Mostly additions to the NSIS script: split the hidden section into a
[neverball] / scripts / neverball.nsi
1 OutFile "../neverball-${VERSION}-setup.exe"
2 Name "Neverball ${VERSION}"
3 LicenseData "COPYING.txt"
4 InstallDir "$PROGRAMFILES\Neverball"
5
6 XPStyle on
7
8 Page license
9 Page components
10 Page directory
11 Page instfiles
12
13 UninstPage uninstConfirm
14 UninstPage instfiles
15
16 Section "Neverball"
17     SectionIn RO
18
19     SetOutPath $INSTDIR
20
21     File *.txt
22     File /oname=AUTHORS.txt doc\AUTHORS.txt
23     File /oname=MANUAL.txt doc\MANUAL.txt
24
25     File /r /x .svn /x *.map /x obj data
26     File /r locale
27
28     File neverball.exe neverputt.exe *.dll
29
30     File /oname=data\icon\neverball.ico dist\newneverball.ico
31     File /oname=data\icon\neverputt.ico dist\newneverputt.ico
32
33     WriteUninstaller $INSTDIR\uninstall.exe
34 SectionEnd
35
36 Section "Mapping tools (compiler, maps, ...)"
37     SetOutPath $INSTDIR
38
39     File mapc.exe
40
41     SetOutPath "$INSTDIR\data"
42
43     File /r /x ".svn" data\*.map
44     File /r /x ".svn" data\obj
45 SectionEnd
46
47 Section "Create Start menu shortcuts"
48     # Reset to get a proper working directory for short-cuts
49     SetOutPath $INSTDIR
50
51     CreateDirectory "$SMPROGRAMS\Games"
52
53     CreateShortcut \
54         "$SMPROGRAMS\Games\Neverball.lnk" \
55         "$INSTDIR\neverball.exe" ""       \
56         "$INSTDIR\data\icon\neverball.ico"
57
58     CreateShortcut \
59         "$SMPROGRAMS\Games\Neverputt.lnk" \
60         "$INSTDIR\neverputt.exe" ""       \
61         "$INSTDIR\data\icon\neverputt.ico"
62 SectionEnd
63
64 Section "Uninstall"
65     Delete "$SMPROGRAMS\Games\Neverball.lnk"
66     Delete "$SMPROGRAMS\Games\Neverputt.lnk"
67     RMDir  "$SMPROGRAMS\Games"
68
69     # FIXME:  unsafe if the directory contains other-than-installed stuff
70     RMDir /r $INSTDIR
71 SectionEnd
72