~s-cecilio/lenmus/v5.1.x

« back to all changes in this revision

Viewing changes to installer/msw/installer.nsi

  • Committer: cecilios
  • Date: 2006-03-19 16:36:00 UTC
  • Revision ID: svn-v4:2587a929-2f0e-0410-ae78-fe6f687d5efe:trunk:13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;==============================================================================================
 
2
;lenmus for Windows installer. NSIS v2.15 script for generating the exe installer and uninstaller
 
3
;Cecilio Salmeron <cecilio@lenmus.org>
 
4
;
 
5
; To generate a new version:
 
6
; -  Change APP_VERSION
 
7
; -  Change Name 
 
8
;==============================================================================================
 
9
 
 
10
;perform a CRC on the installer before allowing an install to make sure the installer
 
11
;is not corrupted
 
12
  CRCCheck on
 
13
 
 
14
;set the compression algorithm to use (zlib | bzip2 | lzma)
 
15
  SetCompressor lzma
 
16
 
 
17
;use the new XP controls style when running on Windows XP
 
18
  XPStyle on
 
19
 
 
20
;some helper defines and variables
 
21
  !define APP_NAME "lenmus Phonascus"
 
22
  !define APP_VERSION "3.0.b0"
 
23
  !define APP_HOME_PAGE "http://www.lenmus.org/"
 
24
 
 
25
  Name "lenmus v3.0 beta 0"     ;product name displayed by the installer
 
26
 
 
27
 
 
28
;support for Modern UI
 
29
  !include "MUI.nsh"
 
30
 
 
31
;support for GetParent
 
32
  !include "FileFunc.nsh"
 
33
  !insertmacro un.GetParent
 
34
  
 
35
;support to install fonts
 
36
  !include "FontRegAdv.nsh"
 
37
  !include "FontName.nsh"
 
38
  
 
39
;support to remove files and subdirs in one step
 
40
  !include "RemoveFilesAndSubDirs.nsh"
 
41
  
 
42
 
 
43
 
 
44
;configuration settings for the MUI interface: options, icons, bitmaps, colors, etc.
 
45
  ;show a warning when the user cancels the install
 
46
    !define MUI_ABORTWARNING
 
47
  ;icons to associate to the resulting installer and uninstaller
 
48
    !define MUI_ICON "lenmus16c.ico"
 
49
    !define MUI_UNICON "win-uninstall.ico"
 
50
 
 
51
!define MUI_HEADERIMAGE
 
52
!define MUI_HEADERIMAGE_BITMAP "BannerTop.bmp"
 
53
!define MUI_WELCOMEFINISHPAGE_BITMAP "BannerLeft.bmp"
 
54
!define MUI_COMPONENTSPAGE_SMALLDESC        ;descriptions at bottom
 
55
 
 
56
;vars to create links on "Start Menu" folder
 
57
  Var MUI_TEMP
 
58
  Var STARTMENU_FOLDER
 
59
  
 
60
;var to store root install directory in uninstall section
 
61
  Var LENMUS_DIR
 
62
 
 
63
 
 
64
;MUI: install pages to show
 
65
  ;welcome page
 
66
    !insertmacro MUI_PAGE_WELCOME
 
67
 
 
68
  ;show and accept licence
 
69
    !insertmacro MUI_PAGE_LICENSE $(license)
 
70
 
 
71
  ;choose installation directory
 
72
    !insertmacro MUI_PAGE_DIRECTORY
 
73
 
 
74
  ;select optional components
 
75
    !define MUI_COMPONENTSPAGE_TEXT_COMPLIST $(MSG_OptionalComponents)
 
76
    !insertmacro MUI_PAGE_COMPONENTS
 
77
 
 
78
  ;ask about creating links on Start Menu
 
79
    !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
 
80
    !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\LenMus"
 
81
    !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartMenuFolder"
 
82
    !define MUI_STARTMENUPAGE_DEFAULTFOLDER $(SM_PRODUCT_GROUP)
 
83
    !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
 
84
 
 
85
  ;instalation page
 
86
    !insertmacro MUI_PAGE_INSTFILES
 
87
 
 
88
  ;finish page: run installed program?
 
