source: OGRE/trunk/ogrenew/SDK/Win32/ogresdk.nsh @ 692

Revision 692, 9.6 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1; Script generated by the HM NIS Edit Script Wizard.
2
3!include WriteEnvStr.nsh
4
5; HM NIS Edit Wizard helper defines
6!define PRODUCT_NAME "OGRE SDK"
7!define PRODUCT_VERSION "1.2.0_RC1"
8!define PRODUCT_PUBLISHER "The OGRE Team"
9!define PRODUCT_WEB_SITE "http://www.ogre3d.org"
10!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
11!define PRODUCT_UNINST_ROOT_KEY "HKLM"
12!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
13
14SetCompressor lzma
15
16; MUI 1.67 compatible ------
17!include "MUI.nsh"
18
19; MUI Settings
20!define MUI_ABORTWARNING
21!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
22!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
23
24; Welcome page
25!insertmacro MUI_PAGE_WELCOME
26; License page
27!define MUI_LICENSEPAGE_CHECKBOX
28!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
29; Directory page
30!insertmacro MUI_PAGE_DIRECTORY
31; Start menu page
32var ICONS_GROUP
33!define MUI_STARTMENUPAGE_NODISABLE
34!define MUI_STARTMENUPAGE_DEFAULTFOLDER "OGRE SDK"
35!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
36!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
37!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
38!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
39; Instfiles page
40!insertmacro MUI_PAGE_INSTFILES
41; Finish page
42!insertmacro MUI_PAGE_FINISH
43
44; Uninstaller pages
45!insertmacro MUI_UNPAGE_INSTFILES
46
47; Language files
48!insertmacro MUI_LANGUAGE "English"
49
50; Reserve files
51!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
52
53; MUI end ------
54
55Name "${PRODUCT_NAME} ${PRODUCT_VERSION} for ${TARGET_COMPILER_DESCRIPTION}"
56OutFile "OgreSDKSetup${PRODUCT_VERSION}_${TARGET_COMPILER}.exe"
57InstallDir "c:\OgreSDK"
58ShowInstDetails show
59ShowUnInstDetails show
60
61Section -Headers
62
63  ; Required header files
64  ; Core
65  SetOutPath "$INSTDIR\include"
66  SetOverwrite try
67  File "..\..\OgreMain\include\*.h"
68  File "..\..\Samples\Common\include\*.h"
69  File "..\..\ReferenceApplication\Common\include\*.h"
70  File "..\..\Samples\Common\CEGUIRenderer\include\*.h"
71  ; Dependencies - only ODE and CEGui
72  SetOutPath "$INSTDIR\include\CEGUI"
73  SetOverwrite try
74  File /r /x CVS "..\..\Dependencies\include\CEGUI\*.*"
75  SetOutPath "$INSTDIR\include\ode"
76  SetOverwrite try
77  File /r /x CVS "..\..\Dependencies\include\ode\*.*"
78
79  ; Optional headers (for linking direct to plugins)
80  SetOutPath "$INSTDIR\include\opt"
81  SetOverwrite try
82  File "..\..\Plugins\OctreeSceneManager\include\*.h"
83  File "..\..\Plugins\BspSceneManager\include\*.h"
84
85SectionEnd
86
87Section -Libs
88  ; Library files
89  SetOutPath "$INSTDIR\lib"
90  SetOverwrite try
91  !ifdef MINGW
92    ; Debug libs
93    File "..\..\Dependencies\lib\Debug\libOPCODE.a"
94    File "..\..\Dependencies\lib\Debug\libode.a"
95    ; Release libs
96  !else ; MSVC
97    ; Debug libs
98    File "..\..\OgreMain\lib\Debug\OgreMain_d.lib"
99    File "..\..\OgreMain\lib\Debug\OgreMain_d.pdb"
100    ; ode.lib is only one available, no separate release version
101    File "..\..\Dependencies\lib\Debug\ode.lib"
102    File "..\..\Dependencies\lib\Debug\CEGUIBase_d.lib"
103    File "..\..\Samples\Common\CEGUIRenderer\lib\OgreGUIRenderer_d.lib"
104    File "..\..\Samples\Common\CEGUIRenderer\bin\Debug\OgreGUIRenderer.pdb"
105    ; Release libs
106    File "..\..\OgreMain\lib\Release\OgreMain.lib"
107    File "..\..\Dependencies\lib\Release\CEGUIBase.lib"
108    File "..\..\Samples\Common\CEGUIRenderer\lib\OgreGUIRenderer.lib"
109  !endif
110
111
112  ; Optional library files (for linking direct to plugins)
113  SetOutPath "$INSTDIR\lib\opt\debug"
114  SetOverwrite try
115  !ifndef MINGW ; MSVC
116    File "..\..\Plugins\OctreeSceneManager\bin\debug\Plugin_OctreeSceneManager.lib"
117    File "..\..\Plugins\OctreeSceneManager\bin\debug\Plugin_OctreeSceneManager.pdb"
118    File "..\..\Plugins\BspSceneManager\bin\debug\Plugin_BspSceneManager.lib"
119    File "..\..\Plugins\BspSceneManager\bin\debug\Plugin_BspSceneManager.pdb"
120  !endif
121  SetOutPath "$INSTDIR\lib\opt\release"
122  SetOverwrite try
123  !ifndef MINGW ; MSVC
124    File "..\..\Plugins\OctreeSceneManager\bin\release\Plugin_OctreeSceneManager.lib"
125    File "..\..\Plugins\BspSceneManager\bin\release\Plugin_BspSceneManager.lib"
126  !endif
127
128SectionEnd
129
130Section -Binaries
131
132  ; Binaries - debug
133  SetOutPath "$INSTDIR\bin\debug"
134  SetOverwrite ifnewer
135  !ifndef MINGW
136    File "..\..\Samples\Common\bin\Debug\ilut.dll"
137  !endif
138  File "..\..\Samples\Common\bin\Debug\ilu.dll"
139  File "..\..\Samples\Common\bin\Debug\devil.dll"
140  File "..\..\Samples\Common\bin\Debug\cg.dll"
141  File "..\..\Samples\Common\bin\Debug\zlib1.dll"
142
143  File "..\..\Samples\Common\bin\Debug\OgreMain_d.dll"
144  File "..\..\Samples\Common\bin\Debug\OgrePlatform_d.dll"
145  File "..\..\Samples\Common\bin\Debug\CEGUIBase_d.dll"
146  File "..\..\Samples\Common\bin\Debug\CEGUIFalagardBase_d.dll"
147  File "..\..\Samples\Common\bin\Debug\CEGUITaharezLook_d.dll"
148  File "..\..\Samples\Common\bin\Debug\CEGUIWindowsLook_d.dll"
149  File "..\..\Samples\Common\bin\Debug\Plugin_BSPSceneManager.dll"
150  File "..\..\Samples\Common\bin\Debug\Plugin_CgProgramManager.dll"
151  File "..\..\Samples\Common\bin\Debug\Plugin_OctreeSceneManager.dll"
152  File "..\..\Samples\Common\bin\Debug\Plugin_ParticleFX.dll"
153  File "..\..\Samples\Common\bin\Debug\RenderSystem_Direct3D9.dll"
154  File "..\..\Samples\Common\bin\Debug\RenderSystem_GL.dll"
155  File "..\..\Samples\Common\bin\Debug\OgreGUIRenderer_d.dll"
156
157  File ".\samples\resources.cfg"
158  File "..\..\Samples\Common\bin\Debug\plugins.cfg"
159  ; File "..\..\Samples\Common\bin\Debug\terrain.cfg"
160  File "..\..\Samples\Common\bin\Debug\media.cfg"
161  File "..\..\Samples\Common\bin\Debug\quake3settings.cfg"
162  ; Binaries - release
163  SetOutPath "$INSTDIR\bin\release"
164  SetOverwrite ifnewer
165  !ifndef MINGW
166    File "..\..\Samples\Common\bin\Release\ilut.dll"
167  !endif
168  File "..\..\Samples\Common\bin\Release\ilu.dll"
169  File "..\..\Samples\Common\bin\Release\devil.dll"
170  File "..\..\Samples\Common\bin\Release\cg.dll"
171  File "..\..\Samples\Common\bin\Release\zlib1.dll"
172
173  File "..\..\Samples\Common\bin\Release\OgreMain.dll"
174  File "..\..\Samples\Common\bin\Release\OgrePlatform.dll"
175  File "..\..\Samples\Common\bin\Release\CEGUIBase.dll"
176  File "..\..\Samples\Common\bin\Release\CEGUITaharezLook.dll"
177  File "..\..\Samples\Common\bin\Release\CEGUIWindowsLook.dll"
178  File "..\..\Samples\Common\bin\Release\CEGUIFalagardBase.dll"
179  File "..\..\Samples\Common\bin\Release\Plugin_BSPSceneManager.dll"
180  File "..\..\Samples\Common\bin\Release\Plugin_CgProgramManager.dll"
181  File "..\..\Samples\Common\bin\Release\Plugin_OctreeSceneManager.dll"
182  File "..\..\Samples\Common\bin\Release\Plugin_ParticleFX.dll"
183  ;File "..\..\Samples\Common\bin\Release\RenderSystem_Direct3D7.dll"
184  File "..\..\Samples\Common\bin\Release\RenderSystem_Direct3D9.dll"
185  File "..\..\Samples\Common\bin\Release\RenderSystem_GL.dll"
186  File "..\..\Samples\Common\bin\Release\OgreGUIRenderer.dll"
187
188  File ".\samples\resources.cfg"
189  File "..\..\Samples\Common\bin\Release\plugins.cfg"
190  ; File "..\..\Samples\Common\bin\Release\terrain.cfg"
191  File "..\..\Samples\Common\bin\Release\media.cfg"
192
193SectionEnd
194
195Section -Media
196  SetOutPath "$INSTDIR\media"
197  SetOverwrite ifnewer
198
199  File /r /x CVS "..\..\Samples\Media\*.*"
200
201SectionEnd
202
203Section -Docs
204  ; Documentation
205  SetOutPath "$INSTDIR\docs"
206  SetOverwrite try
207  File ".\docs\ReadMe.html"
208  File "..\..\Docs\License.html"
209  File "..\..\Docs\ChangeLog.html"
210  File "..\..\Docs\style.css"
211
212
213  SetOutPath "$INSTDIR\docs\manual\images"
214  SetOverwrite try
215  File "..\..\Docs\manual\images\*.*"
216  SetOutPath "$INSTDIR\docs\manual"
217  File "..\..\Docs\manual\*.*"
218
219  SetOutPath "$INSTDIR\docs\api"
220  SetOverwrite try
221  File "..\..\Docs\api\html\OgreAPIReference.*"
222
223  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
224  !insertmacro MUI_STARTMENU_WRITE_END
225SectionEnd
226
227
228Section -AdditionalIcons
229  SetOutPath $INSTDIR
230  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
231  WriteIniStr "$INSTDIR\OgreWebSite.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
232  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
233  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\README.lnk" "$INSTDIR\docs\ReadMe.html"
234  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE Manual.lnk" "$INSTDIR\docs\manual\index.html"
235  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE API Reference.lnk" "$INSTDIR\docs\api\OgreAPIReference.chm"
236  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE Website.lnk" "$INSTDIR\OgreWebSite.url"
237  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
238  !insertmacro MUI_STARTMENU_WRITE_END
239SectionEnd
240
241Section -Post
242  WriteUninstaller "$INSTDIR\uninst.exe"
243  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
244  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
245  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
246  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
247  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
248 
249  ; Register OGRE_HOME
250  Push "OGRE_HOME"
251  Push $INSTDIR
252  Call WriteEnvStr
253
254SectionEnd
255
256
257Function un.onUninstSuccess
258  HideWindow
259  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
260FunctionEnd
261
262Function un.onInit
263  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
264  Abort
265FunctionEnd
266
267Section Uninstall
268  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
269  RMDir /r "$INSTDIR"
270  RMDir /r "$SMPROGRAMS\$ICONS_GROUP"
271 
272  Push "OGRE_HOME"
273  Call un.DeleteEnvStr
274
275  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
276  SetAutoClose true
277SectionEnd
Note: See TracBrowser for help on using the repository browser.