aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/scripts/Prebuild.nsi
diff options
context:
space:
mode:
Diffstat (limited to 'Prebuild/scripts/Prebuild.nsi')
-rw-r--r--Prebuild/scripts/Prebuild.nsi231
1 files changed, 0 insertions, 231 deletions
diff --git a/Prebuild/scripts/Prebuild.nsi b/Prebuild/scripts/Prebuild.nsi
deleted file mode 100644
index 8f9854e..0000000
--- a/Prebuild/scripts/Prebuild.nsi
+++ /dev/null
@@ -1,231 +0,0 @@
1!verbose 3
2
3!define PRODUCT_NAME "Prebuild"
4!define PRODUCT_VERSION "1.3.1"
5!define PRODUCT_PUBLISHER "Prebuild"
6!define PRODUCT_PACKAGE "prebuild"
7!define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net"
8!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild"
9!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild"
10!define PRODUCT_UNINST_ROOT_KEY "HKLM"
11!define PRODUCT_PATH ".."
12
13;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
14;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
15;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
16;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
17
18BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/"
19SetCompressor lzma
20CRCCheck on
21
22; File Association defines
23;!include "fileassoc.nsh"
24
25; MUI 1.67 compatible ------
26!include "MUI.nsh"
27
28; MUI Settings
29!define MUI_ABORTWARNING
30!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
31!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
32
33;--------------------------------
34;Variables
35
36;--------------------------------
37;Installer Pages
38
39; Welcome page
40!insertmacro MUI_PAGE_WELCOME
41; License page
42!insertmacro MUI_PAGE_LICENSE "..\doc\license.txt"
43; Directory page
44!insertmacro MUI_PAGE_DIRECTORY
45
46; Instfiles page
47!insertmacro MUI_PAGE_INSTFILES
48
49; Finish page
50!insertmacro MUI_PAGE_FINISH
51
52;------------------------------------
53; Uninstaller pages
54!insertmacro MUI_UNPAGE_CONFIRM
55!insertmacro MUI_UNPAGE_INSTFILES
56!insertmacro MUI_UNPAGE_FINISH
57;------------------------------------
58
59; Language files
60!insertmacro MUI_LANGUAGE "English"
61
62; Reserve files
63!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
64
65; MUI end ------
66
67Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
68OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe"
69InstallDir "$PROGRAMFILES\Prebuild"
70InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
71ShowInstDetails show
72ShowUnInstDetails show
73
74; .NET Framework check
75; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp
76; Section "Detecting that the .NET Framework 1.1 is installed"
77Function .onInit
78 ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install
79 StrCmp $R0 "" 0 CheckPreviousVersion
80 MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation."
81 Abort
82
83 CheckPreviousVersion:
84 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName"
85 StrCmp $R0 "" CheckOSVersion 0
86 MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation."
87 Abort
88
89 CheckOSVersion:
90 Call IsSupportedWindowsVersion
91 Pop $R0
92 StrCmp $R0 "False" NoAbort 0
93 MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)."
94 Abort
95
96 NoAbort:
97FunctionEnd
98
99Section "Source" SecSource
100 SetOverwrite ifnewer
101 SetOutPath "$INSTDIR\src"
102 File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.*
103
104 ;Store installation folder
105 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
106
107SectionEnd
108
109Section "Runtime" SecRuntime
110 SetOverwrite ifnewer
111 SetOutPath "$INSTDIR"
112 File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml
113
114 ;Store installation folder
115 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
116
117SectionEnd
118
119Section "Documentation" SecDocs
120 SetOverwrite ifnewer
121 SetOutPath "$INSTDIR\doc"
122 File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.*
123
124 ;Store installation folder
125 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
126SectionEnd
127
128Section "Scripts" SecScripts
129 SetOverwrite ifnewer
130 SetOutPath "$INSTDIR\scripts"
131 File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.*
132
133 ;Store installation folder
134 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
135SectionEnd
136
137;Language strings
138
139Section -AdditionalIcons
140 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
141SectionEnd
142
143Section -Post
144 WriteUninstaller "$INSTDIR\uninst.exe"
145 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
146 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
147 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
148 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
149 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
150SectionEnd
151
152Section Uninstall
153
154 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
155 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
156 RMDir /r "$INSTDIR"
157
158SectionEnd
159
160; GetWindowsVersion, taken from NSIS help, modified for our purposes
161Function IsSupportedWindowsVersion
162
163 Push $R0
164 Push $R1
165
166 ReadRegStr $R0 HKLM \
167 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
168
169 IfErrors 0 lbl_winnt
170
171 ; we are not NT
172 ReadRegStr $R0 HKLM \
173 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
174
175 StrCpy $R1 $R0 1
176 StrCmp $R1 '4' 0 lbl_error
177
178 StrCpy $R1 $R0 3
179
180 StrCmp $R1 '4.0' lbl_win32_95
181 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
182
183 lbl_win32_95:
184 StrCpy $R0 'False'
185 Goto lbl_done
186
187 lbl_win32_98:
188 StrCpy $R0 'False'
189 Goto lbl_done
190
191 lbl_win32_ME:
192 StrCpy $R0 'False'
193 Goto lbl_done
194
195 lbl_winnt:
196
197 StrCpy $R1 $R0 1
198
199 StrCmp $R1 '3' lbl_winnt_x
200 StrCmp $R1 '4' lbl_winnt_x
201
202 StrCpy $R1 $R0 3
203
204 StrCmp $R1 '5.0' lbl_winnt_2000
205 StrCmp $R1 '5.1' lbl_winnt_XP
206 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
207
208 lbl_winnt_x:
209 StrCpy $R0 'False'
210 Goto lbl_done
211
212 lbl_winnt_2000:
213 Strcpy $R0 'True'
214 Goto lbl_done
215
216 lbl_winnt_XP:
217 Strcpy $R0 'True'
218 Goto lbl_done
219
220 lbl_winnt_2003:
221 Strcpy $R0 'True'
222 Goto lbl_done
223
224 lbl_error:
225 Strcpy $R0 'False'
226 lbl_done:
227
228 Pop $R1
229 Exch $R0
230
231FunctionEnd