-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.nsi
104 lines (74 loc) · 2.7 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
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
!define MUI_ICON "cacao_accounting_desktop\assets\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "cacao_accounting_desktop\assets\CacaoAccounting.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "cacao_accounting_desktop\assets\CacaoAccountingRotate.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "cacao_accounting_desktop\assets\CacaoAccountingRotate.bmp"
;--------------------------------
;General
;Name and file
Name "Cacao Accounting Desktop"
OutFile "CacaoAccountingSetup.exe"
Unicode True
;Default installation folder
InstallDir "$LOCALAPPDATA\CacaoAccountingDesktop"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\CacaoAccountingDesktop" ""
;Request application privileges for Windows Vista
RequestExecutionLevel user
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Cacao Accounting" SecDummy
SetOutPath "$INSTDIR"
;ADD YOUR OWN FILES HERE
File cacaoaccounting.exe
File cacaoaccounting.pyw
File LICENSE
File README.md
File /r pydist
File /r cacao_accounting_desktop
;Store installation folder
WriteRegStr HKCU "Software\CacaoAccountingDesktop" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortcut "$DESKTOP\Cacao Accounting.lnk" "$INSTDIR\cacaoaccounting.exe"
CreateDirectory "$SMPROGRAMS\Cacao Accounting"
CreateShortcut "$SMPROGRAMS\Cacao Accounting\Cacao Accounting.lnk" "$INSTDIR\cacaoaccounting.exe"
CreateShortcut "$SMPROGRAMS\Cacao Accounting\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\cacaoaccounting.exe"
Delete "$INSTDIR\cacaoaccounting.pyw"
Delete "$INSTDIR\LICENSE"
Delete "$INSTDIR\README.md"
Delete "$DESKTOP\Cacao Accounting.lnk"
RMDir /r "$INSTDIR\pydist"
Delete "$SMPROGRAMS\Cacao Accounting\Cacao Accounting.lnk"
Delete "$SMPROGRAMS\Cacao Accounting\uninstall.lnk"
RMDir /r "$SMPROGRAMS\Cacao Accounting"
Delete "$INSTDIR\Uninstall.exe"
RMDir /r "$INSTDIR"
DeleteRegKey HKCU "Software\CacaoAccountingDesktop"
SectionEnd