2012-08-02 06:33:06 +00:00
|
|
|
!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 Nightly vs2010"
|
|
|
|
OutFile fgfs_win64_vs2010_nightly_${FGVersion}.exe
|
|
|
|
|
|
|
|
; use LZMA for best compression
|
|
|
|
SetCompressor /FINAL /SOLID lzma
|
|
|
|
SetCompressorDictSize 64
|
|
|
|
|
|
|
|
InstallDir $PROGRAMFILES\FlightGear64-nightly-2010
|
|
|
|
|
|
|
|
; Request admin privileges for Windows Vista
|
|
|
|
RequestExecutionLevel highest
|
|
|
|
|
|
|
|
; don't hang around
|
|
|
|
AutoCloseWindow true
|
|
|
|
|
|
|
|
!define UninstallKey "Software\Microsoft\Windows\CurrentVersion\Uninstall\FlightGear64-nightly-2010"
|
|
|
|
!define FGBinDir "install\msvc100-64\FlightGear\bin"
|
2013-10-31 13:37:34 +00:00
|
|
|
!define FGShareDir "install\msvc100-64\FlightGear\share"
|
2012-08-02 06:33:06 +00:00
|
|
|
!define FGRunDir "install\msvc100-64\fgrun"
|
2013-10-31 13:37:34 +00:00
|
|
|
!define RTIInstallDir "install\msvc100-64\OpenRTI"
|
2012-08-02 06:33:06 +00:00
|
|
|
!define OSGInstallDir "install\msvc100-64\OpenSceneGraph"
|
|
|
|
!define OSGPluginsDir "${OSGInstallDir}\bin\osgPlugins-${OSGVersion}"
|
|
|
|
|
|
|
|
!define ThirdPartyBinDir "3rdParty.x64\bin"
|
|
|
|
|
|
|
|
!define MUI_ICON "flightgear\package\flightgear.ico"
|
|
|
|
!define MUI_UNICON "flightgear\package\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
|
|
|
|
|
2013-10-31 13:37:34 +00:00
|
|
|
!define MUI_FINISHPAGE_RUN $INSTDIR\bin\fgrun.exe
|
2012-08-02 06:33:06 +00:00
|
|
|
!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.
|
2013-10-31 13:37:34 +00:00
|
|
|
SetOutPath $INSTDIR\share\flightgear
|
|
|
|
File ${FGShareDir}\flightgear\positions.txt
|
|
|
|
File ${FGShareDir}\flightgear\special_frequencies.txt
|
2012-08-02 06:33:06 +00:00
|
|
|
|
2013-10-31 13:37:34 +00:00
|
|
|
SetOutPath $INSTDIR\bin
|
2012-08-02 06:33:06 +00:00
|
|
|
File ${FGBinDir}\fgfs.exe
|
|
|
|
File ${FGBinDir}\fgjs.exe
|
2013-10-31 13:37:34 +00:00
|
|
|
File ${FGBinDir}\terrasync.exe
|
2012-08-02 06:33:06 +00:00
|
|
|
File ${FGRunDir}\bin\fgrun.exe
|
2013-10-31 13:37:34 +00:00
|
|
|
File ${FGBinDir}\fgcom.exe
|
|
|
|
|
2012-08-02 06:33:06 +00:00
|
|
|
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
|
|
|
|
|
2013-09-30 18:08:05 +00:00
|
|
|
File ${OSGInstallDir}\bin\ot13-OpenThreads.dll
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
File ${ThirdPartyBinDir}\*.dll
|
2013-10-31 13:37:34 +00:00
|
|
|
|
|
|
|
File ${RTIInstallDir}\bin\FedTime.dll
|
|
|
|
File ${RTIInstallDir}\bin\RTI-NG.dll
|
|
|
|
File ${RTIInstallDir}\bin\OpenRTI.dll
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
; VC runtime redistributables
|
2013-10-31 13:37:34 +00:00
|
|
|
File "$%VCINSTALLDIR%\redist\x86\Microsoft.VC100.CRT\*.dll"
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
File /r ${FGRunDir}\share\locale
|
|
|
|
|
2013-10-31 13:37:34 +00:00
|
|
|
SetOutPath $INSTDIR\bin\osgPlugins-${OSGVersion}
|
2012-08-02 06:33:06 +00:00
|
|
|
File ${OSGPluginsDir}\osgdb_ac.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_osg.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_osga.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_dds.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_txf.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_freetype.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osg.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osganimation.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgfx.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgparticle.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgshadow.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgsim.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgterrain.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgtext.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_serializers_osgvolume.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_deprecated_osg.dll
|
|
|
|
File ${OSGPluginsDir}\osgdb_deprecated_osgparticle.dll
|
|
|
|
|
|
|
|
|
2013-10-31 13:37:34 +00:00
|
|
|
Exec '"$INSTDIR\bin\fgrun.exe" --silent --fg-exe="$INSTDIR\bin\fgfs.exe" --ts-exe="$INSTDIR\bin\terrasync.exe" '
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\FlightGear"
|
2013-10-31 13:37:34 +00:00
|
|
|
CreateShortCut "$SMPROGRAMS\FlightGear\FlightGear64-nightly-2010.lnk" "$INSTDIR\bin\fgrun.exe"
|
|
|
|
CreateShortCut "$SMPROGRAMS\FlightGear\FGCom-nightly-2010.lnk" "$INSTDIR\bin\fgcom.exe"
|
|
|
|
CreateShortCut "$SMPROGRAMS\FlightGear\FGCom-testing-nightly-2010.lnk" "$INSTDIR\bin\fgcom.exe" "-f910"
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
|
2013-10-31 13:37:34 +00:00
|
|
|
WriteUninstaller "$INSTDIR\bin\FlightGear_Uninstall.exe"
|
2012-08-02 06:33:06 +00:00
|
|
|
|
|
|
|
WriteRegStr HKLM ${UninstallKey} "DisplayName" "FlightGear64 Nightly (vs2010 build)"
|
|
|
|
WriteRegStr HKLM ${UninstallKey} "DisplayVersion" "${FGVersion}"
|
2013-10-31 13:37:34 +00:00
|
|
|
WriteRegStr HKLM ${UninstallKey} "UninstallString" "$INSTDIR\bin\FlightGear_Uninstall.exe"
|
|
|
|
WriteRegStr HKLM ${UninstallKey} "UninstallPath" "$INSTDIR\bin\FlightGear_Uninstall.exe"
|
2012-08-02 06:33:06 +00:00
|
|
|
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\FlightGear64-nightly-2010.lnk"
|
2013-10-31 13:37:34 +00:00
|
|
|
Delete "$SMPROGRAMS\FlightGear\FGCom-nightly-2010.lnk"
|
|
|
|
Delete "$SMPROGRAMS\FlightGear\FGCom-testing-nightly-2010.lnk"
|
2012-08-02 06:33:06 +00:00
|
|
|
; only delete the FlightGear group if it's empty
|
|
|
|
RMDir "$SMPROGRAMS\FlightGear"
|
|
|
|
|
|
|
|
RMDir /r "$INSTDIR"
|
|
|
|
|
|
|
|
DeleteRegKey HKLM ${UninstallKey}
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|