summaryrefslogtreecommitdiff
path: root/packaging/freshmemory.nsi
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /packaging/freshmemory.nsi
Initial mirror commitHEADmaster
Diffstat (limited to 'packaging/freshmemory.nsi')
-rw-r--r--packaging/freshmemory.nsi72
1 files changed, 72 insertions, 0 deletions
diff --git a/packaging/freshmemory.nsi b/packaging/freshmemory.nsi
new file mode 100644
index 0000000..dc5096d
--- /dev/null
+++ b/packaging/freshmemory.nsi
@@ -0,0 +1,72 @@
+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