Subversion Repositories Tewi

Rev

Rev 208 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 208 Rev 217
Line 1... Line 1...
1
# $Id: install.nsi 208 2024-10-02 02:59:59Z nishi $
1
# $Id: install.nsi 217 2024-10-02 19:50:16Z nishi $
2
 
2
 
3
VIFileVersion "1.0.0.0"
3
VIFileVersion "1.0.0.0"
4
VIProductVersion "1.0.0.0"
4
VIProductVersion "1.0.0.0"
5
VIAddVersionKey "FileVersion" "${VERSION}"
5
VIAddVersionKey "FileVersion" "${VERSION}"
6
VIAddVersionKey "LegalCopyright" "Public domain. Original by Nishi"
6
VIAddVersionKey "LegalCopyright" "Public domain. Original by Nishi"
Line 37... Line 37...
37
	CreateDirectory "$INSTDIR\www"
37
	CreateDirectory "$INSTDIR\www"
38
	CreateDirectory "$INSTDIR\www\icons"
38
	CreateDirectory "$INSTDIR\www\icons"
39
	CreateDirectory "$INSTDIR\modules"
39
	CreateDirectory "$INSTDIR\modules"
40
	CreateDirectory "$INSTDIR\bin"
40
	CreateDirectory "$INSTDIR\bin"
41
	SetOutPath "$INSTDIR"
41
	SetOutPath "$INSTDIR"
-
 
42
	!cd ..
42
	File /oname=LICENSE.txt "../LICENSE"
43
	File /oname=LICENSE.txt "LICENSE"
43
	SetOutPath "$INSTDIR\modules"
44
	SetOutPath "$INSTDIR\modules"
-
 
45
	!cd Module
44
	File "../Module/*.dll"
46
	File "*.dll"
-
 
47
	!cd ..
45
	SetOutPath "$INSTDIR\etc"
48
	SetOutPath "$INSTDIR\etc"
46
	SetOverWrite off
49
	SetOverWrite off
47
	File /oname=tewi.conf "../generated.conf"
50
	File /oname=tewi.conf "generated.conf"
48
	SetOutPath "$INSTDIR\www"
51
	SetOutPath "$INSTDIR\www"
49
	File /oname=index.html "../itworks.html"
52
	File /oname=index.html "itworks.html"
-
 
53
	!cd Binary
50
	File /oname=pbtewi.gif "../Binary/pbtewi.gif"
54
	File /oname=pbtewi.gif "pbtewi.gif"
-
 
55
	!cd ..
51
	SetOutPath "$INSTDIR\www\icons"
56
	SetOutPath "$INSTDIR\www\icons"
-
 
57
	!cd Icons
52
	File "../Icons/*.png"
58
	File "*.png"
-
 
59
	!cd ..
-
 
60
	!cd Server
53
	SetOverWrite on
61
	SetOverWrite on
54
 
62
 
55
	CreateDirectory "$SMPROGRAMS\Tewi HTTPd"
63
	CreateDirectory "$SMPROGRAMS\Tewi HTTPd"
56
	CreateShortcut "$SMPROGRAMS\Tewi HTTPd\License.lnk" "$INSTDIR\LICENSE.txt" ""
64
	CreateShortcut "$SMPROGRAMS\Tewi HTTPd\License.lnk" "$INSTDIR\LICENSE.txt" ""
57
	CreateShortcut "$SMPROGRAMS\Tewi HTTPd\Start Tewi HTTPd.lnk" "$INSTDIR\bin\tewi.exe" ""
65
	CreateShortcut "$SMPROGRAMS\Tewi HTTPd\Start Tewi HTTPd.lnk" "$INSTDIR\bin\tewi.exe" ""
Line 70... Line 78...
70
	WriteUninstaller "$INSTDIR\uninstall.exe"
78
	WriteUninstaller "$INSTDIR\uninstall.exe"
71
SectionEnd
79
SectionEnd
72
 
80
 
73
Section "$(EXEC_ONLY)" SEL_EXEC
81
Section "$(EXEC_ONLY)" SEL_EXEC
74
	SetOutPath "$INSTDIR\bin"
82
	SetOutPath "$INSTDIR\bin"
-
 
83
	!cd ..
75
	File "../tewi.exe"
84
	File "tewi.exe"
-
 
85
	!cd Server
