]> git.mxchange.org Git - flightgear.git/blob - package/Win-NSIS/flightgear64-nightly-vs2010.nsi
Add a nightly build for FG 64
[flightgear.git] / package / Win-NSIS / flightgear64-nightly-vs2010.nsi
1 !include "MUI.nsh"
2
3 !system 'osgversion --so-number > %TEMP%\osg-so-number.txt'
4 !system 'osgversion --version-number > %TEMP%\osg-version.txt'
5
6 !define /file OSGSoNumber $%TEMP%\osg-so-number.txt
7 !define /file OSGVersion $%TEMP%\osg-version.txt
8 !define /file FGVersion flightgear\version
9
10 !echo "osg-so is ${OSGSoNumber}"
11
12 Name "FlightGear Nightly vs2010"
13 OutFile fgfs_win64_vs2010_nightly_${FGVersion}.exe
14
15 ; use LZMA for best compression
16 SetCompressor /FINAL /SOLID lzma
17 SetCompressorDictSize 64
18
19 InstallDir $PROGRAMFILES\FlightGear64-nightly-2010
20
21 ; Request admin privileges for Windows Vista
22 RequestExecutionLevel highest
23
24 ; don't hang around
25 AutoCloseWindow true
26                 
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}"
32
33 !define ThirdPartyBinDir "3rdParty.x64\bin"
34
35 !define MUI_ICON "flightgear\package\flightgear.ico"
36 !define MUI_UNICON "flightgear\package\flightgear.ico"
37
38 !define MUI_HEADERIMAGE
39 !define MUI_HEADERIMAGE_RIGHT
40 !define MUI_HEADERIMAGE_BITMAP "flightgear\package\Win-NSIS\fg-install-header.bmp" ; optional
41
42
43
44 ;!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
45 ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp"
46
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
52
53 !define MUI_FINISHPAGE_RUN $INSTDIR\fgrun.exe
54 !define MUI_FINISHPAGE_RUN_TEXT "Run FlightGear now"
55 !insertmacro MUI_PAGE_FINISH
56
57
58 !insertmacro MUI_UNPAGE_CONFIRM
59 !insertmacro MUI_UNPAGE_INSTFILES
60
61 !insertmacro MUI_LANGUAGE "English"
62
63 ; The stuff to install
64 Section "" ;No components page, name is not important  
65         
66   SetShellVarContext all
67   ; Set output path to the installation directory.
68   SetOutPath $INSTDIR
69   
70   File ${FGBinDir}\fgfs.exe
71   File ${FGBinDir}\fgjs.exe
72   File ${FGBinDir}\terrasync.exe
73   File ${FGRunDir}\bin\fgrun.exe
74   
75   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osg.dll
76   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgDB.dll
77   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgGA.dll
78   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgParticle.dll
79   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgText.dll
80   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgUtil.dll
81   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgViewer.dll
82   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgSim.dll
83   File ${OSGInstallDir}\bin\osg${OSGSoNumber}-osgFX.dll
84   
85   File ${OSGInstallDir}\bin\ot12-OpenThreads.dll
86   
87   File ${ThirdPartyBinDir}\*.dll
88   
89   ; VC runtime redistributables
90   File "$%VCINSTALLDIR%\redist\x64\Microsoft.VC100.CRT\*.dll"
91   
92   File /r ${FGRunDir}\share\locale
93   
94   SetOutPath $INSTDIR\osgPlugins-${OSGVersion}
95   File ${OSGPluginsDir}\osgdb_ac.dll
96   File ${OSGPluginsDir}\osgdb_osg.dll
97   File ${OSGPluginsDir}\osgdb_osga.dll
98   File ${OSGPluginsDir}\osgdb_3ds.dll
99   File ${OSGPluginsDir}\osgdb_mdl.dll
100   File ${OSGPluginsDir}\osgdb_jpeg.dll
101   File ${OSGPluginsDir}\osgdb_rgb.dll  
102   File ${OSGPluginsDir}\osgdb_png.dll
103   File ${OSGPluginsDir}\osgdb_dds.dll
104   File ${OSGPluginsDir}\osgdb_txf.dll
105   File ${OSGPluginsDir}\osgdb_freetype.dll
106   File ${OSGPluginsDir}\osgdb_serializers_osg.dll
107   File ${OSGPluginsDir}\osgdb_serializers_osganimation.dll
108   File ${OSGPluginsDir}\osgdb_serializers_osgfx.dll
109   File ${OSGPluginsDir}\osgdb_serializers_osgmanipulator.dll
110   File ${OSGPluginsDir}\osgdb_serializers_osgparticle.dll
111   File ${OSGPluginsDir}\osgdb_serializers_osgshadow.dll
112   File ${OSGPluginsDir}\osgdb_serializers_osgsim.dll
113   File ${OSGPluginsDir}\osgdb_serializers_osgterrain.dll
114   File ${OSGPluginsDir}\osgdb_serializers_osgtext.dll
115   File ${OSGPluginsDir}\osgdb_serializers_osgvolume.dll
116   File ${OSGPluginsDir}\osgdb_deprecated_osg.dll
117   File ${OSGPluginsDir}\osgdb_deprecated_osgparticle.dll
118   
119   
120   Exec '"$INSTDIR\fgrun.exe"  --silent --fg-exe="$INSTDIR\fgfs.exe" --ts-exe="$INSTDIR\terrasync.exe" '
121   
122   CreateDirectory "$SMPROGRAMS\FlightGear"
123   CreateShortCut "$SMPROGRAMS\FlightGear\FlightGear64-nightly-2010.lnk" "$INSTDIR\fgrun.exe" 
124   
125   
126   WriteUninstaller "$INSTDIR\FlightGear_Uninstall.exe"
127   
128   WriteRegStr HKLM ${UninstallKey} "DisplayName" "FlightGear64 Nightly (vs2010 build)"
129   WriteRegStr HKLM ${UninstallKey} "DisplayVersion" "${FGVersion}"
130   WriteRegStr HKLM ${UninstallKey} "UninstallString" "$INSTDIR\FlightGear_Uninstall.exe"
131   WriteRegStr HKLM ${UninstallKey} "UninstallPath" "$INSTDIR\FlightGear_Uninstall.exe"
132   WriteRegDWORD HKLM ${UninstallKey} "NoModify" 1
133   WriteRegDWORD HKLM ${UninstallKey} "NoRepair" 1
134   WriteRegStr HKLM ${UninstallKey} "URLInfoAbout" "http://www.flightgear.org/"
135  
136 SectionEnd
137
138
139
140 Section "Uninstall"
141    
142   SetShellVarContext all
143   
144   
145   Delete "$SMPROGRAMS\FlightGear\FlightGear64-nightly-2010.lnk"
146   ; only delete the FlightGear group if it's empty
147   RMDir "$SMPROGRAMS\FlightGear"
148   
149   RMDir /r "$INSTDIR"
150   
151   DeleteRegKey HKLM ${UninstallKey}
152
153 SectionEnd
154