Changeset 285 in Main


Ignore:
Timestamp:
Oct 9, 2024, 11:54:37 AM (5 weeks ago)
Author:
Nishi
Message:

build stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Koakumafile

    r283 r285  
    33
    44proc 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         } elseif { "$project_name" == "Tewi-PSP" } {
    25                 RunCommand "./psp.sh"
    26                 RunCommand "doas mkdir -p /raid/f/g/tewi/psp"
    27                 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/psp"
    28                 RunCommand "doas cp tewidist.zip /raid/f/g/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
    29                 RunCommand "doas cp tewidist.zip /raid/ftp/pub/tewi/psp/tewidistpsp-[exec make get-version]-nossl.zip"
    30                 return
    31         } elseif { "$project_name" == "Tewi-PS3" } {
    32                 set ::env(PS3DEV) "/usr/local/ps3dev"
    33                 set ::env(PSL1GHT) "/usr/local/ps3dev"
    34                 set ::env(PATH) "$::env(PATH):/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin"
    35                 RunCommand "make PLATFORM=ps3"
    36                 RunCommand "doas mkdir -p /raid/f/g/tewi/ps3"
    37                 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/ps3"
    38                 RunCommand "doas cp Server/tewi.pkg /raid/f/g/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
    39                 RunCommand "doas cp Server/tewi.pkg /raid/ftp/pub/tewi/ps3/tewidistps3-[exec make get-version]-nossl.pkg"
    40                 return
    41         } elseif { "$project_name" == "Tewi-MinGW-32" || "$project_name" == "Tewi-MinGW-64" } {
    42                 RunCommand "rm -rf openssl"
    43                 RunCommand "git clone https://github.com/clamwin/openssl"
    44                 set bits 32
    45                 if { "$project_name" == "Tewi-MinGW-32" } {
    46                         foreach filen [glob openssl/lib/mingw/x86/*] {
    47                                 RunCommand "cp $filen openssl/lib/"
     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" } {
     49                        RunCommand "rm -rf openssl"
     50                        RunCommand "git clone https://github.com/clamwin/openssl"
     51                        set bits 32
     52                        if { "$project_name" == "Tewi-MinGW-32" } {
     53                                foreach filen [glob openssl/lib/mingw/x86/*] {
     54                                        RunCommand "cp $filen openssl/lib/"
     55                                }
     56                        } else {
     57                                set bits 64
     58                                foreach filen [glob openssl/lib/mingw/x64/*] {
     59                                        RunCommand "cp $filen openssl/lib/"
     60                                }
    4861                        }
     62                        set win "win$bits"
     63                        RunCommand "./installer.sh $win"
     64                        RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
     65                        RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
     66                        RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
     67                        RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
     68                        RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
     69                        RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
     70                        return
    4971                } else {
    50                         set bits 64
    51                         foreach filen [glob openssl/lib/mingw/x64/*] {
    52                                 RunCommand "cp $filen openssl/lib/"
    53                         }
     72                        RunCommand "make"
     73                        return
    5474                }
    55                 set win "win$bits"
    56                 RunCommand "./installer.sh $win"
    57                 RunCommand "doas mkdir -p /raid/f/g/tewi/$win"
    58                 RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$win"
    59                 RunCommand "doas cp install-ssl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
    60                 RunCommand "doas cp install-nossl.exe /raid/f/g/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
    61                 RunCommand "doas cp install-ssl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-ssl.exe"
    62                 RunCommand "doas cp install-nossl.exe /raid/ftp/pub/tewi/$win/tewiinst$bits-[exec make get-version]-nossl.exe"
    63                 return
    64         } else {
    65                 RunCommand "make"
     75                file mkdir workdir
     76                file mkdir workdir/etc
     77                file mkdir workdir/www
     78                file mkdir workdir/bin
     79                file mkdir workdir/modules
     80                file delete archive.7z
     81       
     82                exec ./Tool/itworks > workdir/www/index.html
     83                exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
     84                RunCommand "cp Binary/pbtewi.gif workdir/www/"
     85                RunCommand "cp Server/tewi.exe workdir/bin/"
     86                foreach filen [glob Module/*.dll] {
     87                        RunCommand "cp $filen workdir/modules/"
     88                }
     89                RunCommand "reisen Tewi\\ HTTPd @reisen.conf tewidist.exe"
     90                RunCommand "rm -rf workdir"
     91                RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
     92                RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
     93                RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
     94                RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl$suf.exe"
     95                if { $once == 0 } {
     96                        return
     97                }
     98                set once 0
    6699        }
    67         file mkdir workdir
    68         file mkdir workdir/etc
    69         file mkdir workdir/www
    70         file mkdir workdir/bin
    71         file mkdir workdir/modules
    72         file delete archive.7z
    73 
    74         exec ./Tool/itworks > workdir/www/index.html
    75         exec ./Tool/genconf C:/Tewi modules dll > workdir/etc/tewi.conf
    76         RunCommand "cp Binary/pbtewi.gif workdir/www/"
    77         RunCommand "cp Server/tewi.exe workdir/bin/"
    78         foreach filen [glob Module/*.dll] {
    79                 RunCommand "cp $filen workdir/modules/"
    80         }
    81         RunCommand "reisen Tewi\\ HTTPd @reisen.conf tewidist.exe"
    82         RunCommand "rm -rf workdir"
    83         RunCommand "doas mkdir -p /raid/f/g/tewi/$dirname"
    84         RunCommand "doas cp tewidist.exe /raid/f/g/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
    85         RunCommand "doas mkdir -p /raid/ftp/pub/tewi/$dirname"
    86         RunCommand "doas cp tewidist.exe /raid/ftp/pub/tewi/$dirname/tewidist$dirname-[exec make get-version]-nossl.exe"
    87100}
Note: See TracChangeset for help on using the changeset viewer.