[210] | 1 | # $Id: Koakumafile 288 2024-10-09 03:06:28Z nishi $
|
---|
| 2 | # vim: syntax=tcl
|
---|
| 3 |
|
---|
| 4 | proc run {project_name} {
|
---|
[285] | 5 | set once 1
|
---|
| 6 | while 1 {
|
---|
| 7 | set suf ""
|
---|
[288] | 8 | set arg ""
|
---|
[285] | 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"
|
---|
[288] | 13 | set arg " BUILD_GUI"
|
---|
[285] | 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" } {
|
---|
[287] | 51 | if { $once == 1 } {
|
---|
| 52 | RunCommand "rm -rf openssl"
|
---|
| 53 | RunCommand "git clone https://github.com/clamwin/openssl"
|
---|
| 54 | }
|
---|
[285] | 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 | }
|
---|
[236] | 65 | }
|
---|
[285] | 66 | set win "win$bits"
|
---|
[288] | 67 | RunCommand "./installer.sh $win$arg"
|
---|
[285] | 68 | RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
|
---|
| 69 | RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
|
---|
[286] | 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
|
---|
[236] | 79 | } else {
|
---|
[285] | 80 | RunCommand "make"
|
---|
| 81 | return
|
---|
[236] | 82 | }
|
---|
[285] | 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
|
---|
[223] | 107 | }
|
---|
[210] | 108 | }
|
---|