root/trunk/FahMon.nsi.in

Revision 542, 8.7 kB (checked in by uncle_fungus, 2 years ago)

Added Slovak translation from #215

  • Property svn:executable set to *
Line 
1   !include "MUI.nsh"
2
3   SetCompressor /SOLID lzma
4
5   Name "@PACKAGE_NAME@"
6   OutFile "@PACKAGE_NAME@-@PACKAGE_VERSION@-Installer.exe"
7
8   InstallDir "$PROGRAMFILES\FahMon"
9
10   InstallDirRegKey HKCU "Software\FahMon" ""
11
12   RequestExecutionLevel admin
13
14   Var MUI_TEMP
15   Var STARTMENU_FOLDER
16
17   !define MUI_ABORTWARNING
18
19   !insertmacro MUI_PAGE_COMPONENTS
20   !insertmacro MUI_PAGE_DIRECTORY
21
22   ;Start Menu Folder Page Configuration
23   !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
24   !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\FahMon"
25   !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
26
27   !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
28
29   !insertmacro MUI_PAGE_INSTFILES
30
31   !insertmacro MUI_UNPAGE_CONFIRM
32   !insertmacro MUI_UNPAGE_INSTFILES
33
34   !insertmacro MUI_LANGUAGE "English"
35
36 Section "!@PACKAGE_NAME@" SecFahMon
37
38   SectionIn 1 RO
39
40   SetOutPath "$INSTDIR"
41
42   File "fahmon.exe"
43   File "libcurl.dll"
44   SetOutPath "$INSTDIR\images"
45   File "images\list_client_asynch.png"
46   File "images\list_client_inaccessible.png"
47   File "images\list_client_inactive.png"
48   File "images\list_client_ok.png"
49   File "images\list_client_stopped.png"
50   File "images\list_client_paused.png"
51   File "images\list_down_arrow.png"
52   File "images\list_up_arrow.png"
53   File "images\main_icon.png"
54   File "images\dialog_icon.png"
55   SetOutPath "$INSTDIR\lang"
56   File "lang\fahmon.pot"
57   SetOutPath "$INSTDIR\docs"
58   File "docs\AUTHORS.txt"
59   File "docs\ChangeLog.txt"
60   File "docs\COPYING.txt"
61   File "docs\help.pdf"
62   File "docs\NEWS.txt"
63   File "docs\README.txt"
64
65   SetOutPath "$INSTDIR"
66
67   WriteRegStr HKCU "Software\FahMon" "" $INSTDIR
68
69   WriteUninstaller "$INSTDIR\Uninstall.exe"
70
71   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FahMon" \
72                  "DisplayName" "FahMon - Folding@home client monitoring software"
73   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FahMon" \
74                  "UninstallString" "$INSTDIR\uninstall.exe"
75
76   !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
77
78     CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
79     CreateShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\FahMon.lnk" "$INSTDIR\fahmon.exe"
80     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
81     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Help.lnk" "$INSTDIR\docs\help.pdf"
82     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\README.lnk" "$INSTDIR\docs\README.txt"
83
84   !insertmacro MUI_STARTMENU_WRITE_END
85
86 SectionEnd
87
88 Section "Web Templates" secWebTemplates
89
90   SetOutPath "$INSTDIR\templates"
91   File "templates\fancy_template.htm"
92   File "templates\simple_template.htm"
93   File "templates\simple_template.txt"
94
95 SectionEnd
96
97 SectionGroup "Languages" secLang
98 Section /o "British English" secLangenGB
99
100   SetOutPath "$INSTDIR\lang\en_GB"
101   File "lang\en_GB\en_GB.po"
102   File "lang\en_GB\fahmon.mo"
103
104 SectionEnd
105 Section /o "Czech" secLangcsCZ
106
107   SetOutPath "$INSTDIR\lang\cs_CZ"
108   File "lang\cs_CZ\cs_CZ.po"
109   File "lang\cs_CZ\fahmon.mo"
110
111 SectionEnd
112 Section /o "Dutch" secLangnlNL
113
114   SetOutPath "$INSTDIR\lang\nl_NL"
115   File "lang\nl_NL\nl_NL.po"
116   File "lang\nl_NL\fahmon.mo"
117
118 SectionEnd
119 Section /o "French" secLangfrFR
120
121   SetOutPath "$INSTDIR\lang\fr_FR"
122   File "lang\fr_FR\fr_FR.po"
123   File "lang\fr_FR\fahmon.mo"
124
125 SectionEnd
126 Section /o "German" secLangdeDE
127
128   SetOutPath "$INSTDIR\lang\de_DE"
129   File "lang\de_DE\de_DE.po"
130   File "lang\de_DE\fahmon.mo"
131
132 SectionEnd
133 Section /o "Italian" secLangitIT
134
135   SetOutPath "$INSTDIR\lang\it_IT"
136   File "lang\it_IT\it_IT.po"
137   File "lang\it_IT\fahmon.mo"
138
139 SectionEnd
140 Section /o "Polish" secLangplPL
141
142   SetOutPath "$INSTDIR\lang\pl_PL"
143   File "lang\pl_PL\pl_PL.po"
144   File "lang\pl_PL\fahmon.mo"
145
146 SectionEnd
147 Section /o "Portuguese (Brazil)" secLangptBR
148
149   SetOutPath "$INSTDIR\lang\pt_BR"
150   File "lang\pt_BR\pt_BR.po"
151   File "lang\pt_BR\fahmon.mo"
152
153 SectionEnd
154 Section /o "Portuguese (Portugal)" secLangptPT
155
156   SetOutPath "$INSTDIR\lang\pt_PT"
157   File "lang\pt_PT\pt_PT.po"
158   File "lang\pt_PT\fahmon.mo"
159
160 SectionEnd
161 Section /o "Russian" secLangruRU
162
163   SetOutPath "$INSTDIR\lang\ru_RU"
164   File "lang\ru_RU\ru_RU.po"
165   File "lang\ru_RU\fahmon.mo"
166
167 SectionEnd
168 Section /o "Simplified Chinese" secLangzhCN
169
170   SetOutPath "$INSTDIR\lang\zh_CN"
171   File "lang\zh_CN\zh_CN.po"
172   File "lang\zh_CN\fahmon.mo"
173
174 SectionEnd
175 Section /o "Spanish" secLangesES
176
177   SetOutPath "$INSTDIR\lang\es_ES"
178   File "lang\es_ES\es_ES.po"
179   File "lang\es_ES\fahmon.mo"
180
181 SectionEnd
182 Section /o "Swedish" secLangsvSE
183
184   SetOutPath "$INSTDIR\lang\sv_SE"
185   File "lang\sv_SE\sv_SE.po"
186   File "lang\sv_SE\fahmon.mo"
187
188 SectionEnd
189 Section /o "Slovak" secLangskSK
190
191   SetOutPath "$INSTDIR\lang\sk_SK"
192   File "lang\sk_SK\sk_SK.po"
193   File "lang\sk_SK\fahmon.mo"
194
195 SectionEnd
196 SectionGroupEnd
197
198   LangString DESC_SecFahMon ${LANG_ENGLISH} "Install FahMon"
199   LangString DESC_SecWebTemplates ${LANG_ENGLISH} "Install web output templates"
200   LangString DESC_SecLang ${LANG_ENGLISH} "Install optional language components"
201   LangString DESC_SecLangenGB ${LANG_ENGLISH} "Install British English translation"
202   LangString DESC_SecLangcsCZ ${LANG_ENGLISH} "Install Czech translation"
203   LangString DESC_SecLangnlNL ${LANG_ENGLISH} "Install Dutch translation"
204   LangString DESC_SecLangfrFR ${LANG_ENGLISH} "Install French translation"
205   LangString DESC_SecLangdeDE ${LANG_ENGLISH} "Install German translation"
206   LangString DESC_SecLangitIT ${LANG_ENGLISH} "Install Italian translation"
207   LangString DESC_SecLangplPL ${LANG_ENGLISH} "Install Polish translation"
208   LangString DESC_SecLangptBR ${LANG_ENGLISH} "Install Portuguese (Brazil) translation"
209   LangString DESC_SecLangptPT ${LANG_ENGLISH} "Install Portuguese (Portugal) translation"
210   LangString DESC_SecLangruRU ${LANG_ENGLISH} "Install Russian translation"
211   LangString DESC_SecLangzhCN ${LANG_ENGLISH} "Install Simplified Chinese translation"
212   LangString DESC_SecLangesES ${LANG_ENGLISH} "Install Spanish translation"
213   LangString DESC_SecLangsvSE ${LANG_ENGLISH} "Install Swedish translation"
214   LangString DESC_SecLangskSK ${LANG_ENGLISH} "Install Slovak translation"
215
216   !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
217     !insertmacro MUI_DESCRIPTION_TEXT ${SecFahMon} $(DESC_SecFahMon)
218     !insertmacro MUI_DESCRIPTION_TEXT ${SecWebTemplates} $(DESC_SecWebTemplates)
219     !insertmacro MUI_DESCRIPTION_TEXT ${SecLang} $(DESC_SecLang)
220     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangenGB} $(DESC_SecLangenGB)
221     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangcsCZ} $(DESC_SecLangcsCZ)
222     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangnlNL} $(DESC_SecLangnlNL)
223     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangfrFR} $(DESC_SecLangfrFR)
224     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangdeDE} $(DESC_SecLangdeDE)
225     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangitIT} $(DESC_SecLangitIT)
226     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangplPL} $(DESC_SecLangplPL)
227     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangptBR} $(DESC_SecLangptBR)
228     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangptPT} $(DESC_SecLangptPT)
229     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangzhCN} $(DESC_SecLangzhCN)
230     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangesES} $(DESC_SecLangesES)
231     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangsvSE} $(DESC_SecLangsvSE)
232     !insertmacro MUI_DESCRIPTION_TEXT ${SecLangskSK} $(DESC_SecLangskSK)
233   !insertmacro MUI_FUNCTION_DESCRIPTION_END
234
235 Section "Uninstall"
236
237   Delete "$INSTDIR\fahmon.exe"
238   Delete "$INSTDIR\messages.log"
239   Delete "$INSTDIR\Uninstall.exe"
240
241   MessageBox MB_YESNO "Keep preferences, client-list, project database and benchmarks database?" IDYES true IDNO false
242   true:
243     DetailPrint "Keeping config folder"
244     Goto next
245   false:
246     DetailPrint "Removing config folder"
247     RMDir /r "$APPDATA\FahMon\config"
248     RMDir /r "$APPDATA\FahMon\templates"
249     RMDir /r "$APPDATA\FahMon"
250   next:
251
252    RMDir /r "$INSTDIR\images"
253    RMDir /r "$INSTDIR\lang"
254    RMDir /r "$INSTDIR\docs"
255    RMDir /r "$INSTDIR\templates"
256    RMDir /r "$INSTDIR\config"
257    RMDir "$INSTDIR"
258
259   !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
260
261   Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
262   Delete "$SMPROGRAMS\$MUI_TEMP\FahMon.lnk"
263   Delete "$SMPROGRAMS\$MUI_TEMP\Help.lnk"
264   Delete "$SMPROGRAMS\$MUI_TEMP\README.lnk"
265
266   StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
267
268   startMenuDeleteLoop:
269         ClearErrors
270     RMDir $MUI_TEMP
271     GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
272
273     IfErrors startMenuDeleteLoopDone
274
275     StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
276   startMenuDeleteLoopDone:
277
278   DeleteRegKey /ifempty HKCU "Software\FahMon"
279
280   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FahMon"
281
282 SectionEnd
Note: See TracBrowser for help on using the browser.