aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/runprebuild.bat
diff options
context:
space:
mode:
authorjustincc2013-11-13 00:00:55 +0000
committerjustincc2013-11-13 00:00:55 +0000
commit0f16612400ed959146362810fb21d32656c9b844 (patch)
treeee4d0dfa79431778cc46122cc97385c144c7a1f6 /runprebuild.bat
parentAdd initial test for checking that specifying a parameter in LSL state_entry(... (diff)
downloadopensim-SC_OLD-0f16612400ed959146362810fb21d32656c9b844.zip
opensim-SC_OLD-0f16612400ed959146362810fb21d32656c9b844.tar.gz
opensim-SC_OLD-0f16612400ed959146362810fb21d32656c9b844.tar.bz2
opensim-SC_OLD-0f16612400ed959146362810fb21d32656c9b844.tar.xz
Fix runprebuild.bat on Windows 7 systems and later
MS changed Windows 7 "reg query" command to spit out fewer lines in its preamble Annoyingly there is no option to print raw values and not this preamble. So now using the Windows find command. But this has the side effect of stopping this working with Cygwin as it uses its own GNU find command. Might fix in the future but not simple since Windows find itself is in different locations
Diffstat (limited to '')
-rwxr-xr-xrunprebuild.bat12
1 files changed, 9 insertions, 3 deletions
diff --git a/runprebuild.bat b/runprebuild.bat
index 0fd7bbf..5f75982 100755
--- a/runprebuild.bat
+++ b/runprebuild.bat
@@ -7,18 +7,24 @@ setlocal ENABLEEXTENSIONS
7set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" 7set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
8set VALUE_NAME=MSBuildToolsPath 8set VALUE_NAME=MSBuildToolsPath
9 9
10FOR /F "usebackq skip=4 tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( 10rem We have to use find here as req query spits out 4 lines before Windows 7
11rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin
12rem as it uses its own find command. This could be fixed but it could be
13rem complex to find the location of find on all windows systems
14FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO (
11 set ValueName=%%A 15 set ValueName=%%A
12 set ValueType=%%B 16 set ValueType=%%B
13 set ValueValue=%%C 17 set ValueValue=%%C
14) 18)
15 19
16if defined ValueName ( 20if defined ValueName (
21 @echo Found msbuild path registry entry
17 @echo Value Name = %ValueName% 22 @echo Value Name = %ValueName%
18 @echo Value Type = %ValueType% 23 @echo Value Type = %ValueType%
19 @echo Value Value = %ValueValue% 24 @echo Value Value = %ValueValue%
25 @echo Creating compile.bat
26 @echo %ValueValue%\msbuild opensim.sln > compile.bat
20) else ( 27) else (
21 @echo %KEY_NAME%\%VALUE_NAME% not found. 28 @echo %KEY_NAME%\%VALUE_NAME% not found.
29 @echo Not creating compile.bat
22) 30)
23
24@echo %ValueValue%\msbuild opensim.sln > compile.bat