aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/runprebuild.bat
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Prebuild/runprebuild.bat127
1 files changed, 127 insertions, 0 deletions
diff --git a/Prebuild/runprebuild.bat b/Prebuild/runprebuild.bat
new file mode 100644
index 0000000..5cdef31
--- /dev/null
+++ b/Prebuild/runprebuild.bat
@@ -0,0 +1,127 @@
1
2
3rem Prebuild.exe /target VS2010
4
5@ECHO OFF
6
7echo ==========================================
8echo ==== WhiteCore Prebuild Configuration ====
9echo ==========================================
10echo.
11echo If you wish to customize the configuration, re-run with the switch '-p'
12echo e.g. runprebuild -p
13echo.
14
15rem ## Default "configuration" choice ((r)elease, (d)ebug)
16set configuration=d
17
18rem ## Default Visual Studio edition
19set vstudio=2010
20
21rem ## Default Framework
22set framework=4_0
23
24rem ## Default architecture (86 (for 32bit), 64)
25:CheckArch
26set bits=AnyCPU
27rem if exist "%PROGRAMFILES(X86)%" (set bits=x64)
28rem if %bits% == x64 (
29rem echo Found 64bit architecture
30rem )
31rem if %bits% == x86 (
32rem echo Found 32 bit architecture
33rem )
34
35rem ## Determine native framework
36:CheckOS
37set framework=4_5
38for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
39if %version% == 10.0 (
40 set framework=4_5
41 echo Windows 10
42)
43if %version% == 6.3 (
44 set framework=4_5
45 echo Windows 8.1 or Server 2012 R2
46)
47if %version% == 6.2 (
48 set framework=4_5
49 echo Windows 8 or Server 2012
50)
51if %version% == 6.1 (
52 set framework=4_0
53 echo Windows 7 or Server 2008 R2
54)
55if %version% == 6.0 (
56 set framework=3_5
57 echo hmmm... Windows Vista or Server 2008
58)
59if %version% == 5.2 (
60 set framework=3_5
61 echo hmmm... Windows XP x64 or Server 2003
62)
63if %version% == 5.1 (
64 set framework=3_5
65 echo hmmm... Windows XP
66)
67
68
69rem ## If not requested, skip the prompting
70if "%1" =="" goto final
71if %1 == -p goto prompt
72if %1 == --prompt goto prompt
73goto final
74
75:prompt
76echo I will now ask you four questions regarding your build.
77echo However, if you wish to build for:
78echo %bits% Architecture
79echo .NET %framework%
80echo Visual Studio %vstudio%
81
82echo.
83echo Simply tap [ENTER] three times.
84echo.
85echo Note that you can change these defaults by opening this
86echo batch file in a text editor.
87echo.
88
89:bits
90set /p bits="Choose your architecture (x86, x64, AnyCPU) [%bits%]: "
91if %bits%==86 goto configuration
92if %bits%==x86 goto configuration
93if %bits%==64 goto configuration
94if %bits%==x64 goto configuration
95if %bits%==AnyCPU goto configuration
96if %bits%==anycpu goto configuration
97echo "%bits%" isn't a valid choice!
98goto bits
99
100:configuration
101set /p configuration="Choose your configuration ((r)elease or (d)ebug)? [%configuration%]: "
102if %configuration%==r goto framework
103if %configuration%==d goto framework
104if %configuration%==release goto framework
105if %configuration%==debug goto framework
106echo "%configuration%" isn't a valid choice!
107goto configuration
108
109:framework
110set /p framework="Choose your .NET framework (4_0 or 4_5)? [%framework%]: "
111if %framework%==4_0 goto final
112if %framework%==4_5 goto final
113echo "%framework%" isn't a valid choice!
114goto framework
115
116:final
117echo.
118echo Configuring for %bits% architecture using %framework% .NET framework
119echo.
120echo.
121
122
123if %framework%==4_5 set %vstudio%=2012
124
125echo Calling Prebuild for target %vstudio% with framework %framework%...
126Prebuild.exe /target vs%vstudio% /targetframework v%framework% /conditionals ISWIN;NET_%framework%
127