forked from ormsolutions/NORMA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SetupEnvironment.bat
executable file
·377 lines (346 loc) · 21.9 KB
/
SetupEnvironment.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
@ECHO OFF
IF "%~1"=="" (SET BuildOutDir=bin\Debug) ELSE (SET BuildOutDir=%~1.)
IF "%VS64bit%"=="1" (
SET ResolvedProgramFiles=%ProgramFiles%
SET ResolvedCommonProgramFiles=%CommonProgramFiles%
SET WOWRegistryAdjust=
) ELSE (
IF "%ProgramFiles(X86)%"=="" (
SET ResolvedProgramFiles=%ProgramFiles%
SET ResolvedCommonProgramFiles=%CommonProgramFiles%
SET WOWRegistryAdjust=
) ELSE (
CALL:SET6432
)
)
FOR /F "usebackq delims= tokens=1" %%i in (`CALL "%~dp0NORMAGitVer.bat" all "%~dps0."`) DO SET NORMAGitVer=%%i
IF NOT DEFINED NORMASigningFile (
IF DEFINED NORMAOfficial (
IF EXIST "%~dp0NORMAOfficial.snk" (
SET NORMASigningFile=NORMAOfficial
) ELSE (
SET NORMASigningFile=NORMAOfficialPublic
)
) ELSE (
SET NORMASigningFile=ORMPackage
)
)
FOR /F "usebackq delims= tokens=1" %%i in (`CALL "%~dp0GetPublicKeyToken.bat" "%~dps0%NORMASigningFile%.snk"`) DO SET NORMAPublicKeyToken=%%i
:: TargetVisualStudioVersion settings:
:: v8.0 = Visual Studio 2005 (Code Name "Whidbey")
:: v9.0 = Visual Studio 2008 (Code Name "Orcas")
:: v10.0 = Visual Studio 2010 (Code Name "Rosario")
:: v11.0 = Visual Studio 2012
:: v12.0 = Visual Studio 2013
:: v14.0 = Visual Studio 2015
:: v15.0 = Visual Studio 2017
:: v16.0 = Visual Studio 2019
:: v17.0 = Visual Studio 2022
IF NOT DEFINED TargetVisualStudioVersion (SET TargetVisualStudioVersion=v8.0)
:: Remove the value "Exp" on the next line if you want installations to be performed
:: against the regular (non-Experimental) Visual Studio registry hive.
IF NOT DEFINED VSRegistryRootSuffix (SET VSRegistryRootSuffix=Exp)
CALL:_SetupVersionVars_%TargetVisualStudioVersion%
IF NOT DEFINED FrameworkDir (CALL:_SetupVsVars)
:: Normally, the next few lines would have parentheses around the command portion. However, it is possible
:: for there to be parentheses in the %ProgramFiles% path (and there are by default on x64), which
:: causes a syntax error. Therefore, we leave the parentheses off here.
IF NOT DEFINED TrunkDir SET TrunkDir=%~dp0.
IF NOT DEFINED VSRegistryRootBase (SET VSRegistryRootBase=SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio)
IF NOT DEFINED VSRegistryRootVersion (SET VSRegistryRootVersion=%TargetVisualStudioMajorMinorVersion%)
IF NOT DEFINED VSRegistryRoot (SET VSRegistryRoot=%VSRegistryRootBase%\%VSRegistryRootVersion%%VSRegistryRootSuffix%)
IF NOT DEFINED VSRegistryConfigRootBase (
IF "%VSRegistryConfigHive%"=="HKCU" (
SET VSRegistryConfigRootBase=SOFTWARE\Microsoft\VisualStudio
) ELSE (
SET VSRegistryConfigRootBase=%VSRegistryRootBase%
)
)
IF NOT DEFINED VSRegistryConfigRoot (SET VSRegistryConfigRoot=%VSRegistryConfigRootBase%\%VSRegistryRootVersion%%VSRegistryRootSuffix%%VSRegistryConfigDecorator%)
IF NOT "%VSSideBySide%"=="true" (
CALL "%TrunkDir%\SetFromRegistry.bat" "VSEnvironmentPath" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\Setup\VS" "EnvironmentPath" "f"
CALL "%TrunkDir%\SetFromRegistry.bat" "VSEnvironmentDir" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\Setup\VS" "EnvironmentDirectory" "f"
CALL "%TrunkDir%\SetFromRegistry.bat" "VSDir" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\Setup\VS" "ProductDir" "f"
CALL "%TrunkDir%\SetFromRegistry.bat" "VSItemTemplatesDir" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\VSTemplate\Item" "UserFolder" "f"
) ELSE (
if NOT EXIST "%~dp0%TargetVisualStudioShortProductName%Installation.bat" (
ECHO %TargetVisualStudioLongProductName% supports side-by-side installations of the
ECHO Visual Studio product. The NORMA build systems needs to know which of these
ECHO installations to target.
ECHO(
ECHO Please create %TargetVisualStudioShortProductName%Installation.bat to set the TargetVisualStudioEdition
ECHO and TargetVisualStudioInstallSuffix environment variables.
ECHO(
ECHO The installed editions of %TargetVisualStudioLongProductName% are:
dir /b "%ResolvedProgramFiles%\Microsoft Visual Studio\%TargetVisualStudioLongProductYear%"
ECHO(
ECHO The installed suffixes are the 8 characters after '%TargetVisualStudioMajorMinorVersion%_' and
ECHO before any recognizable suffix like 'Exp' in:
dir /b /ad "%LocalAppData%\Microsoft\VisualStudio\%TargetVisualStudioMajorMinorVersion%_*"
GOTO:EOF
)
CALL "%TrunkDir%\%TargetVisualStudioShortProductName%Installation"
IF NOT DEFINED TargetVisualStudioEdition (
ECHO The 'TargetVisualStudioEdition' environment variable must be defined.
GOTO:EOF
)
IF NOT DEFINED TargetVisualStudioInstallSuffix (
ECHO The 'TargetVisualStudioInstallSuffix' environment variable must be defined.
GOTO:EOF
)
)
IF "%VSSideBySide%"=="true" (
CALL:SETVAR "VSDir" "%ResolvedProgramFiles%\Microsoft Visual Studio\%TargetVisualStudioLongProductYear%\%TargetVisualStudioEdition%\"
)
IF "%VSSideBySide%"=="true" (
CALL:SETVAR "VSEnvironmentDir" "%VSDir%Common7\IDE\"
IF NOT DEFINED MSBuildExtensionsPath CALL:SETVAR "MSBuildExtensionsPath" "%VSDir%MSBuild"
) ELSE (
IF NOT DEFINED MSBuildExtensionsPath CALL:SETVAR "MSBuildExtensionsPath" "%ResolvedProgramFiles%\MSBuild"
)
IF "%VSSideBySide%"=="true" (
CALL:SETVAR "VSEnvironmentPath" "%VSEnvironmentDir%devenv.exe"
CALL:SETVAR "VSItemTemplatesDir" "%VSEnvironmentDir%ItemTemplates"
CALL:SETVAR "VSIPDir" "%VSDir%VSSDK\"
CALL:SETVAR "VSXmlSchemas" "%VSDIR%Xml\Schemas\"
)
IF NOT DEFINED LocalAppData SET LocalAppData=%UserProfile%\Local Settings\Application Data
IF NOT "%VSIXExtensionDir%"=="" (
IF "%VSSideBySide%"=="true" (
CALL:SETVAR "VSIXInstallDir" "%LocalAppData%\Microsoft\VisualStudio\%TargetVisualStudioMajorMinorVersion%_%TargetVisualStudioInstallSuffix%%VSRegistryRootSuffix%\%VSIXExtensionDir%"
) ELSE (
IF "%VSRegistryRootSuffix%"=="" (
CALL:SETVAR "VSIXInstallDir" "%VSEnvironmentDir%\%VSIXExtensionDir%"
) ELSE (
CALL:SETVAR "VSIXInstallDir" "%LocalAppData%\Microsoft\VisualStudio\%VSRegistryRootVersion%%VSRegistryRootSuffix%\%VSIXExtensionDir%"
)
)
) ELSE (
SET VSIXInstallDir=
)
IF "%VSIXInstallDir%"=="" (
CALL:SETVAR "ItemTemplatesInstallDir" "%VSItemTemplatesDir%"
CALL:SETVAR "DesignerRegistryRoot" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\ORM Solutions\Natural ORM Architect"
) ELSE (
CALL:SETVAR "ItemTemplatesInstallDir" "%VSIXInstallDir%\ItemTemplates"
CALL:SETVAR "DesignerRegistryRoot" "HKLM\Software%WOWRegistryAdjust%\ORM Solutions\Natural ORM Architect for %TargetVisualStudioLongProductName%\Designer"
)
IF ERRORLEVEL 1 %COMSPEC% /c
IF NOT "%VSSideBySide%"=="true" (
CALL "%TrunkDir%\SetFromRegistry.bat" "VSIPDir" "HKLM\%VSRegistryRootBase%\VSIP\%VSRegistryRootVersion%" "InstallDir" "f"
:: Fallback, enable building 8.0 without an 8.0 installation
CALL "%TrunkDir%\SetFromRegistry.bat" "VSIPDir" "HKLM\%VSRegistryRootBase%\VSIP\9.0" "InstallDir" "f"
)
IF NOT DEFINED RegPkg (SET RegPkg="%VSIPDir%\VisualStudioIntegration\Tools\Bin\regpkg.exe" /root:"%VSRegistryRoot%")
IF "%VSSideBySide%"=="true" (
CALL:_SideBySideVars
) ELSE (
CALL:_NotSideBySideVars
)
GOTO:EOF
:_SetupVsVars
:: Set up the build environment.
CALL "%%VS%TargetVisualStudioMajorMinorVersion:.=%COMNTOOLS%%\vsvars32.bat"
GOTO:EOF
:_NotSideBySideVars
IF NOT DEFINED NORMADir SET NORMADir=%ResolvedProgramFiles%\ORM Solutions\ORM Architect for %TargetVisualStudioLongProductName%
IF NOT DEFINED NORMABinDir SET NORMABinDir=%NORMADir%\bin
IF NOT DEFINED OldNORMADir SET OldNORMADir=%ResolvedProgramFiles%\Neumont\ORM Architect for %TargetVisualStudioLongProductName%
IF NOT DEFINED NORMAExtensionsDir SET NORMAExtensionsDir=%NORMADir%\bin\Extensions
IF NOT DEFINED ORMDir SET ORMDir=%ResolvedCommonProgramFiles%\Neumont\ORM
IF NOT DEFINED DILDir SET DILDir=%ResolvedCommonProgramFiles%\Neumont\DIL
IF NOT DEFINED PLiXDir SET PLiXDir=%ResolvedCommonProgramFiles%\Neumont\PLiX
IF NOT DEFINED ORMTransformsDir SET ORMTransformsDir=%ORMDir%\Transforms
IF NOT DEFINED DILTransformsDir SET DILTransformsDir=%DILDir%\Transforms
GOTO:EOF
:_SideBySideVars
IF NOT DEFINED NORMADir SET NORMADir=%VSIXInstallDir%
IF NOT DEFINED NORMABinDir SET NORMABinDir=%NORMADir%
IF NOT DEFINED OldNORMADir SET OldNORMADir=%ResolvedProgramFiles%\Neumont\ORM Architect for %TargetVisualStudioLongProductName%
IF NOT DEFINED NORMAExtensionsDir SET NORMAExtensionsDir=%NORMADir%\Extensions
IF NOT DEFINED NORMADesignerSchemasDir SET NORMADesignerSchemasDir=%VSXmlSchemas%ORM Solutions\NORMA\Designer
IF NOT DEFINED NORMAGeneratorSchemasDir SET NORMAGeneratorSchemasDir=%VSXmlSchemas%ORM Solutions\NORMA\Generators
IF NOT DEFINED ORMTransformsDir SET ORMTransformsDir=%VSIXInstallDir%\Xml\Generators\ORM\Transforms
IF NOT DEFINED DILTransformsDir SET DILTransformsDir=%VSIXInstallDir%\Xml\Generators\DIL\Transforms
::PLiXDir not used in SideBySide
GOTO:EOF
:_SetupVersionVars_v8.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v2.0)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=8.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=8.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=2.0.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2005)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=05)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2005)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2005)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=8.2.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=2.0)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=2.0.0.0)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKLM)
GOTO:EOF
:_SetupVersionVars_v9.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v3.5)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=9.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=9.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=3.5.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2008)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=08)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2008)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2008)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=9.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=3.5)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.v3.5)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=3.5.0.0)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKLM)
GOTO:EOF
:_SetupVersionVars_v10.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.0)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=10.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=10.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.0.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2010)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=10)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2010)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2010)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=10.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=4.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.v4.0)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=4.0.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\1.0)
GOTO:EOF
:_SetupVersionVars_v11.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.5)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=11.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=11.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.5.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2012)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=12)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2012)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2012)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=11.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=4.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.v4.0)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=4.0.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\1.0)
GOTO:EOF
:_SetupVersionVars_v12.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.5)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=12.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=12.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.5.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2013)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=13)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2013)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2013)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=12.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=12.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.v12.0)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=12.0.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\1.0)
GOTO:EOF
:_SetupVersionVars_v14.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.6)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=14.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=14.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.6.0.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2015)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=15)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2015)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2015)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=14.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=14.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.Core)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=14.0.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\1.0)
GOTO:EOF
:_SetupVersionVars_v15.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.6.1)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=15.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=15.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.6.2.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2017)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=17)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2017)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2017)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=15.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=15.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.Core)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=15.1.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF "%VSIXPerUser%"=="1" (
IF NOT DEFINED VSIXExtensionDir (CALL:SETVAR "VSIXExtensionDir" "Extensions\ORM Solutions\Natural ORM Architect (Per User)\%NORMAGitVer%")
) ELSE (
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\%NORMAGitVer%)
)
IF NOT DEFINED VSSideBySide (SET VSSideBySide=true)
GOTO:EOF
:_SetupVersionVars_v16.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.7.2)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=16.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=16.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.7.2.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2019)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=19)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2019)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2019)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=16.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=15.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.Core)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=15.1.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF "%VSIXPerUser%"=="1" (
IF NOT DEFINED VSIXExtensionDir (CALL:SETVAR "VSIXExtensionDir" "Extensions\ORM Solutions\Natural ORM Architect (Per User)\%NORMAGitVer%")
) ELSE (
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\%NORMAGitVer%)
)
IF NOT DEFINED VSSideBySide (SET VSSideBySide=true)
GOTO:EOF
:_SetupVersionVars_v17.0
IF NOT DEFINED TargetFrameworkVersion (SET TargetFrameworkVersion=v4.7.2)
IF NOT DEFINED TargetVisualStudioMajorMinorVersion (SET TargetVisualStudioMajorMinorVersion=17.0)
IF NOT DEFINED TargetVisualStudioAssemblyVersion (SET TargetVisualStudioAssemblyVersion=17.0.0.0)
IF NOT DEFINED TargetVisualStudioFrameworkAssemblyVersion (SET TargetVisualStudioFrameworkAssemblyVersion=4.7.2.0)
IF NOT DEFINED TargetVisualStudioLongProductYear (SET TargetVisualStudioLongProductYear=2022)
IF NOT DEFINED TargetVisualStudioShortProductYear (SET TargetVisualStudioShortProductYear=22)
IF NOT DEFINED TargetVisualStudioShortProductName (SET TargetVisualStudioShortProductName=VS2022)
IF NOT DEFINED TargetVisualStudioLongProductName (SET TargetVisualStudioLongProductName=Visual Studio 2022)
IF NOT DEFINED TargetDslToolsAssemblyVersion (SET TargetDslToolsAssemblyVersion=17.0.0.0)
IF NOT DEFINED ProjectToolsVersion (SET ProjectToolsVersion=15.0)
IF NOT DEFINED ProjectToolsAssemblySuffix (SET ProjectToolsAssemblySuffix=.Core)
IF NOT DEFINED ProjectToolsAssemblyVersion (SET ProjectToolsAssemblyVersion=15.1.0.0)
IF NOT DEFINED VSRegistryConfigDecorator (SET VSRegistryConfigDecorator=_Config)
IF NOT DEFINED VSRegistryConfigHive (SET VSRegistryConfigHive=HKCU)
IF "%VSIXPerUser%"=="1" (
IF NOT DEFINED VSIXExtensionDir (CALL:SETVAR "VSIXExtensionDir" "Extensions\ORM Solutions\Natural ORM Architect (Per User)\%NORMAGitVer%")
) ELSE (
IF NOT DEFINED VSIXExtensionDir (SET VSIXExtensionDir=Extensions\ORM Solutions\Natural ORM Architect\%NORMAGitVer%)
)
IF NOT DEFINED VSSideBySide (SET VSSideBySide=true)
GOTO:EOF
:SET6432
::Do this somewhere the resolved parens will not cause problems.
SET ResolvedProgramFiles=%ProgramFiles(x86)%
SET ResolvedCommonProgramFiles=%CommonProgramFiles(x86)%
::If this batch file is already running under a 32 bit process, then the
::reg utility will choose the appropriate registry keys without our help.
::This also means that this file should not be called to pre-set environment
::variables before invoking 32-bit processes that use these variables.
IF DEFINED PROCESSOR_ARCHITEW6432 (
SET WOWRegistryAdjust=
) ELSE (
SET WOWRegistryAdjust=\Wow6432Node
)
GOTO:EOF
:SETVAR
SET %~1=%~2
GOTO:EOF