20080726
[gdash.git] / gdash.nsi.in
blob4ff5fb71a6ddc148b7ef9fb5ede1c39cf7a471d2
1 ; GDash.nsi
4 ;--------------------------------
6 ; The name of the installer
7 Name "GDash"
9 !define VERSION GDASH-VERSION
10 !define MINGWDIR c:\mingw
12 ; The file to write
13 OutFile "gdash-${VERSION}-installer.exe"
15 ; The default installation directory
16 InstallDir $PROGRAMFILES\GDash
18 ; Registry key to check for directory (so if you install again, it will
19 ; overwrite the old one automatically)
20 InstallDirRegKey HKLM "Software\GDash" "Install_Dir"
22 ;--------------------------------
24 ; Pages
25 Page components
26 Page directory
27 Page instfiles
29 UninstPage uninstConfirm
30 UninstPage instfiles
32 ;--------------------------------
34 ; The stuff to install
35 Section "GDash (required)"
37 SectionIn RO
39 ; Program files
40 SetOutPath $INSTDIR
41 File "src\gdash.exe"
42 File "src\sdash.exe"
43 File "include\boulder_rush.png"
44 File "include\cells_c64.png"
45 File "gdash.ico"
46 File /oname=README.txt "README"
48 File "sound\*.wav"
50 ; Profram files, Glib dlls
51 SetOutPath $INSTDIR
52 File ${MINGWDIR}\bin\intl.dll
53 File ${MINGWDIR}\bin\libglib-2.0-0.dll
54 File ${MINGWDIR}\bin\libgmodule-2.0-0.dll
55 File ${MINGWDIR}\bin\libgobject-2.0-0.dll
57 ; Program files, GTK+ dlls
58 SetOutPath $INSTDIR
59 File ${MINGWDIR}\bin\jpeg62.dll
60 File ${MINGWDIR}\bin\libatk-1.0-0.dll
61 File ${MINGWDIR}\bin\libcairo-2.dll
62 File ${MINGWDIR}\bin\libgdk_pixbuf-2.0-0.dll
63 File ${MINGWDIR}\bin\libgdk-win32-2.0-0.dll
64 File ${MINGWDIR}\bin\libgtk-win32-2.0-0.dll
65 File ${MINGWDIR}\bin\libpango-1.0-0.dll
66 File ${MINGWDIR}\bin\libpangocairo-1.0-0.dll
67 File ${MINGWDIR}\bin\libpangowin32-1.0-0.dll
68 File ${MINGWDIR}\bin\libpng13.dll
69 File ${MINGWDIR}\bin\libtiff3.dll
70 File ${MINGWDIR}\bin\zlib1.dll
71 File ${MINGWDIR}\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll
72 SetOutPath $INSTDIR\etc\gtk-2.0
73 File gdk-pixbuf.loaders
75 ; Program files, SDL dlls
76 SetOutPath $INSTDIR
77 File ${MINGWDIR}\bin\SDL.dll
78 File ${MINGWDIR}\bin\SDL_mixer.dll
80 ; Translations
81 SetOutPath $INSTDIR\hu\LC_MESSAGES
82 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\gtk20.mo
83 File /r ${MINGWDIR}\share\locale\hu\LC_MESSAGES\glib20.mo
84 SetOutPath $INSTDIR\de\LC_MESSAGES
85 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\gtk20.mo
86 File /r ${MINGWDIR}\share\locale\de\LC_MESSAGES\glib20.mo
88 SetOutPath $INSTDIR\hu\LC_MESSAGES
89 File /oname=gdash.mo "po\hu.gmo"
90 SetOutPath $INSTDIR\de\LC_MESSAGES
91 File /oname=gdash.mo "po\de.gmo"
93 ; Write the installation path into the registry
94 WriteRegStr HKLM SOFTWARE\GDash "Install_Dir" "$INSTDIR"
96 ; Write the uninstall keys for Windows
97 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "DisplayName" "GDash"
98 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "UninstallString" '"$INSTDIR\uninstall.exe"'
99 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoModify" 1
100 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash" "NoRepair" 1
101 WriteUninstaller "uninstall.exe"
103 SectionEnd
105 ; Optional section (can be disabled by the user)
106 ; The stuff to install
107 Section "Cave sets"
109 ; Set output path to the installation directory.
110 SetOutPath $INSTDIR\caves
112 ; Put files there
113 File /r /x Makefile* /x create_makefile.sh "caves\*"
115 SectionEnd
119 ; Optional section (can be disabled by the user)
120 Section "Start Menu Shortcuts"
122 SetOutPath $INSTDIR
123 CreateDirectory "$SMPROGRAMS\GDash"
124 CreateShortCut "$SMPROGRAMS\GDash\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
125 CreateShortCut "$SMPROGRAMS\GDash\GDash.lnk" "$INSTDIR\gdash.exe" "" "$INSTDIR\gdash.ico" 0
126 CreateShortCut "$SMPROGRAMS\GDash\GDash (C64-like).lnk" "$INSTDIR\sdash.exe" "" "$INSTDIR\gdash.ico" 0
127 CreateShortCut "$SMPROGRAMS\GDash\README.lnk" "$INSTDIR\README.txt" "" "" 0
129 SectionEnd
133 ; Optional section (can be disabled by the user)
134 Section "Register *.bd and *.gds files"
136 WriteRegStr HKCR ".bd" "" "GDash.Caveset"
137 WriteRegStr HKCR ".gds" "" "GDash.Caveset"
139 WriteRegStr HKCR "GDash.Caveset" "" "GDash Caveset"
140 WriteRegStr HKCR "GDash.Caveset\DefaultIcon" "" "$INSTDIR\gdash.ico,0"
142 WriteRegStr HKCR "GDash.Caveset\shell\open\command" "" '"$INSTDIR\gdash.exe" "%1"'
143 WriteRegStr HKCR "GDash.Caveset\shell\edit\command" "" '"$INSTDIR\gdash.exe" -e "%1"'
145 SectionEnd
149 ; Optional section (can be disabled by the user)
150 Section "any2gdash conversion utility"
152 SetOutPath $INSTDIR
153 File "util\any2gdash.exe"
155 SectionEnd
161 ;--------------------------------
162 ; Uninstaller
164 Section "Uninstall"
166 ; Remove registry keys
167 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GDash"
168 DeleteRegKey HKLM SOFTWARE\GDash
169 DeleteRegKey HKCR ".bd"
170 DeleteRegKey HKCR ".gds"
171 DeleteRegKey HKCR "GDash.Caveset"
173 ; Remove shortcuts, if any
174 Delete "$SMPROGRAMS\GDash\*.*"
175 RMDir "$SMPROGRAMS\GDash"
177 ; Remove directories used
178 RMDir /r "$INSTDIR"
180 SectionEnd