Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogreode/nsis/OgreOde_Demos.nsi @ 45

Last change on this file since 45 was 21, checked in by nicolasc, 17 years ago

added ogreode and Colladaplugin

File size: 8.8 KB
Line 
1;--------------------------------
2
3!define BASE_NAME "OgreOde"
4!define PKG_NAME "${BASE_NAME}_Demo"
5!define PKG_EXE "${PKG_NAME}_Setup.exe"
6!define PKG_SUBMENU "Ogre SDK\${PKG_NAME}" 
7!define PKG_FOLDER "${PKG_NAME}"
8 
9!define VERSION "V.1.0"
10
11;--------------------------------
12SetCompress off
13SetCompressor /SOLID lzma
14CRCCheck on
15
16XPStyle on
17SetDateSave on
18SilentInstall normal
19
20;--------------------------------
21Var OGRE_HOME
22Var PKG_BINDIR
23
24;-------------------------------
25;Include Modern UI
26!include "MUI.nsh"
27 
28
29;--------------------------------
30Name "${PKG_NAME}"
31OutFile "${PKG_EXE}"
32InstallDirRegKey HKLM "Software\Ogre\${PKG_NAME}" "Install_Dir"
33
34
35 
36;----------------
37;Modern UI Configuration
38
39  !define MUI_FINISHPAGE_RUN "$PKG_BINDIR\${BASE_NAME}Demo_SimpleScenes.exe"
40  ;!define MUI_FINISHPAGE_SHOWREADME "$PKG_BINDIR\${BASE_NAME}ReadMe.txt"
41  !define MUI_FINISHPAGE_NOREBOOTSUPPORT 1
42
43  ;Remember the installer language
44  !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
45  !define MUI_LANGDLL_REGISTRY_KEY "Software\Ogre\${PKG_NAME}"
46  !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
47
48  !define MUI_HEADERIMAGE
49  !define MUI_HEADERIMAGE_BITMAP ".\${BASE_NAME}_header.bmp"
50 
51  !define MUI_WELCOMEFINISHPAGE_BITMAP ".\${BASE_NAME}_left.bmp"
52 
53  ;Start Menu Folder Page Configuration
54  !define MUI_STARTMENUPAGE
55  !define MUI_STARTMENUPAGE_DEFAULTFOLDER "Ogre\${PKG_NAME}"
56  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
57  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ogre\${PKG_NAME}"
58  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
59  !define MUI_STARTMENUPAGE_VARIABLE "$R9"
60
61
62  !define MUI_ABORTWARNING
63
64;--------------------------------
65;Pages
66
67  !insertmacro MUI_PAGE_WELCOME
68  !insertmacro MUI_PAGE_COMPONENTS
69  !insertmacro MUI_PAGE_DIRECTORY
70 
71  ;!insertmacro MUI_PAGE_STARTMENU 
72  !insertmacro MUI_PAGE_LICENSE "license.txt"
73  !insertmacro MUI_PAGE_INSTFILES
74  !insertmacro MUI_PAGE_FINISH
75
76  !insertmacro MUI_UNPAGE_CONFIRM
77  !insertmacro MUI_UNPAGE_INSTFILES 
78  !insertmacro MUI_UNPAGE_FINISH
79
80  !insertmacro MUI_UNPAGE_CONFIRM
81  !insertmacro MUI_UNPAGE_DIRECTORY
82  !insertmacro MUI_UNPAGE_COMPONENTS
83  !insertmacro MUI_UNPAGE_INSTFILES
84 
85;--------------------------------
86;Languages
87
88  !insertmacro MUI_LANGUAGE "English"
89  !insertmacro MUI_LANGUAGE "French"
90 ; !insertmacro MUI_LANGUAGE "German"
91 ; !insertmacro MUI_LANGUAGE "Spanish"
92 ; !insertmacro MUI_LANGUAGE "SimpChinese"
93 ; !insertmacro MUI_LANGUAGE "TradChinese"
94  ;!insertmacro MUI_LANGUAGE "Japanese"
95  ;;!insertmacro MUI_LANGUAGE "Korean"
96  ;!insertmacro MUI_LANGUAGE "Italian"
97  ;!insertmacro MUI_LANGUAGE "Dutch"
98  ;!insertmacro MUI_LANGUAGE "Danish"
99 ; !insertmacro MUI_LANGUAGE "Swedish"
100 ; !insertmacro MUI_LANGUAGE "Greek"
101 ; !insertmacro MUI_LANGUAGE "Russian"
102 ; !insertmacro MUI_LANGUAGE "Portuguese"
103 ; !insertmacro MUI_LANGUAGE "PortugueseBR"
104 ; !insertmacro MUI_LANGUAGE "Polish"
105 ; !insertmacro MUI_LANGUAGE "Ukrainian"
106 ; !insertmacro MUI_LANGUAGE "Czech"
107 ; !insertmacro MUI_LANGUAGE "Slovak"
108 ; !insertmacro MUI_LANGUAGE "Croatian"
109 ; !insertmacro MUI_LANGUAGE "Bulgarian"
110 ; !insertmacro MUI_LANGUAGE "Hungarian"
111 ; !insertmacro MUI_LANGUAGE "Thai"
112  ;!insertmacro MUI_LANGUAGE "Romanian"
113  ;!insertmacro MUI_LANGUAGE "Macedonian"
114 ; !insertmacro MUI_LANGUAGE "Estonian"
115 ; !insertmacro MUI_LANGUAGE "Turkish"
116 ; !insertmacro MUI_LANGUAGE "Lithuanian"
117 ; !insertmacro MUI_LANGUAGE "Catalan"
118 ; !insertmacro MUI_LANGUAGE "Serbian"
119
120;--------------------------------
121;Reserve Files
122
123  ;Things that need to be extracted on first (keep these lines before any File command!)
124  ;Only for BZIP2 compression
125  !insertmacro MUI_RESERVEFILE_LANGDLL
126;--------------------------------
127;Language Strings
128
129  ;Description
130   
131  ;Header
132  LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Please review the license terms before installing ${MUI_PRODUCT}"
133  LangString TEXT_IO_SUBTITLE ${LANG_FRENCH} "Prière de lire la license avant l'installation ${MUI_PRODUCT}"
134
135;--------------------------------
136;Data
137 
138 
139  LicenseData "license.txt"
140 
141;--------------------------------
142Function .onInit
143    ReadEnvStr $OGRE_HOME OGRE_HOME
144
145    StrCpy $INSTDIR "$OGRE_HOME\..\${PKG_FOLDER}"
146    StrCpy $PKG_BINDIR "$INSTDIR"
147   
148    # the plugins dir is automatically deleted when the installer exits
149    InitPluginsDir
150    #optional
151    #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
152    File /oname=$PLUGINSDIR\splash.bmp "${BASE_NAME}_splash.bmp"
153    advsplash::show 1000 600 400 0x00005B $PLUGINSDIR\splash
154    Pop $0
155
156    Delete $PLUGINSDIR\splash.bmp
157    !insertmacro MUI_LANGDLL_DISPLAY
158   
159FunctionEnd
160
161
162Section "${PKG_NAME} (required)"
163
164  SectionIn RO
165 
166   SetOutPath $INSTDIR 
167 
168 
169             
170    File ..\..\OgreSDK\bin\Release\OgreOdeDemo_Landscape.exe       
171    File ..\..\OgreSDK\bin\Release\OgreOdeDemo_SimpleScenes.exe     
172    File ..\..\OgreSDK\bin\Release\OgreOdeDemo_GranTurismOgre.exe   
173   
174    File ..\..\OgreSDK\bin\Release\OgreOde_Core.dll                 
175    File ..\..\OgreSDK\bin\Release\OgreOde_Prefab.dll                 
176    File ..\..\OgreSDK\bin\Release\OgreOde_Loader.dll               
177
178    File /oname=Plugins.cfg Plugins_ogreode_binary.cfg       
179    File /oname=resources.cfg resources_ogreode_binary.cfg     
180
181    File ..\..\OgreSDK\bin\Release\OgreMain.dll                 
182    File ..\..\OgreSDK\bin\Release\Plugin_CgProgramManager.dll     
183    File ..\..\OgreSDK\bin\Release\Plugin_ParticleFX.dll   
184   
185    File ..\..\OgreSDK\bin\Release\Plugin_BSPSceneManager.dll       
186    File ..\..\OgreSDK\bin\Release\Plugin_OctreeSceneManager.dll         
187
188    File ..\..\OgreSDK\bin\Release\RenderSystem_GL.dll             
189    File ..\..\OgreSDK\bin\Release\RenderSystem_Direct3D9.dll       
190
191    File ..\..\OgreSDK\bin\Release\cg.dll                           
192    File ..\..\OgreSDK\bin\Release\ois.dll                         
193
194    ;File "D:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"   
195    ;File "D:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcm80.dll"   
196    ;File "D:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcp80.dll"   
197    ;File "D:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll"   
198
199   
200   SetOutPath $INSTDIR\Media\OgreOde\ 
201   
202    File ..\Demos\Media\*.*
203
204
205   SetOutPath $INSTDIR\Media\Ogre\packs
206    File ..\..\OgreSDK\media\packs\OgreCore.zip
207   
208   SetOutPath $INSTDIR\Media\Ogre\fonts
209   File ..\..\OgreSDK\media\fonts\*.* 
210   
211   SetOutPath $INSTDIR\Media\Ogre\materials\programs
212   File ..\..\OgreSDK\media\materials\programs\*.* 
213   
214   SetOutPath $INSTDIR\Media\Ogre\materials\scripts
215   File ..\..\OgreSDK\media\materials\scripts\*.*
216   
217   SetOutPath $INSTDIR\Media\Ogre\materials\textures
218   File ..\..\OgreSDK\media\materials\textures\*.*
219   
220   SetOutPath $INSTDIR\Media\Ogre\models
221   File ..\..\OgreSDK\media\models\*.*
222   
223   SetOutPath $INSTDIR\Media\Ogre\overlays
224   File ..\..\OgreSDK\media\overlays\*.*
225   
226   SetOutPath $INSTDIR\Media\Ogre\particle
227   File ..\..\OgreSDK\media\particle\*.*
228   
229   SetOutPath $INSTDIR\Media\Ogre\gui
230   File ..\..\OgreSDK\media\gui\*.*
231
232   SetOutPath $INSTDIR 
233   
234  WriteRegStr HKLM "SOFTWARE\${PKG_SUBMENU}" "Install_Dir" "$INSTDIR"
235 
236  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PKG_NAME}" "DisplayName" ${PKG_NAME}
237  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PKG_NAME}" "UninstallString" '"$INSTDIR\uninstall.exe"'
238  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PKG_NAME}" "NoModify" 1
239  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PKG_NAME}" "NoRepair" 1
240  WriteUninstaller "uninstall.exe"
241 
242  Exec '"$INSTDIR\someprogram.exe"'
243
244SectionEnd
245
246Section "Start Menu Shortcuts"
247 
248  CreateDirectory "$SMPROGRAMS\${PKG_SUBMENU}"
249 
250  SetOutPath $PKG_BINDIR
251
252  CreateShortCut  "$SMPROGRAMS\${PKG_SUBMENU}\${BASE_NAME}DemoSimplesScenes.lnk" "$PKG_BINDIR\${BASE_NAME}Demo_SimpleScenes.exe" "" "$PKG_BINDIR\${BASE_NAME}DemoSimpleScenes.exe" 0
253  CreateShortCut  "$SMPROGRAMS\${PKG_SUBMENU}\${BASE_NAME}GranTurismo.lnk" "$PKG_BINDIR\${BASE_NAME}GranTurismOgre.exe" "" "$PKG_BINDIR\${BASE_NAME}GranTurismOgre.exe" 0
254  CreateShortCut  "$SMPROGRAMS\${PKG_SUBMENU}\${BASE_NAME}Landscape.lnk" "$PKG_BINDIR\${BASE_NAME}Demo_Landscape.exe" "" "$PKG_BINDIR\${BASE_NAME}Landscape.exe" 0
255 
256  SetOutPath $OUTDIR
257
258  CreateShortCut  "$SMPROGRAMS\${PKG_SUBMENU}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
259 
260SectionEnd
261
262Section "Uninstall"
263   
264  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PKG_NAME}"
265  DeleteRegKey HKLM SOFTWARE\Ogre\${BASE_NAME}
266
267  RMDir /r "$SMPROGRAMS\${PKG_SUBMENU}\" 
268  RMDir /r "$INSTDIR"
269
270SectionEnd
Note: See TracBrowser for help on using the repository browser.