89
    !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\lenmus.exe"
 
90
    !insertmacro MUI_PAGE_FINISH
 
91
 
 
92
 
 
93
;MUI: uninstall Pages
 
94
  ;ask for confirmation to uninstall
 
95
  !insertmacro MUI_UNPAGE_CONFIRM
 
96
  
 
97
  ;proceed to uninstall
 
98
  !insertmacro MUI_UNPAGE_INSTFILES
 
99
 
 
100
 
 
101
 
 
102
;language selection dialog settings
 
103
  ;Remember the installer language
 
104
  !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
 
105
  !define MUI_LANGDLL_REGISTRY_KEY "Software\LenMus"
 
106
  !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
107
 
 
108
  ;available languages
 
109
  !insertmacro MUI_LANGUAGE "Spanish"
 
110
  !insertmacro MUI_LANGUAGE "English"
 
111
 
 
112
  ;reserve files for languages
 
113
    ;These files should be inserted before other files in the data block
 
114
    ;Keep these lines before any File command
 
115
    !insertmacro MUI_RESERVEFILE_LANGDLL
 
116
 
 
117
 
 
118
 
 
119
;define filename of installer and uninstaller
 
120
  !define INSTALLER_NAME "lenmus_${APP_VERSION}.exe"
 
121
  !define UNINSTALLER_NAME "uninstall_lenmus.exe"
 
122
 
 
123
;variable to retry installation when error found
 
124
  var "STEP"
 
125
 
 
126
 
 
127
;Specify path and name of resulting installer
 
128
  OutFile "${INSTALLER_NAME}"
 
129
 
 
130
;define the default installation directory
 
131
  InstallDir "$PROGRAMFILES\LenMus"
 
132
 
 
133
;Registry key to check for directory, so if you install again, it will take the old one
 
134
;as default installation directory instead of the previously defined.
 
135
  InstallDirRegKey  HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\lenmus.exe" ""
 
136
 
 
137
;instruct installer and uninstaller to show install/uninstall log to the user
 
138
  ShowInstDetails show                   ;show install log 
 
139
  ShowUnInstDetails show                 ;show uninstall log
 
140
 
 
141
 
 
142
;languaje files to support different languages <---- Est� comentado durante el desarrollo. 
 
143
  ;!addincludedir "."
 
144
  ;!include "lenmus_spanish.nsh"
 
145
  ;!include "lenmus_english.nsh"
 
146
 
 
147
; Este trozo s�lo durante el desarrollo. Luego cortar, llevar a 
 
148
; "lenmus_Spanish.nsh" y quitar los comentarios de las dos sentencias anteriores
 
149
;========================================================================================
 
150
 
 
151
;Spanish language file for lenmus installer/uninstaller
 
152
;---------------------------------------------------------------------------------------------------------
 
153
 
 
154
LicenseLangString license ${LANG_Spanish} "license_spa.rtf"
 
155
 
 
156
;strings to customize MUI pages
 
157
LangString MSG_OptionalComponents   ${LANG_Spanish} "Por favor, seleccione los componentes opcionales que desee instalar"
 
158
 
 
159
 
 
160
;section titles, what user sees to select components for installation
 
161
LangString TITLE_CreateIcon     ${LANG_Spanish} "Acceso directo en escritorio"
 
162
LangString TITLE_Scores         ${LANG_Spanish} "Partituras de ejemplo"
 
163
LangString TITLE_RegKeys        ${LANG_Spanish} "Incluir en panel de control (en 'Agregar/quitar software')"
 
164
 
 
165
;descriptions for the sections. Displayed to user when mouse hovers over a section
 
166
LangString DESC_CreateIcon      ${LANG_Spanish} "Crear un icono de acceso directo en el escritorio"
 
167
LangString DESC_Scores          ${LANG_Spanish} "Crear una carpeta con algunas partituras de ejemplo"
 
168
LangString DESC_RegKeys         ${LANG_Spanish} "Crear claves en el Registro de Windows para que el LenMus aparezca en panel de control, en 'Agregar/quitar programas'"
 
169
 
 
170
 
 
171
;error messages and other texts
 
