Annotation of Amaya/amaya-wx_release.nsi, revision 1.9
1.1 gully 1: ;--------------------------------
2: ;Include Modern UI
3:
4: !include "MUI.nsh"
5:
6: ;--------------------------------
7: ;General
8:
9: ;Name and file
1.8 gully 10: !define VERSION "9.0"
1.1 gully 11: Name "Amaya WX ${VERSION}"
1.9 ! cvs 12: OutFile "amaya-WinXP-${VERSION}.exe"
1.1 gully 13:
14: ;Use lzma to compress (better than zip)
15: SetCompressor lzma
16:
1.9 ! cvs 17:
1.1 gully 18: ;Default installation folder
1.2 gully 19: InstallDir "$PROGRAMFILES\AmayaWX"
1.1 gully 20:
21: ;Get installation folder from registry if available
1.2 gully 22: InstallDirRegKey HKCU "Software\AmayaWX" ""
1.1 gully 23:
24: ;--------------------------------
25: ;Variables
26:
1.3 gully 27:
1.1 gully 28: Var STARTMENU_FOLDER
29:
30: ;--------------------------------
31: ;Interface Settings
32:
33: !define MUI_ABORTWARNING
34:
35: ;--------------------------------
36: ;Language Selection Dialog Settings
37:
38: ;Remember the installer language
39: !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
1.2 gully 40: !define MUI_LANGDLL_REGISTRY_KEY "Software\AmayaWX"
1.1 gully 41: !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
42:
43: ;--------------------------------
44: ;Pages
45:
46: !insertmacro MUI_PAGE_LICENSE "amaya\COPYRIGHT"
47: !insertmacro MUI_PAGE_COMPONENTS
48: !insertmacro MUI_PAGE_DIRECTORY
49:
50: ;Start Menu Folder Page Configuration
51: !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
1.2 gully 52: !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\AmayaWX"
1.1 gully 53: !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
54: !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
55:
56: !insertmacro MUI_PAGE_INSTFILES
57:
58: !insertmacro MUI_UNPAGE_CONFIRM
59: !insertmacro MUI_UNPAGE_INSTFILES
60:
61: ;--------------------------------
62: ;Languages
63:
64: !insertmacro MUI_LANGUAGE "English"
65: !insertmacro MUI_LANGUAGE "French"
66: !insertmacro MUI_LANGUAGE "German"
67: !insertmacro MUI_LANGUAGE "Spanish"
68: ; !insertmacro MUI_LANGUAGE "SimpChinese"
69: ; !insertmacro MUI_LANGUAGE "TradChinese"
70: ; !insertmacro MUI_LANGUAGE "Japanese"
71: ; !insertmacro MUI_LANGUAGE "Korean"
72: ; !insertmacro MUI_LANGUAGE "Italian"
73: ; !insertmacro MUI_LANGUAGE "Dutch"
74: ; !insertmacro MUI_LANGUAGE "Danish"
75: ; !insertmacro MUI_LANGUAGE "Swedish"
76: ; !insertmacro MUI_LANGUAGE "Norwegian"
77: ; !insertmacro MUI_LANGUAGE "Finnish"
78: ; !insertmacro MUI_LANGUAGE "Greek"
79: !insertmacro MUI_LANGUAGE "Russian"
80: !insertmacro MUI_LANGUAGE "Portuguese"
81: ; !insertmacro MUI_LANGUAGE "PortugueseBR"
82: ; !insertmacro MUI_LANGUAGE "Polish"
83: ; !insertmacro MUI_LANGUAGE "Ukrainian"
84: ; !insertmacro MUI_LANGUAGE "Czech"
85: ; !insertmacro MUI_LANGUAGE "Slovak"
86: ; !insertmacro MUI_LANGUAGE "Croatian"
87: ; !insertmacro MUI_LANGUAGE "Bulgarian"
88: ; !insertmacro MUI_LANGUAGE "Hungarian"
89: ; !insertmacro MUI_LANGUAGE "Thai"
90: ; !insertmacro MUI_LANGUAGE "Romanian"
91: ; !insertmacro MUI_LANGUAGE "Latvian"
92: ; !insertmacro MUI_LANGUAGE "Macedonian"
93: ; !insertmacro MUI_LANGUAGE "Estonian"
94: !insertmacro MUI_LANGUAGE "Turkish"
95: ; !insertmacro MUI_LANGUAGE "Lithuanian"
96: ; !insertmacro MUI_LANGUAGE "Catalan"
97: ; !insertmacro MUI_LANGUAGE "Slovenian"
98: ; !insertmacro MUI_LANGUAGE "Serbian"
99: ; !insertmacro MUI_LANGUAGE "SerbianLatin"
100: ; !insertmacro MUI_LANGUAGE "Arabic"
101: ; !insertmacro MUI_LANGUAGE "Farsi"
102: ; !insertmacro MUI_LANGUAGE "Hebrew"
103: ; !insertmacro MUI_LANGUAGE "Indonesian"
104: ; !insertmacro MUI_LANGUAGE "Mongolian"
105: ; !insertmacro MUI_LANGUAGE "Luxembourgish"
106: ; !insertmacro MUI_LANGUAGE "Albanian"
107:
108: ;--------------------------------
109: ;Reserve Files
110:
111: ;These files should be inserted before other files in the data block
112: ;Keep these lines before any File command
113: ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
114:
115: !insertmacro MUI_RESERVEFILE_LANGDLL
116:
117: ;--------------------------------
118: ;Installer Sections
119:
120: Section "Amaya" SecAmaya
121:
1.9 ! cvs 122:
! 123: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
! 124: ;Test the platform
! 125: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
! 126: ReadRegStr $R0 HKLM \
! 127: "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
! 128:
! 129: IfErrors 0 lbl_winnt
! 130:
! 131: ; we are not NT
! 132: ReadRegStr $R0 HKLM \
! 133: "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
! 134:
! 135: StrCpy $R1 $R0 1
! 136: StrCmp $R1 '4' 0 lbl_error
! 137:
! 138: StrCpy $R1 $R0 3
! 139:
! 140: StrCmp $R1 '4.0' lbl_win32_95
! 141: StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
! 142:
! 143: lbl_win32_95:
! 144: Abort
! 145:
! 146: lbl_win32_98:
! 147: Abort
! 148:
! 149: lbl_win32_ME:
! 150: Abort
! 151:
! 152: lbl_winnt:
! 153:
! 154: StrCpy $R1 $R0 1
! 155:
! 156: StrCmp $R1 '3' lbl_winnt_x
! 157: StrCmp $R1 '4' lbl_winnt_x
! 158:
! 159: StrCpy $R1 $R0 3
! 160:
! 161: StrCmp $R1 '5.0' lbl_winnt_2000
! 162: StrCmp $R1 '5.1' lbl_winnt_XP
! 163: StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
! 164:
! 165: lbl_winnt_x:
! 166: StrCpy $R0 "NT $R0" 6
! 167: Goto lbl_done
! 168:
! 169: lbl_winnt_2000:
! 170: Strcpy $R0 '2000'
! 171: Goto lbl_done
! 172:
! 173: lbl_winnt_XP:
! 174: Strcpy $R0 'XP'
! 175: Goto lbl_done
! 176:
! 177: lbl_winnt_2003:
! 178: Strcpy $R0 '2003'
! 179: Goto lbl_done
! 180:
! 181: lbl_error:
! 182: Abort
! 183: lbl_done:
! 184: MessageBox MB_OK $R0
! 185: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
! 186:
1.1 gully 187: ;This section is required : readonly mode
188: SectionIn RO
189:
190: SetOutPath "$INSTDIR\WindowsWX\bin"
191: File WindowsWX\bin\amaya.exe
192: File WindowsWX\bin\wxmsw*u_xrc_vc_custom.dll
193: File WindowsWX\bin\wxmsw*u_html_vc_custom.dll
194: File WindowsWX\bin\wxmsw*u_core_vc_custom.dll
195: File WindowsWX\bin\wxmsw*u_adv_vc_custom.dll
196: File WindowsWX\bin\wxmsw*u_gl_vc_custom.dll
197: File WindowsWX\bin\wxbase*u_vc_custom.dll
198: File WindowsWX\bin\wxbase*u_xml_vc_custom.dll
199: ; File WindowsWX\bin\thotprinter.exe
200:
201:
202: SetOutPath "$INSTDIR\resources\icons"
203: File resources\icons\*.png
1.6 gully 204: File resources\icons\*.gif
1.1 gully 205: SetOutPath "$INSTDIR\resources\xrc"
206: File resources\xrc\*.xrc
207:
208:
209: SetOutPath "$INSTDIR\amaya"
210: File amaya\COPYRIGHT
211: File amaya\*.png
212: File amaya\*.gif
213: File amaya\*.css
214: File amaya\*.html*
215: File amaya\*.PRS
216: File amaya\*.STR
217: File amaya\*.TRA
218: File amaya\*.conf
219: File amaya\*.en
220: File amaya\*.trans*
221: File amaya\*.ico
222: File amaya\*.svg
223:
224: SetOutPath "$INSTDIR\annotlib"
225: File annotlib\*.png
226: File annotlib\*.gif
227: File annotlib\*.PRS
228: File annotlib\*.STR
229: File annotlib\*.TRA
230: File annotlib\*.en
231:
232: SetOutPath "$INSTDIR\config\libconfig"
233: File config\libconfig\*.png
234: File config\libconfig\*.svg
235: File config\libconfig\*.css
236: File config\libconfig\*.lhtml
237:
238: SetOutPath "$INSTDIR\config"
239: File config\*-amayadialogue
240: File config\*-libdialogue
241: File config\*-amayamsg
242: File config\*-libdialogue
243: File config\lib_files.dat
244: File config\fonts.*
245: File config\amaya.kb
246: File config\amaya.profiles
247: File config\*.rdf
248: File config\annot.schemas
249: File config\win-thot.rc
250:
251: SetOutPath "$INSTDIR\dicopar"
252: File dicopar\alphabet
253: File dicopar\*.ptn
254: File dicopar\clavier
255: File dicopar\*.dic
256:
257: SetOutPath "$INSTDIR\doc\html"
258: File doc\html\*
1.4 gully 259: SetOutPath "$INSTDIR\doc\html\accessibility_in_amaya"
1.1 gully 260: File doc\html\accessibility_in_amaya\*
1.4 gully 261: SetOutPath "$INSTDIR\doc\html\attaching_annotations"
1.1 gully 262: File doc\html\attaching_annotations\*
1.4 gully 263: SetOutPath "$INSTDIR\doc\html\browsing"
1.1 gully 264: File doc\html\browsing\*
1.4 gully 265: SetOutPath "$INSTDIR\doc\html\configuring_amaya"
1.1 gully 266: File doc\html\configuring_amaya\*
1.4 gully 267: SetOutPath "$INSTDIR\doc\html\editing_attributes"
1.1 gully 268: File doc\html\editing_attributes\*
1.4 gully 269: SetOutPath "$INSTDIR\doc\html\editing_documents"
1.1 gully 270: File doc\html\editing_documents\*
1.4 gully 271: SetOutPath "$INSTDIR\doc\html\editing_iso-latin-1_characters"
1.1 gully 272: File doc\html\editing_iso-latin-1_characters\*
1.4 gully 273: SetOutPath "$INSTDIR\doc\html\editing_mathematics"
1.1 gully 274: File doc\html\editing_mathematics\*
1.4 gully 275: SetOutPath "$INSTDIR\doc\html\editing_tables"
1.1 gully 276: File doc\html\editing_tables\*
1.4 gully 277: SetOutPath "$INSTDIR\doc\html\elements"
1.1 gully 278: File doc\html\elements\*
1.4 gully 279: SetOutPath "$INSTDIR\doc\html\HTML-elements"
1.1 gully 280: File doc\html\HTML-elements\*
1.4 gully 281: SetOutPath "$INSTDIR\doc\html\linking"
1.1 gully 282: File doc\html\linking\*
1.4 gully 283: SetOutPath "$INSTDIR\doc\html\printing"
1.1 gully 284: File doc\html\printing\*
1.4 gully 285: SetOutPath "$INSTDIR\doc\html\saving_and_publishing_documents"
1.1 gully 286: File doc\html\saving_and_publishing_documents\*
1.4 gully 287: SetOutPath "$INSTDIR\doc\html\searching_and_replacing_text"
1.1 gully 288: File doc\html\searching_and_replacing_text\*
1.4 gully 289: SetOutPath "$INSTDIR\doc\html\selecting"
1.1 gully 290: File doc\html\selecting\*
1.4 gully 291: SetOutPath "$INSTDIR\doc\html\spell_checking"
1.1 gully 292: File doc\html\spell_checking\*
1.4 gully 293: SetOutPath "$INSTDIR\doc\html\style_sheets"
1.1 gully 294: File doc\html\style_sheets\*
1.4 gully 295: SetOutPath "$INSTDIR\doc\html\using_graphics"
1.1 gully 296: File doc\html\using_graphics\*
1.4 gully 297: SetOutPath "$INSTDIR\doc\html\using_image_maps"
1.1 gully 298: File doc\html\using_image_maps\*
1.4 gully 299: SetOutPath "$INSTDIR\doc\html\using_the_makebook_function"
1.1 gully 300: File doc\html\using_the_makebook_function\*
1.4 gully 301: SetOutPath "$INSTDIR\doc\html\using_xml"
1.1 gully 302: File doc\html\using_xml\*
1.4 gully 303: SetOutPath "$INSTDIR\doc\html\viewing"
1.1 gully 304: File doc\html\viewing\*
305:
306: SetOutPath "$INSTDIR\doc\images"
307: File doc\images\*
308:
309: SetOutPath "$INSTDIR\fonts"
310: File fonts\*
311:
312: ;Store installation folder
1.2 gully 313: WriteRegStr HKCU "Software\AmayaWX" "" $INSTDIR
1.1 gully 314:
315: ;Create uninstaller
316: WriteUninstaller "$INSTDIR\Uninstall.exe"
317:
318: ;Start Menu
319: !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
320: ;Create shortcuts
321: CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
322: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
323: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
324: !insertmacro MUI_STARTMENU_WRITE_END
325:
1.3 gully 326: ;Create desktop link
327: CreateShortCut "$DESKTOP\AmayaWX.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
1.1 gully 328: SectionEnd
329:
330: ;--------------------------------
331: ;Installer Functions
332:
333: Function .onInit
334:
335: !insertmacro MUI_LANGDLL_DISPLAY
336:
337: FunctionEnd
338:
339: ;--------------------------------
340: ;Descriptions
341:
342: ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
343:
344: ;Assign descriptions to sections
345: !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
346: !insertmacro MUI_DESCRIPTION_TEXT ${SecAmaya} "Amaya."
347: !insertmacro MUI_FUNCTION_DESCRIPTION_END
348:
349:
350: ;--------------------------------
351: ;Uninstaller Section
352:
353: Section "Uninstall"
354:
355: Delete "$INSTDIR\Uninstall.exe"
356:
357: RMDir /r "$INSTDIR"
358:
359: ;Start Menu uninstall
1.3 gully 360: ; !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
361: ; Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
362: ; ;Delete empty start menu parent diretories
363: ; StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
364: ; startMenuDeleteLoop:
365: ; ClearErrors
366: ; RMDir $MUI_TEMP
367: ; GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
368: ; IfErrors startMenuDeleteLoopDone
369: ; StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
370: ; startMenuDeleteLoopDone:
1.1 gully 371:
1.5 gully 372: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk"
373: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk"
374: RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
1.3 gully 375: Delete "$DESKTOP\AmayaWX.lnk"
1.1 gully 376:
1.2 gully 377: DeleteRegKey /ifempty HKCU "Software\AmayaWX"
1.1 gully 378:
379: SectionEnd
380:
381: ;--------------------------------
382: ;Uninstaller Functions
383:
384: Function un.onInit
385:
386: !insertmacro MUI_UNGETLANGUAGE
387:
388: FunctionEnd
Webmaster