3 !system 'osgversion --so-number > %TEMP%\osg-so-number.txt'
4 !system 'osgversion --version-number > %TEMP%\osg-version.txt'
6 !define /file OSGSoNumber $%TEMP%\osg-so-number.txt
7 !define /file OSGVersion $%TEMP%\osg-version.txt
8 !define /file FGVersion flightgear\version
10 !echo "osg-so is ${OSGSoNumber}"
12 Name "FlightGear Nightly vs2010"
13 OutFile fgfs_win64_vs2010_nightly_${FGVersion}.exe
15 ; use LZMA for best compression
16 SetCompressor /FINAL /SOLID lzma
17 SetCompressorDictSize 64
19 InstallDir $PROGRAMFILES\FlightGear64-nightly-2010
21 ; Request admin privileges for Windows Vista
22 RequestExecutionLevel highest
27 !define UninstallKey "Software\Microsoft\Windows\CurrentVersion\Uninstall\FlightGear64-nightly-2010"
28 !define FGBinDir "install\msvc100-64\FlightGear\bin"
29 !define FGRunDir "install\msvc100-64\fgrun"
30 !define OSGInstallDir "install\msvc100-64\OpenSceneGraph"
31 !define OSGPluginsDir "${OSGInstallDir}\bin\osgPlugins-${OSGVersion}"
33 !define ThirdPartyBinDir "3rdParty.x64\bin"
35 !define MUI_ICON "flightgear\package\flightgear.ico"
36 !define MUI_UNICON "flightgear\package\flightgear.ico"
38 !define MUI_HEADERIMAGE
39 !define MUI_HEADERIMAGE_RIGHT
40 !define MUI_HEADERIMAGE_BITMAP "flightgear\package\Win-NSIS\fg-install-header.bmp" ; optional
44 ;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
45 ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp"
47 !insertmacro MUI_PAGE_WELCOME
48 ; include GPL license page
49 !insertmacro MUI_PAGE_LICENSE "flightgear\Copying"
50 !insertmacro MUI_PAGE_DIRECTORY
51 !insertmacro MUI_PAGE_INSTFILES
53 !define MUI_FINISHPAGE_RUN $INSTDIR\fgrun.exe
54 !define MUI_FINISHPAGE_RUN_TEXT "Run FlightGear now"
55 !insertmacro MUI_PAGE_FINISH
58 !insertmacro MUI_UNPAGE_CONFIRM
59 !insertmacro MUI_UNPAGE_INSTFILES
61 !insertmacro MUI_LANGUAGE "English"
63 ; The stuff to install
64 Section "" ;No components page, name is not important
66 SetShellVarContext all
67 ; Set output path to the installation directory.
70 File ${FGBinDir}\fgfs.exe
71 File ${FGBinDir}\fgjs.exe
72 File ${FGRunDir}\bin\fgrun.exe
74 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osg.dll
75 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgDB.dll
76 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgGA.dll
77 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgParticle.dll
78 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgText.dll
79 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgUtil.dll
80 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgViewer.dll
81 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgSim.dll
82 File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgFX.dll
84 File ${OSGInstallDir}\bin\ot13-OpenThreads.dll
86 File ${ThirdPartyBinDir}\*.dll
88 ; VC runtime redistributables
89 File "$%VCINSTALLDIR%\redist\x64\Microsoft.VC100.CRT\*.dll"
91 File /r ${FGRunDir}\share\locale
93 SetOutPath $INSTDIR\osgPlugins-${OSGVersion}
94 File ${OSGPluginsDir}\osgdb_ac.dll
95 File ${OSGPluginsDir}\osgdb_osg.dll
96 File ${OSGPluginsDir}\osgdb_osga.dll
97 File ${OSGPluginsDir}\osgdb_3ds.dll
98 File ${OSGPluginsDir}\osgdb_mdl.dll
99 File ${OSGPluginsDir}\osgdb_jpeg.dll
100 File ${OSGPluginsDir}\osgdb_rgb.dll
101 File ${OSGPluginsDir}\osgdb_png.dll
102 File ${OSGPluginsDir}\osgdb_dds.dll
103 File ${OSGPluginsDir}\osgdb_txf.dll
104 File ${OSGPluginsDir}\osgdb_freetype.dll
105 File ${OSGPluginsDir}\osgdb_serializers_osg.dll
106 File ${OSGPluginsDir}\osgdb_serializers_osganimation.dll
107 File ${OSGPluginsDir}\osgdb_serializers_osgfx.dll
108 File ${OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll
109 File ${OSGPluginsDir}\osgdb_serializers_osgparticle.dll
110 File ${OSGPluginsDir}\osgdb_serializers_osgshadow.dll
111 File ${OSGPluginsDir}\osgdb_serializers_osgsim.dll
112 File ${OSGPluginsDir}\osgdb_serializers_osgterrain.dll
113 File ${OSGPluginsDir}\osgdb_serializers_osgtext.dll
114 File ${OSGPluginsDir}\osgdb_serializers_osgvolume.dll
115 File ${OSGPluginsDir}\osgdb_deprecated_osg.dll
116 File ${OSGPluginsDir}\osgdb_deprecated_osgparticle.dll
119 Exec '"$INSTDIR\fgrun.exe" --silent --fg-exe="$INSTDIR\fgfs.exe" '
121 CreateDirectory "$SMPROGRAMS\FlightGear"
122 CreateShortCut "$SMPROGRAMS\FlightGear\FlightGear64-nightly-2010.lnk" "$INSTDIR\fgrun.exe"
125 WriteUninstaller "$INSTDIR\FlightGear_Uninstall.exe"
127 WriteRegStr HKLM ${UninstallKey} "DisplayName" "FlightGear64 Nightly (vs2010 build)"
128 WriteRegStr HKLM ${UninstallKey} "DisplayVersion" "${FGVersion}"
129 WriteRegStr HKLM ${UninstallKey} "UninstallString" "$INSTDIR\FlightGear_Uninstall.exe"
130 WriteRegStr HKLM ${UninstallKey} "UninstallPath" "$INSTDIR\FlightGear_Uninstall.exe"
131 WriteRegDWORD HKLM ${UninstallKey} "NoModify" 1
132 WriteRegDWORD HKLM ${UninstallKey} "NoRepair" 1
133 WriteRegStr HKLM ${UninstallKey} "URLInfoAbout" "http://www.flightgear.org/"
141 SetShellVarContext all
144 Delete "$SMPROGRAMS\FlightGear\FlightGear64-nightly-2010.lnk"
145 ; only delete the FlightGear group if it's empty
146 RMDir "$SMPROGRAMS\FlightGear"
150 DeleteRegKey HKLM ${UninstallKey}