172
LangString ERROR_CopyFiles          ${LANG_Spanish} "Error copiando archivos de programa"
 
173
LangString ERROR_InstallFonts       ${LANG_Spanish} "Error instalando el font"
 
174
LangString ERROR_CreateIcon         ${LANG_Spanish} "Error creando acceso directo en el escritorio"
 
175
LangString ERROR_CopyScores         ${LANG_Spanish} "Error copiando partituras de ejemplo"
 
176
LangString ERROR_DeterminarOS       ${LANG_Spanish} "Error al tratar de determinar cual es el sistema operativo"
 
177
LangString MSG_CONTINUE             ${LANG_Spanish} "�Quiere continuar instalando?"
 
178
LangString MSG_ABORT                ${LANG_Spanish} "Instalaci�n cancelada"
 
179
 
 
180
 
 
181
;start menu & desktop descriptions
 
182
LangString SM_PRODUCT_GROUP             ${LANG_Spanish} "${APP_NAME}"
 
183
LangString SHORTCUT_NAME_EXEC           ${LANG_Spanish} "Ejecutar ${APP_NAME}"
 
184
LangString SHORTCUT_NAME_UNINSTALL      ${LANG_Spanish} "Desinstalar ${APP_NAME}"
 
185
 
 
186
;End Spanish language file
 
187
;=========================================================================================
 
188
 
 
189
;English language file for lenmus installer/uninstaller
 
190
;---------------------------------------------------------------------------------------------------------
 
191
 
 
192
LicenseLangString license ${LANG_English} "license_eng.rtf"
 
193
 
 
194
;strings to customize MUI pages
 
195
LangString MSG_OptionalComponents   ${LANG_English} "Please, choose the optional components you would like to install"
 
196
 
 
197
 
 
198
;section titles, what user sees to select components for installation
 
199
LangString TITLE_CreateIcon     ${LANG_English} "Shorcut on desktop"
 
200
LangString TITLE_Scores         ${LANG_English} "Examples of music scores"
 
201
LangString TITLE_RegKeys        ${LANG_English} "Add to Control Panel (to 'Add/Remove Programs')"
 
202
 
 
203
;descriptions for the sections. Displayed to user when mouse hovers over a section
 
204
LangString DESC_CreateIcon      ${LANG_English} "Create a shorcut icon on the desktop"
 
205
LangString DESC_Scores          ${LANG_English} "Create a folder containing some examples of music scores"
 
206
LangString DESC_RegKeys         ${LANG_English} "Create keys in Windows Registry to add LenMus to the 'Add/Remove Programs' section in the Control Panel."
 
207
 
 
208
 
 
209
;error messages and other texts
 
210
LangString ERROR_CopyFiles          ${LANG_English} "Error copying program files"
 
211
LangString ERROR_InstallFonts       ${LANG_English} "Error installing font"
 
212
LangString ERROR_CreateIcon         ${LANG_English} "Error creating shortcut on desktop"
 
213
LangString ERROR_CopyScores         ${LANG_English} "Error copying examples of music scores"
 
214
LangString ERROR_DeterminarOS       ${LANG_English} "Error trying to identify operting system"
 
215
LangString MSG_CONTINUE             ${LANG_English} "Would you like to continue the installation?"
 
216
LangString MSG_ABORT                ${LANG_English} "Installation canceled"
 
217
 
 
218
 
 
219
;start menu & desktop descriptions
 
220
LangString SM_PRODUCT_GROUP             ${LANG_English} "${APP_NAME}"
 
221
LangString SHORTCUT_NAME_EXEC           ${LANG_English} "Run ${APP_NAME}"
 
222
LangString SHORTCUT_NAME_UNINSTALL      ${LANG_English} "Uninstall ${APP_NAME}"
 
223
 
 
224
;End English language file
 
225
;=========================================================================================
 
226
 
 
227
 
 
228
 
 
229
 
 
230
; *********************************************************************
 
231
; Install Sections
 
232
; *********************************************************************
 
233
 
 
234
;first of all, show installer language selection page
 
235
Function .onInit
 
236
  !insertmacro MUI_LANGDLL_DISPLAY
 
