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

Revision 657, 9.2 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

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.0.7"
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  File "..\..\OgreMain\lib\Debug\OgreMain_d.lib"
92  File "..\..\OgreMain\lib\Debug\OgreMain_d.pdb"
93  File "..\..\Dependencies\lib\Debug\CEGUIBase_d.lib"
94  ; ode.lib is only one available, no separate release version
95  File "..\..\Dependencies\lib\Debug\ode.lib"
96  File "..\..\Samples\Common\CEGUIRenderer\lib\OgreGUIRenderer_d.lib"
97  File "..\..\Samples\Common\CEGUIRenderer\bin\Debug\OgreGUIRenderer.pdb"
98
99  File "..\..\OgreMain\lib\Release\OgreMain.lib"
100  File "..\..\Dependencies\lib\Release\CEGUIBase.lib"
101  File "..\..\Samples\Common\CEGUIRenderer\lib\OgreGUIRenderer.lib"
102
103  ; Optional library files (for linking direct to plugins)
104  SetOutPath "$INSTDIR\lib\opt\debug"
105  SetOverwrite try
106  File "..\..\Plugins\OctreeSceneManager\bin\debug\Plugin_OctreeSceneManager.lib"
107  File "..\..\Plugins\OctreeSceneManager\bin\debug\Plugin_OctreeSceneManager.pdb"
108  File "..\..\Plugins\BspSceneManager\bin\debug\Plugin_BspSceneManager.lib"
109  File "..\..\Plugins\BspSceneManager\bin\debug\Plugin_BspSceneManager.pdb"
110  SetOutPath "$INSTDIR\lib\opt\release"
111  SetOverwrite try
112  File "..\..\Plugins\OctreeSceneManager\bin\release\Plugin_OctreeSceneManager.lib"
113  File "..\..\Plugins\BspSceneManager\bin\release\Plugin_BspSceneManager.lib"
114
115SectionEnd
116
117Section -Binaries
118
119  ; Binaries - debug
120  SetOutPath "$INSTDIR\bin\debug"
121  SetOverwrite ifnewer
122  File "..\..\Samples\Common\bin\Debug\ilut.dll"
123  File "..\..\Samples\Common\bin\Debug\ilu.dll"
124  File "..\..\Samples\Common\bin\Debug\devil.dll"
125  File "..\..\Samples\Common\bin\Debug\cg.dll"
126  File "..\..\Samples\Common\bin\Debug\zlib1.dll"
127
128  File "..\..\Samples\Common\bin\Debug\OgreMain_d.dll"
129  File "..\..\Samples\Common\bin\Debug\OgrePlatform_d.dll"
130  File "..\..\Samples\Common\bin\Debug\CEGUIBase_d.dll"
131  File "..\..\Samples\Common\bin\Debug\CEGUITaharezLook_d.dll"
132  File "..\..\Samples\Common\bin\Debug\CEGUIWindowsLook_d.dll"
133  File "..\..\Samples\Common\bin\Debug\Plugin_BSPSceneManager.dll"
134  File "..\..\Samples\Common\bin\Debug\Plugin_CgProgramManager.dll"
135  File "..\..\Samples\Common\bin\Debug\Plugin_OctreeSceneManager.dll"
136  File "..\..\Samples\Common\bin\Debug\Plugin_ParticleFX.dll"
137  File "..\..\Samples\Common\bin\Debug\RenderSystem_Direct3D7.dll"
138  File "..\..\Samples\Common\bin\Debug\RenderSystem_Direct3D9.dll"
139  File "..\..\Samples\Common\bin\Debug\RenderSystem_GL.dll"
140  File "..\..\Samples\Common\bin\Debug\OgreGUIRenderer_d.dll"
141
142  File ".\samples\resources.cfg"
143  File "..\..\Samples\Common\bin\Debug\plugins.cfg"
144  File "..\..\Samples\Common\bin\Debug\terrain.cfg"
145  File "..\..\Samples\Common\bin\Debug\media.cfg"
146  File "..\..\Samples\Common\bin\Debug\quake3settings.cfg"
147  ; Binaries - release
148  SetOutPath "$INSTDIR\bin\release"
149  SetOverwrite ifnewer
150  File "..\..\Samples\Common\bin\Release\ilut.dll"
151  File "..\..\Samples\Common\bin\Release\ilu.dll"
152  File "..\..\Samples\Common\bin\Release\devil.dll"
153  File "..\..\Samples\Common\bin\Release\cg.dll"
154  File "..\..\Samples\Common\bin\Release\zlib1.dll"
155
156  File "..\..\Samples\Common\bin\Release\OgreMain.dll"
157  File "..\..\Samples\Common\bin\Release\OgrePlatform.dll"
158  File "..\..\Samples\Common\bin\Release\CEGUIBase.dll"
159  File "..\..\Samples\Common\bin\Release\CEGUITaharezLook.dll"
160  File "..\..\Samples\Common\bin\Release\CEGUIWindowsLook.dll"
161  File "..\..\Samples\Common\bin\Release\Plugin_BSPSceneManager.dll"
162  File "..\..\Samples\Common\bin\Release\Plugin_CgProgramManager.dll"
163  File "..\..\Samples\Common\bin\Release\Plugin_OctreeSceneManager.dll"
164  File "..\..\Samples\Common\bin\Release\Plugin_ParticleFX.dll"
165  File "..\..\Samples\Common\bin\Release\RenderSystem_Direct3D7.dll"
166  File "..\..\Samples\Common\bin\Release\RenderSystem_Direct3D9.dll"
167  File "..\..\Samples\Common\bin\Release\RenderSystem_GL.dll"
168  File "..\..\Samples\Common\bin\Release\OgreGUIRenderer.dll"
169
170  File ".\samples\resources.cfg"
171  File "..\..\Samples\Common\bin\Release\plugins.cfg"
172  File "..\..\Samples\Common\bin\Release\terrain.cfg"
173  File "..\..\Samples\Common\bin\Release\media.cfg"
174
175SectionEnd
176
177Section -Media
178  SetOutPath "$INSTDIR\media"
179  SetOverwrite ifnewer
180
181  File /r /x CVS "..\..\Samples\Media\*.*"
182
183SectionEnd
184
185Section -Docs
186  ; Documentation
187  SetOutPath "$INSTDIR\docs"
188  SetOverwrite try
189  File ".\docs\ReadMe.html"
190  File "..\..\Docs\License.html"
191  File "..\..\Docs\ChangeLog.html"
192  File "..\..\Docs\style.css"
193
194
195  SetOutPath "$INSTDIR\docs\manual\images"
196  SetOverwrite try
197  File "..\..\Docs\manual\images\*.*"
198  SetOutPath "$INSTDIR\docs\manual"
199  File "..\..\Docs\manual\*.*"
200
201  SetOutPath "$INSTDIR\docs\api"
202  SetOverwrite try
203  File "..\..\Docs\api\html\OgreAPIReference.*"
204
205  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
206  !insertmacro MUI_STARTMENU_WRITE_END
207SectionEnd
208
209
210Section -AdditionalIcons
211  SetOutPath $INSTDIR
212  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
213  WriteIniStr "$INSTDIR\OgreWebSite.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
214  CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
215  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\README.lnk" "$INSTDIR\docs\ReadMe.html"
216  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE Manual.lnk" "$INSTDIR\docs\manual\index.html"
217  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE API Reference.lnk" "$INSTDIR\docs\api\OgreAPIReference.chm"
218  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OGRE Website.lnk" "$INSTDIR\OgreWebSite.url"
219  CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
220  !insertmacro MUI_STARTMENU_WRITE_END
221SectionEnd
222
223Section -Post
224  WriteUninstaller "$INSTDIR\uninst.exe"
225  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
226  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
227  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
228  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
229  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
230 
231  ; Register OGRE_HOME
232  Push "OGRE_HOME"
233  Push $INSTDIR
234  Call WriteEnvStr
235
236SectionEnd
237
238
239Function un.onUninstSuccess
240  HideWindow
241  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
242FunctionEnd
243
244Function un.onInit
245  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
246  Abort
247FunctionEnd
248
249Section Uninstall
250  !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
251  RMDir /r "$INSTDIR"
252  RMDir /r "$SMPROGRAMS\$ICONS_GROUP"
253 
254  Push "OGRE_HOME"
255  Call un.DeleteEnvStr
256
257  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
258  SetAutoClose true
259SectionEnd
Note: See TracBrowser for help on using the repository browser.