-
Notifications
You must be signed in to change notification settings - Fork 1
/
wadoku-notify.nsi
executable file
·68 lines (49 loc) · 2.19 KB
/
wadoku-notify.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
!include "MUI.nsh"
Name "Wadoku Notify"
OutFile "wadoku_notify_installer.exe"
InstallDir $PROGRAMFILES\WadokuNotify
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "data\wadoku.png"
!define MUI_ICON "data\wadoku.ico"
;Show all languages, despite user's codepage
!define MUI_LANGDLL_ALLLANGUAGES
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;!insertmacro MUI_LANGUAGE "German"
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
Section "Install"
SetOutPath $INSTDIR
File "bin\wadoku.exe"
File "data\wadoku.sqlite3"
File "data\wadoku.png"
;CreateDirectory "$INSTDIR\recources"
;CopyFiles "$EXEDIR\recources\*" "$INSTDIR\recources\" 1000
WriteUninstaller "uninstall.exe"
CreateDirectory "$SMPROGRAMS\WadokuNotify"
CreateShortCut "$SMPROGRAMS\WadokuNotify\WadokuNotify.lnk" "$INSTDIR\wadoku.exe" "" "$INSTDIR\wadoku.exe" 0
CreateShortCut "$SMPROGRAMS\WadokuNotify\WadokuNotify Uninstaller.lnk" "$INSTDIR\uninstall.exe" "" "$SMPROGRAMS\WadokuNotify\WadokuNotify.lnk" 0
; write uninstall strings
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "WadokuNotify (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\uninstall.exe"'
;working directory not working with regkey WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" "WadokuNotify" "$INSTDIR\wadoku.exe"
CreateShortCut "$SMSTARTUP\WadokuNotify.lnk" "$INSTDIR\wadoku.exe"
SectionEnd
Section "Uninstall"
Delete "$INSTDIR\wadoku.exe"
RMDir /r "$INSTDIR"
Delete "$SMPROGRAMS\WadokuNotify\WadokuNotify.lnk"
Delete "$SMPROGRAMS\WadokuNotify\uninstall.lnk"
Delete "$SMSTARTUP\WadokuNotify.lnk"
RMDir "$SMPROGRAMS\WadokuNotify"
;DeleteRegValue HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" "WadokuNotify"
SectionEnd
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd