source: Main/trunk/Koakumafile@ 288

Last change on this file since 288 was 288, checked in by Nishi, on Oct 9, 2024 at 12:06:28 PM

build stuff

  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1# $Id: Koakumafile 288 2024-10-09 03:06:28Z nishi $
2# vim: syntax=tcl
3
4proc run {project_name} {
5 set once 1
6 while 1 {
7 set suf ""
8 set arg ""
9 exec sed "s/undef NO_SSL/define NO_SSL/g" config.h.tmpl > config.h
10 if { $once == 0 } {
11 exec sed -i "s/undef BUILD_GUI/define BUILD_GUI/g" config.h
12 set suf "-gui"
13 set arg " BUILD_GUI"
14 }
15 set ::env(DISPLAY) ":0"
16 RunCommand "make clean"
17 set dirname ""
18 if { "$project_name" == "Tewi-BCC" } {
19 set ::env(LANG) "ja_JP.UTF-8"
20 set ::env(BORLAND) "C:/borland/bcc55"
21 RunCommand "make PLATFORM=bcc"
22 set ::env(LANG) "en_US.UTF-8"
23 set dirname "bcc"
24 } elseif { "$project_name" == "Tewi-VC6" } {
25 RunCommand "make PLATFORM=vc6"
26 set dirname "vc6"
27 } elseif { "$project_name" == "Tewi-Watcom" } {
28 set ::env(WATCOM) "/usr/watcom"
29 set ::env(INCLUDE) "/usr/watcom/h"
30 set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
31 RunCommand "make PLATFORM=watcom"
32 set dirname "watcom"
33 } elseif { "$project_name" == "Tewi-PSP" } {
34 RunCommand "./psp.sh"
35 RunCommand "doas mkdir -p /raid/f/g/tewi/psp"
36 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/psp"
37 RunCommand "doas cp tewidist.zip /raid/f/g/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
38 RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
39 return
40 } elseif { "$project_name" == "Tewi-PS3" } {
41 set ::env(PS3DEV) "/usr/local/ps3dev"
42 set ::env(PSL1GHT) "/usr/local/ps3dev"
43 set ::env(PATH) "$::env(PATH):/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin"
44 RunCommand "make PLATFORM=ps3"
45 RunCommand "doas mkdir -p /raid/f/g/tewi/ps3"
46 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/ps3"
47 RunCommand "doas cp Server/tewi.pkg /raid/f/g/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
48 RunCommand "doas cp Server/tewi.pkg /raid/ftp/pub/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
49 return
50 } elseif { "$project_name" == "Tewi-MinGW-32" || "$project_name" == "Tewi-MinGW-64" } {
51 if { $once == 1 } {
52 RunCommand "rm -rf openssl"
53 RunCommand "git clone https://github.com/clamwin/openssl"
54 }
55 set bits 32
56 if { "$project_name" == "Tewi-MinGW-32" } {
57 foreach filen [glob openssl/lib/mingw/x86/*] {
58 RunCommand "cp $filen openssl/lib/"
59 }
60 } else {
61 set bits 64
62 foreach filen [glob openssl/lib/mingw/x64/*] {
63 RunCommand "cp $filen openssl/lib/"
64 }
65 }
66 set win "win$bits"
67 RunCommand "./installer.sh $win$arg"
68 RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
69 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
70 RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl$suf.exe"
71 RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl$suf.exe"
72 RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl$suf.exe"
73 RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl$suf.exe"
74 if { $once == 0 } {
75 return
76 }
77 set once 0
78 continue
79 } else {
80 RunCommand "make"
81 return
82 }
83 file mkdir workdir
84 file mkdir workdir/etc
85 file mkdir workdir/www
86 file mkdir workdir/bin
87 file mkdir workdir/modules
88 file delete archive.7z
89
90 exec ./Tool/itworks > workdir/www/index.html
91 exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
92 RunCommand "cp Binary/pbtewi.gif workdir/www/"
93 RunCommand "cp Server/tewi.exe workdir/bin/"
94 foreach filen [glob Module/*.dll] {
95 RunCommand "cp $filen workdir/modules/"
96 }
97 RunCommand "reisen Tewi\\ HTTPd @reisen.conf tewidist.exe"
98 RunCommand "rm -rf workdir"
99 RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
100 RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
101 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
102 RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
103 if { $once == 0 } {
104 return
105 }
106 set once 0
107 }
108}
Note: See TracBrowser for help on using the repository browser.