source: Main/trunk/Koakumafile@ 360

Last change on this file since 360 was 354, checked in by Nishi, on Oct 16, 2024 at 5:42:57 PM

fix Tewi-OS2

  • Property svn:keywords set to Id
File size: 4.9 KB
RevLine 
[210]1# $Id: Koakumafile 354 2024-10-16 08:42:57Z nishi $
2# vim: syntax=tcl
3
4proc 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"
[353]33 } elseif { "$project_name" == "Tewi-Watcom" } {
34 set ::env(WATCOM) "/usr/watcom"
35 set ::env(INCLUDE) "/usr/watcom/h"
36 set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
37 RunCommand "make PLATFORM=watcom"
38 set dirname "watcom"
[354]39 } elseif { "$project_name" == "Tewi-OS2" } {
[353]40 set ::env(WATCOM) "/usr/watcom"
41 set ::env(INCLUDE) "/usr/watcom/h"
42 set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
43 RunCommand "rm -rf os2"
44 RunCommand "make PLATFORM=os2"
45 RunCommand "make PLATFORM=os2 install DESTDIR=os2/"
46 cd os2/C:
47 RunCommand "zip -rv ../../tewidist.zip Tewi"
48 cd ../..
49 RunCommand "doas mkdir -p /raid/f/g/tewi/os2"
50 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/os2"
51 RunCommand "doas cp tewidist.zip /raid/f/g/tewi/os2/tewidistos2-[exec make get-version]-nossl.zip"
52 RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/os2/tewidistos2-[exec make get-version]-nossl.zip"
53 return
[285]54 } elseif { "$project_name" == "Tewi-PSP" } {
55 RunCommand "./psp.sh"
56 RunCommand "doas mkdir -p /raid/f/g/tewi/psp"
57 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/psp"
58 RunCommand "doas cp tewidist.zip /raid/f/g/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
59 RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
60 return
61 } elseif { "$project_name" == "Tewi-PS3" } {
62 set ::env(PS3DEV) "/usr/local/ps3dev"
63 set ::env(PSL1GHT) "/usr/local/ps3dev"
64 set ::env(PATH) "$::env(PATH):/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin"
65 RunCommand "make PLATFORM=ps3"
66 RunCommand "doas mkdir -p /raid/f/g/tewi/ps3"
67 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/ps3"
68 RunCommand "doas cp Server/tewi.pkg /raid/f/g/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
69 RunCommand "doas cp Server/tewi.pkg /raid/ftp/pub/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
70 return
71 } elseif { "$project_name" == "Tewi-MinGW-32" || "$project_name" == "Tewi-MinGW-64" } {
[287]72 if { $once == 1 } {
73 RunCommand "rm -rf openssl"
74 RunCommand "git clone https://github.com/clamwin/openssl"
75 }
[285]76 set bits 32
77 if { "$project_name" == "Tewi-MinGW-32" } {
78 foreach filen [glob openssl/lib/mingw/x86/*] {
79 RunCommand "cp $filen openssl/lib/"
80 }
81 } else {
82 set bits 64
83 foreach filen [glob openssl/lib/mingw/x64/*] {
84 RunCommand "cp $filen openssl/lib/"
85 }
[236]86 }
[285]87 set win "win$bits"
[288]88 RunCommand "./installer.sh $win$arg"
[285]89 RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
90 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
[286]91 RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl$suf.exe"
92 RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl$suf.exe"
93 RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl$suf.exe"
94 RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl$suf.exe"
95 if { $once == 0 } {
96 return
97 }
98 set once 0
99 continue
[236]100 } else {
[285]101 RunCommand "make"
102 return
[236]103 }
[285]104 file mkdir workdir
105 file mkdir workdir/etc
106 file mkdir workdir/www
107 file mkdir workdir/bin
108 file mkdir workdir/modules
109 file delete archive.7z
110
111 exec ./Tool/itworks > workdir/www/index.html
112 exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
113 RunCommand "cp Binary/pbtewi.gif workdir/www/"
114 RunCommand "cp Server/tewi.exe workdir/bin/"
115 foreach filen [glob Module/*.dll] {
116 RunCommand "cp $filen workdir/modules/"
117 }
118 RunCommand "reisen Tewi\\ HTTPd @reisen.conf tewidist.exe"
119 RunCommand "rm -rf workdir"
120 RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
121 RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
122 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
123 RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
124 if { $once == 0 } {
125 return
126 }
127 set once 0
[223]128 }
[210]129}
Note: See TracBrowser for help on using the repository browser.