From ecf320d14d33d65ef123fa75bf87cbe69335c7df Mon Sep 17 00:00:00 2001 From: Trivalik_cp <42497cfff885d3ca0e6fda54fb6262dd42101bd5sx56jUzf> Date: Fri, 10 Sep 2010 21:40:30 +0000 Subject: [PATCH] output directory in install.bat was always the same, solve this by checking directory on start --- Build/VSIP/install.bat | 18 +++++++++++++----- Setup2/BuildUserKit.bat | 14 +++++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Build/VSIP/install.bat b/Build/VSIP/install.bat index cd9b93c6d..79fff9483 100644 --- a/Build/VSIP/install.bat +++ b/Build/VSIP/install.bat @@ -1,14 +1,22 @@ @echo off +rem click on install.bat and run as admin the path in %CD% is c:\windows\system32 +if "%CD%" == "%SystemRoot%\system32" goto adminClick +goto adminCalledFromACmdShellOrUnprivileged + +:adminClick REM Necessary to set dir when running as admin cd /D %~dp0 -echo Compiling cosmos -set "THE_OUTPUT_PATH=%CD%" -set "ProgFiles=%ProgramFiles% -if not "[%ProgramFiles(x86)%]"=="[]" set "ProgFiles=%ProgramFiles(x86)% +:adminCalledFromACmdShellOrUnprivileged -cd "..\..\source" +echo Compiling cosmos +set THE_OUTPUT_PATH=%CD% +set ProgFiles=%ProgramFiles% +if not "%ProgramFiles(x86)%"=="" set "ProgFiles=%ProgramFiles(x86)% + +cd /D %~dp0 +cd ..\..\source %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild Cosmos.sln /maxcpucount /verbosity:normal /nologo /p:Configuration=Bootstrap /p:Platform=x86 "/p:OutputPath=%THE_OUTPUT_PATH%" rem /t:Rebuild cd ..\Build\VSIP\ diff --git a/Setup2/BuildUserKit.bat b/Setup2/BuildUserKit.bat index e55c73fe9..3c17ea16a 100644 --- a/Setup2/BuildUserKit.bat +++ b/Setup2/BuildUserKit.bat @@ -1,8 +1,15 @@ @echo off +rem click on install.bat and run as admin the path in %CD% is c:\windows\system32 +if "%CD%" == "%SystemRoot%\system32" goto adminClick +goto adminCalledFromACmdShellOrUnprivileged + +:adminClick REM Necessary to set dir when running as admin cd /D %~dp0 +:adminCalledFromACmdShellOrUnprivileged + rem Prob not needed at all anymore, can delete rem echo Killing old stuff - Need to modify not to be user specific rem del /S /Q "C:\Users\Atmoic\AppData\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies\*.*" @@ -10,10 +17,11 @@ rem rmdir /S /Q "C:\Users\Atmoic\AppData\Local\Microsoft\VisualStudio\9.0\Projec rem del /S /Q "C:\Users\Atmoic\AppData\Roaming\Cosmos User Kit\Build\VSIP\*.*" echo Compiling cosmos -cd ..\Build\VSIP set "THE_OUTPUT_PATH=%CD%" -cd "..\..\source" -%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild Cosmos2010.sln /maxcpucount /verbosity:normal /nologo /p:Configuration=Bootstrap /p:Platform=x86 /t:Rebuild "/p:OutputPath=%THE_OUTPUT_PATH%" + +cd /D %~dp0 +cd ..\source +%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild Cosmos.sln /maxcpucount /verbosity:normal /nologo /p:Configuration=Bootstrap /p:Platform=x86 "/p:OutputPath=%THE_OUTPUT_PATH%" rem /t:Rebuild cd ..\Build\VSIP\