/
transcriberjs-x86.nsi
93 lines (64 loc) · 2.44 KB
/
transcriberjs-x86.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
; transcriberjs-x86.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install transcriberjs.nsi into a directory that the user selects,
;--------------------------------
!include "MUI.nsh"
!include nsDialogs.nsh
;--------------------------------
; The name of the installer
Name "trjs-install-v0.7.8c-x86"
; The file to write
OutFile "trjs-v0.7.8c-x86.exe"
; The default installation directory
InstallDir "$PROGRAMFILES64\trjs"
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\trjs" "Install_Dir"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "trjs 64bits v0.7.8c (required)"
SectionIn RO
; Put file there
SetOutPath $INSTDIR
File /r "C:\devlopt\builds\trjs-x86\Trjs-win32-ia32\*.*"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\trjs "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\trjs" "DisplayName" "trjs"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\trjs" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\trjs" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\trjs" "NoRepair" 1
WriteUninstaller "uninstall.exe"
CreateDirectory "$SMPROGRAMS\trjs"
CreateShortCut "$SMPROGRAMS\trjs\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\trjs\trjs.lnk" "$INSTDIR\trjs.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Desktop Shortcuts"
CreateShortCut "$DESKTOP\trjs.lnk" "$INSTDIR\trjs.exe"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\trjs"
DeleteRegKey HKLM SOFTWARE\trjs
; Remove shortcuts, if any
Delete "$SMPROGRAMS\trjs\*.*"
Delete "$DESKTOP\trjs.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\trjs"
RMDir /r "$INSTDIR"
SectionEnd