Subversion Repositories Tewi

Rev

Rev 236 | Rev 238 | 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 237 2024-10-03 04:55:42Z 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"
237 nishi 7
	set ::env(PATH) "$::env$(PATH)"
211 nishi 8
	RunCommand "make clean"
232 nishi 9
	set dirname ""
223 nishi 10
	if { "$project_name" == "Tewi-BCC" } {
228 nishi 11
		set ::env(LANG) "ja_JP.UTF-8"
223 nishi 12
		set ::env(BORLAND) "C:/borland/bcc55"
13
		RunCommand "make PLATFORM=bcc"
228 nishi 14
		set ::env(LANG) "en_US.UTF-8"
232 nishi 15
		set dirname "bcc"
223 nishi 16
	} elseif { "$project_name" == "Tewi-VC6" } {
17
		RunCommand "make PLATFORM=vc6"
232 nishi 18
		set dirname "vc6"
223 nishi 19
	} elseif { "$project_name" == "Tewi-Watcom" } {
20
		set ::env(WATCOM) "/usr/watcom"
21
		set ::env(INCLUDE) "/usr/watcom/h"
225 nishi 22
		set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
223 nishi 23
		RunCommand "make PLATFORM=watcom"
232 nishi 24
		set dirname "watcom"
237 nishi 25
	} elseif { "$project_name" == "Tewi-PSP" } {
26
		RunCommand "./psp.sh"
27
		RunCommand "doas mkdir -p /raid/f/g/tewi/psp"
28
		RunCommand "doas mkdir -p /raid/ftp/pub/tewi/psp"
29
		RunCommand "doas cp tewidist.zip /raid/f/g/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
30
		RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
236 nishi 31
	} elseif { "$project_name" == "Tewi-MinGW-32" || "$project_name" == "Tewi-MinGW-64" } {
237 nishi 32
		RunCommand "rm -rf openssl"
236 nishi 33
		RunCommand "git clone https://github.com/clamwin/openssl"
34
		set bits 32
35
		if { "$project_name" == "Tewi-MinGW-32" } {
36
			foreach filen [glob openssl/lib/mingw/x86/*] {
37
				RunCommand "cp $filen openssl/lib/"
38
			}
39
		} else {
40
			set bits 64
41
			foreach filen [glob openssl/lib/mingw/x64/*] {
42
				RunCommand "cp $filen openssl/lib/"
43
			}
44
		}
45
		set win "win$bits"
46
		RunCommand "./installer.sh $win"
47
		RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
48
		RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
49
		RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
50
		RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
51
		RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
52
		RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
53
		return
223 nishi 54
	} else {
55
		RunCommand "make"
56
	}
229 nishi 57
	file mkdir workdir
58
	file mkdir workdir/etc
59
	file mkdir workdir/www
235 nishi 60
	file mkdir workdir/bin
229 nishi 61
	file mkdir workdir/modules
62
	file delete archive.7z
63
 
64
	exec ./Tool/itworks > workdir/www/index.html
65
	exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
66
	RunCommand "cp Binary/pbtewi.gif workdir/www/"
235 nishi 67
	RunCommand "cp Server/tewi.exe workdir/bin/"
231 nishi 68
	foreach filen [glob Module/*.dll] {
69
		RunCommand "cp $filen workdir/modules/"
70
	}
229 nishi 71
	cd workdir
72
	RunCommand "7z a ../archive.7z *"
73
	cd ..
74
	exec cat /usr/share/7z.sfx archive.7z > tewidist.exe
75
	RunCommand "rm -rf workdir"
233 nishi 76
	RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
77
	RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
234 nishi 78
	RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
79
	RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
210 nishi 80
}