From 08cb5c481b445c8bc39f763153abd516b08fda6d Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 10 Dec 2016 23:57:11 +0000 Subject: [PATCH] Add my Windows build script for posterity. Linux/Mac coming shortly. --- compile-scripts/README.md | 14 +++++++++ compile-scripts/pull_build.bat | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 compile-scripts/README.md create mode 100644 compile-scripts/pull_build.bat diff --git a/compile-scripts/README.md b/compile-scripts/README.md new file mode 100644 index 0000000..8ecc46b --- /dev/null +++ b/compile-scripts/README.md @@ -0,0 +1,14 @@ +This is the scripts I (James) use to maintain my builds on each platform. + +They're much less clever than 'download and compile' but they do enough for me +and probably most other people, if you tweak the paths accordingly. The Mac +and Linux ones require Ruby (which is usually pre-installed). There are no +instructions - if you can't figure out what these do from reading the scripts, +you almost certainly should not be using them! + +They all assume a top-level folder (called 'FGFS' in my case) which contains +checkouts of simgear, flightgear, fgdata, OpenSceneGraph (into a dir named + 'osg') and the windows-3rd-party dir in the case of Windows. It's assumed + you copy the script to that same dir, edit paths and run from there. + +Files will be installed into a subdir called 'dist' diff --git a/compile-scripts/pull_build.bat b/compile-scripts/pull_build.bat new file mode 100644 index 0000000..0d70673 --- /dev/null +++ b/compile-scripts/pull_build.bat @@ -0,0 +1,52 @@ + +SET PATH=%PATH%;%ProgramFiles%\CMake\bin +SET QT5SDK64=C:\Qt\5.6\msvc2015_64 +SET CMAKE_TOOLCHAIN="Visual Studio 14 Win64" +SET ROOT_DIR=%CD% + +md osgbuild +md sgbuild +md fgbuild +REM md fgrun-build + +cd simgear +git pull --rebase + +cd ..\flightgear +git pull --rebase + +REM cd ..\fgrun +REM git pull --rebase + +cd ..\osgbuild +cmake ..\osg -G %CMAKE_TOOLCHAIN% ^ + -DACTUAL_3RDPARTY_DIR:PATH=%ROOT_DIR%\windows-3rd-party\msvc140\3rdparty.x64 ^ + -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist ^ + -DOSG_USE_UTF8_FILENAME:BOOL=ON + +cmake --build . --config Release --target INSTALL +cmake --build . --config Debug --target INSTALL + +cd ..\sgbuild +cmake ..\simgear -G %CMAKE_TOOLCHAIN% ^ + -DMSVC_3RDPARTY_ROOT=%ROOT_DIR%\windows-3rd-party\msvc140 ^ + -DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON ^ + -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist +cmake --build . --config Release --target INSTALL +cmake --build . --config Debug --target INSTALL + +cd ..\fgbuild +cmake ..\flightgear -G %CMAKE_TOOLCHAIN% ^ + -DMSVC_3RDPARTY_ROOT=%ROOT_DIR%\windows-3rd-party\msvc140 ^ + -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\dist ^ + -DCMAKE_PREFIX_PATH=%QT5SDK64% ^ + -DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON +cmake --build . --config Release --target INSTALL +cmake --build . --config Debug --target INSTALL + +REM cd ..\fgrun-build +REM cmake ..\fgrun -G %CMAKE_TOOLCHAIN% ^ +REM -DMSVC_3RDPARTY_ROOT=C:\FGFS\windows-3rd-party\msvc140 ^ +REM -DCMAKE_INSTALL_PREFIX:PATH=C:\FGFS\dist +REM cmake --build . --config Release --target INSTALL +REM cmake --build . --config Debug --target INSTALL