From 0136cf684924f12fcc3b2362b800580eefd23f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20de=20l=27Hamaide?= Date: Sun, 8 Mar 2015 01:19:10 +0100 Subject: [PATCH] Implement the necessary change for the new FGData for Linux and Windows --- .gitignore | 1 - .gitmodules | 8 +-- base-package.rules | 34 --------- ...build_release.sh => build_release_linux.sh | 10 --- build_release_mac.sh | 0 build_release_windows.bat | 70 +++++++++++++++++++ fgdata | 1 + hudson_win_build32.bat | 22 ------ hudson_win_build64.bat | 24 ------- hudson_win_package_release.bat | 40 ----------- installWinDeps.bat | 1 + 11 files changed, 76 insertions(+), 135 deletions(-) delete mode 100644 base-package.rules rename hudson_build_release.sh => build_release_linux.sh (81%) mode change 100755 => 100644 create mode 100644 build_release_mac.sh create mode 100644 build_release_windows.bat create mode 160000 fgdata delete mode 100644 hudson_win_build32.bat delete mode 100644 hudson_win_build64.bat delete mode 100644 hudson_win_package_release.bat diff --git a/.gitignore b/.gitignore index c3b6131..a320026 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ sgBuild image build macflightgear -fgdata src tmp Makefile diff --git a/.gitmodules b/.gitmodules index bf5114c..0994876 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,7 +10,7 @@ path = fgrun url = git://gitorious.org/fg/fgrun.git branch = next -[submodule "maclauncher"] - path = maclauncher - url = git://gitorious.org/fg/maclauncher.git - branch = master +[submodule "fgdata"] + path = fgdata + url = git://git.code.sf.net/p/flightgear/fgdata + branch = next diff --git a/base-package.rules b/base-package.rules deleted file mode 100644 index 11ad292..0000000 --- a/base-package.rules +++ /dev/null @@ -1,34 +0,0 @@ -- .git -- *.xcf -- *.tex - -+ /fgdata/Aircraft/Generic -+ /fgdata/Aircraft/Instruments -+ /fgdata/Aircraft/Instruments-3d - -+ /fgdata/Aircraft/c172p -+ /fgdata/Aircraft/777 -+ /fgdata/Aircraft/777-200 -+ /fgdata/Aircraft/b1900d -+ /fgdata/Aircraft/ufo -+ /fgdata/Aircraft/CitationX -+ /fgdata/Aircraft/ZLT-NT -+ /fgdata/Aircraft/dhc2 -+ /fgdata/Aircraft/Cub -+ /fgdata/Aircraft/sopwithCamel -+ /fgdata/Aircraft/f-14b -+ /fgdata/Aircraft/ASK13 -+ /fgdata/Aircraft/bo105 -+ /fgdata/Aircraft/Dragonfly -+ /fgdata/Aircraft/SenecaII -+ /fgdata/Aircraft/A6M2 - -- /fgdata/Aircraft/* - -- /fgdata/Textures/Unused -- /fgdata/Textures/*.orig -- /fgdata/Docs/source -- /fgdata/Models/Airspace -- /fgdata/Models/MNUAV - - diff --git a/hudson_build_release.sh b/build_release_linux.sh old mode 100755 new mode 100644 similarity index 81% rename from hudson_build_release.sh rename to build_release_linux.sh index e689e17..d3b8d30 --- a/hudson_build_release.sh +++ b/build_release_linux.sh @@ -60,15 +60,5 @@ cp flightgear-*.tar.bz2 ../output/. echo "Assembling base package" cd $WORKSPACE -echo "Syncing base packages files from sphere.telascience.org" - -# a: archive mode -# z: compress -# delete: 'delete extraneous files from dest dirs'; avoid bug 1344 -# filter: use the rules in our rules file -rsync -az --delete \ - --filter 'merge base-package.rules' \ - -e ssh jturner@sphere.telascience.org:/home/jturner/fgdata . - tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/ diff --git a/build_release_mac.sh b/build_release_mac.sh new file mode 100644 index 0000000..e69de29 diff --git a/build_release_windows.bat b/build_release_windows.bat new file mode 100644 index 0000000..016d7fa --- /dev/null +++ b/build_release_windows.bat @@ -0,0 +1,70 @@ + + +IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 + +REM SET /P SIMGEAR_VERSION=<%WORKSPACE%\simgear\version +REM ECHO #define SIMGEAR_VERSION "%SIMGEAR_VERSION%" > %WORKSPACE%\simgear\simgear\version.h + + + +REM 32bits +md build-sg32 +md build-fg32 +md build-fgrun32 +cd build-sg32 +cmake ..\simgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear -DBOOST_ROOT=%WORKSPACE%/Boost +cmake --build . --config Release --target INSTALL + +cd ..\build-fg32 +cmake ..\flightgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FlightGear -DPNG_LIBRARY=%WORKSPACE%/3rdParty/lib/libpng16.lib -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe -DBOOST_ROOT=%WORKSPACE%/Boost +cmake --build . --config Release --target INSTALL + +cd ..\build-fgrun32 +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 +cmake --build . --config Release --target INSTALL + + + +REM 64 bits +md build-sg64 +md build-fg64 +md build-fgrun64 +cd build-sg64 +cmake ..\SimGear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear -DBOOST_ROOT=%WORKSPACE%/Boost +cmake --build . --config Release --target INSTALL + +cd ..\build-fg64 +cmake ..\flightgear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FlightGear -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe -DBOOST_ROOT=%WORKSPACE%/Boost -DWITH_FGPANEL=OFF -DENABLE_PROFILE=OFF +cmake --build . --config Release --target INSTALL + +cd ..\build-fgrun64 +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 +cmake --build . --config Release --target INSTALL + + + +REM build setup +ECHO Packaging root is %WORKSPACE% + +subst X: /D +subst X: %WORKSPACE%. + +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= 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 + +REM run Inno-setup! +REM use iscc instead of compil32 for better error reporting +iscc FlightGear.iss diff --git a/fgdata b/fgdata new file mode 160000 index 0000000..7b53516 --- /dev/null +++ b/fgdata @@ -0,0 +1 @@ +Subproject commit 7b53516a9619f598721d7ee34d6a446367e9d9cd diff --git a/hudson_win_build32.bat b/hudson_win_build32.bat deleted file mode 100644 index 01401e0..0000000 --- a/hudson_win_build32.bat +++ /dev/null @@ -1,22 +0,0 @@ -IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 - -SET /P SIMGEAR_VERSION=<%WORKSPACE%\simgear\version -ECHO #define SIMGEAR_VERSION "%SIMGEAR_VERSION%" > %WORKSPACE%\simgear\simgear\version.h - -rem set PATH=%PATH%;D:\Program Files (x86)\CMake 2.8\bin -rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat" - -md build-sg -md build-fg -md build-fgrun -cd build-sg -cmake ..\simgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/SimGear -DBOOST_ROOT=%WORKSPACE%/Boost -cmake --build . --config Release --target INSTALL - -cd ..\build-fg -cmake ..\flightgear -G "Visual Studio 10" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100/FlightGear -DPNG_LIBRARY=%WORKSPACE%/3rdParty/lib/libpng16.lib -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe -DBOOST_ROOT=%WORKSPACE%/Boost -cmake --build . --config Release --target INSTALL - -cd ..\build-fgrun -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 -cmake --build . --config Release --target INSTALL diff --git a/hudson_win_build64.bat b/hudson_win_build64.bat deleted file mode 100644 index 0e1a2a5..0000000 --- a/hudson_win_build64.bat +++ /dev/null @@ -1,24 +0,0 @@ -IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 - - -SET /P SIMGEAR_VERSION=<%WORKSPACE%\simgear\version -ECHO #define SIMGEAR_VERSION "%SIMGEAR_VERSION%" > %WORKSPACE%\simgear\simgear\version.h - -rem ECHO #define SIMGEAR_VERSION "2.9.0" > %WORKSPACE%\simgear\simgear\version.h -rem set PATH=%PATH%;D:\Program Files (x86)\CMake 2.8\bin -rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64 - -md build-sg64 -md build-fg64 -md build-fgrun64 -cd build-sg64 -cmake ..\SimGear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/SimGear -DBOOST_ROOT=%WORKSPACE%/Boost -cmake --build . --config Release --target INSTALL - -cd ..\build-fg64 -cmake ..\flightgear -G "Visual Studio 10 Win64" -DMSVC_3RDPARTY_ROOT=%WORKSPACE% -DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc100-64/FlightGear -DFLTK_FLUID_EXECUTABLE=%WORKSPACE%/3rdParty/bin/fluid.exe -DBOOST_ROOT=%WORKSPACE%/Boost -DWITH_FGPANEL=OFF -DENABLE_PROFILE=OFF -cmake --build . --config Release --target INSTALL - -cd ..\build-fgrun64 -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 -cmake --build . --config Release --target INSTALL diff --git a/hudson_win_package_release.bat b/hudson_win_package_release.bat deleted file mode 100644 index 30d5f91..0000000 --- a/hudson_win_package_release.bat +++ /dev/null @@ -1,40 +0,0 @@ -ECHO OFF - -IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 -ECHO Packaging root is %WORKSPACE% - -subst X: /D -subst X: %WORKSPACE%. - -REM construct information file to be read by Inno-setup - - -set PATH=%WORKSPACE%\install\msvc100\OpenSceneGraph\bin;%PATH% - -REM add 7-zip to the PATH -set PATH=%PATH%;C:\Program Files\7-zip - -REM indirect way to get command output into an environment variable -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= 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 - -set DATA_FILE=FlightGear-%FLIGHTGEAR_VERSION%-data - -REM extract the data files -7z e -aoa %DATA_FILE%.tar.bz2 && 7z x -aoa %DATA_FILE%.tar - -REM run Inno-setup! -REM use iscc instead of compil32 for better error reporting - -iscc FlightGear.iss diff --git a/installWinDeps.bat b/installWinDeps.bat index 73972a6..5546cc4 100644 --- a/installWinDeps.bat +++ b/installWinDeps.bat @@ -1,6 +1,7 @@ REM ExternalProject can't cleanly extract a zip into an existing directory REM Instead we extract to a subdir, and then move the directories we want REM using this bat file. +REM This script is used by the SuperBuild CMakeLists.txt echo %CD% IF EXIST winDeps/3rdParty (