1 | # $Id: Koakumafile 235 2024-10-03 04:40:57Z nishi $
|
---|
2 | # vim: syntax=tcl
|
---|
3 |
|
---|
4 | proc run {project_name} {
|
---|
5 | exec sed "s/undef NO_SSL/define NO_SSL/g" config.h.tmpl > config.h
|
---|
6 | set ::env(DISPLAY) ":0"
|
---|
7 | RunCommand "make clean"
|
---|
8 | set dirname ""
|
---|
9 | if { "$project_name" == "Tewi-BCC" } {
|
---|
10 | set ::env(LANG) "ja_JP.UTF-8"
|
---|
11 | set ::env(BORLAND) "C:/borland/bcc55"
|
---|
12 | RunCommand "make PLATFORM=bcc"
|
---|
13 | set ::env(LANG) "en_US.UTF-8"
|
---|
14 | set dirname "bcc"
|
---|
15 | } elseif { "$project_name" == "Tewi-VC6" } {
|
---|
16 | RunCommand "make PLATFORM=vc6"
|
---|
17 | set dirname "vc6"
|
---|
18 | } elseif { "$project_name" == "Tewi-Watcom" } {
|
---|
19 | set ::env(WATCOM) "/usr/watcom"
|
---|
20 | set ::env(INCLUDE) "/usr/watcom/h"
|
---|
21 | set ::env(PATH) "$::env(PATH):/usr/watcom/binl64"
|
---|
22 | RunCommand "make PLATFORM=watcom"
|
---|
23 | set dirname "watcom"
|
---|
24 | } else {
|
---|
25 | RunCommand "make"
|
---|
26 | }
|
---|
27 | file mkdir workdir
|
---|
28 | file mkdir workdir/etc
|
---|
29 | file mkdir workdir/www
|
---|
30 | file mkdir workdir/bin
|
---|
31 | file mkdir workdir/modules
|
---|
32 | file delete archive.7z
|
---|
33 |
|
---|
34 | exec ./Tool/itworks > workdir/www/index.html
|
---|
35 | exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
|
---|
36 | RunCommand "cp Binary/pbtewi.gif workdir/www/"
|
---|
37 | RunCommand "cp Server/tewi.exe workdir/bin/"
|
---|
38 | foreach filen [glob Module/*.dll] {
|
---|
39 | RunCommand "cp $filen workdir/modules/"
|
---|
40 | }
|
---|
41 | cd workdir
|
---|
42 | RunCommand "7z a ../archive.7z *"
|
---|
43 | cd ..
|
---|
44 | exec cat /usr/share/7z.sfx archive.7z > tewidist.exe
|
---|
45 | RunCommand "rm -rf workdir"
|
---|
46 | RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
|
---|
47 | RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
|
---|
48 | RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
|
---|
49 | RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
|
---|
50 | }
|
---|