Annotation of Amaya/amaya-src.nsi, revision 1.5
1.1 gully 1: ;--------------------------------
2: ;Include Modern UI
3:
4: !include "MUI.nsh"
5:
6: ;--------------------------------
7: ;General
8:
9: ;Name and file
1.4 gully 10: !define VERSION "9.1-src"
1.1 gully 11: Name "Amaya ${VERSION}"
12: OutFile "Amaya-${VERSION}.exe"
13:
14: ;Use lzma to compress (better than zip)
15: SetCompressor lzma
16:
17: ;Default installation folder
18: InstallDir "$EXEDIR\src"
19:
20: ;Get installation folder from registry if available
21: InstallDirRegKey HKCU "Software\Amaya-src" ""
22:
23:
24: ;--------------------------------
25: ;Variables
26:
27:
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"
40: !define MUI_LANGDLL_REGISTRY_KEY "Software\Amaya-src"
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"
52: !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Amaya-src"
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:
122: ;This section is required : readonly mode
123: SectionIn RO
124:
125: ; Amaya sources
126: SetOutPath "$INSTDIR\Amaya\WindowsWX"
127: File WindowsWX\*.dsw
128: File WindowsWX\*.dsp
129: SetOutPath "$INSTDIR\Amaya\WindowsWX\wx-setup"
130: File WindowsWX\wx-setup\setup.h
131: SetOutPath "$INSTDIR\Amaya\WindowsWX\zlib"
132: File WindowsWX\zlib\*.dsp
133: SetOutPath "$INSTDIR\Amaya\WindowsWX\tra"
134: File WindowsWX\tra\*.dsp
135: SetOutPath "$INSTDIR\Amaya\WindowsWX\thotprinter"
136: File WindowsWX\thotprinter\*.dsp
137: SetOutPath "$INSTDIR\Amaya\WindowsWX\str"
138: File WindowsWX\str\*.dsp
139: SetOutPath "$INSTDIR\Amaya\WindowsWX\prs"
140: File WindowsWX\prs\*.dsp
141: SetOutPath "$INSTDIR\Amaya\WindowsWX\printlib"
142: File WindowsWX\printlib\*.dsp
143: SetOutPath "$INSTDIR\Amaya\WindowsWX\libwww"
144: File WindowsWX\libwww\*.dsp
145: SetOutPath "$INSTDIR\Amaya\WindowsWX\LibThotKernel"
146: File WindowsWX\LibThotKernel\*.dsp
147: SetOutPath "$INSTDIR\Amaya\WindowsWX\LibThotEditor"
148: File WindowsWX\LibThotEditor\*.dsp
149: SetOutPath "$INSTDIR\Amaya\WindowsWX\librdf"
150: File WindowsWX\librdf\*.dsp
151: SetOutPath "$INSTDIR\Amaya\WindowsWX\libraptor"
152: File WindowsWX\libraptor\*.dsp
153: SetOutPath "$INSTDIR\Amaya\WindowsWX\libpng"
154: File WindowsWX\libpng\*.dsp
155: SetOutPath "$INSTDIR\Amaya\WindowsWX\libjpeg"
156: File WindowsWX\libjpeg\*.dsp
157: SetOutPath "$INSTDIR\Amaya\WindowsWX\davlib"
158: File WindowsWX\davlib\*.dsp
159: SetOutPath "$INSTDIR\Amaya\WindowsWX\cpp"
160: File WindowsWX\cpp\*.dsp
161: SetOutPath "$INSTDIR\Amaya\WindowsWX\Compilers"
162: File WindowsWX\Compilers\*.dsp
163: SetOutPath "$INSTDIR\Amaya\WindowsWX\app"
164: File WindowsWX\app\*.dsp
165: SetOutPath "$INSTDIR\Amaya\WindowsWX\annotlib"
166: File WindowsWX\annotlib\*.dsp
167: SetOutPath "$INSTDIR\Amaya\WindowsWX\amaya"
168: File WindowsWX\amaya\amaya.mkf
169:
170:
171: SetOutPath "$INSTDIR\Amaya\WindowsGL"
172: File WindowsGL\*.dsw
173: File WindowsGL\*.dsp
174: SetOutPath "$INSTDIR\Amaya\WindowsGL\zlib"
175: File WindowsGL\zlib\*.dsp
176: SetOutPath "$INSTDIR\Amaya\WindowsGL\tra"
177: File WindowsGL\tra\*.dsp
178: SetOutPath "$INSTDIR\Amaya\WindowsGL\thotprinter"
179: File WindowsGL\thotprinter\*.dsp
180: SetOutPath "$INSTDIR\Amaya\WindowsGL\str"
181: File WindowsGL\str\*.dsp
182: SetOutPath "$INSTDIR\Amaya\WindowsGL\prs"
183: File WindowsGL\prs\*.dsp
184: SetOutPath "$INSTDIR\Amaya\WindowsGL\printlib"
185: File WindowsGL\printlib\*.dsp
186: SetOutPath "$INSTDIR\Amaya\WindowsGL\libwww"
187: File WindowsGL\libwww\*.dsp
188: SetOutPath "$INSTDIR\Amaya\WindowsGL\LibThotKernel"
189: File WindowsGL\LibThotKernel\*.dsp
190: SetOutPath "$INSTDIR\Amaya\WindowsGL\LibThotEditor"
191: File WindowsGL\LibThotEditor\*.dsp
192: SetOutPath "$INSTDIR\Amaya\WindowsGL\librdf"
193: File WindowsGL\librdf\*.dsp
194: SetOutPath "$INSTDIR\Amaya\WindowsGL\libraptor"
195: File WindowsGL\libraptor\*.dsp
196: SetOutPath "$INSTDIR\Amaya\WindowsGL\libpng"
197: File WindowsGL\libpng\*.dsp
198: SetOutPath "$INSTDIR\Amaya\WindowsGL\libjpeg"
199: File WindowsGL\libjpeg\*.dsp
200: SetOutPath "$INSTDIR\Amaya\WindowsGL\davlib"
201: File WindowsGL\davlib\*.dsp
202: SetOutPath "$INSTDIR\Amaya\WindowsGL\cpp"
203: File WindowsGL\cpp\*.dsp
204: SetOutPath "$INSTDIR\Amaya\WindowsGL\Compilers"
205: File WindowsGL\Compilers\*.dsp
206: SetOutPath "$INSTDIR\Amaya\WindowsGL\app"
207: File WindowsGL\app\*.dsp
208: SetOutPath "$INSTDIR\Amaya\WindowsGL\annotlib"
209: File WindowsGL\annotlib\*.dsp
210: SetOutPath "$INSTDIR\Amaya\WindowsGL\amaya"
211: File WindowsGL\amaya\amaya.mkf
212:
213:
214: SetOutPath "$INSTDIR\Amaya\Windows"
215: File Windows\*.dsw
216: File Windows\*.dsp
217: SetOutPath "$INSTDIR\Amaya\Windows\zlib"
218: File Windows\zlib\*.dsp
219: SetOutPath "$INSTDIR\Amaya\Windows\tra"
220: File Windows\tra\*.dsp
221: SetOutPath "$INSTDIR\Amaya\Windows\thotprinter"
222: File Windows\thotprinter\*.dsp
223: SetOutPath "$INSTDIR\Amaya\Windows\str"
224: File Windows\str\*.dsp
225: SetOutPath "$INSTDIR\Amaya\Windows\prs"
226: File Windows\prs\*.dsp
227: SetOutPath "$INSTDIR\Amaya\Windows\printlib"
228: File Windows\printlib\*.dsp
229: SetOutPath "$INSTDIR\Amaya\Windows\libwww"
230: File Windows\libwww\*.dsp
231: SetOutPath "$INSTDIR\Amaya\Windows\LibThotKernel"
232: File Windows\LibThotKernel\*.dsp
233: SetOutPath "$INSTDIR\Amaya\Windows\LibThotEditor"
234: File Windows\LibThotEditor\*.dsp
235: SetOutPath "$INSTDIR\Amaya\Windows\librdf"
236: File Windows\librdf\*.dsp
237: SetOutPath "$INSTDIR\Amaya\Windows\libraptor"
238: File Windows\libraptor\*.dsp
239: SetOutPath "$INSTDIR\Amaya\Windows\libpng"
240: File Windows\libpng\*.dsp
241: SetOutPath "$INSTDIR\Amaya\Windows\libjpeg"
242: File Windows\libjpeg\*.dsp
243: SetOutPath "$INSTDIR\Amaya\Windows\davlib"
244: File Windows\davlib\*.dsp
245: SetOutPath "$INSTDIR\Amaya\Windows\cpp"
246: File Windows\cpp\*.dsp
247: SetOutPath "$INSTDIR\Amaya\Windows\Compilers"
248: File Windows\Compilers\*.dsp
249: SetOutPath "$INSTDIR\Amaya\Windows\app"
250: File Windows\app\*.dsp
251: SetOutPath "$INSTDIR\Amaya\Windows\annotlib"
252: File Windows\annotlib\*.dsp
253: SetOutPath "$INSTDIR\Amaya\Windows\amaya"
254: File Windows\amaya\amaya.mkf
255:
256:
257: SetOutPath "$INSTDIR\Amaya\tools"
258: File /r tools\*
259: SetOutPath "$INSTDIR\Amaya\thotlib"
260: File /r thotlib\*
261: SetOutPath "$INSTDIR\Amaya\templates"
262: File /r templates\*
263: SetOutPath "$INSTDIR\Amaya\resources"
264: File /r resources\*
265: SetOutPath "$INSTDIR\Amaya\libpng"
266: File /r libpng\*
267: SetOutPath "$INSTDIR\Amaya\libjpeg"
268: File /r libjpeg\*
269: SetOutPath "$INSTDIR\Amaya\Icons"
270: File /r Icons\*
271: SetOutPath "$INSTDIR\Amaya\fonts"
272: File /r fonts\*
273: SetOutPath "$INSTDIR\Amaya\doc"
274: File /r doc\*
275: SetOutPath "$INSTDIR\Amaya\dicopar"
276: File /r dicopar\*
277: SetOutPath "$INSTDIR\Amaya\davlib"
278: File /r davlib\*
279: SetOutPath "$INSTDIR\Amaya\cpp"
280: File /r cpp\*
281: SetOutPath "$INSTDIR\Amaya\config"
282: File /r config\*
283: SetOutPath "$INSTDIR\Amaya\batch"
284: File /r batch\*
285: SetOutPath "$INSTDIR\Amaya\annotlib"
286: File /r annotlib\*
287: SetOutPath "$INSTDIR\Amaya\amaya"
288: File /r amaya\*
289:
290: SetOutPath "$INSTDIR\Amaya"
291: File *.info
292: File *.pkg
293: File *.spec
294: File *.nsi
295: File *.in
296: File config.guess
297: File config.sub
298: File configure
299: File install-sh
300: File README*
301: File *.html
302:
303: ; libwww sources
1.2 gully 304: SetOutPath "$INSTDIR\libwww"
305: File /r ..\libwww\*
1.1 gully 306:
307: ; redland sources
1.2 gully 308: SetOutPath "$INSTDIR\redland"
309: File /r ..\redland\*
1.1 gully 310:
311: ; freetype sources
312: SetOutPath "$INSTDIR\freetype-2.1.9"
313: File ..\freetype-2.1.9\*
314: SetOutPath "$INSTDIR\freetype-2.1.9"
315: File /r ..\freetype-2.1.9\builds
316: SetOutPath "$INSTDIR\freetype-2.1.9"
317: File /r ..\freetype-2.1.9\devel
318: SetOutPath "$INSTDIR\freetype-2.1.9"
319: File /r ..\freetype-2.1.9\include
320: SetOutPath "$INSTDIR\freetype-2.1.9\objs"
321: File ..\freetype-2.1.9\objs\README
322: SetOutPath "$INSTDIR\freetype-2.1.9"
323: File /r ..\freetype-2.1.9\src
324:
325: ; wxWidgets sources
326: SetOutPath "$INSTDIR\wxWidgets"
327: File ..\wxWidgets\*
328: SetOutPath "$INSTDIR\wxWidgets"
329: File /r ..\wxWidgets\src
330: SetOutPath "$INSTDIR\wxWidgets"
331: File /r ..\wxWidgets\include
332: SetOutPath "$INSTDIR\wxWidgets"
333: File /r ..\wxWidgets\locale
334: SetOutPath "$INSTDIR\wxWidgets"
335: File /r ..\wxWidgets\art
336: SetOutPath "$INSTDIR\wxWidgets\lib"
337: File ..\wxWidgets\lib\dummy
338: SetOutPath "$INSTDIR\wxWidgets\build\msw"
339: File ..\wxWidgets\build\msw\*.dsp
340: File ..\wxWidgets\build\msw\*.dsw
341: File ..\wxWidgets\build\msw\config*
342: File ..\wxWidgets\build\msw\makefile*
343:
344: ;Store installation folder
345: WriteRegStr HKCU "Software\Amaya-src" "" $INSTDIR
346:
347: ;Create uninstaller
348: WriteUninstaller "$INSTDIR\Uninstall.exe"
349:
350: ;Start Menu
351: !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
352: ;Create shortcuts
353: CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
354: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
355: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya-src.lnk" "$INSTDIR\"
356: !insertmacro MUI_STARTMENU_WRITE_END
357:
358: ;Create desktop link
359: CreateShortCut "$DESKTOP\Amaya-src.lnk" "$INSTDIR\"
360: SectionEnd
361:
362: ;--------------------------------
363: ;Installer Functions
364:
365: Function .onInit
366:
367: !insertmacro MUI_LANGDLL_DISPLAY
368:
369: FunctionEnd
370:
371: ;--------------------------------
372: ;Descriptions
373:
374: ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
375:
376: ;Assign descriptions to sections
377: !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
378: !insertmacro MUI_DESCRIPTION_TEXT ${SecAmaya} "Amaya sources."
379: !insertmacro MUI_FUNCTION_DESCRIPTION_END
380:
381:
382: ;--------------------------------
383: ;Uninstaller Section
384:
385: Section "Uninstall"
386:
387: Delete "$INSTDIR\Uninstall.exe"
388:
389: RMDir /r "$INSTDIR"
390:
391: ;Start Menu uninstall
392: ; !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
393: ; Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
394: ; ;Delete empty start menu parent diretories
395: ; StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
396: ; startMenuDeleteLoop:
397: ; ClearErrors
398: ; RMDir $MUI_TEMP
399: ; GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
400: ; IfErrors startMenuDeleteLoopDone
401: ; StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
402: ; startMenuDeleteLoopDone:
403:
404: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya-src.lnk"
405: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk"
406: RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
407:
408: DeleteRegKey /ifempty HKCU "Software\Amaya-src"
409:
410: SectionEnd
411:
412: ;--------------------------------
413: ;Uninstaller Functions
414:
415: Function un.onInit
416:
417: !insertmacro MUI_UNGETLANGUAGE
418:
1.5 ! vatton 419: FunctionEnd
Webmaster