Skip to content

Commit

Permalink
some minor corrections to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaVainio committed Feb 12, 2023
1 parent 0a91b98 commit 1fe20c4
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions installer2.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ Section "Dictionary Maintainer" SecProgram
SetOutPath "$INSTDIR"

# Files to put into the installation directory from the distribution folder
# TODO: katso tähän oikeat hakemistot ja tiedostot
File /r "*.aff"
File /r "dist\maintainGui\"

# Store installation folder to registry
WriteRegStr HKCU "Software\Hunspell Dictionary Maintainer" "" $INSTDIR
Expand All @@ -100,7 +99,7 @@ Section "Dictionary Maintainer" SecProgram

# Create shortcuts
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
# TODO: tee käynnistyslinkki
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Maintain Dictionary.lnk" "$INSTDIR\maintainGui.exe"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"

!insertmacro MUI_STARTMENU_WRITE_END
Expand All @@ -113,6 +112,7 @@ Section "Dictionaries" SecDictionaries

# Dictionary files to put into subdirectory Dictionaries
File "*.dic"
File "*.aff"
SectionEnd

# --- # Installer Sections end
Expand Down Expand Up @@ -148,21 +148,19 @@ FunctionEnd
# Uninstaller Section
Section "Uninstall"

# Remove files and folders from installation directory
Delete $INSTDIR\Dictionaries\*.*
RMDir $INSTDIR\Dictionaries
Delete $INSTDIR\*.*
RMDir "$INSTDIR"
# Remove files and folders from installation directory, if not successfull remove after reboot
RMDir /r /REBOOTOK $INSTDIR

!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder

# Remove start menu items
Delete "$SMPROGRAMS\$StartMenuFolder\Maintain Dictionary.lnk"
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
RMDir "$SMPROGRAMS\$StartMenuFolder"

# Clean the registry
# FIXME: Muuta niin, että poistaa rekisterimerkinnät ensin
DeleteRegKey /ifempty HKCU "Software\Hunspell Dictionary Maintainer"
# Clean the registry by removing all keys under Hunspell Dictionary Maintainer

DeleteRegKey HKCU "Software\Hunspell Dictionary Maintainer"

SectionEnd

Expand Down

0 comments on commit 1fe20c4

Please sign in to comment.