SetCompressor /SOLID lzma !include "FileAssociation.nsh" !define /file VERSION ..\version.txt Name "Fresh Memory ${VERSION}" OutFile "freshmemory-${VERSION}-setup.exe" Icon ..\images\mainicon.ico Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles LicenseData ..\COPYING InstType "Normal" InstallDir $PROGRAMFILES\Freshmemory Section "Fresh Memory (required)" SectionIn RO SetOutPath $INSTDIR File ..\freshmemory.exe WriteUninstaller $INSTDIR\Uninstall.exe File /oname=README.txt ..\README File /oname=ChangeLog.txt ..\ChangeLog File /oname=AUTHORS.txt ..\AUTHORS SetOutPath "$INSTDIR\tr" File ..\tr\*.qm SetShellVarContext all CreateDirectory "$SMPROGRAMS\Fresh Memory" Delete "$SMPROGRAMS\Fresh Memory\Fresh Memory*.lnk" CreateShortCut "$SMPROGRAMS\Fresh Memory\Fresh Memory ${VERSION}.lnk" "$INSTDIR\freshmemory.exe" CreateShortCut "$SMPROGRAMS\Fresh Memory\Uninstall.lnk" "$INSTDIR\Uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fresh Memory" "DisplayName" "Fresh Memory ${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fresh Memory" "UninstallString" "$INSTDIR\Uninstall.exe" ${registerExtension} "$PROGRAMFILES\Freshmemory\freshmemory.exe" ".fmd" "Freshmemory dictionary" SectionEnd Section "Qt libraries" SectionIn 1 SetOutPath "$INSTDIR" File qt-win\*.dll SetOutPath "$INSTDIR\imageformats" File qt-win\imageformats\*.dll SetOutPath "$INSTDIR\platforms" File qt-win\platforms\*.dll SectionEnd Section "Uninstall" ${unregisterExtension} ".fmd" "Freshmemory dictionary" RMDir /r $INSTDIR SetShellVarContext all RMDir /r $APPDATA\freshmemory SetShellVarContext current RMDir /r $APPDATA\freshmemory SetShellVarContext all Delete "$SMPROGRAMS\Fresh Memory\*" RMDir "$SMPROGRAMS\Fresh Memory" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Fresh Memory" SectionEnd