Skip to content

Commit

Permalink
add nullsoft installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mgth committed Nov 26, 2023
1 parent b29aa4f commit 395a630
Show file tree
Hide file tree
Showing 124 changed files with 8,309 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,4 @@ ModelManifest.xml
LittleBigMouse/Control.Loader/setup/*.exe
/LittleBigMouse/Control.Loader/img/Logos/Intel
/LittleBigMouse.Setup/LittleBigMouse_5.0.0.0.exe
*.exe
8 changes: 4 additions & 4 deletions LittleBigMouse.Setup/LittleBigMouse.iss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Name: "{group}\Little Big Mouse"; Filename: "{app}\LittleBigMouse.Ui.Avalonia.ex
[Run]
Filename: {app}\LittleBigMouse.Ui.Avalonia.exe; Description: Run Application; Flags: postinstall nowait skipifsilent runascurrentuser

[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""taskkill /im LittleBigMouse.Ui.Avalonia.exe /f /t"
Filename: "{cmd}"; Parameters: "/C ""taskkill /im LittleBigMouse.Hook.exe /f /t"
Filename: "{app}\LittleBigMouse_Daemon.exe"; Parameters: "--unschedule --exit"
;[UninstallRun]
;Filename: "{cmd}"; Parameters: "/C ""taskkill /im LittleBigMouse.Ui.Avalonia.exe /f /t"
;Filename: "{cmd}"; Parameters: "/C ""taskkill /im LittleBigMouse.Hook.exe /f /t"
;Filename: "{app}\LittleBigMouse_Daemon.exe"; Parameters: "--unschedule --exit"
119 changes: 119 additions & 0 deletions LittleBigMouse.Setup/LittleBigMouse.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
;--------------------------------
;Include Modern UI

!include "MUI2.nsh"

!define lbm "LittleBigMouse"
!define lbm_version "5.0.0"
!define lbm_file "LittleBigMouse.Ui.Avalonia.exe"


!define main "..\LittleBigMouse.Ui\LittleBigMouse.Ui.Avalonia"
!define daemon "..\LittleBigMouse.Daemon"
!define main_out_dir "${main}\bin\x64\Release\net8.0"
!define daemon_out_dir "${daemon}\bin\x64\Release"

;--------------------------------
;General

;Name and file
Name "Little Big Mouse"
OutFile "${lbm}-${lbm_version}.exe"
Unicode True

;Default installation folder
InstallDir "$PROGRAMFILES64\${lbm}"

;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Mgth\${lbm}" ""

;Request application privileges for Windows Vista
RequestExecutionLevel admin

;---------------------------------
;General

!define MUI_ICON "${main}\MainIcon.ico"
!define MUI_UNICON "${main}\MainIcon.ico"
; !define MUI_SPECIALBITMAP "Bitmap.bmp"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
; !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_RUN "$INSTDIR\${lbm_file}"
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES


;--------------------------------
;Language

!insertmacro MUI_LANGUAGE "English"


;--------------------------------
;Installer Sections
Section "install"

;Add files
SetOutPath "$INSTDIR"

File "${main_out_dir}\*.exe"
File "${daemon_out_dir}\*.exe"
File /r "${main_out_dir}\*.dll"
File "${main_out_dir}\*.json"

;create desktop shortcut
CreateShortCut "$DESKTOP\${lbm}.lnk" "$INSTDIR\${lbm_file}" ""

;create start-menu items
CreateDirectory "$SMPROGRAMS\${lbm}"
CreateShortCut "$SMPROGRAMS\${lbm}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${lbm}\${lbm}.lnk" "$INSTDIR\${lbm_file}" "" "$INSTDIR\${lbm_file}" 0

;write uninstall information to the registry
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${lbm}" "DisplayName" "${lbm} (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${lbm}" "UninstallString" "$INSTDIR\Uninstall.exe"

WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd


;--------------------------------
;Uninstaller Section
Section "Uninstall"

;Delete Files
RMDir /r "$INSTDIR\*.*"

;Remove the installation directory
RMDir "$INSTDIR"

;Delete Start Menu Shortcuts
Delete "$DESKTOP\${lbm}.lnk"
Delete "$SMPROGRAMS\${lbm}\*.*"
RmDir "$SMPROGRAMS\${lbm}"

;Delete Uninstaller And Unistall Registry Entries
; DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${lbm}"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${lbm}"

SectionEnd




;eof
Binary file removed LittleBigMouse.Setup/LittleBigMouse_4.0-beta4.exe
Binary file not shown.
Binary file removed LittleBigMouse.Setup/LittleBigMouse_4.0-beta5.exe
Binary file not shown.
Binary file removed LittleBigMouse.Setup/LittleBigMouse_4.0-beta6.exe
Binary file not shown.
Binary file removed LittleBigMouse.Setup/LittleBigMouse_4.0-beta7.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed LittleBigMouse.Setup/LittleBigMouse_4.1.6597.297.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 395a630

Please sign in to comment.