From 1ccca5bcaf178118b9ec0367dba5cb9d68a31e8c Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 9 Jan 2011 19:35:29 +0000 Subject: [PATCH 01/31] Create 2.2.0 release branch. --- .gitmodules | 6 ++++++ flightgear | 1 + simgear | 1 + 3 files changed, 8 insertions(+) create mode 100644 .gitmodules create mode 160000 flightgear create mode 160000 simgear diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..dbc0fce --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "simgear"] + path = simgear + url = http://git.gitorious.org/fg/simgear.git +[submodule "flightgear"] + path = flightgear + url = http://git.gitorious.org/fg/flightgear.git diff --git a/flightgear b/flightgear new file mode 160000 index 0000000..5deec69 --- /dev/null +++ b/flightgear @@ -0,0 +1 @@ +Subproject commit 5deec69e000d34bb93426ee3f14f4cb9731a3462 diff --git a/simgear b/simgear new file mode 160000 index 0000000..1670f88 --- /dev/null +++ b/simgear @@ -0,0 +1 @@ +Subproject commit 1670f88e54fcb7842913f874f0f308f551df102f From 90981cbb9c664002bf7d5e22521fcf6c3796f7b3 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 9 Jan 2011 22:49:52 +0000 Subject: [PATCH 02/31] Initial release build script for Linux --- .gitignore | 2 ++ hudson_build_release.sh | 30 +++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36d3a9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist +.DS_Store diff --git a/hudson_build_release.sh b/hudson_build_release.sh index f50cbf1..a91f480 100755 --- a/hudson_build_release.sh +++ b/hudson_build_release.sh @@ -1,2 +1,30 @@ #!/bin/sh -echo "Write me!" + +cd simgear +./autogen.sh +./configure --prefix=$WORKSPACE/dist --with-osg=$WORKSPACE/dist + +make + +if [ $? -ne '0' ]; then + echo "make simgear failed" + exit 1 +fi + +make install +make dist + +echo "Starting on FlightGear" + +cd ../flightgear +./autogen.sh +./configure --prefix=$WORKSPACE/dist --with-osg=$WORKSPACE/dist +make + +if [ $? -ne '0' ]; then + echo "make flightgear failed" + exit 1 +fi + +make install +make dist From cddac41252085a1cc2e0816fa92b1eb58e399352 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 14 Jan 2011 20:08:03 +0000 Subject: [PATCH 03/31] Update to latest flightgear release head. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index 5deec69..c2a3d24 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 5deec69e000d34bb93426ee3f14f4cb9731a3462 +Subproject commit c2a3d24ef3c77f4c1457f69c21ef7fc5091494b8 From 61599e47c866168d5ac5a3071dbcb7ed22b0e112 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 17 Jan 2011 23:42:49 +0000 Subject: [PATCH 04/31] Update release branch head, add initial Mac package script --- flightgear | 2 +- hudson_mac_package_release.rb | 113 ++++++++++++++++++++++++++++++++++ simgear | 2 +- 3 files changed, 115 insertions(+), 2 deletions(-) create mode 100755 hudson_mac_package_release.rb diff --git a/flightgear b/flightgear index c2a3d24..5ec5c34 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit c2a3d24ef3c77f4c1457f69c21ef7fc5091494b8 +Subproject commit 5ec5c34255d2488d5a7b255cf9c95520eccf3ac5 diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb new file mode 100755 index 0000000..7cd2de0 --- /dev/null +++ b/hudson_mac_package_release.rb @@ -0,0 +1,113 @@ +#!/usr/bin/ruby + +require 'ERB' + +$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB'] +$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf', 'mdl', '3ds'] + +def runOsgVersion(option) + env = "export DYLD_LIBRARY_PATH=#{Dir.pwd}/dist/lib" + bin = Dir.pwd + "/dist/bin/osgversion" + return `#{env}; #{bin} --#{option}`.chomp +end + +osgVersion = runOsgVersion('version-number') +$osgSoVersion=runOsgVersion('so-number') +$openThreadsSoVersion=runOsgVersion('openthreads-soversion-number') + +puts "osgVersion=#{osgVersion}, so-number=#{$osgSoVersion}" + +$alutSourcePath='/Library/Frameworks/ALUT.framework' + +def fix_install_names(object) + #puts "fixing install names for #{object}" + + $osgLibs.each do |l| + oldName = "lib#{l}.#{$osgSoVersion}.dylib" + newName = "@executable_path/../Frameworks/#{oldName}" + `install_name_tool -change #{oldName} #{newName} #{object}` + end + + oldName = "libOpenThreads.#{$openThreadsSoVersion}.dylib" + newName= "@executable_path/../Frameworks/#{oldName}" + `install_name_tool -change #{oldName} #{newName} #{object}` + + alutBundlePath = "@executable_path/../Frameworks/Alut.framework" + alutLib = "Versions/A/ALUT" + `install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}` +end + +prefixDir=Dir.pwd + "/dist" +dmgDir=Dir.pwd + "/image" +srcDir=Dir.pwd + "/flightgear" + + +puts "Erasing previous image dir" +`rm -rf #{dmgDir}` + +bundle=dmgDir + "/FlightGear.app" +contents=bundle + "/Contents" +macosDir=contents + "/MacOS" +frameworksDir=contents +"/Frameworks" +resourcesDir=contents+"/Resources" +osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}" +volName="\"FlightGear #{VERSION}\"" + +VERSION = File.read("#{srcDir}/version").strip + +dmgPath = Dir.pwd + "/fg_mac_#{VERSION}.dmg" + +puts "Creating directory structure" +`mkdir -p #{macosDir}` +`mkdir -p #{frameworksDir}` +`mkdir -p #{resourcesDir}` +`mkdir -p #{osgPluginsDir}` + +puts "Copying binaries" +bins = ['fgfs', 'terrasync', 'fgjs'] +bins.each do |b| + `cp #{prefixDir}/bin/#{b} #{macosDir}/#{b}` + fix_install_names("#{macosDir}/#{b}") +end + +puts "copying libraries" +$osgLibs.each do |l| + libFile = "lib#{l}.#{$osgSoVersion}.dylib" + `cp #{prefixDir}/lib/#{libFile} #{frameworksDir}` + fix_install_names("#{frameworksDir}/#{libFile}") +end + +# and not forgetting OpenThreads +libFile = "libOpenThreads.#{$openThreadsSoVersion}.dylib" +`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}` + +$osgPlugins.each do |p| + pluginFile = "osgdb_#{p}.so" + `cp #{prefixDir}/lib/osgPlugins-#{osgVersion}/#{pluginFile} #{osgPluginsDir}` + fix_install_names("#{osgPluginsDir}/#{pluginFile}") +end + +# custom ALUT +# must copy frameworks using ditto +`ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework` + +# Macflightgear launcher + + +# Info.plist +template = File.read("#{srcDir}/package/mac/nightly.plist.in") +output = ERB.new(template).result(binding) + +File.open("#{contents}/Info.plist", 'w') { |f| + f.write(output) +} + +`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns` +`cp #{srcDir}/COPYING #{dmgDir}` + +puts "Creating DMG" + +createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}" + +`rm #{dmgPath}` +`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}` diff --git a/simgear b/simgear index 1670f88..e988dc0 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit 1670f88e54fcb7842913f874f0f308f551df102f +Subproject commit e988dc0e421744fe71b7cdc74b8ff081becfc31d From 38067ca3062606df1c6a772a27d2167f33320349 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 17 Jan 2011 23:58:24 +0000 Subject: [PATCH 05/31] Initial script to checkout+build the Mac launcher --- hudson_mac_build_launcher.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 hudson_mac_build_launcher.sh diff --git a/hudson_mac_build_launcher.sh b/hudson_mac_build_launcher.sh new file mode 100755 index 0000000..4cf8e54 --- /dev/null +++ b/hudson_mac_build_launcher.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +SDK_PATH="/Developer/SDKs/MacOSX10.5.sdk" +OSX_TARGET="10.5" + +svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear + +pushd macflightgear + +# compile the stub executable +gcc -o FlightGear -mmacosx-version-min=$OSX_TARGET -isysroot $SDK_PATH -arch i386 main.m \ + -framework Cocoa -framework RubyCocoa -framework Foundation -framework AppKit + +popd + From 74c9e4334be0e733e1568929e99376ca8cb12922 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 10:13:10 +0000 Subject: [PATCH 06/31] First draft of a Windows release script. --- hudson_build_win_release.bat | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 hudson_build_win_release.bat diff --git a/hudson_build_win_release.bat b/hudson_build_win_release.bat new file mode 100644 index 0000000..aa95010 --- /dev/null +++ b/hudson_build_win_release.bat @@ -0,0 +1,28 @@ +call "D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" + +ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\version.h +cd %WORKSPACE%\simgear\projects\VC90 +msbuild SimGear.vcproj /p:Configuration=Release /m + +REM FlightGear + +cd %WORKSPACE%\flightgear +call scripts\tools\version.bat +SET HAVE_VERSION_H=1 +cd %WORKSPACE%\flightgear\projects\VC90 +msbuild FlightGear.sln /p:Configuration=Release /m + + +REM FGRun + +cd %WORKSPACE% +svn co https://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk/fgrun fgrun + +cd %WORKSPACE%\fgrun\msvc\9.0 +msbuild fgrun.sln /p:Configuration=Release /m + + +REM Installer + +cd %WORKSPACE% +ECHo "Should build installer here" From dbbe915127eefb5ab8ee1646a62f12b0aa4d05b2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 11:50:46 +0000 Subject: [PATCH 07/31] Win installer building (and don't build FGRun here) --- flightgear-release.nsi | 139 +++++++++++++++++++++++++++++++++++ hudson_build_win_release.bat | 12 +-- 2 files changed, 141 insertions(+), 10 deletions(-) create mode 100644 flightgear-release.nsi diff --git a/flightgear-release.nsi b/flightgear-release.nsi new file mode 100644 index 0000000..1c1feaf --- /dev/null +++ b/flightgear-release.nsi @@ -0,0 +1,139 @@ +!include "MUI.nsh" + +!system 'osgversion --so-number > %TEMP%\osg-so-number.txt' +!system 'osgversion --version-number > %TEMP%\osg-version.txt' + +!define /file OSGSoNumber $%TEMP%\osg-so-number.txt +!define /file OSGVersion $%TEMP%\osg-version.txt +!define /file FGVersion flightgear\version + +!echo "osg-so is ${OSGSoNumber}" + +Name "FlightGear" +OutFile fgfs_win32_${FGVersion}.exe + +; use LZMA for best compression +SetCompressor /FINAL /SOLID lzma +SetCompressorDictSize 64 + +InstallDir $PROGRAMFILES\FlightGear + +; Request admin privileges for Windows Vista +RequestExecutionLevel highest + +; don't hang around +AutoCloseWindow true + +!define UninstallKey "Software\Microsoft\Windows\CurrentVersion\Uninstall\FlightGear" +!define FGBinDir "flightgear\projects\VC90\Win32\Release" +!define FGRunBinDir "fgrun" +!define OSGInstallDir "install\msvc90\OpenSceneGraph" +!define OSGPluginsDir "${OSGInstallDir}\bin\osgPlugins-${OSGVersion}" + +!define ThirdPartyBinDir "3rdParty\bin" + +!define MUI_ICON "flightgear\projects\VC90\flightgear.ico" +!define MUI_UNICON "flightgear\projects\VC90\flightgear.ico" + +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_HEADERIMAGE_BITMAP "flightgear\package\Win-NSIS\fg-install-header.bmp" ; optional + + + +;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" +;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp" + +!insertmacro MUI_PAGE_WELCOME +; include GPL license page +!insertmacro MUI_PAGE_LICENSE "flightgear\Copying" +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_RUN $INSTDIR\fgrun.exe +!define MUI_FINISHPAGE_RUN_TEXT "Run FlightGear now" +!insertmacro MUI_PAGE_FINISH + + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +!insertmacro MUI_LANGUAGE "English" + +; The stuff to install +Section "" ;No components page, name is not important + + SetShellVarContext all + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + File ${FGBinDir}\fgfs.exe + File ${FGBinDir}\fgjs.exe + File ${FGBinDir}\terrasync.exe + File ${FGRunBinDir}\fgrun.exe + + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osg.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgDB.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgGA.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgParticle.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgText.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgUtil.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgViewer.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgSim.dll + File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgFX.dll + + File ${OSGInstallDir}\bin\ot12-OpenThreads.dll + + File ${ThirdPartyBinDir}\*.dll + + ; VC runtime redistributables + File "$%VCINSTALLDIR%\redist\x86\Microsoft.VC90.CRT\*.dll" + + File /r ${FGRunBinDir}\locale + + SetOutPath $INSTDIR\osgPlugins-${OSGVersion} + File ${OSGPluginsDir}\osgdb_ac.dll + File ${OSGPluginsDir}\osgdb_osg.dll + File ${OSGPluginsDir}\osgdb_3ds.dll + File ${OSGPluginsDir}\osgdb_mdl.dll + File ${OSGPluginsDir}\osgdb_jpeg.dll + File ${OSGPluginsDir}\osgdb_rgb.dll + File ${OSGPluginsDir}\osgdb_png.dll + File ${OSGPluginsDir}\osgdb_txf.dll + + + Exec '"$INSTDIR\fgrun.exe" --silent --fg-exe="$INSTDIR\fgfs.exe" --ts-exe="$INSTDIR\terrasync.exe" ' + + CreateDirectory "$SMPROGRAMS\FlightGear" + CreateShortCut "$SMPROGRAMS\FlightGear\FlightGear.lnk" "$INSTDIR\fgrun.exe" + + + WriteUninstaller "$INSTDIR\FlightGear_Uninstall.exe" + + WriteRegStr HKLM ${UninstallKey} "DisplayName" "FlightGear" + WriteRegStr HKLM ${UninstallKey} "DisplayVersion" "${FGVersion}" + WriteRegStr HKLM ${UninstallKey} "UninstallString" "$INSTDIR\FlightGear_Uninstall.exe" + WriteRegStr HKLM ${UninstallKey} "UninstallPath" "$INSTDIR\FlightGear_Uninstall.exe" + WriteRegDWORD HKLM ${UninstallKey} "NoModify" 1 + WriteRegDWORD HKLM ${UninstallKey} "NoRepair" 1 + WriteRegStr HKLM ${UninstallKey} "URLInfoAbout" "http://www.flightgear.org/" + +SectionEnd + + + +Section "Uninstall" + + SetShellVarContext all + + + Delete "$SMPROGRAMS\FlightGear\FlightGear.lnk" + ; only delete the FlightGear group if it's empty + RMDir "$SMPROGRAMS\FlightGear" + + RMDir /r "$INSTDIR" + + DeleteRegKey HKLM ${UninstallKey} + +SectionEnd + \ No newline at end of file diff --git a/hudson_build_win_release.bat b/hudson_build_win_release.bat index aa95010..d8115be 100644 --- a/hudson_build_win_release.bat +++ b/hudson_build_win_release.bat @@ -13,16 +13,8 @@ cd %WORKSPACE%\flightgear\projects\VC90 msbuild FlightGear.sln /p:Configuration=Release /m -REM FGRun - -cd %WORKSPACE% -svn co https://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk/fgrun fgrun - -cd %WORKSPACE%\fgrun\msvc\9.0 -msbuild fgrun.sln /p:Configuration=Release /m - - REM Installer cd %WORKSPACE% -ECHo "Should build installer here" +set PATH=%PATH%;C:\Program Files (x86)\NSIS;%WORKSPACE%\install\msvc90\OpenSceneGraph\bin +makensis flightgear-release.nsi From b221b59dbc109e7860a8a962e60d03de02a9c2bb Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 14:24:31 +0000 Subject: [PATCH 08/31] Different Info.plist for official releases. --- Info.plist.in | 29 +++++++++++++++++++++++++++++ hudson_mac_package_release.rb | 12 +++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 Info.plist.in diff --git a/Info.plist.in b/Info.plist.in new file mode 100644 index 0000000..5fdd5d4 --- /dev/null +++ b/Info.plist.in @@ -0,0 +1,29 @@ + + + + + CFBundleIconFile + FlightGear.icns + CFBundlePackageType + APPL + CFBundleGetInfoString + FlightGear nightly build + CFBundleSignature + ???? + CFBundleExecutable + FlightGear + CFBundleIdentifier + org.flightgear.FlightGear + CFBundleVersion + <%= fgVersion %> + CFBundleShortVersionString + <%= fgVersion %> + LSMinimumSystemVersion + 10.5.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + + diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb index 7cd2de0..11a7744 100755 --- a/hudson_mac_package_release.rb +++ b/hudson_mac_package_release.rb @@ -51,11 +51,12 @@ macosDir=contents + "/MacOS" frameworksDir=contents +"/Frameworks" resourcesDir=contents+"/Resources" osgPluginsDir=contents+"/PlugIns/osgPlugins-#{osgVersion}" -volName="\"FlightGear #{VERSION}\"" -VERSION = File.read("#{srcDir}/version").strip -dmgPath = Dir.pwd + "/fg_mac_#{VERSION}.dmg" +fgVersion = File.read("#{srcDir}/version").strip +volName="\"FlightGear #{fgVersion}\"" + +dmgPath = Dir.pwd + "/fg_mac_#{fgVersion}.dmg" puts "Creating directory structure" `mkdir -p #{macosDir}` @@ -92,10 +93,11 @@ end `ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework` # Macflightgear launcher - +puts "Copying Macflightgear launcher files" +`rsync -a --exclude=\".svn\" macflightgear/* #{resourcesDir}` # Info.plist -template = File.read("#{srcDir}/package/mac/nightly.plist.in") +template = File.read("Info.plist.in") output = ERB.new(template).result(binding) File.open("#{contents}/Info.plist", 'w') { |f| From 3045eb8661bde9b4582e1466aa7750f07712d416 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 19:28:03 +0000 Subject: [PATCH 09/31] Tweak Mac release packaging script, getting better. --- hudson_mac_package_release.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb index 11a7744..81fc2cf 100755 --- a/hudson_mac_package_release.rb +++ b/hudson_mac_package_release.rb @@ -65,7 +65,7 @@ puts "Creating directory structure" `mkdir -p #{osgPluginsDir}` puts "Copying binaries" -bins = ['fgfs', 'terrasync', 'fgjs'] +bins = ['fgfs', 'terrasync', 'fgjs', 'fgviewer'] bins.each do |b| `cp #{prefixDir}/bin/#{b} #{macosDir}/#{b}` fix_install_names("#{macosDir}/#{b}") @@ -94,7 +94,11 @@ end # Macflightgear launcher puts "Copying Macflightgear launcher files" -`rsync -a --exclude=\".svn\" macflightgear/* #{resourcesDir}` + +Dir.chdir "macflightgear" do + `cp FlightGear #{macosDir}` + `rsync -a --exclude=\".svn\" *.rb *.lproj *.sh *.tiff #{resourcesDir}` +end # Info.plist template = File.read("Info.plist.in") From bc7993db1df7b49437bd8661996354b2c274c10e Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 22:14:16 +0000 Subject: [PATCH 10/31] Update to release-head. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index 5ec5c34..f025c65 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 5ec5c34255d2488d5a7b255cf9c95520eccf3ac5 +Subproject commit f025c65c60ba34c2fd91bc52f201463d992cf613 From 77e2eeb228b66943dabeb3bb6bd8370f612b4040 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 18 Jan 2011 22:33:06 +0000 Subject: [PATCH 11/31] Change binaries to fit launcher expectations. --- hudson_mac_package_release.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hudson_mac_package_release.rb b/hudson_mac_package_release.rb index 81fc2cf..d1cfb24 100755 --- a/hudson_mac_package_release.rb +++ b/hudson_mac_package_release.rb @@ -65,10 +65,10 @@ puts "Creating directory structure" `mkdir -p #{osgPluginsDir}` puts "Copying binaries" -bins = ['fgfs', 'terrasync', 'fgjs', 'fgviewer'] +bins = ['fgfs', 'terrasync'] bins.each do |b| - `cp #{prefixDir}/bin/#{b} #{macosDir}/#{b}` - fix_install_names("#{macosDir}/#{b}") + `cp #{prefixDir}/bin/#{b} #{resourcesDir}/#{b}` + fix_install_names("#{resourcesDir}/#{b}") end puts "copying libraries" From 1bd7db4ba4cee395238880a3ce8ad490139c0618 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 19 Jan 2011 16:49:20 +0000 Subject: [PATCH 12/31] Fix version.h location, and disable installer for the moment, will switch to Inno-setup soon. --- hudson_build_win_release.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hudson_build_win_release.bat b/hudson_build_win_release.bat index d8115be..9692b80 100644 --- a/hudson_build_win_release.bat +++ b/hudson_build_win_release.bat @@ -1,6 +1,6 @@ call "D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" -ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\version.h +ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\simgear\version.h cd %WORKSPACE%\simgear\projects\VC90 msbuild SimGear.vcproj /p:Configuration=Release /m @@ -16,5 +16,7 @@ msbuild FlightGear.sln /p:Configuration=Release /m REM Installer cd %WORKSPACE% -set PATH=%PATH%;C:\Program Files (x86)\NSIS;%WORKSPACE%\install\msvc90\OpenSceneGraph\bin -makensis flightgear-release.nsi + + +REM set PATH=%PATH%;C:\Program Files (x86)\NSIS;%WORKSPACE%\install\msvc90\OpenSceneGraph\bin +REM makensis flightgear-release.nsi From a4c86f6fba5f27656141e7a1c1c9b37d292d65a5 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 20 Jan 2011 22:09:43 +0000 Subject: [PATCH 13/31] Updated to latests Simgear release head. --- simgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear b/simgear index e988dc0..840780d 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit e988dc0e421744fe71b7cdc74b8ff081becfc31d +Subproject commit 840780dc4acf8afd08f648b1e3d83c2294bb081b From 25a3442303476f6f08369bcc7947140be5476f3a Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 21 Jan 2011 00:20:40 +0000 Subject: [PATCH 14/31] Initial draft of Inno-setup file for release builds. --- FlightGear.iss | 199 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100755 FlightGear.iss diff --git a/FlightGear.iss b/FlightGear.iss new file mode 100755 index 0000000..14cbb91 --- /dev/null +++ b/FlightGear.iss @@ -0,0 +1,199 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! +; +; This script creates an installable FlightGear package for Win32 using the +; "Inno Setup" package builder. Inno Setup is free (but probably not open +; source?.) The official web site for this package building software is: +; +; http://www.jrsoftware.org/isinfo.php +; +; Note: the files must appear in the X: drive. +; You can do this with the command below: +; +; subst X: path_to_files +; +; For example: +; +; C:\> subst X: F:\Path\to\FlightGear\root +; C:\> subst X: F:\ +; + +#define FGVersion "2.2.0" +;#define VCInstallDir GetEnv(VCINSTALLDIR) +#define VCInstallDir "C:\Program Files\Microsoft Visual Studio 9.0\VC" +#define OSGSoNumber "66" +#define OSGInstallDir "X:\install\msvc90\OpenSceneGraph" +#define OSGVersion "2.9.9" +#define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion + +[Setup] +AppId=FlightGear +AppName=FlightGear +AppPublisher=The FlightGear Team +OutputBaseFilename=fgsetup-{#FGVersion} +AppVerName=FlightGear v{#FGVersion} +AppPublisherURL=http://www.flightgear.org +AppSupportURL=http://www.flightgear.org +AppUpdatesURL=http://www.flightgear.org +DefaultDirName={pf}\FlightGear +DefaultGroupName=FlightGear {#FGVersion} +LicenseFile=X:\flightgear\COPYING +Uninstallable=yes +SetupIconFile=X:\flightgear\projects\VC90\flightgear.ico +VersionInfoVersion={#FGVersion}.0 +WizardImageFile=X:\flightgear\package\Win32-Inno\setupimg.bmp +WizardImageStretch=No +WizardSmallImageFile=X:\flightgear\package\Win32-Inno\setupsmall.bmp +VersionInfoCompany=The FlightGear Team +UninstallDisplayIcon=X:\flightgear\projects\VC90\flightgear.ico + +[Tasks] +; NOTE: The following entry contains English phrases ("Create a desktop icon" and "Additional icons"). You are free to translate them into another language if required. +Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:" + +[Files] +; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at) +;Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion +Source: "X:\flightgear\projects\VC90\Win32\Release\*.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion + +Source: "X:\fgrun\msvc\9.0\Win32\Release\fgrun.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion +Source: "X:\fgrun\msvc\9.0\Win32\Release\locale\*"; DestDir: "{app}\bin\Win32\locale"; Flags: ignoreversion recursesubdirs + +Source: "X:\3rdParty\bin\*.dll"; DestDir: "{app}\bin\Win32" +Source: "{#VCInstallDir}\redist\x86\Microsoft.VC90.CRT\*.dll"; DestDir: "{app}\bin\Win32" + +Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs + +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin\Win32" +Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin\Win32" + +Source: "{#OSGInstallDir}\bin\ot12-OpenThreads.dll"; DestDir: "{app}\bin\Win32" + +Source: "{#OSGPluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSGPluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" + +[Dirs] +; Make the user installable scenery directory +Name: "{app}\scenery"; Permissions: everyone-modify +Name: "{code:TerrasyncDir}"; Permissions: everyone-modify + +[Icons] +Name: "{group}\FlightGear Launcher"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; +; Name: "{group}\FlightGear"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}"; +Name: "{group}\FlightGear Manual"; Filename: "{app}\data\Docs\getstart.pdf" +Name: "{group}\FlightGear Documentation"; Filename: "{app}\data\Docs\index.html" +Name: "{group}\Flightgear Wiki"; Filename: "http://wiki.flightgear.org" +Name: "{userdesktop}\FlightGear {#FGVersion}"; Filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}"; Tasks: desktopicon + +Name: "{group}\Tools\Install & Uninstall Scenery"; Filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}"; +Name: "{group}\Tools\TerraSync"; Filename: "{app}\bin\Win32\terrasync.exe"; Parameters: "-S -p 5505 -d ""{app}\terrasync"""; WorkingDir: "{app}"; +Name: "{group}\Tools\Uninstall FlightGear"; Filename: "{uninstallexe}" + +Name: "{group}\Tools\js_demo"; Filename: "{app}\bin\Win32\js_demo.exe" +Name: "{group}\Tools\fgjs"; Filename: "cmd"; Parameters: "/k fgjs.exe ""--fg-root={app}\data"""; WorkingDir: "{app}\bin\Win32"; +Name: "{group}\Tools\GPSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\GPSsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32"; +Name: "{group}\Tools\UGsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\UGsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32"; +Name: "{group}\Tools\MIDSsmooth"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\MIDSsmooth.exe"" -h"; WorkingDir: "{app}\bin\Win32"; +Name: "{group}\Tools\metar"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\metar.exe"" -h"; WorkingDir: "{app}\bin\Win32"; +Name: "{group}\Tools\yasim"; Filename: "cmd"; Parameters: "/k ""{app}\bin\Win32\yasim.exe"" -h"; WorkingDir: "{app}\bin\Win32"; + +Name: "{group}\Tools\Explore Documentation Folder"; Filename: "{app}\data\Docs" + +; For running flightgear directly +; Name: "{userdesktop}\FlightGear v2.0.0"; Filename: "{app}\bin\Win32\fgfs.exe"; Parameters: "--fg-root=."; WorkingDir: "{app}"; Tasks: desktopicon + +[Run] + +; Put installation directory into the fgrun.prefs +filename: "{app}\bin\Win32\fgrun.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--fg-exe={app}\bin\Win32\fgfs.exe"" ""--ts-exe={app}\bin\Win32\terrasync.exe"" ""--fg-root={app}\data"" ""--fg-scenery={app}\data\Scenery;{app}\scenery;{code:TerrasyncDir}"" --ts-dir=3" + +; Put installation and source directories into the fgadmin.prefs +filename: "{app}\bin\Win32\fgadmin.exe"; WorkingDir: "{app}\bin\Win32"; Parameters: "--silent ""--install-source={src}\..\Scenery"" ""--scenery-dest={app}\scenery""" + +[Registry] +Root: HKLM; Subkey: "Software\flightgear.org"; ValueType: string; ValueName: "TerrasyncDir"; ValueData: "{code:TerrasyncDir}" + +[Code] +var + TerrasyncDirPage: TInputDirWizardPage; + +procedure URLLabelOnClick(Sender: TObject); +var + ErrorCode: Integer; +begin + ShellExec('open', 'http://www.flightgear.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); +end; + +procedure CreateURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton); +var + URLLabel: TNewStaticText; +begin + URLLabel := TNewStaticText.Create(ParentForm); + URLLabel.Caption := 'www.flightgear.org'; + URLLabel.Cursor := crHand; + URLLabel.OnClick := @URLLabelOnClick; + URLLabel.Parent := ParentForm; + { Alter Font *after* setting Parent so the correct defaults are inherited first } + URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline]; + URLLabel.Font.Color := clBlue; + URLLabel.Top := CancelButton.Top + CancelButton.Height - URLLabel.Height - 2; + URLLabel.Left := ScaleX(20); +end; + +procedure InitializeWizard(); +begin + TerrasyncDirPage := CreateInputDirPage(wpSelectDir, + 'Select Terrasync Directory', 'Where should scenery downloaded by Terrasync be put?', + 'Select the folder in which Terrasync would download additional scenery, then click Next.', + False, 'Terrasync Folder'); + TerrasyncDirPage.Add(''); + + CreateURLLabel(WizardForm, WizardForm.CancelButton); +end; + +function NextButtonClick(CurPageID: Integer): Boolean; +begin + if CurPageID = wpSelectDir then begin + TerrasyncDirPage.Values[0] := GetPreviousData( 'TerrasyncDir', ExpandConstant('{reg:HKLM\Software\flightgear.org,TerrasyncDir|{app}\terrasync}') ); + end; + Result := True; +end; + +function TerrasyncDir(Param: String): String; +begin + Result := TerrasyncDirPage.Values[0]; +end; + +procedure RegisterPreviousData(PreviousDataKey: Integer); +begin + { Store the settings so we can restore them next time } + SetPreviousData(PreviousDataKey, 'TerrasyncDir', TerrasyncDirPage.Values[0]); +end; + +function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String; +var + S: String; +begin + S := ''; + S := S + MemoDirInfo + NewLine + NewLine; + S := S + 'Terrasync folder:' + NewLine; + S := S + Space + TerrasyncDirPage.Values[0] + NewLine + NewLine; + S := S + MemoGroupInfo + NewLine + NewLine; + S := S + MemoTasksInfo + NewLine + NewLine; + + Result := S; +end; + From a87af6904e2ef9129c111dd3b5cf3fa18f0700a9 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 21 Jan 2011 23:23:26 +0000 Subject: [PATCH 15/31] Update to Fg release head. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index f025c65..d365689 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit f025c65c60ba34c2fd91bc52f201463d992cf613 +Subproject commit d365689d5c1641369219bbc07ba74016a72cd266 From 1707fa61ddd5aa2f04bc8a95856d6d8a2fc3ce0a Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Jan 2011 10:55:32 +0000 Subject: [PATCH 16/31] Update to FG release branch head --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index d365689..59d06d1 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit d365689d5c1641369219bbc07ba74016a72cd266 +Subproject commit 59d06d130d4803836de43cda40575a1e8e90c52c From 0bcdabc0f3ca18fc878f1a686d58fd95b5fa515d Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Jan 2011 19:57:32 +0000 Subject: [PATCH 17/31] Further work on Win release packaging. --- .gitignore | 5 +++++ FlightGear.iss | 20 ++++++++++++++------ hudson_win_build32.bat | 12 ++++++++++++ hudson_win_build64.bat | 13 +++++++++++++ hudson_win_package_release.bat | 30 ++++++++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 hudson_win_build32.bat create mode 100644 hudson_win_build64.bat create mode 100644 hudson_win_package_release.bat diff --git a/.gitignore b/.gitignore index 36d3a9c..6380c51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ dist .DS_Store +install +3rdParty +boost_1_44_0 +InstallConfig.iss +Output diff --git a/FlightGear.iss b/FlightGear.iss index 14cbb91..cf3834d 100755 --- a/FlightGear.iss +++ b/FlightGear.iss @@ -18,12 +18,16 @@ ; C:\> subst X: F:\ ; -#define FGVersion "2.2.0" -;#define VCInstallDir GetEnv(VCINSTALLDIR) -#define VCInstallDir "C:\Program Files\Microsoft Visual Studio 9.0\VC" -#define OSGSoNumber "66" +#include "InstallConfig.iss" + +#if GetEnv("VSINSTALLDIR") == "" + #define VSInstallDir "C:\Program Files\Microsoft Visual Studio 9.0" +#else + #define VSInstallDir GetEnv("VSINSTALLDIR") +#endif + +#define VCInstallDir VSInstallDir + "\VC" #define OSGInstallDir "X:\install\msvc90\OpenSceneGraph" -#define OSGVersion "2.9.9" #define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion [Setup] @@ -55,14 +59,18 @@ Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "A ; NOTE: run subst X: F:\ (or whatever path the expanded tree resides at) ;Source: "X:\*.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "X:\flightgear\projects\VC90\Win32\Release\*.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion +Source: "X:\flightgear\projects\VC90\x64\Release\*.exe"; DestDir: "{app}\bin\Win64"; Flags: ignoreversion skipifsourcedoesntexist Source: "X:\fgrun\msvc\9.0\Win32\Release\fgrun.exe"; DestDir: "{app}\bin\Win32"; Flags: ignoreversion Source: "X:\fgrun\msvc\9.0\Win32\Release\locale\*"; DestDir: "{app}\bin\Win32\locale"; Flags: ignoreversion recursesubdirs +Source: "X:\fgrun\msvc\9.0\x64\Release\fgrun.exe"; DestDir: "{app}\bin\Win64"; Flags: ignoreversion +Source: "X:\fgrun\msvc\9.0\Win32\Release\locale\*"; DestDir: "{app}\bin\Win64\locale"; Flags: ignoreversion recursesubdirs + Source: "X:\3rdParty\bin\*.dll"; DestDir: "{app}\bin\Win32" Source: "{#VCInstallDir}\redist\x86\Microsoft.VC90.CRT\*.dll"; DestDir: "{app}\bin\Win32" -Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs +Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin\Win32" Source: "{#OSGInstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin\Win32" diff --git a/hudson_win_build32.bat b/hudson_win_build32.bat new file mode 100644 index 0000000..77669d5 --- /dev/null +++ b/hudson_win_build32.bat @@ -0,0 +1,12 @@ + +IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 + +ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\simgear\version.h +cd %WORKSPACE%\simgear\projects\VC90 +msbuild SimGear.vcproj /p:Configuration=Release /m + +cd %WORKSPACE%\flightgear +call scripts\tools\version.bat +SET HAVE_VERSION_H=1 +cd %WORKSPACE%\flightgear\projects\VC90 +msbuild FlightGear.sln /p:Configuration=Release /m diff --git a/hudson_win_build64.bat b/hudson_win_build64.bat new file mode 100644 index 0000000..4d235de --- /dev/null +++ b/hudson_win_build64.bat @@ -0,0 +1,13 @@ + +IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0 + +ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\simgear\version.h +cd %WORKSPACE%\simgear\projects\VC90 +msbuild SimGear.vcproj /p:Configuration=Release /p:Platform=x64 + +cd %WORKSPACE%\flightgear +call scripts\tools\version.bat +SET HAVE_VERSION_H=1 +cd %WORKSPACE%\flightgear\projects\VC90 +msbuild FlightGear.sln /p:Configuration=Release /p:Platform=x64 + diff --git a/hudson_win_package_release.bat b/hudson_win_package_release.bat new file mode 100644 index 0000000..d058849 --- /dev/null +++ b/hudson_win_package_release.bat @@ -0,0 +1,30 @@ +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\msvc90\OpenSceneGraph\bin;%PATH% +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 + +SET /P FLIGHTGEAR_VERSION= InstallConfig.iss +ECHO #define OSGVersion "%OSG_VERSION%" >> InstallConfig.iss +ECHO #define OSGSoNumber "%OSG_SO_NUMBER%" >> InstallConfig.iss + +REM run Inno-setup! + +Compil32 /cc FlightGear.iss + + + From e4a20c75b02642242c6fe6b17790b6ab7f4c7dc2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Jan 2011 22:39:16 +0000 Subject: [PATCH 18/31] Expanded 64-bit support in the Windows installer --- FlightGear.iss | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/FlightGear.iss b/FlightGear.iss index cf3834d..5ddd35d 100755 --- a/FlightGear.iss +++ b/FlightGear.iss @@ -30,6 +30,9 @@ #define OSGInstallDir "X:\install\msvc90\OpenSceneGraph" #define OSGPluginsDir OSGInstallDir + "\bin\osgPlugins-" + OSGVersion +#define OSG64InstallDir "X:\install\msvc90-64\OpenSceneGraph" +#define OSG64PluginsDir OSG64InstallDir + "\bin\osgPlugins-" + OSGVersion + [Setup] AppId=FlightGear AppName=FlightGear @@ -68,7 +71,10 @@ Source: "X:\fgrun\msvc\9.0\x64\Release\fgrun.exe"; DestDir: "{app}\bin\Win64"; F Source: "X:\fgrun\msvc\9.0\Win32\Release\locale\*"; DestDir: "{app}\bin\Win64\locale"; Flags: ignoreversion recursesubdirs Source: "X:\3rdParty\bin\*.dll"; DestDir: "{app}\bin\Win32" +Source: "X:\3rdParty.x64\bin\*.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode + Source: "{#VCInstallDir}\redist\x86\Microsoft.VC90.CRT\*.dll"; DestDir: "{app}\bin\Win32" +Source: "{#VCInstallDir}\redist\x64\Microsoft.VC90.CRT\*.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist; Check: Is64BitInstallMode Source: "X:\data\*.*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs skipifsourcedoesntexist @@ -93,6 +99,27 @@ Source: "{#OSGPluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{ Source: "{#OSGPluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" Source: "{#OSGPluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\Win32\osgPlugins-{#OSGVersion}" +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osg.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgDB.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgGA.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgParticle.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgText.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgUtil.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgViewer.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgSim.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist +Source: "{#OSG64InstallDir}\bin\osg{#OSGSoNumber}-osgFX.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist + +Source: "{#OSG64InstallDir}\bin\ot12-OpenThreads.dll"; DestDir: "{app}\bin\Win64"; Flags: skipifsourcedoesntexist + +Source: "{#OSG64PluginsDir}\osgdb_ac.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_osg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_3ds.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_mdl.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_jpeg.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_rgb.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_png.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist +Source: "{#OSG64PluginsDir}\osgdb_txf.dll"; DestDir: "{app}\bin\Win64\osgPlugins-{#OSGVersion}"; Flags: skipifsourcedoesntexist + [Dirs] ; Make the user installable scenery directory Name: "{app}\scenery"; Permissions: everyone-modify From e6f315c99b8e8a62bb188c08c4f0bc1cf096874e Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Jan 2011 22:52:07 +0000 Subject: [PATCH 19/31] Remove some abortive files from the build, which are no longer used. --- flightgear-release.nsi | 139 ----------------------------------- hudson_build_win_release.bat | 22 ------ 2 files changed, 161 deletions(-) delete mode 100644 flightgear-release.nsi delete mode 100644 hudson_build_win_release.bat diff --git a/flightgear-release.nsi b/flightgear-release.nsi deleted file mode 100644 index 1c1feaf..0000000 --- a/flightgear-release.nsi +++ /dev/null @@ -1,139 +0,0 @@ -!include "MUI.nsh" - -!system 'osgversion --so-number > %TEMP%\osg-so-number.txt' -!system 'osgversion --version-number > %TEMP%\osg-version.txt' - -!define /file OSGSoNumber $%TEMP%\osg-so-number.txt -!define /file OSGVersion $%TEMP%\osg-version.txt -!define /file FGVersion flightgear\version - -!echo "osg-so is ${OSGSoNumber}" - -Name "FlightGear" -OutFile fgfs_win32_${FGVersion}.exe - -; use LZMA for best compression -SetCompressor /FINAL /SOLID lzma -SetCompressorDictSize 64 - -InstallDir $PROGRAMFILES\FlightGear - -; Request admin privileges for Windows Vista -RequestExecutionLevel highest - -; don't hang around -AutoCloseWindow true - -!define UninstallKey "Software\Microsoft\Windows\CurrentVersion\Uninstall\FlightGear" -!define FGBinDir "flightgear\projects\VC90\Win32\Release" -!define FGRunBinDir "fgrun" -!define OSGInstallDir "install\msvc90\OpenSceneGraph" -!define OSGPluginsDir "${OSGInstallDir}\bin\osgPlugins-${OSGVersion}" - -!define ThirdPartyBinDir "3rdParty\bin" - -!define MUI_ICON "flightgear\projects\VC90\flightgear.ico" -!define MUI_UNICON "flightgear\projects\VC90\flightgear.ico" - -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_RIGHT -!define MUI_HEADERIMAGE_BITMAP "flightgear\package\Win-NSIS\fg-install-header.bmp" ; optional - - - -;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" -;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp" - -!insertmacro MUI_PAGE_WELCOME -; include GPL license page -!insertmacro MUI_PAGE_LICENSE "flightgear\Copying" -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -!define MUI_FINISHPAGE_RUN $INSTDIR\fgrun.exe -!define MUI_FINISHPAGE_RUN_TEXT "Run FlightGear now" -!insertmacro MUI_PAGE_FINISH - - -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -!insertmacro MUI_LANGUAGE "English" - -; The stuff to install -Section "" ;No components page, name is not important - - SetShellVarContext all - ; Set output path to the installation directory. - SetOutPath $INSTDIR - - File ${FGBinDir}\fgfs.exe - File ${FGBinDir}\fgjs.exe - File ${FGBinDir}\terrasync.exe - File ${FGRunBinDir}\fgrun.exe - - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osg.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgDB.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgGA.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgParticle.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgText.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgUtil.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgViewer.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgSim.dll - File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgFX.dll - - File ${OSGInstallDir}\bin\ot12-OpenThreads.dll - - File ${ThirdPartyBinDir}\*.dll - - ; VC runtime redistributables - File "$%VCINSTALLDIR%\redist\x86\Microsoft.VC90.CRT\*.dll" - - File /r ${FGRunBinDir}\locale - - SetOutPath $INSTDIR\osgPlugins-${OSGVersion} - File ${OSGPluginsDir}\osgdb_ac.dll - File ${OSGPluginsDir}\osgdb_osg.dll - File ${OSGPluginsDir}\osgdb_3ds.dll - File ${OSGPluginsDir}\osgdb_mdl.dll - File ${OSGPluginsDir}\osgdb_jpeg.dll - File ${OSGPluginsDir}\osgdb_rgb.dll - File ${OSGPluginsDir}\osgdb_png.dll - File ${OSGPluginsDir}\osgdb_txf.dll - - - Exec '"$INSTDIR\fgrun.exe" --silent --fg-exe="$INSTDIR\fgfs.exe" --ts-exe="$INSTDIR\terrasync.exe" ' - - CreateDirectory "$SMPROGRAMS\FlightGear" - CreateShortCut "$SMPROGRAMS\FlightGear\FlightGear.lnk" "$INSTDIR\fgrun.exe" - - - WriteUninstaller "$INSTDIR\FlightGear_Uninstall.exe" - - WriteRegStr HKLM ${UninstallKey} "DisplayName" "FlightGear" - WriteRegStr HKLM ${UninstallKey} "DisplayVersion" "${FGVersion}" - WriteRegStr HKLM ${UninstallKey} "UninstallString" "$INSTDIR\FlightGear_Uninstall.exe" - WriteRegStr HKLM ${UninstallKey} "UninstallPath" "$INSTDIR\FlightGear_Uninstall.exe" - WriteRegDWORD HKLM ${UninstallKey} "NoModify" 1 - WriteRegDWORD HKLM ${UninstallKey} "NoRepair" 1 - WriteRegStr HKLM ${UninstallKey} "URLInfoAbout" "http://www.flightgear.org/" - -SectionEnd - - - -Section "Uninstall" - - SetShellVarContext all - - - Delete "$SMPROGRAMS\FlightGear\FlightGear.lnk" - ; only delete the FlightGear group if it's empty - RMDir "$SMPROGRAMS\FlightGear" - - RMDir /r "$INSTDIR" - - DeleteRegKey HKLM ${UninstallKey} - -SectionEnd - \ No newline at end of file diff --git a/hudson_build_win_release.bat b/hudson_build_win_release.bat deleted file mode 100644 index 9692b80..0000000 --- a/hudson_build_win_release.bat +++ /dev/null @@ -1,22 +0,0 @@ -call "D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" - -ECHO #define SIMGEAR_VERSION "2.2.0" > %WORKSPACE%\simgear\simgear\version.h -cd %WORKSPACE%\simgear\projects\VC90 -msbuild SimGear.vcproj /p:Configuration=Release /m - -REM FlightGear - -cd %WORKSPACE%\flightgear -call scripts\tools\version.bat -SET HAVE_VERSION_H=1 -cd %WORKSPACE%\flightgear\projects\VC90 -msbuild FlightGear.sln /p:Configuration=Release /m - - -REM Installer - -cd %WORKSPACE% - - -REM set PATH=%PATH%;C:\Program Files (x86)\NSIS;%WORKSPACE%\install\msvc90\OpenSceneGraph\bin -REM makensis flightgear-release.nsi From 011a113656226a291c2c6cd7bde1b85f4e41e7cc Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 25 Jan 2011 00:30:47 +0000 Subject: [PATCH 20/31] Update to latest FG. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index 59d06d1..53e8fbf 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 59d06d130d4803836de43cda40575a1e8e90c52c +Subproject commit 53e8fbfcbb3ddac0dc261043fea7bd24dfa6e62d From b6f225c6e7b54014d939c10b0328a51010a69cd0 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 30 Jan 2011 18:24:23 +0100 Subject: [PATCH 21/31] Update fgmeta to latest flightgear 2.2.0 head. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index 53e8fbf..67978f9 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 53e8fbfcbb3ddac0dc261043fea7bd24dfa6e62d +Subproject commit 67978f92e553953f8b13710d57741602d796e08f From 998197ac87d3981002b9081bd9f253a7b66e689b Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 30 Jan 2011 18:30:40 +0100 Subject: [PATCH 22/31] Updated simgear to release head. (Torsten Dreyer: Fix wrong difference calculation in SGExpression) --- simgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear b/simgear index 840780d..6d26462 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit 840780dc4acf8afd08f648b1e3d83c2294bb081b +Subproject commit 6d2646239e70d46e993d08492da43c4583c4e519 From b9a3a85c634167c38b04f438a6af1deb01235f10 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 6 Feb 2011 16:00:02 +0100 Subject: [PATCH 23/31] Updated to flightgear release head, fixes for #47, #184, #204, #222 --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index 67978f9..ac71778 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 67978f92e553953f8b13710d57741602d796e08f +Subproject commit ac717783197dace28bd4f9946f757fc22c26085a From 19ef7a616a2b14075692b5f05e5b1f1afb033fa6 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 6 Feb 2011 16:47:44 +0100 Subject: [PATCH 24/31] Updated flightgear release head. Fix incomplete merge of JSBSim.cxx. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index ac71778..591ef4a 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit ac717783197dace28bd4f9946f757fc22c26085a +Subproject commit 591ef4ab0157f79d35486a5c7ac1e16147cda7af From e56aa0d62d1c645d61e0c20975685cfd5da25aba Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 6 Feb 2011 20:41:16 +0100 Subject: [PATCH 25/31] Bump simgear to latest release head. Merged OSG>=2.9.11 warning. --- simgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear b/simgear index 6d26462..7308486 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit 6d2646239e70d46e993d08492da43c4583c4e519 +Subproject commit 73084863b744534853e59fa7fe3e0547fc15ee4a From 582472784483b4c1537c5518d1f7fdbe4caa3358 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 6 Feb 2011 20:44:11 +0100 Subject: [PATCH 26/31] Original download_and_compile script by Francesco Brisa --- download_and_compile.sh | 1058 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1058 insertions(+) create mode 100755 download_and_compile.sh diff --git a/download_and_compile.sh b/download_and_compile.sh new file mode 100755 index 0000000..8df28f5 --- /dev/null +++ b/download_and_compile.sh @@ -0,0 +1,1058 @@ +#!/bin/bash +#* Written by Francesco Angelo Brisa, started January 2008. +# +# Copyright (C) 2008 Francesco Angelo Brisa - http://brisa.homelinux.net +# email: francesco@brisa.homelinux.net - fbrisa@yahoo.it +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +VERSION="1.1" + +#COMPILE GIT FGFS + +####################################################### +# THANKS TO +####################################################### +# Special thanks to Alessandro Garosi for FGComGui and +# other patches + + + +LOGFILE=compilation_log.txt +LOGSEP="***********************************" + +WHATTOBUILD= +UPDATE= +STABLE= + +APT_GET_UPDATE="y" +DOWNLOAD_PACKAGES="y" + +COMPILE="y" +RECONFIGURE="y" +DOWNLOAD="y" + + +JOPTION="" +DEBUG="" + +while getopts "suhc:p:a:d:r:j:g" OPTION +do + case $OPTION in + s) + STABLE="STABLE" + ;; + u) + UPDATE="UPDATE" + ;; + h) + WHATTOBUILD="--help" + ;; + a) + APT_GET_UPDATE=$OPTARG + ;; + c) + COMPILE=$OPTARG + ;; + p) + DOWNLOAD_PACKAGES=$OPTARG + ;; + d) + DOWNLOAD=$OPTARG + ;; + r) + RECONFIGURE=$OPTARG + ;; + j) + JOPTION=" -j"$OPTARG" " + ;; + g) + DEBUG="CXXFLAGS=-g" + ;; + ?) + echo "errore" + WHATTOBUILD="--help" + #exit + ;; + esac +done +shift $(($OPTIND - 1)) +#printf "Remaining arguments are: %s\n" "$*" +#printf "Num: %d\n" "$#" + +if [ ! "$#" = "0" ] +then + if [ "$WHATTOBUILD" = "" ] + then + WHATTOBUILD="$1" + fi + + if [ ! "$#" = "1" ] + then + UPDATE="$2" + fi + +fi + + + +####################################################### +# Last working revision +PLIB_STABLE_REVISION="2163" +OSG_STABLE_REVISION="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.3" +SIMGEAR_STABLE_REVISION="937297561fcc4daadedd1f7c49efd39291ebd5df" +FGFS_STABLE_REVISION="a5017f218fe68fbfb05cfef9e85214b198ed8f0b" +FGFS_DATA_STABLE_REVISION="061d4ec7f7037e4c71f7163d38d443e59225f399" +FGRUN_STABLE_REVISION="554" +FGCOM_STABLE_REVISION="234" +FGCOMGUI_STABLE_REVISION="46" + +####################################################### +# set script to stop if an error occours +set -e + + + +if [ "$WHATTOBUILD" = "--help" ] +then + echo "$0 Version $VERSION" + echo "Usage:" + echo "./$0 [-u] [-h] [-s] [-a y|n] [-c y|n] [-p y|n] [-d y|n] [-r y|n] [ALL|PLIB|OSG|SIMGEAR|FGFS|FGRUN|FGCOM|FGCOMGUI|ATLAS] [UPDATE]" + echo "* without options it recompiles: PLIB,OSG,SIMGEAR,FGFS,FGRUN" + echo "* Using ALL compiles everything" + echo "* Adding UPDATE it does not rebuild all (faster but to use only after one successfull first compile)" + echo "Switches:" + echo "* -u such as using UPDATE" + echo "* -h show this help" + echo "* -g compile with debug info for gcc" + echo "* -a y|n y=do an apt-get update n=skip apt-get update default=y" + echo "* -p y|n y=download packages n=skip download packages default=y" + echo "* -c y|n y=compile programs n=do not compile programs default=y" + echo "* -d y|n y=fetch programs from internet (cvs, svn, etc...) n=do not fetch default=y" + echo "* -j X Add -jX to the make compiolation default=None" + echo "* -r y|n y=reconfigure programs before compiling them n=do not reconfigure default=y" + echo "* -s compile only last stable known versions default=y" + + exit +fi + + +####################################################### +####################################################### +# Warning about compilation time and size +# Idea from Jester +echo "**************************************" +echo "* *" +echo "* Warning, the compilation process *" +echo "* is going to use 7 or more Gbytes *" +echo "* of space and at least a couple of *" +echo "* hours to download and build FG. *" +echo "* *" +echo "* Please, be patient ...... *" +echo "* *" +echo "**************************************" + + + + +####################################################### +####################################################### +# Debian 4.0rX (Etch) backports.org +# From D-HUND + +ISSUE=$(cat /etc/issue) + +# Uncomment following line to confirm backports.org is in sources.list: +#ISSUE="" + +if [ "$ISSUE" = "Debian GNU/Linux 4.0 \n \l" ]; then + clear + echo "*****************************************************" + echo "* Note to users of Debian Etch (Stable 4.0rX) *" + echo "*****************************************************" + echo + echo "Since autumn 2008 it is not possible anymore to easily install fgfs" + echo "cvs by using standard repositry. Therefore it is necessary to have" + echo "backports.org in the apt sources.list to run this script." + echo + echo "If you're using synaptic you may follow these steps:" + echo " - Open synaptics menu 'Settings' --> 'Repositories'" + echo " - Click 'Add' and do" + echo " select 'Binaries (deb)'" + echo " enter Address: 'www.backports.org/backports.org/'" + echo " enter Distribution: 'etch-backports'" + echo " enter Section(s): 'main contrib non-free'" + echo " - Close Repositries window using 'OK'" + echo " - Click 'Reload' to update database." + echo + echo "If you have backports.org in your apt-repositries and want to get" + echo "rid of this message have a look at the script." + echo -n "[c] to continue or just [ENTER] to exit script: " + if [ "$(read GOON)" != "c" ]; then + echo "Script aborted!" + exit 0 + fi +fi +####################################################### +####################################################### + + +echo $0 $* > $LOGFILE + +echo "APT_GET_UPDATE=$APT_GET_UPDATE" >> $LOGFILE +echo "DOWNLOAD_PACKAGES=$DOWNLOAD_PACKAGES" >> $LOGFILE +echo "COMPILE=$COMPILE" >> $LOGFILE +echo "RECONFIGURE=$RECONFIGURE" >> $LOGFILE +echo "DOWNLOAD=$DOWNLOAD" >> $LOGFILE +echo "JOPTION=$JOPTION" >> $LOGFILE +echo "DEBUG=$DEBUG" >> $LOGFILE + + +echo "$LOGSEP" >> $LOGFILE + +# discovering linux +if [ -e /etc/lsb-release ] +then + . /etc/lsb-release +fi + + +# default is hardy +DISTRO_PACKAGES="libglut3-dev libopenal-dev libalut-dev libalut0 libfltk1.1-dev libfltk1.1 cvs subversion cmake make build-essential automake zlib1g-dev zlib1g libwxgtk2.8-0 libwxgtk2.8-dev fluid gawk gettext libjpeg62-dev libjpeg62 libxi-dev libxi6 libxmu-dev libxmu6 libboost-dev libasound2-dev libasound2 libpng12-dev libpng12-0 libjasper1 libjasper-dev libopenexr-dev libtiff4-dev libboost-serialization-dev git-core libhal-dev boost-build libqt4-dev scons" + + + +# checking linux distro and version to differ needed packages +if [ "$DISTRIB_ID" = "Ubuntu" ] +then + echo "$DISTRIB_ID $DISTRIB_RELEASE" >> $LOGFILE +else + echo "DEBIAN I SUPPOUSE" >> $LOGFILE +fi +echo "$LOGSEP" >> $LOGFILE + + +if [ "$DOWNLOAD_PACKAGES" = "y" ] +then + + echo -n "PACKAGE INSTALLATION ... " >> $LOGFILE + + LIBOPENALPACKAGE=$(apt-cache search libopenal | grep "libopenal. " | sed s/\ .*//) + DISTRO_PACKAGES=$DISTRO_PACKAGES" "$LIBOPENALPACKAGE + + # checking linux distro and version to differ needed packages + if [ "$DISTRIB_ID" = "Ubuntu" ] + then + + if [ "$APT_GET_UPDATE" = "y" ] + then + echo "Asking your password to perform an apt-get update" + sudo apt-get update + fi + + + echo "Asking your password to perform an apt-get install ... " + sudo apt-get install $DISTRO_PACKAGES + else + # WE ARE USING DEBIAN + + if [ "$APT_GET_UPDATE" = "y" ] + then + echo "Asking root password to perform an apt-get update" + su -c "apt-get update" + fi + echo "Asking root password to perform an apt-get install ... " + su -c "apt-get install $DISTRO_PACKAGES" + fi + + echo " OK" >> $LOGFILE +fi + + + + + + + + + +COMPILE_BASE_DIR=. + + + + +#cd into compile base directory +cd "$COMPILE_BASE_DIR" + +#get absolute path +CBD=$(pwd) + +LOGFILE=$CBD/$LOGFILE + + +echo "DIRECTORY= $CBD" >> $LOGFILE +echo "$LOGSEP" >> $LOGFILE + + +if [ ! -d install ] +then + mkdir install +fi + +SUB_INSTALL_DIR=install +INSTALL_DIR=$CBD/$SUB_INSTALL_DIR + + +####################################################### +# PLIB +####################################################### +PLIB_INSTALL_DIR=plib +INSTALL_DIR_PLIB=$INSTALL_DIR/$PLIB_INSTALL_DIR + + +cd "$CBD" + +#svn co http://plib.svn.sourceforge.net/svnroot/plib/trunk plib +#cd plib + +if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "PLIB" -o "$WHATTOBUILD" = "ALL" ] +then + if [ ! "$UPDATE" = "UPDATE" ] + then + echo "****************************************" | tee -a $LOGFILE + echo "**************** PLIB ******************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + echo "COMPILING PLIB" >> $LOGFILE + echo "INSTALL_DIR_PLIB=$INSTALL_DIR_PLIB" >> $LOGFILE + + + #we rebuild plib only if not in update + #if [ "$DOWNLOAD" = "y" ] + #then + #echo -n "DOWNLOADING FROM http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz ... " >> $LOGFILE + #wget -c http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz + #echo " OK" >> $LOGFILE + + #echo -n "UNPACKING plib-1.8.5.tar.gz ... " >> $LOGFILE + #tar zxvf plib-1.8.5.tar.gz + #echo " OK" >> $LOGFILE + #fi + #cd plib-1.8.5 + + + PLIB_STABLE_REVISION_="" + if [ "$STABLE" = "STABLE" ] + then + PLIB_STABLE_REVISION_=" -r $PLIB_STABLE_REVISION" + fi + + #we rebuild plib only if not in update, using svn version tagged 1.8.6 + if [ "$DOWNLOAD" = "y" ] + then + if [ -d "plib/.svn" ] + then + echo -n "updating plib svn" >>$LOGFILE + cd plib + svn update $PLIB_STABLE_REVISION_ + cd - + else + echo -n "DOWNLOADING FROM http://plib.svn.sourceforge.net ..." >> $LOGFILE + svn $PLIB_STABLE_REVISION_ co http://plib.svn.sourceforge.net/svnroot/plib/trunk plib + cat plib/src/util/ul.h | sed s/"PLIB_TINY_VERSION 5"/"PLIB_TINY_VERSION 6"/g > ul.h-v1.8.6 + mv ul.h-v1.8.6 plib/src/util/ul.h + echo " OK" >> $LOGFILE + fi + fi + cd plib + + if [ "$RECONFIGURE" = "y" ] + then + echo "AUTOGEN plib" >> $LOGFILE + ./autogen.sh 2>&1 | tee -a $LOGFILE + echo "CONFIGURING plib" >> $LOGFILE + ./configure --prefix="$INSTALL_DIR_PLIB" --exec-prefix="$INSTALL_DIR_PLIB" 2>&1 | tee -a $LOGFILE + else + echo "NO RECONFIGURE FOR plib" >> $LOGFILE + fi + + if [ "$COMPILE" = "y" ] + then + echo "MAKE plib" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + + if [ ! -d $INSTALL_DIR_PLIB ] + then + mkdir -p "$INSTALL_DIR_PLIB" + fi + + + echo "INSTALL plib" >> $LOGFILE + echo "make install" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + + cd - + fi +fi + + + +####################################################### +# OpenSceneGraph +####################################################### +OSG_INSTALL_DIR=OpenSceneGraph +INSTALL_DIR_OSG=$INSTALL_DIR/$OSG_INSTALL_DIR +cd "$CBD" + +if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "OSG" -o "$WHATTOBUILD" = "ALL" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "**************** OSG *******************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + OSG_SVN="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk" + if [ "$STABLE" = "STABLE" -o "Y" = "Y" ] + then + OSG_SVN=$OSG_STABLE_REVISION + fi + + + if [ "$DOWNLOAD" = "y" ] + then + echo -n "SVN FROM http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk ... " >> $LOGFILE + svn co "$OSG_SVN" OpenSceneGraph + echo " OK" >> $LOGFILE + fi + cd OpenSceneGraph + + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$RECONFIGURE" = "y" ] + then + echo -n "RECONFIGURE OSG ... " >> $LOGFILE + rm -f CMakeCache.txt + cmake . + echo " OK" >> $LOGFILE + + cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3 -D__STDC_CONSTANT_MACROS" -D CMAKE_C_FLAGS="-O3" -D CMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_OSG" . 2>&1 | tee -a $LOGFILE + + echo "RECONFIGURE OSG DONE." >> $LOGFILE + + fi + fi + + if [ "$COMPILE" = "y" ] + then + echo "COMPILING OSG" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + if [ ! -d $INSTALL_DIR_OSG ] + then + mkdir -p "$INSTALL_DIR_OSG" + fi + + echo "INSTALLING OSG" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + + #FIX FOR 64 BIT COMPILATION + if [ -d "$INSTALL_DIR_OSG/lib64" ] + then + if [ -L "$INSTALL_DIR_OSG/lib" ] + then + echo "link already done" + else + ln -s "$INSTALL_DIR_OSG/lib64" "$INSTALL_DIR_OSG/lib" + fi + fi + + cd - +fi + +####################################################### +# SIMGEAR +####################################################### +SIMGEAR_INSTALL_DIR=simgear +INSTALL_DIR_SIMGEAR=$INSTALL_DIR/$SIMGEAR_INSTALL_DIR +cd "$CBD" + +if [ ! -d "simgear" ] +then + mkdir "simgear" +fi + +if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "SIMGEAR" -o "$WHATTOBUILD" = "ALL" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "**************** SIMGEAR ***************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + + if [ "$DOWNLOAD" = "y" ] + then + cd simgear + #echo -n "CVS FROM cvs.simgear.org:/var/cvs/SimGear-0.3 ... " >> $LOGFILE + #cvs -z5 -d :pserver:cvsguest:guest@cvs.simgear.org:/var/cvs/SimGear-0.3 login + #cvs -z5 -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source + + + echo -n "git FROM git://gitorious.org/fg/simgear.git ... " >> $LOGFILE + + if [ -d "simgear" ] + then + echo "simgear exists already." + else + git clone git://gitorious.org/fg/simgear.git + fi + + cd simgear + + if [ "$STABLE" = "STABLE" ] + then + git pull origin + git reset --hard $SIMGEAR_STABLE_REVISION + fi + + git pull + cd .. + + + + echo " OK" >> $LOGFILE + cd .. + + fi + + cd "simgear/simgear" + + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$RECONFIGURE" = "y" ] + then + echo "AUTOGEN SIMGEAR" >> $LOGFILE + ./autogen.sh 2>&1 | tee -a $LOGFILE + + echo "CONFIGURE SIMGEAR" >> $LOGFILE + echo ./configure $DEBUG --prefix="$INSTALL_DIR_SIMGEAR" --exec-prefix="$INSTALL_DIR_SIMGEAR" --with-osg="$INSTALL_DIR_OSG" --with-plib="$INSTALL_DIR_PLIB" --with-jpeg-factory --with-boost-libdir=/usr/include/boost + ./configure $DEBUG --prefix="$INSTALL_DIR_SIMGEAR" --exec-prefix="$INSTALL_DIR_SIMGEAR" --with-osg="$INSTALL_DIR_OSG" --with-plib="$INSTALL_DIR_PLIB" --with-jpeg-factory --with-boost-libdir=/usr/include/boost 2>&1 | tee -a $LOGFILE + fi + fi + + if [ "$COMPILE" = "y" ] + then + echo "MAKE SIMGEAR" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + echo "INSTALL SIMGEAR" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + cd - +fi + + +####################################################### +# FGFS +####################################################### +FGFS_INSTALL_DIR=fgfs +INSTALL_DIR_FGFS=$INSTALL_DIR/$FGFS_INSTALL_DIR +cd "$CBD" + +if [ ! -d "fgfs" ] +then + mkdir "fgfs" +fi + +if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "FGFS" -o "$WHATTOBUILD" = "DATA" -o "$WHATTOBUILD" = "ALL" ] +then + + echo "****************************************" | tee -a $LOGFILE + echo "**************** FGFS ******************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + cd fgfs + + if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "FGFS" -o "$WHATTOBUILD" = "ALL" ] + then + if [ "$DOWNLOAD" = "y" ] + then + #echo -n "CVS FROM cvs.flightgear.org:/var/cvs/FlightGear-0.9 ... " >> $LOGFILE + #cvs -z5 -d :pserver:cvsguest:guest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login + #cvs -z5 -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co source + + echo -n "GIT FROM git://gitorious.org/fg/flightgear.git ... " >> $LOGFILE + + + if [ -d "flightgear" ] + then + echo "flightgear exists already." + else + git clone git://gitorious.org/fg/flightgear.git + fi + + cd flightgear + + if [ "$STABLE" = "STABLE" ] + then + git pull origin + git reset --hard $FGFS_STABLE_REVISION + fi + + + git pull + cd .. + + echo " OK" >> $LOGFILE + + fi + + cd flightgear + + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$RECONFIGURE" = "y" ] + then + echo "AUTOGEN FGFS" >> $LOGFILE + ./autogen.sh 2>&1 | tee -a $LOGFILE + + echo "CONFIGURE FGFS" >> $LOGFILE + echo ./configure "$DEBUG" --with-eventinput --prefix=$INSTALL_DIR_FGFS --exec-prefix=$INSTALL_DIR_FGFS --with-osg="$INSTALL_DIR_OSG" --with-simgear="$INSTALL_DIR_SIMGEAR" --with-plib="$INSTALL_DIR_PLIB" + ./configure "$DEBUG" --with-eventinput --prefix=$INSTALL_DIR_FGFS --exec-prefix=$INSTALL_DIR_FGFS --with-osg="$INSTALL_DIR_OSG" --with-simgear="$INSTALL_DIR_SIMGEAR" --with-plib="$INSTALL_DIR_PLIB" 2>&1 | tee -a $LOGFILE + fi + fi + + if [ "$COMPILE" = "y" ] + then + echo "MAKE FGFS" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + echo "INSTALL FGFS" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + cd .. + fi + cd .. + + + if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "DATA" -o "$WHATTOBUILD" = "ALL" ] + then + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$DOWNLOAD" = "y" ] + then + EXDIR=$(pwd) + cd $INSTALL_DIR_FGFS + echo -n "GIT DATA FROM git://gitorious.org/fg/fgdata.git ... " >> $LOGFILE + #cvs -z5 -d :pserver:cvsguest:guest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login + #cvs -z5 -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data + + if [ -d "fgdata" ] + then + cd fgdata + + if [ "$STABLE" = "STABLE" ] + then + git pull origin + git reset --hard $FGFS_DATA_STABLE_REVISION + fi + + git pull + cd .. + else + git clone git://gitorious.org/fg/fgdata.git + fi + + + echo " OK" >> $LOGFILE + cd "$EXDIR" + fi + fi + fi + + cat > run_fgfs.sh << ENDOFALL +#!/bin/sh +cd \$(dirname \$0) +cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin +export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib +./fgfs --fg-root=\$PWD/../fgdata/ \$@ +ENDOFALL + chmod 755 run_fgfs.sh + + cat > run_fgfs_debug.sh << ENDOFALL2 +#!/bin/sh +cd \$(dirname \$0) +P1=\$PWD +cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin +export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib +gdb --directory="\$P1"/fgfs/source/src/ --args fgfs --fg-root=\$PWD/../fgdata/ \$@ +ENDOFALL2 + chmod 755 run_fgfs_debug.sh + + #echo "#!/bin/sh" > run_fgfs.sh + #echo "cd \$(dirname \$0)" >> run_fgfs.sh + #echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> run_fgfs.sh + #echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_fgfs.sh + #echo "./fgfs --fg-root=\$PWD/../fgdata/ \$@" >> run_fgfs.sh + #chmod 755 run_fgfs.sh + + SCRIPT=run_terrasync.sh + echo "#!/bin/sh" > $SCRIPT + echo "cd \$(dirname \$0)" >> $SCRIPT + echo "cd $SUB_INSTALL_DIR/$FGFS_INSTALL_DIR/bin" >> $SCRIPT + echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> $SCRIPT + echo "./terrasync \$@" >> $SCRIPT + chmod 755 $SCRIPT + +fi + + + + +####################################################### +# FGRUN +####################################################### +FGRUN_INSTALL_DIR=fgrun +INSTALL_DIR_FGRUN=$INSTALL_DIR/$FGRUN_INSTALL_DIR +cd "$CBD" + +if [ "$WHATTOBUILD" = "" -o "$WHATTOBUILD" = "FGRUN" -o "$WHATTOBUILD" = "ALL" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "**************** FGRUN *****************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + if [ "$DOWNLOAD" = "y" ] + then + + FGRUN_STABLE_REVISION_="" + if [ "$STABLE" = "STABLE" ] + then + FGRUN_STABLE_REVISION_=" -r $FGRUN_STABLE_REVISION" + fi + + + echo -n "SVN FROM http://fgrun.svn.sourceforge.net/svnroot/fgrun ... " >> $LOGFILE + svn $FGRUN_STABLE_REVISION_ co http://fgrun.svn.sourceforge.net/svnroot/fgrun/trunk fgrun + echo " OK" >> $LOGFILE + + #echo -n "Patching fgrun ... " >> $LOGFILE + #cd fgrun/ + + #MF=src/wizard_funcs.cxx && cat $MF | awk '{o=$0} /#include / {o=o"\n#include "} {print o}' > "$MF"2 && mv "$MF"2 "$MF" + #MF=src/AirportBrowser.cxx && cat $MF | awk '{o=$0} /#include / {o=o"\n#include "} {print o}' > "$MF"2 && mv "$MF"2 "$MF" + #MF=src/run_posix.cxx && cat $MF | awk '{o=$0} /#include / {o=o"\n#include "} {print o}' > "$MF"2 && mv "$MF"2 "$MF" + + #Thanks to Brandano..... + #if [ ! -e "compile-fix-20100102.patch" ] + #then + # wget http://brisa.homelinux.net/fgfs/compile-fix-20100102.patch + #fi + #patch -p0 < compile-fix-20100102.patch + + #cd - + fi + #cd fgrun/trunk/fgrun/ + cd fgrun/fgrun/ + + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$RECONFIGURE" = "y" ] + then + echo "AUTOGEN FGRUN" >> $LOGFILE + ./autogen.sh 2>&1 | tee -a $LOGFILE + echo "CONFIGURE FGRUN" >> $LOGFILE + + ./configure --prefix=$INSTALL_DIR_FGRUN --exec-prefix=$INSTALL_DIR_FGRUN --with-osg="$INSTALL_DIR_OSG" --with-simgear="$INSTALL_DIR_SIMGEAR" CPPFLAGS="-I$INSTALL_DIR_PLIB/include" LDFLAGS="-L$INSTALL_DIR_PLIB/lib" 2>&1 | tee -a $LOGFILE + fi + fi + + if [ "$COMPILE" = "y" ] + then + echo "MAKE FGRUN" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>1 | tee -a $LOGFILE + + echo "INSTALL FGRUN" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + cd - + + SCRIPT=run_fgrun.sh + echo "#!/bin/sh" > $SCRIPT + echo "cd \$(dirname \$0)" >> $SCRIPT + echo "cd $SUB_INSTALL_DIR/$FGRUN_INSTALL_DIR/bin" >> $SCRIPT + echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> $SCRIPT + echo "./fgrun --fg-exe=\$PWD/../../$FGFS_INSTALL_DIR/bin/fgfs --fg-root=\$PWD/../../$FGFS_INSTALL_DIR/fgdata \$@" >> $SCRIPT + chmod 755 $SCRIPT + + +fi + + + +####################################################### +# FGCOM +####################################################### +FGCOM_INSTALL_DIR=fgcom +INSTALL_DIR_FGCOM=$INSTALL_DIR/$FGCOM_INSTALL_DIR +cd "$CBD" + +if [ "$WHATTOBUILD" = "ALL" -o "$WHATTOBUILD" = "FGCOM" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "**************** FGCOM *****************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + + #svn checkout svn://svn.dfn.de:/fgcom/trunk fgcom + if [ "$DOWNLOAD" = "y" ] + then + + FGCOM_STABLE_REVISION_="" + if [ "$STABLE" = "STABLE" ] + then + FGCOM_STABLE_REVISION_=" -r $FGCOM_STABLE_REVISION" + fi + + + echo -n "SVN FROM https://appfgcom.svn.sourceforge.net/svnroot/fgcom/trunk ... " >> $LOGFILE + svn $FGCOM_STABLE_REVISION_ co https://appfgcom.svn.sourceforge.net/svnroot/fgcom/trunk fgcom + echo " OK" >> $LOGFILE + + + +#patch for new netdb.h version. + cat fgcom/iaxclient/lib/libiax2/src/iax.c | sed s/hp-\>h_addr,/hp-\>h_addr_list[0],/g > fgcom/iaxclient/lib/libiax2/src/iax_ok.c + mv fgcom/iaxclient/lib/libiax2/src/iax_ok.c fgcom/iaxclient/lib/libiax2/src/iax.c + fi + + cd fgcom/src/ + + if [ "$RECONFIGURE" = "y" ] + then + cat Makefile | sed s/\\//MY_SLASH_HERE/g > Makefile_NOSLASHES + + + + + # 1 + INSTALL_DIR_PLIB_NO_SLASHES=$(echo "$INSTALL_DIR_PLIB" | sed -e 's/\//MY_SLASH_HERE/g') + cat Makefile_NOSLASHES | sed s/PLIB_PREFIX:=MY_SLASH_HEREusrMY_SLASH_HERElocalMY_SLASH_HEREsrcMY_SLASH_HEREfgfs-builderMY_SLASH_HEREinstall/PLIB_PREFIX:=$INSTALL_DIR_PLIB_NO_SLASHES/g > Makefile_temp + mv -f Makefile_temp Makefile_NOSLASHES + + #2 + CXXFLAGS=$(cat Makefile_NOSLASHES | grep ^CXXFLAGS | head -n 1) + CXXFLAGS2=$CXXFLAGS" -I $INSTALL_DIR_SIMGEAR/include -I $INSTALL_DIR_OSG/include" + CXXFLAGS3=$(echo $CXXFLAGS2 | sed s/\\//MY_SLASH_HERE/g) + + cat Makefile_NOSLASHES | sed s/^CXXFLAGS.*/"$CXXFLAGS3"/g > Makefile_temp + mv -f Makefile_temp Makefile_NOSLASHES + + #3 + LDFLAGS=$(cat Makefile_NOSLASHES | grep ^LDFLAGS | head -n 1) + LDFLAGS2=$LDFLAGS" -L $INSTALL_DIR_SIMGEAR/lib" + LDFLAGS3=$(echo $LDFLAGS2 | sed s/\\//MY_SLASH_HERE/g) + + cat Makefile_NOSLASHES | sed s/^LDFLAGS.*/"$LDFLAGS3"/g > Makefile_temp + mv -f Makefile_temp Makefile_NOSLASHES + + #4 + INSTALL_DIR_FGCOM_NO_SLASHS=$(echo "$INSTALL_DIR_FGCOM" | sed -e 's/\//MY_SLASH_HERE/g') + INSTALL_BIN_FGCOM_NO_SLASHS="$INSTALL_DIR_FGCOM_NO_SLASHS""MY_SLASH_HEREbin" + + cat Makefile_NOSLASHES | sed s/INSTALL_BIN:=MY_SLASH_HEREusrMY_SLASH_HERElocalMY_SLASH_HEREbin/INSTALL_BIN:=$INSTALL_BIN_FGCOM_NO_SLASHS/g > Makefile_temp + mv -f Makefile_temp Makefile_NOSLASHES + + cat Makefile_NOSLASHES | sed s/INSTALL_DIR:=MY_SLASH_HEREusrMY_SLASH_HERElocal/INSTALL_DIR:=$INSTALL_DIR_FGCOM_NO_SLASHS/g > Makefile_temp + mv -f Makefile_temp Makefile_NOSLASHES + + + #last + cat Makefile_NOSLASHES | sed s/MY_SLASH_HERE/\\//g > Makefile + + fi + + + + mkdir -p "$INSTALL_DIR_FGCOM"/bin + + if [ "$COMPILE" = "y" ] + then + echo "MAKE FGCOM" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + echo "INSTALL FGCOM" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + cd - + + echo "#!/bin/sh" > run_fgcom.sh + echo "cd \$(dirname \$0)" >> run_fgcom.sh + echo "cd $SUB_INSTALL_DIR/$FGCOM_INSTALL_DIR/bin" >> run_fgcom.sh + echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_fgcom.sh + echo "./fgcom -Sfgcom.flightgear.org.uk \$@" >> run_fgcom.sh + chmod 755 run_fgcom.sh + +fi + + + +####################################################### +# FGCOMGUI +####################################################### +FGCOMGUI_INSTALL_DIR=fgcomgui +INSTALL_DIR_FGCOMGUI=$INSTALL_DIR/$FGCOMGUI_INSTALL_DIR +cd "$CBD" + +if [ "$WHATTOBUILD" = "ALL" -o "$WHATTOBUILD" = "FGCOMGUI" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "*************** FGCOMGUI ***************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + + #svn checkout svn://svn.dfn.de:/fgcom/trunk fgcom + if [ "$DOWNLOAD" = "y" ] + then + FGCOMGUI_STABLE_REVISION_="" + if [ "$STABLE" = "STABLE" ] + then + FGCOMGUI_STABLE_REVISION_=" -r $FGCOMGUI_STABLE_REVISION" + fi + + echo -n "SVN FROM https://fgcomgui.googlecode.com/svn/trunk ... " >> $LOGFILE + svn $FGCOMGUI_STABLE_REVISION_ co https://fgcomgui.googlecode.com/svn/trunk fgcomgui + echo " OK" >> $LOGFILE + + fi + + cd fgcomgui/ + + mkdir -p "$INSTALL_DIR_FGCOMGUI" + + if [ "$COMPILE" = "y" ] + then + + + echo "SCONS FGCOMGUI" >> $LOGFILE + echo "scons prefix=\"$INSTALL_DIR_FGCOMGUI\" $JOPTION" >> $LOGFILE + scons prefix="$INSTALL_DIR_FGCOMGUI" $JOPTION 2>&1 | tee -a $LOGFILE + echo "INSTALL FGCOM" >> $LOGFILE + scons install 2>&1 | tee -a $LOGFILE + fi + cd - + + echo "#!/bin/sh" > run_fgcomgui.sh + echo "cd \$(dirname \$0)" >> run_fgcomgui.sh + echo "cd $SUB_INSTALL_DIR/$FGCOMGUI_INSTALL_DIR/bin" >> run_fgcomgui.sh + echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_fgcomgui.sh + echo "export PATH=../../fgcom/bin/:$PATH" >> run_fgcomgui.sh + echo "./fgcomgui \$@" >> run_fgcomgui.sh + chmod 755 run_fgcomgui.sh + +fi + + +####################################################### +# ATLAS +####################################################### +ATLAS_INSTALL_DIR=atlas +INSTALL_DIR_ATLAS=$INSTALL_DIR/$ATLAS_INSTALL_DIR +cd "$CBD" + +if [ "$WHATTOBUILD" = "ALL" -o "$WHATTOBUILD" = "ATLAS" ] +then + echo "****************************************" | tee -a $LOGFILE + echo "**************** ATLAS *****************" | tee -a $LOGFILE + echo "****************************************" | tee -a $LOGFILE + + + + if [ "$DOWNLOAD" = "y" ] + then + #echo "Downloading from http://ovh.dl.sourceforge.net/project/atlas/atlas/0.3.0/Atlas-0.3.0.tar.gz ... " >> $LOGFILE + #wget -c http://ovh.dl.sourceforge.net/project/atlas/atlas/0.3.0/Atlas-0.3.0.tar.gz + #echo " OK" >> $LOGFILE + #tar zxvf Atlas-0.3.0.tar.gz + + + echo -n "CSV FROM atlas.cvs.sourceforge.net:/cvsroot/atlas ... " >> $LOGFILE + cvs -z3 -d:pserver:anonymous@atlas.cvs.sourceforge.net:/cvsroot/atlas co Atlas + echo " OK" >> $LOGFILE + + #echo -n "CSV PATCH FROM http://janodesbois.free.fr ... " >> $LOGFILE + #cd Atlas + #wget http://janodesbois.free.fr/doc/atlas-CVS.diff + #patch -p0 < atlas-CVS.diff + #cd .. + #echo " OK" >> $LOGFILE + + fi + cd Atlas + #cd Atlas-0.3.0 + + if [ ! "$UPDATE" = "UPDATE" ] + then + if [ "$RECONFIGURE" = "y" ] + then + echo "AUTOGEN ATLAS" >> $LOGFILE + ./autogen.sh 2>&1 | tee -a $LOGFILE + echo "CONFIGURE ATLAS" >> $LOGFILE + ./configure --prefix=$INSTALL_DIR_ATLAS --exec-prefix=$INSTALL_DIR_ATLAS --with-plib=$INSTALL_DIR_PLIB --with-simgear="$INSTALL_DIR_SIMGEAR" --with-fgbase="$INSTALL_DIR_FGFS/fgdata" CXXFLAGS="$CXXFLAGS -I$CBD/OpenSceneGraph/include" 2>&1 | tee -a $LOGFILE + make clean + fi + fi + if [ "$COMPILE" = "y" ] + then + echo "MAKE ATLAS" >> $LOGFILE + echo "make $JOPTION" >> $LOGFILE + make $JOPTION 2>&1 | tee -a $LOGFILE + + echo "INSTALL ATLAS" >> $LOGFILE + make install 2>&1 | tee -a $LOGFILE + fi + cd - + + echo "#!/bin/sh" > run_atlas.sh + echo "cd \$(dirname \$0)" >> run_atlas.sh + echo "cd $SUB_INSTALL_DIR/$ATLAS_INSTALL_DIR/bin" >> run_atlas.sh + echo "export LD_LIBRARY_PATH=../../$PLIB_INSTALL_DIR/lib:../../$OSG_INSTALL_DIR/lib:../../$SIMGEAR_INSTALL_DIR/lib" >> run_atlas.sh + echo "./Atlas --fg-root=\$PWD/../../$FGFS_INSTALL_DIR/fgdata \$@" >> run_atlas.sh + chmod 755 run_atlas.sh + +fi + + + +echo "To start fgfs, run the run_fgfs.sh file" +echo "To start terrasync, run the run_terrasync.sh file" +echo "To start fgrun, run the run_fgrun.sh file" +echo "To start fgcom, run the run_fgcom.sh file" +echo "To start fgcom GUI, run the run_fgcomgui.sh file" +echo "To start atlas, run the run_atlas.sh file" + + +if [ "$WHATTOBUILD" = "--help" ] +then + echo "" +else + echo "Usage: $0 -h" + echo "for help" +fi From d8033e0df91b5a7a40b6092cbd5c9264155987ce Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 6 Feb 2011 20:54:15 +0100 Subject: [PATCH 27/31] Updated download_and_install script to use a stable OSG revision --- download_and_compile.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/download_and_compile.sh b/download_and_compile.sh index 8df28f5..3265281 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . -VERSION="1.1" +VERSION="1.2" #COMPILE GIT FGFS @@ -109,7 +109,7 @@ fi ####################################################### -# Last working revision +# Last stable revision: currently FlightGear 2.0 with OSG 2.8.3 PLIB_STABLE_REVISION="2163" OSG_STABLE_REVISION="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.3" SIMGEAR_STABLE_REVISION="937297561fcc4daadedd1f7c49efd39291ebd5df" @@ -119,6 +119,9 @@ FGRUN_STABLE_REVISION="554" FGCOM_STABLE_REVISION="234" FGCOMGUI_STABLE_REVISION="46" +# Current developer revision: latest FlightGear GIT (2.3.0) with OSG 2.9.9 +OSG_UNSTABLE_REVISION="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.9.9" + ####################################################### # set script to stop if an error occours set -e @@ -425,7 +428,7 @@ then echo "**************** OSG *******************" | tee -a $LOGFILE echo "****************************************" | tee -a $LOGFILE - OSG_SVN="http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk" + OSG_SVN=$OSG_UNSTABLE_REVISION if [ "$STABLE" = "STABLE" -o "Y" = "Y" ] then OSG_SVN=$OSG_STABLE_REVISION @@ -434,7 +437,7 @@ then if [ "$DOWNLOAD" = "y" ] then - echo -n "SVN FROM http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk ... " >> $LOGFILE + echo -n "SVN FROM $OSG_SVN ... " >> $LOGFILE svn co "$OSG_SVN" OpenSceneGraph echo " OK" >> $LOGFILE fi From 924a1b80a5d2309e0b2fca3824579dba59baed9a Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 11 Feb 2011 20:00:21 +0100 Subject: [PATCH 28/31] Updated fg/sg release head: FreeBSD support. --- flightgear | 2 +- simgear | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flightgear b/flightgear index 591ef4a..a4ebec6 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 591ef4ab0157f79d35486a5c7ac1e16147cda7af +Subproject commit a4ebec667da0f849bcbf0be3fed1df3bca7d1db9 diff --git a/simgear b/simgear index 7308486..5208750 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit 73084863b744534853e59fa7fe3e0547fc15ee4a +Subproject commit 5208750cdb34ed98411a2104963965b08fb72a47 From 7f45dd7a13b6e18b7142375ad60936639779492b Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 13 Feb 2011 18:47:38 +0100 Subject: [PATCH 29/31] Updated fg release head. --- flightgear | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flightgear b/flightgear index a4ebec6..526cd9f 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit a4ebec667da0f849bcbf0be3fed1df3bca7d1db9 +Subproject commit 526cd9fa6e5b89522c528d4a7f5f7b2cafb9095e From fa16219cfde92e20aa315eb0b17e82675ab8d473 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 4 Mar 2011 23:04:19 +0100 Subject: [PATCH 30/31] Update sg/fg release head. --- flightgear | 2 +- simgear | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flightgear b/flightgear index 526cd9f..118d8fb 160000 --- a/flightgear +++ b/flightgear @@ -1 +1 @@ -Subproject commit 526cd9fa6e5b89522c528d4a7f5f7b2cafb9095e +Subproject commit 118d8fbca5d98e994d572e4c922f76ba2cab9e52 diff --git a/simgear b/simgear index 5208750..e55017b 160000 --- a/simgear +++ b/simgear @@ -1 +1 @@ -Subproject commit 5208750cdb34ed98411a2104963965b08fb72a47 +Subproject commit e55017bbfce20a999bc9173260f402b2ec3819d0 From 5718b4d010473c629656eaee0061dbfc1d671c0c Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 21 May 2011 12:25:00 +0100 Subject: [PATCH 31/31] Update launcher build script for 2.2.0 release --- hudson_mac_build_launcher.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hudson_mac_build_launcher.sh b/hudson_mac_build_launcher.sh index 4cf8e54..dc3bd24 100755 --- a/hudson_mac_build_launcher.sh +++ b/hudson_mac_build_launcher.sh @@ -1,7 +1,7 @@ #!/bin/sh -SDK_PATH="/Developer/SDKs/MacOSX10.5.sdk" -OSX_TARGET="10.5" +SDK_PATH="/Developer/SDKs/MacOSX10.6.sdk" +OSX_TARGET="10.6" svn co https://macflightgear.svn.sourceforge.net/svnroot/macflightgear/trunk/FlightGearOSX macflightgear