1
- !include " MUI2.nsh"
2
-
3
-
4
-
5
-
6
-
7
1
; DesktopBrailleRAP.nsi
8
2
;
9
3
; This script is based on example1.nsi, but it remember the directory,
10
4
; has uninstall support and (optionally) installs start menu shortcuts.
11
5
;
12
- ; It will install example2.nsi into a directory that the user selects.
6
+ ; This script will install DesktopBrailleRAP software and necessary drivers
7
+ ; to control UART for BrailleRAP communication.
13
8
;
14
- ; See install-shared.nsi for a more robust way of checking for administrator rights.
15
- ; See install-per-user.nsi for a file association example .
9
+ ; This file is licensed under GPL V3 as DesktopBrailleRAP software
10
+ ; .
16
11
17
12
; --------------------------------
13
+ !include " LogicLib.nsh"
14
+
15
+ !include " MUI2.nsh"
18
16
19
17
; The name of the installer
20
18
Name " DesktopBrailleRAP"
@@ -47,11 +45,22 @@ InstallDirRegKey HKLM "Software\DesktopBrailleRAP" "Install_Dir"
47
45
!define MUI_HEADERIMAGE_BITMAP " ${NSISDIR}\Contrib\Graphics\Header\win.bmp" ; optional
48
46
; !define MUI_ABORTWARNING
49
47
48
+ !define UNINSTKEY " Software\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
49
+ !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY " ${UNINSTKEY}"
50
+ !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME " CurrentUser"
51
+ !define MULTIUSER_INSTALLMODE_INSTDIR " $(^Name)"
52
+ !define MULTIUSER_INSTALLMODE_COMMANDLINE
53
+ !define MULTIUSER_EXECUTIONLEVEL Admin
54
+ !define MULTIUSER_MUI
55
+
56
+ !include " MultiUser.nsh"
57
+
50
58
51
59
; Pages
52
60
!insertmacro MUI_PAGE_WELCOME
53
61
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
54
62
; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
63
+ !insertmacro MULTIUSER_PAGE_INSTALLMODE
55
64
!insertmacro MUI_PAGE_COMPONENTS
56
65
!insertmacro MUI_PAGE_DIRECTORY
57
66
!insertmacro MUI_PAGE_INSTFILES
@@ -61,6 +70,14 @@ InstallDirRegKey HKLM "Software\DesktopBrailleRAP" "Install_Dir"
61
70
62
71
!insertmacro MUI_LANGUAGE " English"
63
72
!addplugindir " .\"
73
+ Function .onInit
74
+ !insertmacro MULTIUSER_INIT
75
+ FunctionEnd
76
+
77
+ Function un.onInit
78
+ !insertmacro MULTIUSER_UNINIT
79
+ FunctionEnd
80
+
64
81
65
82
; --------------------------------
66
83
@@ -74,7 +91,9 @@ Section "DesktopBrailleRAP (required)"
74
91
75
92
; Put file there
76
93
File " DesktopBrailleRAP.exe"
94
+ SetOverwrite off
77
95
File " desktop_brap_parameters.json"
96
+ SetOverwrite on
78
97
File " _internal.zip"
79
98
80
99
0 commit comments