Subversion Repositories Tewi

Rev

Rev 239 | Rev 282 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
210 nishi 1
# $Id: Koakumafile 281 2024-10-09 02:37:03Z nishi $
2
# vim: syntax=tcl
3
 
4
proc run {project_name} {
225 nishi 5
	exec sed "s/undef NO_SSL/define NO_SSL/g" config.h.tmpl > config.h
227 nishi 6
	set ::env(DISPLAY) ":0"
211 nishi 7
	RunCommand "make clean"
232 nishi 8
	set dirname ""
223 nishi 9
	if { "$project_name" == "Tewi-BCC" } {
228 nishi 10
		set ::env(LANG) "ja_JP.UTF-8"
223 nishi 11
		set ::env(BORLAND) "C:/borland/bcc55"
12
		RunCommand "make PLATFORM=bcc"
228 nishi 13
		set ::env(LANG) "en_US.UTF-8"
232 nishi 14
		set dirname "bcc"
223 nishi 15
	} elseif { "$project_name" == "Tewi-VC6" } {
16
		RunCommand "make PLATFORM=vc6"
232 nishi 17
		set dirname "vc6"
223 nishi 18
	} elseif { "$project_name" == "Tewi-Watcom" } {
19
		set ::env(WATCOM) "/usr/watcom"
20
		set ::env(INCLUDE) "/usr/watcom/h"
225 nishi 21
		set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
223 nishi 22
		RunCommand "make PLATFORM=watcom"
232 nishi 23
		set dirname "watcom"
237 nishi 24
	} elseif { "$project_name" == "Tewi-PSP" } {
25
		RunCommand "./psp.sh"
26
		RunCommand "doas mkdir -p /raid/f/g/tewi/psp"
27
		RunCommand "doas mkdir -p /raid/ftp/pub/tewi/psp"
28
		RunCommand "doas cp tewidist.zip /raid/f/g/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
29
		RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
238 nishi 30
		return
239 nishi 31
	} elseif { "$project_name" == "Tewi-PS3" } {
32
		set ::env(PS3DEV) "/usr/local/ps3dev"
33
		set ::env(PSL1GHT) "/usr/local/ps3dev"
34
		set ::env(PATH) "$::env(PATH):/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin"
35
		RunCommand "make PLATFORM=ps3"
36
		RunCommand "doas mkdir -p /raid/f/g/tewi/ps3"
37
		RunCommand "doas mkdir -p /raid/ftp/pub/tewi/ps3"
38
		RunCommand "doas cp Server/tewi.pkg /raid/f/g/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
39
		RunCommand "doas cp Server/tewi.pkg /raid/ftp/pub/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
40
		return
236 nishi 41
	} elseif { "$project_name" == "Tewi-MinGW-32" || "$project_name" == "Tewi-MinGW-64" } {
237 nishi 42
		RunCommand "rm -rf openssl"
236 nishi 43
		RunCommand "git clone https://github.com/clamwin/openssl"
44
		set bits 32
45
		if { "$project_name" == "Tewi-MinGW-32" } {
46
			foreach filen [glob openssl/lib/mingw/x86/*] {
47
				RunCommand "cp $filen openssl/lib/"
48
			}
49
		} else {
50
			set bits 64
51
			foreach filen [glob openssl/lib/mingw/x64/*] {
52
				RunCommand "cp $filen openssl/lib/"
53
			}
54
		}
55
		set win "win$bits"
56
		RunCommand "./installer.sh $win"
57
		RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
58
		RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
59
		RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
60
		RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
61
		RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
62
		RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
63
		return
223 nishi 64
	} else {
65
		RunCommand "make"
66
	}
229 nishi 67
	file mkdir workdir
68
	file mkdir workdir/etc
69
	file mkdir workdir/www
235 nishi 70
	file mkdir workdir/bin
229 nishi 71
	file mkdir workdir/modules
72
	file delete archive.7z
73
 
74
	exec ./Tool/itworks > workdir/www/index.html
75
	exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
76
	RunCommand "cp Binary/pbtewi.gif workdir/www/"
235 nishi 77
	RunCommand "cp Server/tewi.exe workdir/bin/"
231 nishi 78
	foreach filen [glob Module/*.dll] {
79
		RunCommand "cp $filen workdir/modules/"
80
	}
281 nishi 81
	RunCommand "reisen 'Tewi HTTPd' @reisen.conf tewidist.exe"
229 nishi 82
	RunCommand "rm -rf workdir"
233 nishi 83
	RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
84
	RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
234 nishi 85
	RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
86
	RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
210 nishi 87
}