237
FunctionEnd
 
238
 
 
239
 
 
240
;Install all the mandatory components
 
241
Section  "-" "SeccionBasica"
 
242
 
 
243
  ; vars initialization
 
244
  StrCpy "$STEP" "Nil" 
 
245
 
 
246
  ;If a previous version exits delete old installed files, but no scores
 
247
  ;-----------------------------------------------------------------------------------
 
248
  !insertmacro RemoveFilesAndSubDirs "$INSTDIR\bin"
 
249
  !insertmacro RemoveFilesAndSubDirs "$INSTDIR\locale"
 
250
  !insertmacro RemoveFilesAndSubDirs "$INSTDIR\res"
 
251
  !insertmacro RemoveFilesAndSubDirs "$INSTDIR\xrc"
 
252
  !insertmacro RemoveFilesAndSubDirs "$INSTDIR\temp"
 
253
 
 
254
 
 
255
  ;install application files
 
256
  ;-----------------------------------------------------------------------------------
 
257
  CopyFiles:
 
258
     ClearErrors
 
259
     SetOverWrite try
 
260
     SetOutPath "$INSTDIR"
 
261
     File "..\..\docs\html\licence.htm"
 
262
     File "..\..\docs\html\singledoc.css"
 
263
     File "..\..\docs\release\licence.txt"
 
264
     File "license_eng.rtf"
 
265
     File "license_spa.rtf"
 
266
 
 
267
     SetOutPath "$INSTDIR\bin"
 
268
     File "..\..\z_bin\lenmus.exe"
 
269
     File "..\..\fonts\LeMusNot.ttf"
 
270
 
 
271
     SetOutPath "$INSTDIR\locale\en"
 
272
     File "..\..\locale\en\*.*"
 
273
     SetOutPath "$INSTDIR\locale\es"
 
274
     File "..\..\locale\es\*.*"
 
275
 
 
276
     SetOutPath "$INSTDIR\res\bitmaps"
 
277
     File "..\..\res\bitmaps\*.*"
 
278
     SetOutPath "$INSTDIR\res\icons"
 
279
     File "..\..\res\icons\*.*"
 
280
 
 
281
     SetOutPath "$INSTDIR\xrc"
 
282
     File "..\..\xrc\*.xrc"
 
283
 
 
284
     SetOutPath "$INSTDIR\temp"
 
285
     File "..\..\temp\DataError.log"
 
286
 
 
287
      IfErrors +1 EndCopyFiles
 
288
        StrCmp $STEP "ErrorCopyingFiles" "Error_CopyFiles"
 
289
        StrCpy "$STEP" "ErrorCopyingFiles" 
 
290
      Goto CopyFiles
 
291
        Error_CopyFiles:
 
292
          MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(ERROR_CopyFiles) IDRETRY CopyFiles
 
293
          MessageBox MB_YESNO|MB_ICONQUESTION $(MSG_CONTINUE) IDYES +2
 
294
      Abort "$(MSG_ABORT)"
 
295
     EndCopyFiles:
 
296
 
 
297
 
 
298
  ;install font
 
299
  ;-----------------------------------------------------------------------------------
 
300
  InstallFonts:
 
301
     ClearErrors
 
302
     StrCpy $FONT_DIR $FONTS
 
303
     !insertmacro InstallTTF '..\..\fonts\LeMusNot.ttf'
 
304
     SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
 
305
     IfErrors +1 EndInstallFonts
 
306
        StrCmp $STEP "ErrorInstallingFonts" "Error_InstallFonts"
 
307
        StrCpy "$STEP" "ErrorInstallingFonts" 
 
308
      Goto InstallFonts
 
309
        Error_InstallFonts:
 
310
          MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(ERROR_InstallFonts) IDRETRY InstallFonts
 
311
          MessageBox MB_YESNO|MB_ICONQUESTION $(MSG_CONTINUE) IDYES +2
 
312
      Abort "$(MSG_ABORT)"
 
313
     EndInstallFonts:
 
314
 
 
315
  ;create entries in Start Menu folder
 
316
  ;-----------------------------------------------------------------------------------
 
317
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
 
318
    CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
 
