From: <mcu...@us...> - 2012-10-04 01:17:01
|
Revision: 1492 http://orm.svn.sourceforge.net/orm/?rev=1492&view=rev Author: mcurland Date: 2012-10-04 01:16:54 +0000 (Thu, 04 Oct 2012) Log Message: ----------- Finished enabling project build on 64-bit platforms * Use HKCU\Software keys without Wow6432Node redirect * Redirect HKLM\Software keys to Wow6432Node only when running in 64-bit script, not when invoked by 32-bit project Build * Do not make preliminary calls to SetupEnvironment.bat before invoking build system, call only as needed * Register VS2010 extension as an installed add-in so it is not initially disabled Modified Paths: -------------- trunk/Build.bat trunk/BuildAll.bat trunk/BuildDevTools.bat trunk/BuildHelp.bat trunk/BuildTests.bat trunk/CodeSmith/DILSchemaProvider/Install.bat trunk/FirstTimeBuild.bat trunk/FirstTimeBuildAll.bat trunk/FirstTimeBuildAllVS2008.bat trunk/FirstTimeBuildVS2008.bat trunk/FirstTimeBuildVS2010.bat trunk/ORM2CommandLineTest/install.bat trunk/SetupEnvironment.bat trunk/TestSuites/RegressionTests/TestHost.bat trunk/TestSuites/RegressionTests/VSEnvironmentSnapshot.bat trunk/Tools/DisableRuleDirectiveProcessor/Install.bat trunk/Tools/NUBuildVS/Install.bat trunk/install.bat Modified: trunk/Build.bat =================================================================== --- trunk/Build.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/Build.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,8 +1,12 @@ @ECHO OFF SETLOCAL -SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* +::Do not call SetupEnvironment.bat. For 64-bit systems, the environment +::variables differ depending on whether the installation batch files are +::launched directly from the command line or indirectly by the 32-bit +::build process. Therefore, any environment variables designed for registry +::use that include Wow6432Node will be correct here, but incorrect when they +::are used by the batch scripts invoked during build. -MSBuild.exe /nologo "%RootDir%\Main.proj" %* +MSBuild.exe /nologo "%~dp0Main.proj" %* GOTO:EOF Modified: trunk/BuildAll.bat =================================================================== --- trunk/BuildAll.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/BuildAll.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,7 +1,6 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* CALL "%RootDir%\BuildSetup.bat" %* CALL "%RootDir%\BuildTests.bat" %* Modified: trunk/BuildDevTools.bat =================================================================== --- trunk/BuildDevTools.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/BuildDevTools.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,7 +1,6 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* :: NUBuild and NUBuildVS need to be built separately, before any other projects, since all of the later projects depend on them. MSBuild.exe /nologo "%RootDir%\Tools\NUBuild\NUBuild.sln" %* Modified: trunk/BuildHelp.bat =================================================================== --- trunk/BuildHelp.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/BuildHelp.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,9 +1,9 @@ -@ECHO OFF +@ECHO ON SETLOCAL SET RootDir=%~dp0. CALL "%RootDir%\SetupEnvironment.bat" %* -CALL "%TrunkDir%\SetFromRegistry.bat" "HSLiteInstallDir" "HKLM\SOFTWARE%WOWRegistryRoot%\Innovasys\HelpStudio2" "LiteInstallDir" "f" +CALL "%TrunkDir%\SetFromRegistry.bat" "HSLiteInstallDir" "HKLM\SOFTWARE%WOWRegistryAdjust%\Innovasys\HelpStudio2" "LiteInstallDir" "f" ECHO Building help project. This may take several minutes... PUSHD "%TrunkDir%\Documentation\Help Project" Modified: trunk/BuildTests.bat =================================================================== --- trunk/BuildTests.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/BuildTests.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,7 +1,6 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* MSBuild.exe /nologo "%RootDir%\Tests.proj" %* Modified: trunk/CodeSmith/DILSchemaProvider/Install.bat =================================================================== --- trunk/CodeSmith/DILSchemaProvider/Install.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/CodeSmith/DILSchemaProvider/Install.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -6,7 +6,11 @@ IF "%ProgramFiles(X86)%"=="" ( SET WOWRegistryAdjust= ) ELSE ( - SET WOWRegistryAdjust=\Wow6432Node + IF DEFINED PROCESSOR_ARCHITEW6432 ( + SET WOWRegistryAdjust= + ) ELSE ( + SET WOWRegistryAdjust=\Wow6432Node + ) ) FOR /F "usebackq skip=2 tokens=2*" %%A IN (`REG QUERY "HKLM\SOFTWARE%WOWRegistryAdjust%\CodeSmith\v3.2" /v "ApplicationDirectory"`) DO SET CodeSmithDir=%%~fB Modified: trunk/FirstTimeBuild.bat =================================================================== --- trunk/FirstTimeBuild.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/FirstTimeBuild.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,11 +1,11 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* CALL "%RootDir%\BuildDevTools.bat" %* CALL "%RootDir%\Build.bat" %* +CALL "%RootDir%\SetupEnvironment.bat" %* ECHO. ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... "%VSEnvironmentPath%" /RootSuffix "%VSRegistryRootSuffix%" /Setup Modified: trunk/FirstTimeBuildAll.bat =================================================================== --- trunk/FirstTimeBuildAll.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/FirstTimeBuildAll.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,11 +1,11 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* CALL "%RootDir%\BuildDevTools.bat" %* CALL "%RootDir%\BuildAll.bat" %* +CALL "%RootDir%\SetupEnvironment.bat" %* ECHO. ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... "%VSEnvironmentPath%" /RootSuffix "%VSRegistryRootSuffix%" /Setup Modified: trunk/FirstTimeBuildAllVS2008.bat =================================================================== --- trunk/FirstTimeBuildAllVS2008.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/FirstTimeBuildAllVS2008.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -2,28 +2,33 @@ SETLOCAL SET RootDir=%~dp0. +SETLOCAL IF "%ProgramFiles(X86)%"=="" ( SET WOWRegistryAdjust= ) ELSE ( - SET WOWRegistryAdjust=\Wow6432Node + IF DEFINED PROCESSOR_ARCHITEW6432 ( + SET WOWRegistryAdjust= + ) ELSE ( + SET WOWRegistryAdjust=\Wow6432Node + ) ) +REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 +IF ERRORLEVEL 1 (CALL:_SetupExpHive) +REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 +IF ERRORLEVEL 1 (ECHO Could not find experimental registry hive for Visual Studio 2008. Aborting... && GOTO:EOF) +ENDLOCAL + IF "%TargetVisualStudioVersion%"=="v8.0" ( SET DegradeToolsVersion=/toolsversion:2.0 ) ELSE ( SET TargetVisualStudioVersion=v9.0 ) -REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 -IF ERRORLEVEL 1 (CALL:_SetupExpHive) -REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 -IF ERRORLEVEL 1 (ECHO Could not find experimental registry hive for Visual Studio 2008. Aborting... && GOTO:EOF) - -CALL "%RootDir%\SetupEnvironment.bat" %* - CALL "%RootDir%\BuildDevTools.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% CALL "%RootDir%\BuildAll.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% +CALL "%RootDir%\SetupEnvironment.bat" %* ECHO. ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... "%VSEnvironmentPath%" /RootSuffix "%VSRegistryRootSuffix%" /Setup @@ -35,14 +40,14 @@ IF "%VSIPDir%"=="" (ECHO Please install the Microsoft Visual Studio 2008 SDK. See README.txt. && PAUSE && EXIT) ECHO Setting up machine-level experimental registry hive for Visual Studio 2008... This may take a few minutes... "%VSIPDir%\VisualStudioIntegration\Tools\Bin\VSRegEx.exe" GetOrig 9.0 Exp -REG QUERY "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" /v ApplicationID 1>NUL 2>&1 +REG QUERY "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" /v ApplicationID 1>NUL 2>&1 IF NOT ERRORLEVEL 1 (CALL:_BackupUserConfiguration) GOTO:EOF :_BackupUserConfiguration ECHO Backing up user-level experimental registry hive for Visual Studio 2008... This may take a minute... REG DELETE "HCKU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /f 1>NUL 2>&1 -REG ADD "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" 1>NUL 2>&1 -REG COPY "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /s /f -REG DELETE "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" /f 1>NUL 2>&1 +REG ADD "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" 1>NUL 2>&1 +REG COPY "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /s /f +REG DELETE "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" /f 1>NUL 2>&1 GOTO:EOF Modified: trunk/FirstTimeBuildVS2008.bat =================================================================== --- trunk/FirstTimeBuildVS2008.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/FirstTimeBuildVS2008.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -2,12 +2,23 @@ SETLOCAL SET RootDir=%~dp0. +SETLOCAL IF "%ProgramFiles(X86)%"=="" ( SET WOWRegistryAdjust= ) ELSE ( - SET WOWRegistryAdjust=\Wow6432Node + IF DEFINED PROCESSOR_ARCHITEW6432 ( + SET WOWRegistryAdjust= + ) ELSE ( + SET WOWRegistryAdjust=\Wow6432Node + ) ) +REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 +IF ERRORLEVEL 1 (CALL:_SetupExpHive) +REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 +IF ERRORLEVEL 1 (ECHO Could not find experimental registry hive for Visual Studio 2008. Aborting... && GOTO:EOF) +ENDLOCAL + IF "%TargetVisualStudioVersion%"=="v8.0" ( SET DegradeToolsVersion=/toolsversion:2.0 ) ELSE ( @@ -15,16 +26,10 @@ SET DegradeToolsVersion=/toolsversion:3.5 ) -REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 -IF ERRORLEVEL 1 (CALL:_SetupExpHive) -REG QUERY "HKLM\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp" /v ApplicationID 1>NUL 2>&1 -IF ERRORLEVEL 1 (ECHO Could not find experimental registry hive for Visual Studio 2008. Aborting... && GOTO:EOF) - -CALL "%RootDir%\SetupEnvironment.bat" %* - CALL "%RootDir%\BuildDevTools.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% CALL "%RootDir%\Build.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% +CALL "%RootDir%\SetupEnvironment.bat" %* ECHO. ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... "%VSEnvironmentPath%" /RootSuffix "%VSRegistryRootSuffix%" /Setup @@ -36,14 +41,14 @@ IF "%VSIPDir%"=="" (ECHO Please install the Microsoft Visual Studio 2008 SDK. See README.txt. && PAUSE && EXIT) ECHO Setting up machine-level experimental registry hive for Visual Studio 2008... This may take a few minutes... "%VSIPDir%\VisualStudioIntegration\Tools\Bin\VSRegEx.exe" GetOrig 9.0 Exp -REG QUERY "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" /v ApplicationID 1>NUL 2>&1 +REG QUERY "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" /v ApplicationID 1>NUL 2>&1 IF NOT ERRORLEVEL 1 (CALL:_BackupUserConfiguration) GOTO:EOF :_BackupUserConfiguration ECHO Backing up user-level experimental registry hive for Visual Studio 2008... This may take a minute... REG DELETE "HCKU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /f 1>NUL 2>&1 -REG ADD "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" 1>NUL 2>&1 -REG COPY "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /s /f -REG DELETE "HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\9.0Exp\Configuration" /f 1>NUL 2>&1 +REG ADD "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" 1>NUL 2>&1 +REG COPY "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration_Backup" /s /f +REG DELETE "HKCU\Software\Microsoft\VisualStudio\9.0Exp\Configuration" /f 1>NUL 2>&1 GOTO:EOF Modified: trunk/FirstTimeBuildVS2010.bat =================================================================== --- trunk/FirstTimeBuildVS2010.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/FirstTimeBuildVS2010.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -1,7 +1,6 @@ @ECHO OFF SETLOCAL SET RootDir=%~dp0. -CALL "%RootDir%\SetupEnvironment.bat" %* IF "%TargetVisualStudioVersion%"=="v8.0" ( SET DegradeToolsVersion=/toolsversion:2.0 @@ -11,7 +10,7 @@ SET TargetVisualStudioVersion=v10.0 ) -CALL "%RootDir%\BuildDevTools.bat" %* -CALL "%RootDir%\Build.bat" %* +CALL "%RootDir%\BuildDevTools.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% +CALL "%RootDir%\Build.bat" %* /consoleloggerparameters:DisableMPLogging %DegradeToolsVersion% GOTO:EOF Modified: trunk/ORM2CommandLineTest/install.bat =================================================================== --- trunk/ORM2CommandLineTest/install.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/ORM2CommandLineTest/install.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -83,5 +83,9 @@ :SET6432 ::Do this somewhere the resolved parens will not cause problems. SET ResolvedProgramFiles=%ProgramFiles(X86)% -SET WOWRegistryAdjust=\Wow6432Node +IF DEFINED PROCESSOR_ARCHITEW6432 ( + SET WOWRegistryAdjust= +) ELSE ( + SET WOWRegistryAdjust=\Wow6432Node +) GOTO:EOF Modified: trunk/SetupEnvironment.bat =================================================================== --- trunk/SetupEnvironment.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/SetupEnvironment.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -41,7 +41,14 @@ 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 VSRegistryConfigRoot (SET VSRegistryConfigRoot=%VSRegistryRootBase%\%VSRegistryRootVersion%%VSRegistryRootSuffix%%VSRegistryConfigDecorator%) +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%) CALL "%TrunkDir%\SetFromRegistry.bat" "VSEnvironmentPath" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\Setup\VS" "EnvironmentPath" "f" CALL "%TrunkDir%\SetFromRegistry.bat" "VSEnvironmentDir" "%VSRegistryConfigHive%\%VSRegistryConfigRoot%\Setup\VS" "EnvironmentDirectory" "f" @@ -50,9 +57,9 @@ IF NOT DEFINED LocalAppData SET LocalAppData=%UserProfile%\Local Settings\Application Data IF NOT "%VSIXExtensionDir%"=="" ( IF "%VSRegistryRootSuffix%"=="" ( - SET VSIXInstallDir=%VSEnvironmentDir%\%VSIXExtensionDir% + CALL:SETVAR "VSIXInstallDir" "%VSEnvironmentDir%\%VSIXExtensionDir%" ) ELSE ( - SET VSIXInstallDir=%LocalAppData%\Microsoft\VisualStudio\%VSRegistryRootVersion%%VSRegistryRootSuffix%\%VSIXExtensionDir% + CALL:SETVAR "VSIXInstallDir" "%LocalAppData%\Microsoft\VisualStudio\%VSRegistryRootVersion%%VSRegistryRootSuffix%\%VSIXExtensionDir%" ) ) ELSE ( SET VSIXInstallDir= @@ -126,7 +133,15 @@ ::Do this somewhere the resolved parens will not cause problems. SET ResolvedProgramFiles=%ProgramFiles(x86)% SET ResolvedCommonProgramFiles=%CommonProgramFiles(x86)% -SET WOWRegistryAdjust=\Wow6432Node +::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 Modified: trunk/TestSuites/RegressionTests/TestHost.bat =================================================================== --- trunk/TestSuites/RegressionTests/TestHost.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/TestSuites/RegressionTests/TestHost.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -27,14 +27,18 @@ IF "%ProgramFiles(X86)%"=="" ( SET WOWRegistryAdjust= ) ELSE ( - SET WOWRegistryAdjust=\Wow6432Node + IF DEFINED PROCESSOR_ARCHITEW6432 ( + SET WOWRegistryAdjust= + ) ELSE ( + SET WOWRegistryAdjust=\Wow6432Node + ) ) REM Get the Visual Studio environment install location FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKLM\SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%" /v "InstallDir"`) DO call set LaunchDevenv=%%~dpsBdevenv REM Clear the current add-in file, it may not load -FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B +FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B if not exist "%VSFileLocation%\Addins" (md "%VSFileLocation%\Addins") del /F "%VSFileLocation%\Addins\%TestAddin%.Addin" 1>NUL 2>&1 @@ -48,22 +52,22 @@ call:RestoreDir %UserSettingsDir%" "Backup" goto:eof ) -reg save HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0CurrentUserSettings.hiv" 1>NUL +reg save HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0CurrentUserSettings.hiv" 1>NUL REM Establish the test environment xcopy /y /q /e /d "%~dp0%CachedSettings%" "%UserSettingsDir%\" 1>NUL -reg delete HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% /f 1>NUL 2>&1 -reg add HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% 1>NUL -reg restore HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0%CachedSettings%.hiv" 1>NUL +reg delete HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% /f 1>NUL 2>&1 +reg add HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% 1>NUL +reg restore HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0%CachedSettings%.hiv" 1>NUL del /f "%~dp0%CachedSettings%.copy.vssettings" 1>NUL 2>&1 copy /y "%~dp0%CachedSettings%.vssettings" "%~dp0%CachedSettings%.copy.vssettings" 1>NUL -reg add HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%\Profile /v AutoSaveFile /t REG_SZ /f /d "%~dp0%CachedSettings%.copy.vssettings" 1>NUL +reg add HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix%\Profile /v AutoSaveFile /t REG_SZ /f /d "%~dp0%CachedSettings%.copy.vssettings" 1>NUL REM Run VS once to make sure all directories are in line start /wait /min %LaunchDevenv%.exe /Command File.Exit /RootSuffix %RootSuffix% REM Install the add-in file so VS knows its there -FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B +FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B SET InstallAddin="%VSFileLocation%\Addins\%TestAddin%.AddIn" type "%~dp0%TestAddin%\%TestAddin%.AddIn.start" > %InstallAddin% echo %~dp0%TestAddin%\bin\%TestAddin%.dll >> %InstallAddin% @@ -82,9 +86,9 @@ REM type "%TestLog%" REM Restore registry settings, application data, and .vssettings files -reg delete HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% /f 1>NUL 2>&1 -reg add HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% 1>NUL -reg restore HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0CurrentUserSettings.hiv" 1>NUL +reg delete HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% /f 1>NUL 2>&1 +reg add HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% 1>NUL +reg restore HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0CurrentUserSettings.hiv" 1>NUL del /f "%~dp0CurrentUserSettings.hiv" del /f "%~dp0%CachedSettings%.copy.vssettings" 1>NUL 2>&1 call:RestoreDir "%UserSettingsDir%" "Backup" Modified: trunk/TestSuites/RegressionTests/VSEnvironmentSnapshot.bat =================================================================== --- trunk/TestSuites/RegressionTests/VSEnvironmentSnapshot.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/TestSuites/RegressionTests/VSEnvironmentSnapshot.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -7,15 +7,9 @@ if exist "%~dp0%BaseName%.vssettings" del /f "%~dp0%BaseName%.vssettings" if exist "%~dp0%BaseName%" rd /s /q "%~dp0%BaseName%" -IF "%ProgramFiles(X86)%"=="" ( - SET WOWRegistryAdjust= -) ELSE ( - SET WOWRegistryAdjust=\Wow6432Node -) - -FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B -reg save HKCU\Software%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0%BaseName%.hiv" 1>NUL -FOR /F "usebackq eol=! tokens=2* delims=%%" %%A IN (`REG QUERY "HKCU\SOFTWARE%WOWRegistryAdjust%\Microsoft\VisualStudio\8.0%RootSuffix%\Profile" /v "AutoSaveFile"`) DO ( +FOR /F "usebackq eol=! tokens=2*" %%A IN (`REG QUERY "HKCU\SOFTWARE\Microsoft\VisualStudio\8.0%RootSuffix%" /v "VisualStudioLocation"`) DO call set VSFileLocation=%%B +reg save HKCU\Software\Microsoft\VisualStudio\8.0%RootSuffix% "%~dp0%BaseName%.hiv" 1>NUL +FOR /F "usebackq eol=! tokens=2* delims=%%" %%A IN (`REG QUERY "HKCU\SOFTWARE\Microsoft\VisualStudio\8.0%RootSuffix%\Profile" /v "AutoSaveFile"`) DO ( copy /y "%VSFileLocation%%%B" "%~dp0%BaseName%.vssettings" 1>NUL ) xcopy /y /q /e /d "%AppData%\Microsoft\VisualStudio\8.0%RootSuffix%" "%~dp0%BaseName%\" 1>NUL Modified: trunk/Tools/DisableRuleDirectiveProcessor/Install.bat =================================================================== --- trunk/Tools/DisableRuleDirectiveProcessor/Install.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/Tools/DisableRuleDirectiveProcessor/Install.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -15,7 +15,7 @@ GOTO:EOF :_AddTextTemplateReg -REG ADD "%~1\%VSRegistryRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /ve /d "A directive processor that disables Rules." -REG ADD "%~1\%VSRegistryRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /v "Class" /d "Neumont.Tools.Modeling.%~3" -REG ADD "%~1\%VSRegistryRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /v "Assembly" /d "Neumont.Tools.Modeling.DisableRuleDirectiveProcessor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=957d5b7d5e79e25f" +REG ADD "%~1\%VSRegistryConfigRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /ve /d "A directive processor that disables Rules." +REG ADD "%~1\%VSRegistryConfigRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /v "Class" /d "Neumont.Tools.Modeling.%~3" +REG ADD "%~1\%VSRegistryConfigRootBase%\%~2\TextTemplating\DirectiveProcessors\%~3" /f /v "Assembly" /d "Neumont.Tools.Modeling.DisableRuleDirectiveProcessor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=957d5b7d5e79e25f" GOTO:EOF Modified: trunk/Tools/NUBuildVS/Install.bat =================================================================== --- trunk/Tools/NUBuildVS/Install.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/Tools/NUBuildVS/Install.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -7,9 +7,9 @@ :: for there to be parentheses in the %VSIPDir% path (and there are by default on x64), which :: causes a syntax error. Therefore, we leave the parentheses off here. IF /I "%TargetVisualStudioVersion%"=="v8.0" ( - IF EXIST "%VSIPDir%\Prerelease\VSCT" SET VsSDKVsctDir=%VSIPDir%\Prerelease\VSCT + IF EXIST "%VSIPDir%\Prerelease\VSCT" CALL:SETVAR "VsSDKVsctDir" "%VSIPDir%\Prerelease\VSCT" ) -IF NOT DEFINED VsSDKVsctDir SET VsSDKVsctDir=%VSIPDir%\VisualStudioIntegration\Tools\Bin +IF NOT DEFINED VsSDKVsctDir CALL:SETVAR "VsSDKVsctDir" "%VSIPDir%\VisualStudioIntegration\Tools\Bin" :: GAC the VSCT compiler so that we can use it. gacutil.exe /nologo /f /i "%VsSDKVsctDir%\VSCTCompress.dll" @@ -38,3 +38,7 @@ IF ERRORLEVEL 1 %COMSPEC% /c GOTO:EOF + +:SETVAR +SET %~1=%~2 +GOTO:EOF Modified: trunk/install.bat =================================================================== --- trunk/install.bat 2012-09-10 23:19:43 UTC (rev 1491) +++ trunk/install.bat 2012-10-04 01:16:54 UTC (rev 1492) @@ -2,7 +2,11 @@ SETLOCAL SET RootDir=%~dp0. IF NOT "%~2"=="" (SET TargetVisualStudioVersion=%~2) -CALL "%RootDir%\SetupEnvironment.bat" %* +CALL "%RootDir%\SetupEnvironment.bat" +IF NOT EXIST "%RootDir%\Version.bat" ( + CALL:_GenerateVersion +) +CALL "%RootDir%\Version.bat" %* IF "%VSIXInstallDir%"=="" ( IF EXIST "%OldNORMADir%\bin\Neumont.Tools.ORM.dll" (%RegPkg% /unregister "%NORMADir%\bin\Neumont.Tools.ORM.dll") @@ -150,6 +154,7 @@ XCOPY /Y /D /V /Q "%RootDir%\VSIXInstall\%TargetVisualStudioShortProductName%\ORMDesigner.pkgdef" "%VSIXInstallDir%\" XCOPY /Y /D /V /Q "%RootDir%\VSIXInstall\ORMDesignerIcon.png" "%VSIXInstallDir%\" XCOPY /Y /D /V /Q "%RootDir%\VSIXInstall\ORMDesignerPreview.png" "%VSIXInstallDir%\" + REG ADD "%VSRegistryConfigHive%\%VSRegistryConfigRootBase%\%VSRegistryRootVersion%%VSRegistryRootSuffix%\ExtensionManager\EnabledExtensions" /v "efddc549-1646-4451-8a51-e5a5e94d647c,%ProductMajorVersion%.%ProductMinorVersion%" /d "%VSIXInstallDir%\\" /f 1>NUL ) REG ADD "%DesignerRegistryRoot%\DesignerSettings\Core" /v "SettingsFile" /d "%NORMADir%\Xml\ORMDesignerSettings.xml" /f 1>NUL @@ -163,7 +168,7 @@ REG ADD "HKCR\ormfile" /ve /d "Object-Role Modeling File" /f 1>NUL REG ADD "HKCR\ormfile\DefaultIcon" /ve /d "%NORMADir%\bin\%TargetBaseName%.dll,0" /f 1>NUL REG ADD "HKCR\ormfile\shell\open" /ve /d "&Open" /f 1>NUL - REG ADD "HKCR\ormfile\shell\open\command" /ve /d "\"%VSEnvironmentPath%\" /RootSuffix \"%VSRegistryRootSuffix%\" /dde" /f 1>NUL + CALL:_SetShellCommand REG ADD "HKCR\ormfile\shell\open\ddeexec" /ve /d "Open(\"%%1\")" /f 1>NUL REG ADD "HKCR\ormfile\shell\open\ddeexec\application" /ve /d "VisualStudio.%TargetVisualStudioMajorMinorVersion%" /f 1>NUL REG ADD "HKCR\ormfile\shell\open\ddeexec\topic" /ve /d "system" /f 1>NUL @@ -174,6 +179,10 @@ GOTO:EOF +:_SetShellCommand +::Hack to handle parentheses in environment path +REG ADD "HKCR\ormfile\shell\open\command" /ve /d "\"%VSEnvironmentPath%\" /RootSuffix \"%VSRegistryRootSuffix%\" /dde" /f 1>NUL +GOTO:EOF :_MakeDir IF NOT EXIST "%~1" (MKDIR "%~1") @@ -195,3 +204,7 @@ :_CleanupFile IF EXIST "%~1" (DEL /F /Q "%~1") GOTO:EOF + +:_GenerateVersion +"%RootDir%\VersionGenerator.exe" +GOTO:EOF \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |