root/tags/fe3d_0.11/project/win32/NSIS/fe3d-x64.nsi

Revision 6, 7.0 KB (checked in by stou, 5 years ago)
Line 
1# Auto-generated by EclipseNSIS Script Wizard
2# Apr 27, 2007 3:06:28 AM
3Name fe3d
4
5# Defines
6!define REGKEY "SOFTWARE\$(^Name)"
7!define VERSION 0.11
8!define COMPANY iCapsid.net
9!define URL http://projects.icapsid.net
10!define OMUI_THEME_PATH "${NSISDIR}\Contrib\MUI Orange Vista Theme\CD-NSIS-V"
11
12
13# MUI defines
14!define MUI_FINISHPAGE_NOAUTOCLOSE
15!define MUI_UNFINISHPAGE_NOAUTOCLOSE
16!define MUI_LICENSEPAGE_CHECKBOX
17!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
18!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
19!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
20!define MUI_STARTMENUPAGE_DEFAULTFOLDER fe3d
21!define MUI_FINISHPAGE_RUN $INSTDIR\fe3d.exe
22!define MUI_FINISHPAGE_RUN_PARAMETERS .\data\nmap-test.xml
23
24# MUI Icons
25;!define MUI_ICON "${OMUI_THEME_PATH}\installer-nopng.ico"
26;!define MUI_UNICON "${OMUI_THEME_PATH}\uninstaller-nopng.ico"
27!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install-nsis.ico"
28!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall-nsis.ico"
29; MUI Settings / Header
30!define MUI_HEADERIMAGE
31!define MUI_HEADERIMAGE_RIGHT
32!define MUI_HEADERIMAGE_BITMAP "${OMUI_THEME_PATH}\header-r.bmp"
33!define MUI_HEADERIMAGE_UNBITMAP "${OMUI_THEME_PATH}\header-r-un.bmp"
34 ; MUI Settings / Wizard
35!define MUI_WELCOMEFINISHPAGE_BITMAP "${OMUI_THEME_PATH}\wizard.bmp"
36!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${OMUI_THEME_PATH}\wizard-un.bmp"
37
38
39# Included files
40!include Sections.nsh
41!include MUI.nsh
42!include Library.nsh
43!include LogicLib.nsh
44!include x64.nsh
45
46# Variables
47Var StartMenuGroup
48
49# Installer pages
50!insertmacro MUI_PAGE_WELCOME
51!insertmacro MUI_PAGE_LICENSE ..\..\..\doc\LICENSE.txt
52!insertmacro MUI_PAGE_DIRECTORY
53!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
54!insertmacro MUI_PAGE_INSTFILES
55!insertmacro MUI_PAGE_FINISH
56!insertmacro MUI_UNPAGE_CONFIRM
57!insertmacro MUI_UNPAGE_INSTFILES
58
59# Installer languages
60!insertmacro MUI_LANGUAGE English
61
62# Installer attributes
63OutFile fe3d-0.11-x64.exe
64InstallDir $PROGRAMFILES\fe3d
65CRCCheck on
66XPStyle on
67ShowInstDetails show
68VIProductVersion 0.11.0.0
69VIAddVersionKey ProductName fe3d
70VIAddVersionKey ProductVersion "${VERSION}"
71VIAddVersionKey CompanyName "${COMPANY}"
72VIAddVersionKey CompanyWebsite "${URL}"
73VIAddVersionKey FileVersion ""
74VIAddVersionKey FileDescription ""
75VIAddVersionKey LegalCopyright ""
76InstallDirRegKey HKLM "${REGKEY}" Path
77ShowUninstDetails show
78
79# Installer sections
80Section -Main SEC0000
81    SetOutPath $INSTDIR\data
82    SetOverwrite on
83    File /r ..\..\..\data\*.xml
84
85    SetOutPath $INSTDIR\data\img
86    SetOverwrite on
87    File /r ..\..\..\data\img\*.png
88
89    # Installing library ..\..\..\build\64\release\libfe3d.dll
90    !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ..\..\..\build\64\release\libfe3d.dll $INSTDIR\libfe3d.dll $INSTDIR
91
92    SetOutPath $INSTDIR
93    File ..\..\..\build\64\release\fe3d.exe
94    File ..\..\..\build\64\release\wxbase28u_vc_custom.dll
95    File ..\..\..\build\64\release\wxbase28u_xml_vc_custom.dll
96    File ..\..\..\build\64\release\wxmsw28u_core_vc_custom.dll
97    File ..\..\..\build\64\release\wxmsw28u_gl_vc_custom.dll
98    File ..\..\..\build\64\release\xerces-c_2_7_amd64.dll
99    File "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest"
100    File "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT\msvcm80.dll"
101    File "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT\msvcp80.dll"
102    File "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT\msvcr80.dll"
103    WriteRegStr HKLM "${REGKEY}\Components" Main 1
104SectionEnd
105
106Section -post SEC0001
107    WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
108    SetOutPath $INSTDIR
109    WriteUninstaller $INSTDIR\uninstall.exe
110    !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
111    SetOutPath $SMPROGRAMS\$StartMenuGroup
112    SetOutPath $INSTDIR
113    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\fe3d.exe
114    CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
115    !insertmacro MUI_STARTMENU_WRITE_END
116    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
117    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
118    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
119    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
120    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
121    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
122    WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
123    WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
124SectionEnd
125
126# Macro for selecting uninstaller sections
127!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
128    Push $R0
129    ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}"
130    StrCmp $R0 1 0 next${UNSECTION_ID}
131    !insertmacro SelectSection "${UNSECTION_ID}"
132    GoTo done${UNSECTION_ID}
133next${UNSECTION_ID}:
134    !insertmacro UnselectSection "${UNSECTION_ID}"
135done${UNSECTION_ID}:
136    Pop $R0
137!macroend
138
139# Uninstaller sections
140Section /o un.Main UNSEC0000
141    Delete /REBOOTOK $INSTDIR\fe3d.exe
142    RmDir /r /REBOOTOK $INSTDIR\data
143
144    # Uninstalling library $INSTDIR\libfe3d.dll
145    !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libfe3d.dll
146
147    DeleteRegValue HKLM "${REGKEY}\Components" Main
148SectionEnd
149
150Section un.post UNSEC0001
151    DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
152    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
153    Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
154    Delete /REBOOTOK $INSTDIR\uninstall.exe
155    DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
156    DeleteRegValue HKLM "${REGKEY}" Path
157    DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components"
158    DeleteRegKey /IfEmpty HKLM "${REGKEY}"
159    RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
160    RmDir /REBOOTOK $INSTDIR
161    Push $R0
162    StrCpy $R0 $StartMenuGroup 1
163    StrCmp $R0 ">" no_smgroup
164no_smgroup:
165    Pop $R0
166SectionEnd
167
168# Installer functions
169Function .onInit
170    InitPluginsDir
171    ${If} ${RunningX64}
172     MessageBox MB_OK "Sorry but since this is a 32bit installer, you'll need to change the install directory to: 'Program Files'"
173    ${Else}
174     MessageBox MB_OK "This installer is for AMD64 Processors ONLY!!!"
175    ${DisableX64FSRedirection}
176    ${EndIf}
177   
178   
179FunctionEnd
180
181# Uninstaller functions
182Function un.onInit
183    ReadRegStr $INSTDIR HKLM "${REGKEY}" Path
184    !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
185    !insertmacro SELECT_UNSECTION Main ${UNSEC0000}
186FunctionEnd
187
188
189
190
Note: See TracBrowser for help on using the browser.