319
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\$(SHORTCUT_NAME_EXEC).lnk" "$INSTDIR\bin\lenmus.exe"
 
320
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\$(SHORTCUT_NAME_UNINSTALL).lnk" "$INSTDIR\bin\${UNINSTALLER_NAME}"
 
321
  !insertmacro MUI_STARTMENU_WRITE_END
 
322
 
 
323
    ;write uninstaller
 
324
    WriteUninstaller "$INSTDIR\bin\${UNINSTALLER_NAME}"
 
325
 
 
326
SectionEnd
 
327
 
 
328
;===============================================================================================================
 
329
; Installation of optional components
 
330
;===============================================================================================================
 
331
 
 
332
;-----------------------------------------------------------------------------------------------
 
333
; shortcut icon on desktop
 
334
;-----------------------------------------------------------------------------------------------
 
335
Section $(TITLE_CreateIcon) CreateIcon
 
336
 
 
337
  CreateIcon:
 
338
     ClearErrors
 
339
     CreateShortCut "$DESKTOP\lenmus.lnk" "$INSTDIR\bin\lenmus.exe"
 
340
     IfErrors +1 EndCreateIcon
 
341
        StrCmp $STEP "ErrorCreatingIcon" "Error_CreateIcon"
 
342
        StrCpy "$STEP" "ErrorCreatingIcon" 
 
343
      Goto CreateIcon
 
344
        Error_CreateIcon:
 
345
          MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(ERROR_CreateIcon) IDRETRY CreateIcon
 
346
          MessageBox MB_YESNO|MB_ICONQUESTION $(MSG_CONTINUE) IDYES +2
 
347
      Abort "$(MSG_ABORT)"
 
348
     EndCreateIcon:
 
349
 
 
350
SectionEnd
 
351
 
 
352
;-----------------------------------------------------------------------------------------------
 
353
; example score sheets 
 
354
;-----------------------------------------------------------------------------------------------
 
355
Section $(TITLE_Scores) Scores
 
356
 
 
357
  CopyScores:
 
358
     ClearErrors
 
359
     SetOverwrite on
 
360
     SetOutPath "$INSTDIR\scores\MusicXML"
 
361
     File "..\..\scores\MusicXML\*.*"
 
362
     SetOutPath "$INSTDIR\scores\test"
 
363
     File "..\..\scores\test\*.*"
 
364
     IfErrors +1 EndCopyScores
 
365
        StrCmp $STEP "ErrorCopyingScores" "Error_CopyScores"
 
366
        StrCpy "$STEP" "ErrorCopyingScores" 
 
367
      Goto CopyScores
 
368
        Error_CopyScores:
 
369
          MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(ERROR_CopyScores) IDRETRY CopyScores
 
370
          MessageBox MB_YESNO|MB_ICONQUESTION $(MSG_CONTINUE) IDYES +2
 
371
          Abort "$(MSG_ABORT)"
 
372
     EndCopyScores:
 
373
 
 
374
SectionEnd
 
375
 
 
376
;-----------------------------------------------------------------------------------------------
 
377
; Add uninstall information to Add/Remove Programs so that lenmus program 
 
378
; will be included on the "Add/Remove Programs" folder of the Control Pannel 
 
379
;-----------------------------------------------------------------------------------------------
 
380
Section $(TITLE_RegKeys) RegKeys
 
381
 
 
382
    ; mandatory keys for un-installing
 
383
    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LenMus" "DisplayName" "$(^Name)"
 
384
    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LenMus" "UninstallString" "$INSTDIR\bin\${UNINSTALLER_NAME}"
 
385
 
 
386
    ; optional information
 
387
    
 
388
    ;NoModify (DWORD) - 1 if uninstaller has no option to modify the installed application
 
389
    ;NoRepair (DWORD) - 1 if the uninstaller has no option to repair the installation
 
390
    WriteRegDWord HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LenMus" "NoModifiy" 1
 
391
    WriteRegDWord HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LenMus" "NoRepair" 1
 
392
 
 
393
SectionEnd
 
394
 
 
395
 
 
396
;assign descriptions to sections -------------------------------------------------------
 
397
 
 
398
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
 
