From 812a61bf159c7449317da0c958389750374b91b2 Mon Sep 17 00:00:00 2001 From: Jacob Halsey Date: Wed, 10 Jan 2024 00:14:25 +0000 Subject: [PATCH] wip --- .gitignore | 2 ++ installers/windows.nsi | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 installers/windows.nsi diff --git a/.gitignore b/.gitignore index 55f6440..b3d1c11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ **/target **/*.rs.bk .idea/ + +*.exe \ No newline at end of file diff --git a/installers/windows.nsi b/installers/windows.nsi new file mode 100644 index 0000000..bb21c65 --- /dev/null +++ b/installers/windows.nsi @@ -0,0 +1,25 @@ +OutFile "SsbInstaller.exe" + +InstallDir "$LocalAppdata\solar-screen-brightness" + +!define SHORT_CUT "$SMPROGRAMS\Solar Screen Brightness.lnk" +!define SHORT_CUT_UNINSTALL "$SMPROGRAMS\Uninstall Solar Screen Brightness.lnk" +!define SHORT_CUT_START_UP "$SMSTARTUP\Solar Screen Brightness (Minimised).lnk" + +Section + SetOutPath "$INSTDIR" + File "..\target\release\ssb.exe" + File "..\target\release\ssb-cli.exe" + WriteUninstaller "$INSTDIR\uninstall.exe" + CreateShortcut "${SHORT_CUT}" "$INSTDIR\ssb.exe" + CreateShortcut "${SHORT_CUT_UNINSTALL}" "$INSTDIR\uninstall.exe" + CreateShortcut "${SHORT_CUT_START_UP}" "$INSTDIR\ssb.exe" "--minimised" +SectionEnd + +Section "uninstall" + Delete "${SHORT_CUT}" + Delete "${SHORT_CUT_UNINSTALL}" + Delete "${SHORT_CUT_START_UP}" + RMDir /r "$INSTDIR" +SectionEnd +