76
	WriteINIStr $INSTDIR\install.ini uninstall service false
86
	WriteINIStr $INSTDIR\install.ini uninstall service false
77
SectionEnd
87
SectionEnd
78
 
88
 
-
 
89
!ifndef ONLY_EXEC
79
Section /o "$(SERV_TOO)" SEL_SERVICE
90
Section /o "$(SERV_TOO)" SEL_SERVICE
80
	WriteINIStr $INSTDIR\install.ini uninstall service true
91
	WriteINIStr $INSTDIR\install.ini uninstall service true
81
	FileOpen $9 $INSTDIR\install.bat w
92
	FileOpen $9 $INSTDIR\install.bat w
82
	FileWrite $9 '"$SYSDIR\sc.exe" stop "TewiHTTPd"$\r$\n'
93
	FileWrite $9 '"$SYSDIR\sc.exe" stop "TewiHTTPd"$\r$\n'
83
	FileClose $9
94
	FileClose $9
Line 85... Line 96...
85
	Pop $0
96
	Pop $0
86
	DetailPrint "$(WAIT_STOP)"
97
	DetailPrint "$(WAIT_STOP)"
87
	Sleep 1000
98
	Sleep 1000
88
	CreateDirectory "$INSTDIR\logs"
99
	CreateDirectory "$INSTDIR\logs"
89
	SetOutPath "$INSTDIR\bin"
100
	SetOutPath "$INSTDIR\bin"
-
 
101
	!cd ..
90
	File "../tewi.exe"
102
	File "tewi.exe"
91
	File /oname=tewisrv.exe "../tewi-service.exe"
103
	File /oname=tewisrv.exe "tewi-service.exe"
-
 
104
	!cd Server
92
	FileOpen $9 $INSTDIR\install.bat w
105
	FileOpen $9 $INSTDIR\install.bat w
93
	FileWrite $9 '"$SYSDIR\sc.exe" delete "TewiHTTPd"$\r$\n'
106
	FileWrite $9 '"$SYSDIR\sc.exe" delete "TewiHTTPd"$\r$\n'
94
	FileWrite $9 '"$SYSDIR\sc.exe" create "TewiHTTPd" DisplayName= "Tewi HTTPd" binpath= "$INSTDIR\bin\tewisrv.exe" start= "auto"$\r$\n'
107
	FileWrite $9 '"$SYSDIR\sc.exe" create "TewiHTTPd" DisplayName= "Tewi HTTPd" binpath= "$INSTDIR\bin\tewisrv.exe" start= "auto"$\r$\n'
95
	FileWrite $9 '"$SYSDIR\sc.exe" start "TewiHTTPd"$\r$\n'
108
	FileWrite $9 '"$SYSDIR\sc.exe" start "TewiHTTPd"$\r$\n'
96
	FileClose $9
109
	FileClose $9
97
	nsExec::Exec '"$INSTDIR\install.bat"'
110
	nsExec::Exec '"$INSTDIR\install.bat"'
98
	Pop $0
111
	Pop $0
99
	Delete $INSTDIR\install.bat
112
	Delete $INSTDIR\install.bat
100
SectionEnd
113
SectionEnd
-
 
114
!endif
101
 
115
 
102
Function .onInit
116
Function .onInit
103
	StrCpy $1 ${SEL_EXEC}
117
	StrCpy $1 ${SEL_EXEC}
104
FunctionEnd
118
FunctionEnd
105
 
119
 
106
Function .onSelChange
120
Function .onSelChange
107
	!insertmacro StartRadioButtons $1
121
	!insertmacro StartRadioButtons $1
108
	!insertmacro RadioButton ${SEL_EXEC}
122
	!insertmacro RadioButton ${SEL_EXEC}
-
 
123
	!ifndef ONLY_EXEC
109
	!insertmacro RadioButton ${SEL_SERVICE}
124
	!insertmacro RadioButton ${SEL_SERVICE}
-
 
125
	!endif
110
	!insertmacro EndRadioButtons
126
	!insertmacro EndRadioButtons
111
FunctionEnd
127
FunctionEnd
112
 
128
 
113
Section "Uninstall"
129
Section "Uninstall"
114
	ReadINIStr $8 $INSTDIR\install.ini uninstall service
130
	ReadINIStr $8 $INSTDIR\install.ini uninstall service