2015-03-08 08:19:10 +08:00
|
|
|
|
|
|
|
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
|
|
|
|
|
|
|
|
REM 32bits
|
|
|
|
md build-sg32
|
|
|
|
md build-fg32
|
|
|
|
md build-fgrun32
|
|
|
|
cd build-sg32
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\simgear -G "Visual Studio 10" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
|
2016-04-15 23:12:37 +08:00
|
|
|
-DENABLE_CURL:BOOL="ON" ^
|
2015-03-10 06:29:55 +08:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
|
|
|
cd ..\build-fg32
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\flightgear -G "Visual Studio 10" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FlightGear ^
|
2015-03-13 16:16:13 +08:00
|
|
|
-DCMAKE_PREFIX_PATH=%QT5SDK32% ^
|
2015-03-10 06:29:55 +08:00
|
|
|
-DPNG_LIBRARY=%WORKSPACE%/3rdParty/lib/libpng16.lib ^
|
|
|
|
-DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
|
|
|
cd ..\build-fgrun32
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\fgrun -G "Visual Studio 10" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT:PATH=%WORKSPACE% ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FGRun ^
|
|
|
|
-DFLTK_FLUID_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/fluid.exe ^
|
|
|
|
-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgfmt.exe ^
|
|
|
|
-DGETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgmerge.exe ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
2015-03-08 19:51:15 +08:00
|
|
|
cd ..
|
2015-03-08 08:19:10 +08:00
|
|
|
|
|
|
|
REM 64 bits
|
|
|
|
md build-sg64
|
|
|
|
md build-fg64
|
|
|
|
md build-fgrun64
|
|
|
|
cd build-sg64
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\SimGear -G "Visual Studio 10 Win64" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear ^
|
2016-04-15 23:12:37 +08:00
|
|
|
-DENABLE_CURL:BOOL="ON" ^
|
2015-03-10 06:29:55 +08:00
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
|
|
|
cd ..\build-fg64
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\flightgear -G "Visual Studio 10 Win64" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT=%WORKSPACE% ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FlightGear ^
|
2015-03-13 16:16:13 +08:00
|
|
|
-DCMAKE_PREFIX_PATH=%QT5SDK64% ^
|
2015-03-10 06:29:55 +08:00
|
|
|
-DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost ^
|
|
|
|
-DWITH_FGPANEL=OFF ^
|
|
|
|
-DENABLE_PROFILE=OFF
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
|
|
|
cd ..\build-fgrun64
|
2015-03-10 06:29:55 +08:00
|
|
|
cmake ..\fgrun -G "Visual Studio 10 Win64" ^
|
|
|
|
-DMSVC_3RDPARTY_ROOT:PATH=%WORKSPACE% ^
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FGRun ^
|
|
|
|
-DFLTK_FLUID_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/fluid.exe ^
|
|
|
|
-DGETTEXT_MSGFMT_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgfmt.exe ^
|
|
|
|
-DGETTEXT_MSGMERGE_EXECUTABLE:FILEPATH=%WORKSPACE%/3rdParty/bin/msgmerge.exe ^
|
|
|
|
-DBOOST_ROOT=%WORKSPACE%/Boost
|
2015-03-08 08:19:10 +08:00
|
|
|
cmake --build . --config Release --target INSTALL
|
|
|
|
|
2015-03-08 19:43:19 +08:00
|
|
|
cd ..
|
2015-03-08 08:19:10 +08:00
|
|
|
|
2015-03-16 18:06:06 +08:00
|
|
|
REM Qt5 deployment
|
|
|
|
%QT5SDK32%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc100/FlightGear/bin/fgfs.exe
|
|
|
|
%QT5SDK64%\bin\windeployqt --release --list target %WORKSPACE%/install/msvc100-64/FlightGear/bin/fgfs.exe
|
|
|
|
|
2015-03-08 08:19:10 +08:00
|
|
|
REM build setup
|
|
|
|
ECHO Packaging root is %WORKSPACE%
|
|
|
|
|
|
|
|
subst X: /D
|
|
|
|
subst X: %WORKSPACE%.
|
|
|
|
|
2015-09-02 18:35:06 +08:00
|
|
|
REM ensure output dir is clean since we upload the entirety of it
|
2015-09-02 18:38:50 +08:00
|
|
|
rmdir /S /Q output
|
2015-09-02 18:35:06 +08:00
|
|
|
|
2015-09-02 18:41:49 +08:00
|
|
|
REM archiving PDB files
|
|
|
|
copy %WORKSPACE%\build-fg32\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x86-%BUILD_NUMBER%.pdb
|
|
|
|
copy %WORKSPACE%\build-fg64\src\Main\RelWithDebInfo\fgfs.pdb %WORKSPACE%\Output\fgfs-x64-%BUILD_NUMBER%.pdb
|
|
|
|
|
2015-03-08 08:19:10 +08:00
|
|
|
REM indirect way to get command output into an environment variable
|
|
|
|
set PATH=%WORKSPACE%\install\msvc100\OpenSceneGraph\bin;%PATH%
|
|
|
|
osgversion --so-number > %TEMP%\osg-so-number.txt
|
|
|
|
osgversion --version-number > %TEMP%\osg-version.txt
|
|
|
|
osgversion --openthreads-soversion-number > %TEMP%\openthreads-so-number.txt
|
|
|
|
|
|
|
|
SET /P FLIGHTGEAR_VERSION=<flightgear\version
|
|
|
|
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
|
|
|
|
|
2015-03-14 02:13:19 +08: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 21:51:49 +08:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeNightlyFullConfig
|
|
|
|
iscc FlightGear.iss
|
|
|
|
|
2015-03-14 02:13:19 +08:00
|
|
|
REM FlightGear nightly: without fgdata, output filename would be "FlightGear-x.x.x-nightly.exe"
|
2015-03-13 21:51:49 +08:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeNightlyDietConfig
|
|
|
|
iscc FlightGear.iss
|
2015-03-14 01:58:01 +08:00
|
|
|
) ELSE (
|
2015-03-14 02:13:19 +08:00
|
|
|
REM FlightGear release: with fgdata, output filename would be "FlightGear-x.x.x.exe"
|
2015-03-13 21:51:49 +08:00
|
|
|
CALL :writeBaseConfig
|
|
|
|
CALL :writeReleaseConfig
|
|
|
|
iscc FlightGear.iss
|
2015-03-10 05:38:42 +08:00
|
|
|
)
|
2015-03-14 02:23:21 +08:00
|
|
|
GOTO End
|
2015-03-10 05:38:42 +08:00
|
|
|
|
2015-03-13 21:51:49 +08:00
|
|
|
:writeBaseConfig
|
2015-03-08 08:19:10 +08:00
|
|
|
ECHO #define FGVersion "%FLIGHTGEAR_VERSION%" > InstallConfig.iss
|
|
|
|
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 21:51:49 +08:00
|
|
|
GOTO End
|
2015-03-08 08:19:10 +08:00
|
|
|
|
2015-03-13 21:51:49 +08:00
|
|
|
:writeReleaseConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "" >> InstallConfig.iss
|
|
|
|
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
|
|
|
|
GOTO End
|
2015-03-10 05:38:42 +08:00
|
|
|
|
2015-03-13 21:51:49 +08:00
|
|
|
:writeNightlyFullConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "-nightly-full" >> InstallConfig.iss
|
|
|
|
ECHO #define IncludeData "TRUE" >> InstallConfig.iss
|
|
|
|
GOTO End
|
2015-03-10 05:38:42 +08:00
|
|
|
|
2015-03-13 21:51:49 +08:00
|
|
|
:writeNightlyDietConfig
|
|
|
|
CALL :writeBaseConfig
|
|
|
|
ECHO #define FGDetails "-nightly" >> InstallConfig.iss
|
2015-03-13 16:28:16 +08:00
|
|
|
ECHO #define IncludeData "FALSE" >> InstallConfig.iss
|
2015-03-13 21:51:49 +08:00
|
|
|
GOTO End
|
2015-03-10 05:38:42 +08:00
|
|
|
|
2015-03-13 21:51:49 +08:00
|
|
|
:End
|