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