2015-03-08 00:19:10 +00:00
|
|
|
|
|
|
|
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
|
2017-12-23 11:21:07 +00:00
|
|
|
IF NOT DEFINED IS_NIGHTLY_BUILD SET IS_NIGHTLY_BUILD=1
|
2015-03-08 00:19:10 +00:00
|
|
|
|
2017-02-28 16:25:58 +00:00
|
|
|
IF %IS_NIGHTLY_BUILD% EQU 1 (
|
|
|
|
SET FGBUILDTYPE=Nightly
|
|
|
|
) ELSE (
|
|
|
|
SET FGBUILDTYPE=Release
|
|
|
|
)
|
|
|
|
|
2016-08-02 10:18:42 +00:00
|
|
|
REM following are for testing the script locally
|
2016-08-03 09:39:32 +00:00
|
|
|
REM SET PATH=%PATH%;%ProgramFiles%\CMake\bin;%ProgramFiles(x86)%\"Inno Setup 5"\
|
2016-08-02 10:18:42 +00:00
|
|
|
REM SET QT5SDK32=C:\Qt\5.6\msvc2015
|
|
|
|
REM SET QT5SDK64=C:\Qt\5.6\msvc2015_64
|
|
|
|
REM SET IS_NIGHTLY_BUILD=1
|
|
|
|
|
2016-08-03 09:39:32 +00:00
|
|
|
SET OSG64=%WORKSPACE%\install\msvc140-64\OpenSceneGraph
|
|
|
|
|
2020-10-15 11:18:55 +00:00
|
|
|
SET VSGEN="Visual Studio 16 2019"
|
2020-04-06 22:15:29 +00:00
|
|
|
|
2015-03-08 00:19:10 +00:00
|
|
|
md build-sg64
|
|
|
|
md build-fg64
|
2016-11-14 21:29:04 +00:00
|
|
|
|
2015-03-08 00:19:10 +00:00
|
|
|
cd build-sg64
|
2020-10-15 11:18:55 +00:00
|
|
|
cmake ..\SimGear -G %VSGEN% -A x64 ^
|
2016-08-02 10:18:42 +00:00
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
|
2017-06-21 22:04:02 +00:00
|
|
|
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
|
2016-08-03 09:39:32 +00:00
|
|
|
-DCMAKE_PREFIX_PATH:PATH=%OSG64% ^
|
2016-08-02 10:18:42 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64
|
2020-11-21 16:03:31 +00:00
|
|
|
|
2016-12-13 11:32:33 +00:00
|
|
|
cmake --build . --config RelWithDebInfo --target INSTALL
|
2015-03-08 00:19:10 +00:00
|
|
|
|
|
|
|
cd ..\build-fg64
|
2020-10-15 11:18:55 +00:00
|
|
|
cmake ..\flightgear -G %VSGEN% -A x64 ^
|
2016-08-02 10:18:42 +00:00
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64 ^
|
2017-02-28 16:25:58 +00:00
|
|
|
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64% ^
|
2017-06-21 22:04:02 +00:00
|
|
|
-DOSG_FSTREAM_EXPORT_FIXED=1 ^
|
2019-05-23 11:38:02 +00:00
|
|
|
-DFG_BUILD_TYPE=%FGBUILDTYPE% ^
|
2020-11-21 16:03:31 +00:00
|
|
|
-DENABLE_SWIFT:BOOL=ON
|
|
|
|
|
2016-12-13 11:32:33 +00:00
|
|
|
cmake --build . --config RelWithDebInfo --target INSTALL
|
2015-03-08 00:19:10 +00:00
|
|
|
|
2015-03-08 11:43:19 +00:00
|
|
|
cd ..
|
2015-03-08 00:19:10 +00:00
|
|
|
|
2015-03-16 10:06:06 +00:00
|
|
|
REM Qt5 deployment
|
2017-12-23 08:26:30 +00:00
|
|
|
SET QMLDIR=%WORKSPACE%/flightgear/src/GUI/qml
|
2020-10-15 11:18:55 +00:00
|
|
|
|
2022-02-08 10:30:27 +00:00
|
|
|
REM Don't copy the compiler runtime libs, since it includes potentially older UCrtbase.
|
|
|
|
%QT5SDK64%\bin\windeployqt --release --no-compiler-runtime --qmldir %QMLDIR% %WORKSPACE%/install/msvc140-64/bin/fgfs.exe
|
2015-03-16 10:06:06 +00:00
|
|
|
|
2015-03-08 00:19:10 +00:00
|
|
|
REM build setup
|
|
|
|
ECHO Packaging root is %WORKSPACE%
|
|
|
|
|
|
|
|
subst X: /D
|
|
|
|
subst X: %WORKSPACE%.
|
|
|
|
|
2015-09-02 10:35:06 +00:00
|
|
|
REM ensure output dir is clean since we upload the entirety of it
|
2015-09-02 10:38:50 +00:00
|
|
|
rmdir /S /Q output
|
2015-09-02 10:35:06 +00:00
|
|
|
|
2017-04-18 07:57:35 +00:00
|
|
|
SET FGFS_PDB=src\Main\RelWithDebInfo\fgfs.pdb
|
2020-04-06 22:15:29 +00:00
|
|
|
|
2020-04-08 11:12:20 +00:00
|
|
|
SET SENTRY_ORG=flightgear
|
|
|
|
SET SENTRY_PROJECT=flightgear
|
|
|
|
REM ensure SENTRY_AUTH_TOKEN is set in the environment
|
2015-09-02 10:41:49 +00:00
|
|
|
|
2020-10-15 11:18:55 +00:00
|
|
|
sentry-cli upload-dif --include-sources %WORKSPACE%\build-fg64\%FGFS_PDB%
|
2018-07-02 10:39:08 +00:00
|
|
|
|
2015-03-08 00:19:10 +00:00
|
|
|
REM indirect way to get command output into an environment variable
|
2021-05-20 13:00:09 +00:00
|
|
|
set PATH=%OSG64%\bin;%PATH%
|
2015-03-08 00:19:10 +00:00
|
|
|
osgversion --so-number > %TEMP%\osg-so-number.txt
|
|
|
|
osgversion --version-number > %TEMP%\osg-version.txt
|
|
|
|
osgversion --openthreads-soversion-number > %TEMP%\openthreads-so-number.txt
|
|
|
|
|
2020-07-03 08:27:07 +00:00
|
|
|
SET /P FLIGHTGEAR_VERSION=<flightgear\flightgear-version
|
2015-03-08 00:19:10 +00:00
|
|
|
SET /P OSG_VERSION=<%TEMP%\osg-version.txt
|
|
|
|
SET /P OSG_SO_NUMBER=<%TEMP%\osg-so-number.txt
|
|
|
|
SET /P OT_SO_NUMBER=<%TEMP%\openthreads-so-number.txt
|
|
|
|
|
2020-12-23 10:05:05 +00:00
|
|
|
for /F "tokens=1,2,3 delims=." %%a in ("%FLIGHTGEAR_VERSION%") do (
|
|
|
|
set FLIGHTGEAR_VERSION_MAJOR=%%a
|
|
|
|
set FLIGHTGEAR_VERSION_MINOR=%%b
|
|
|
|
set FLIGHTGEAR_VERSION_PATCH=%%c
|
|
|
|
)
|
|
|
|
|
2015-03-13 18:13:19 +00:00
|
|
|
IF %IS_NIGHTLY_BUILD% EQU 1 (
|
|
|
|
REM FlightGear nightly: with fgdata, output filename would be "FlightGear-x.x.x-nightly-full.exe"
|
2015-03-13 13:51:49 +00:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeNightlyFullConfig
|
2016-12-02 16:59:07 +00:00
|
|
|
iscc /Q FlightGear.iss
|
2015-03-13 13:51:49 +00:00
|
|
|
|
2015-03-13 18:13:19 +00:00
|
|
|
REM FlightGear nightly: without fgdata, output filename would be "FlightGear-x.x.x-nightly.exe"
|
2015-03-13 13:51:49 +00:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeNightlyDietConfig
|
2016-12-02 16:59:07 +00:00
|
|
|
iscc /Q FlightGear.iss
|
2015-03-13 17:58:01 +00:00
|
|
|
) ELSE (
|
2015-03-13 18:13:19 +00:00
|
|
|
REM FlightGear release: with fgdata, output filename would be "FlightGear-x.x.x.exe"
|
2015-03-13 13:51:49 +00:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeReleaseConfig
|
2016-12-02 16:59:07 +00:00
|
|
|
iscc /Q FlightGear.iss
|
2015-03-09 21:38:42 +00:00
|
|
|
)
|
2015-03-13 18:23:21 +00:00
|
|
|
GOTO End
|
2015-03-09 21:38:42 +00:00
|
|
|
|
2015-03-13 13:51:49 +00:00
|
|
|
:writeBaseConfig
|
2021-01-17 09:48:47 +00:00
|
|
|
ECHO #define FGHarnessPath "x:" > InstallConfig.iss
|
2021-02-11 19:32:05 +00:00
|
|
|
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" >> InstallConfig.iss
|
|
|
|
ECHO #define FGVersionGroup "%FLIGHTGEAR_VERSION_MAJOR%.%FLIGHTGEAR_VERSION_MINOR%" >> InstallConfig.iss
|
2015-03-08 00:19:10 +00:00
|
|
|
ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss
|
|
|
|
ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss
|
|
|
|
ECHO #define OTSoNumber "%OT_SO_NUMBER%" >> InstallConfig.iss
|
2015-03-13 13:51:49 +00:00
|
|
|
GOTO End
|
2015-03-08 00:19:10 +00:00
|
|
|
|
2015-03-13 13:51:49 +00:00
|
|
|
:writeReleaseConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "" >> InstallConfig.iss
|
|
|
|
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
|
|
|
|
GOTO End
|
2015-03-09 21:38:42 +00:00
|
|
|
|
2015-03-13 13:51:49 +00:00
|
|
|
:writeNightlyFullConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "-nightly-full" >> InstallConfig.iss
|
|
|
|
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
|
|
|
|
GOTO End
|
2015-03-09 21:38:42 +00:00
|
|
|
|
2015-03-13 13:51:49 +00:00
|
|
|
:writeNightlyDietConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "-nightly" >> InstallConfig.iss
|
2015-03-13 08:28:16 +00:00
|
|
|
ECHO #define IncludeData "FALSE" >> InstallConfig.iss
|
2015-03-13 13:51:49 +00:00
|
|
|
GOTO End
|
2015-03-09 21:38:42 +00:00
|
|
|
|
2015-03-13 13:51:49 +00:00
|
|
|
:End
|