Repository navigation
Expand file tree
/
Copy pathBuild.bat
More file actions
68 lines (57 loc) · 2.84 KB
/
Copy pathBuild.bat
File metadata and controls
68 lines (57 loc) · 2.84 KB
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
@echo off
cls
setlocal
REM ============================================================================
REM Build.bat -- build, sign, create + install GeoDMS setups for all flavours.
REM
REM Runs the per-flavor setup scripts SEQUENTIALLY (never in parallel: each is a
REM full build and concurrent builds exhaust RAM). Each sub-script is interactive
REM (CHOICE prompts + the SafeNet signing PIN) -- drive them at the console.
REM
REM m = msbuild c = cmake g = GLOBIO compatibility l = linux
REM
REM The individual flavor scripts live in .\batch and can be run on their own:
REM batch\BuildSignAndCreateSetup.bat (m)
REM batch\BuildSignAndCreateSetupCmake.bat (c)
REM batch\BuildSignAndCreateSetupLinux.bat (l)
REM batch\BuildSignAndCreateSetupGlobio.bat (g)
REM The version is bumped in GeoDmsVersion.cmd (repo root).
REM ============================================================================
REM Generate the version + buildstamp headers ONCE here, before any flavour
REM builds, so all four (m/c/g/l) share a single header with one timestamp.
REM GeoDmsVersion.cmd sets GEODMS_VERSION_HEADER_DONE; the per-flavor scripts
REM still `call` it (for the version numbers) but the guard makes those calls
REM reuse this header instead of rewriting it -- which stops a later F5 in MSVC
REM from re-running msbuild and emitting .pdb files that no longer match the
REM installed binaries. (cd to repo root: the header paths are relative to it.)
REM By its full path, as every other call since 39c0b5fed: with NoDefaultCurrentDirectoryInExePath=1
REM the bare name is not found, GEODMS_VERSION_HEADER_DONE stays unset and every flavour rewrites
REM buildstamp.h (BAT-A37). setlocal above keeps these variables out of the calling console.
cd /d "%~dp0"
REM At Normal priority, whatever the console it is started from: see batch\RaisePriorityToNormal.ps1.
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0batch\RaisePriorityToNormal.ps1"
set "GEODMS_VERSION_HEADER_DONE="
call "%~dp0GeoDmsVersion.cmd"
if errorlevel 1 goto :version_failed
if not defined DMS_VERSION_MAJOR goto :version_failed
if not defined GEODMS_VERSION_HEADER_DONE goto :version_failed
echo === [m] msbuild setup ===
call "%~dp0batch\BuildSignAndCreateSetup.bat"
if errorlevel 1 goto :failed
echo === [c] cmake setup ===
call "%~dp0batch\BuildSignAndCreateSetupCmake.bat"
if errorlevel 1 goto :failed
echo === [g] GLOBIO compatibility setup ===
call "%~dp0batch\BuildSignAndCreateSetupGlobio.bat"
if errorlevel 1 goto :failed
echo === [l] linux setup ===
call "%~dp0batch\BuildSignAndCreateSetupLinux.bat"
if errorlevel 1 goto :failed
echo === All flavor setups (m, c, g, l) built, signed, installed ===
exit /B 0
:failed
echo *** A flavor setup FAILED - stopping (remaining flavors skipped). ***
exit /B 1
:version_failed
echo *** GeoDmsVersion.cmd failed - no flavor built. ***
exit /B 1