-
Notifications
You must be signed in to change notification settings - Fork 137
/
setup.nsi
119 lines (74 loc) · 2.66 KB
/
setup.nsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
; example1.nsi
;
; This script is perhaps one of the simplest NSIs you can make. All of the
; optional settings are left to their default settings. The installer simply
; prompts the user asking them where to install, and drops a copy of example1.nsi
; there.
;--------------------------------
!include "MUI2.nsh"
!include "x64.nsh" ; Macros for x64 machines
; The name of the installer
Name "OpenEdsEditor"
; The file to write
OutFile "edseditor-Setup.exe"
; Show install details
ShowInstDetails show
; The default installation directory
InstallDir "$PROGRAMFILES\OpenEdsEditor\"
; Request application privileges for Windows Vista
;RequestExecutionLevel Admin
SetOverwrite on
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" ; optional
!define MUI_ABORTWARNING
;--------------------------------
; Pages
!insertmacro MUI_PAGE_LICENSE "License-GPLv3.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;Page instfiles
; The stuff to install
Section "OpenEdsEditor" Secopeneds ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File EDSEditorGUI\bin\Release\EDSEditor.exe
File EDSEditorGUI\bin\Release\EDSEditor.exe.config
File EDSEditorGUI\bin\Release\libEDSsharp.dll
File EDSEditorGUI\bin\Release\style.css
File Index_8287_16x.ico
File License-GPLv3.txt
SetOutPath $INSTDIR\Profiles
File EDSEditorGUI\Profiles\*
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\OpenEDSEditor"
CreateShortCut "$SMPROGRAMS\OpenEDSEditor\OpenEDSEditor.lnk" $INSTDIR\EDSEditor.exe "" $INSTDIR\Index_8287_16x.ico 0
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\OpenEDSEditor\Uninstall.lnk" $INSTDIR\Uninstall.exe
SectionEnd ; end the section
;Language strings
LangString DESC_Secopeneds ${LANG_ENGLISH} "The Open EDS editor"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Secopeneds} $(DESC_Secopeneds)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function .onInit
;Extract InstallOptions files
;$PLUGINSDIR will automatically be removed when the installer closes
InitPluginsDir
Push $0
Pop $0
FunctionEnd
Section "Uninstall"
;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\*"
Delete "$INSTDIR\Profiles\*"
RMDir "$INSTDIR\Profiles"
RMDir "$INSTDIR"
SetShellVarContext all
Delete "$SMPROGRAMS\OpenEDSEditor\OpenEDSEditor.lnk"
RMDir "$SMPROGRAMS\OpenEDSEditor"
SectionEnd