399
    !insertmacro MUI_DESCRIPTION_TEXT ${CreateIcon} $(DESC_CreateIcon)
 
400
    !insertmacro MUI_DESCRIPTION_TEXT ${Scores} $(DESC_Scores)
 
401
    !insertmacro MUI_DESCRIPTION_TEXT ${RegKeys} $(DESC_RegKeys)
 
402
  !insertmacro MUI_FUNCTION_DESCRIPTION_END
 
403
 
 
404
 
 
405
 
 
406
 
 
407
############################################################################################
 
408
;                                 Uninstaller                                              ;
 
409
############################################################################################
 
410
 
 
411
;get the stored language preference
 
412
Function un.onInit
 
413
  !insertmacro MUI_UNGETLANGUAGE
 
414
FunctionEnd
 
415
 
 
416
/*
 
417
Function un.onInit
 
418
  FindWindow $R0 "THMNISEdit2_MainWindowClass"
 
419
  IsWindow $R0 0 +3
 
420
  MessageBox MB_ICONEXCLAMATION|MB_OK "lenmus est� ejecut�ndose. Antes de desinstalar lenmus debe cerrarlo."
 
421
  Abort
 
422
 
 
423
  UserInfo::GetAccountType
 
424
  Pop $R0
 
425
  StrCmp $R0 "Admin" 0 +2
 
426
  SetShellVarContext all
 
427
FunctionEnd
 
428
*/
 
429
 
 
430
Section un.Install
 
431
  ;the font will not be uninstalled as it might have been used by other applications
 
432
  
 
433
  ; move to root directory and delete all folders and files
 
434
  ${un.GetParent} "$INSTDIR" $LENMUS_DIR
 
435
  !insertmacro RemoveFilesAndSubDirs "$LENMUS_DIR"
 
436
 
 
437
  ;delete files
 
438
  ;Delete "$INSTDIR\*.*"
 
439
  ;Delete "$INSTDIR\bin\*.*"
 
440
  ;Delete "$INSTDIR\locale\en\*.*"
 
441
  ;Delete "$INSTDIR\locale\es\*.*"
 
442
  ;Delete "$INSTDIR\res\bitmaps\*.*"
 
443
  ;Delete "$INSTDIR\res\icons\*.*"
 
444
  ;Delete "$INSTDIR\xrc\*.*"
 
445
  ;Delete "$INSTDIR\temp\*.*"
 
446
  ;Delete "$INSTDIR\scores\MusicXML\*.*"
 
447
  ;Delete "$INSTDIR\scores\test\*.*"
 
448
 
 
449
  ;delete folders
 
450
  ;RMDir "$INSTDIR\bin"
 
451
  ;RMDir "$INSTDIR\locale\en"
 
452
  ;RMDir "$INSTDIR\locale\es"
 
453
  ;RMDir "$INSTDIR\locale"
 
454
  ;RMDir "$INSTDIR\res\bitmaps"
 
455
  ;RMDir "$INSTDIR\res\icons"
 
456
  ;RMDir "$INSTDIR\res"
 
457
  ;RMDir "$INSTDIR\xrc"
 
458
  ;RMDir "$INSTDIR\temp"
 
459
  ;RMDir "$INSTDIR\scores\MusicXML"
 
460
  ;RMDir "$INSTDIR\scores\test"
 
461
  ;RMDir "$INSTDIR\scores"
 
462
  RMDir "$LENMUS_DIR"
 
463
 
 
464
  ;delete ico on desktop
 
465
  Delete "$DESKTOP\lenmus.lnk"
 
466
  
 
467
  ;delete Start Menu folder entries
 
468
  !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
 
469
  Delete "$SMPROGRAMS\$MUI_TEMP\*.*"
 
470
  StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
 
471
  RMDir $MUI_TEMP
 
472
  DeleteRegKey /ifempty HKCU "Software\LenMus"
 
473
 
 
474
  ;erase registry keys
 
475
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LenMus"
 
476
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\lenmus.exe"
 
477
  
 
478
  SetAutoClose false
 
479
  
 
480
SectionEnd
 
481
 
 
482
;End of lenmus install/uninstall script