fg-from-scratch: Build Flightgear
This commit is contained in:
parent
5be72a84d3
commit
a20cdef996
2 changed files with 57 additions and 48 deletions
fg-from-scratch
|
@ -30,7 +30,7 @@ Windows 10
|
||||||
|
|
||||||
Qt 5.10.1
|
Qt 5.10.1
|
||||||
https://www.qt.io/download/
|
https://www.qt.io/download/
|
||||||
The script assumes the installation folder is C:\Qt\Qt5\.
|
The script assumes the installation folder is C:\Qt\.
|
||||||
|
|
||||||
Git 2.17.1
|
Git 2.17.1
|
||||||
https://git-scm.com/download/win/
|
https://git-scm.com/download/win/
|
||||||
|
|
|
@ -20,7 +20,7 @@ REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, U
|
||||||
SET ROOT_DIR=%CD%
|
SET ROOT_DIR=%CD%
|
||||||
SET PATH=%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%PATH%
|
SET PATH=%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%PATH%
|
||||||
SET CMAKE_TOOLCHAIN="Visual Studio 15 2017 Win64"
|
SET CMAKE_TOOLCHAIN="Visual Studio 15 2017 Win64"
|
||||||
SET QT5x64=C:/Qt/Qt5/5.10.1/msvc2017_64
|
SET QT5x64=C:/Qt/5.10.1/msvc2017_64
|
||||||
|
|
||||||
IF NOT EXIST vcpkg-git/NUL (
|
IF NOT EXIST vcpkg-git/NUL (
|
||||||
echo Preparing to install external libraries via vcpkg . . .
|
echo Preparing to install external libraries via vcpkg . . .
|
||||||
|
@ -68,25 +68,35 @@ IF NOT EXIST simgear-git/NUL (
|
||||||
)
|
)
|
||||||
cd %ROOT_DIR%
|
cd %ROOT_DIR%
|
||||||
|
|
||||||
REM Intended for future use.
|
IF NOT EXIST plib-git/NUL (
|
||||||
REM IF NOT EXIST flightgear-git/NUL (
|
mkdir plib-build
|
||||||
REM mkdir flightgear-build
|
echo Downloading PLib . . .
|
||||||
REM echo Downloading FlightGear . . .
|
git clone https://github.com/congocongo/plib.git plib-git
|
||||||
REM git clone -b next https://git.code.sf.net/p/flightgear/flightgear flightgear-git
|
) ELSE (
|
||||||
REM ) ELSE (
|
echo Updating PLib . . .
|
||||||
REM echo Updating FlightGear . . .
|
cd plib-git
|
||||||
REM cd flightgear-git
|
git pull
|
||||||
REM git pull
|
)
|
||||||
REM )
|
|
||||||
cd %ROOT_DIR%
|
cd %ROOT_DIR%
|
||||||
|
|
||||||
IF NOT EXIST terragear-ws2.0-git/NUL (
|
IF NOT EXIST flightgear-git/NUL (
|
||||||
mkdir terragear-ws2.0-build
|
mkdir flightgear-build
|
||||||
|
echo Downloading FlightGear . . .
|
||||||
|
git clone -b next https://git.code.sf.net/p/flightgear/flightgear flightgear-git
|
||||||
|
) ELSE (
|
||||||
|
echo Updating FlightGear . . .
|
||||||
|
cd flightgear-git
|
||||||
|
git pull
|
||||||
|
)
|
||||||
|
cd %ROOT_DIR%
|
||||||
|
|
||||||
|
IF NOT EXIST terragear-git/NUL (
|
||||||
|
mkdir terragear-build
|
||||||
echo Downloading TerraGear . . .
|
echo Downloading TerraGear . . .
|
||||||
git clone -b scenery/ws2.0 https://git.code.sf.net/p/flightgear/terragear terragear-ws2.0-git
|
git clone -b next https://git.code.sf.net/p/flightgear/terragear terragear-git
|
||||||
) ELSE (
|
) ELSE (
|
||||||
echo Updating TerraGear . . .
|
echo Updating TerraGear . . .
|
||||||
cd terragear-ws2.0-git
|
cd terragear-git
|
||||||
git pull
|
git pull
|
||||||
)
|
)
|
||||||
cd %ROOT_DIR%
|
cd %ROOT_DIR%
|
||||||
|
@ -149,40 +159,39 @@ cmake ..\simgear-git -G %CMAKE_TOOLCHAIN% ^
|
||||||
cmake --build . --config Release --target INSTALL
|
cmake --build . --config Release --target INSTALL
|
||||||
cd %ROOT_DIR%
|
cd %ROOT_DIR%
|
||||||
|
|
||||||
REM Currently broken. Intended for future use.
|
ECHO Compiling FlightGear . . .
|
||||||
REM ECHO Compiling FlightGear . . .
|
cd flightgear-build
|
||||||
REM cd flightgear-build
|
cmake ..\flightgear-git -G %CMAKE_TOOLCHAIN% ^
|
||||||
REM cmake ..\flightgear-git -G %CMAKE_TOOLCHAIN% ^
|
-DMSVC_3RDPARTY_ROOT=%ROOT_DIR%/vcpkg-git/installed/x64-windows ^
|
||||||
REM -DMSVC_3RDPARTY_ROOT=%ROOT_DIR%/vcpkg-git/installed/x64-windows ^
|
-DCMAKE_PREFIX_PATH:PATH=%ROOT_DIR%/Stage/lib;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%QT5x64% ^
|
||||||
REM -DCMAKE_PREFIX_PATH:PATH=%ROOT_DIR%/Stage/lib;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%QT5x64% ^
|
-DCMAKE_CONFIGURATION_TYPES=Debug;Release ^
|
||||||
REM -DCMAKE_CONFIGURATION_TYPES=Debug;Release ^
|
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/Stage ^
|
||||||
REM -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/Stage ^
|
-DOSG_FSTREAM_EXPORT_FIXED:BOOL=1 ^
|
||||||
REM -DOSG_FSTREAM_EXPORT_FIXED:BOOL=1 ^
|
-DENABLE_GDAL:BOOL=1 ^
|
||||||
REM -DENABLE_GDAL:BOOL=1 ^
|
-DENABLE_OPENMP:BOOL=1 ^
|
||||||
REM -DENABLE_OPENMP:BOOL=1 ^
|
-DENABLE_JSBSIM:BOOL=1 ^
|
||||||
REM -DENABLE_JSBSIM:BOOL=1 ^
|
-DENABLE_GPSSMOOTH:BOOL=1 ^
|
||||||
REM -DENABLE_GPSSMOOTH:BOOL=1 ^
|
-DENABLE_FGVIEWER:BOOL=1 ^
|
||||||
REM -DENABLE_FGVIEWER:BOOL=0 ^
|
-DENABLE_STGMERGE:BOOL=0 ^
|
||||||
REM -DENABLE_STGMERGE:BOOL=0 ^
|
-DWITH_FGPANEL:BOOL=0 ^
|
||||||
REM -DWITH_FGPANEL:BOOL=0 ^
|
-DUSE_AEONWAVE:BOOL=0 ^
|
||||||
REM -DUSE_AEONWAVE:BOOL=0 ^
|
-DHAVE_CONFIG_H:BOOL=0 ^
|
||||||
REM -DHAVE_CONFIG_H:BOOL=0 ^
|
-DFREETYPE_INCLUDE_DIR_ft2build=%ROOT_DIR%/vcpkg-git/packages/freetype_x64-windows/include ^
|
||||||
REM -DFREETYPE_INCLUDE_DIR_ft2build=%ROOT_DIR%/vcpkg-git/packages/freetype_x64-windows/include ^
|
-DGDAL_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
||||||
REM -DGDAL_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
-DGDAL_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/gdal.lib ^
|
||||||
REM -DGDAL_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/gdal.lib ^
|
-DOPENAL_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
||||||
REM -DOPENAL_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
-DOPENAL_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/OpenAL32.lib ^
|
||||||
REM -DOPENAL_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/OpenAL32.lib ^
|
-DPLIB_INCLUDE_DIR=%ROOT_DIR%/Stage/include ^
|
||||||
REM -DPLIB_INCLUDE_DIR=C:/src/3rdParty.x64/VS2017-x64-MD/include ^
|
-DPNG_PNG_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
||||||
REM -DPNG_PNG_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
-DPNG_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/libpng16.lib ^
|
||||||
REM -DPNG_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/libpng16.lib ^
|
-DZLIB_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
||||||
REM -DZLIB_INCLUDE_DIR=%ROOT_DIR%/vcpkg-git/installed/x64-windows/include ^
|
-DZLIB_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/zlib.lib
|
||||||
REM -DZLIB_LIBRARY=%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib/zlib.lib
|
cmake --build . --config Release --target INSTALL
|
||||||
REM cmake --build . --config Release --target INSTALL
|
cd %ROOT_DIR%
|
||||||
REM cd %ROOT_DIR%
|
|
||||||
|
|
||||||
ECHO Compiling TerraGear . . .
|
ECHO Compiling TerraGear . . .
|
||||||
cd terragear-ws2.0-build
|
cd terragear-build
|
||||||
cmake ..\terragear-ws2.0-git -G %CMAKE_TOOLCHAIN% ^
|
cmake ..\terragear-git -G %CMAKE_TOOLCHAIN% ^
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%ROOT_DIR%/Stage/lib;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%QT5x64% ^
|
-DCMAKE_PREFIX_PATH:PATH=%ROOT_DIR%/Stage/lib;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%QT5x64% ^
|
||||||
-DCMAKE_CONFIGURATION_TYPES=Debug;Release ^
|
-DCMAKE_CONFIGURATION_TYPES=Debug;Release ^
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/Stage ^
|
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/Stage ^
|
||||||
|
|
Loading…
Add table
Reference in a new issue