more stuff

This commit is contained in:
cathugger 2022-05-17 16:01:52 +00:00
parent ef71219c2b
commit b428196b5e
No known key found for this signature in database
GPG key ID: 9BADDA2DAF6F01A8
3 changed files with 57 additions and 10 deletions

View file

@ -19,6 +19,9 @@ const int charcounts[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10 };
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
// TODO
(void) argc;
(void) argv;
printf(" |"); printf(" |");
for (size_t i = 0; i < sizeof(probs)/sizeof(probs[0]); ++i) { for (size_t i = 0; i < sizeof(probs)/sizeof(probs[0]); ++i) {

View file

@ -1,3 +1,2 @@
/winepfx /build
/x86_64 /out
/i686

View file

@ -1,33 +1,78 @@
#!/bin/sh #!/bin/sh
set -e set -eux
V=$1
D=$(realpath "$0") D=$(realpath "$0")
D=$(dirname "$D") D=$(dirname "$D")
cd "$D" cd "$D"
mkdir -p build
export WINEARCH=win64 export WINEARCH=win64
export WINEPREFIX=$(realpath ./winepfx) export WINEPREFIX=$(realpath ./build/winepfx)
OPATH=$PATH OPATH=$PATH
rm -rf out
mkdir -p out
# prepare source
SV=mkp224o-$V
SO=$(realpath ./out/$SV)
git clone ../../ "$SO"
cd "$SO"
rm -rf .git
./autogen.sh
echo v$V > version.txt
cd ../..
# build windows bins
B=$(realpath ./build)
for w in x86_64 i686 for w in x86_64 i686
do do
rm -rf "$w" cd "$B"
mkdir "$w" rm -rf $w
cd "$w" mkdir $w
cd $w
p=$w-w64-mingw32 p=$w-w64-mingw32
case $w in case $w in
i686) i686)
CFLAGS="-march=i686 -mtune=generic" CFLAGS="-march=i686 -mtune=generic"
W=32
;; ;;
x86_64) x86_64)
CFLAGS="-march=x86-64 -mtune=generic" CFLAGS="-march=x86-64 -mtune=generic"
W=64
;; ;;
esac esac
CFLAGS="-O3 $CFLAGS -fomit-frame-pointer" CFLAGS="-O3 $CFLAGS -fomit-frame-pointer"
export PATH=/usr/$p/bin:$OPATH export PATH=/usr/$p/bin:$OPATH
../../../configure --enable-regex --enable-donna --with-pcre2="/usr/$p/bin/pcre2-config" CC="$p-gcc" CFLAGS="$CFLAGS" ../../out/$SV/configure --enable-regex --enable-donna --with-pcre2="/usr/$p/bin/pcre2-config" CC="${p}-gcc" CFLAGS="$CFLAGS"
make make main util
$p-strip mkp224o.exe
$p-strip calcest.exe
cd .. cd ..
BO="$SO-w$W"
mkdir -p "$BO"
cp $w/mkp224o.exe "$BO/"
cp $w/calcest.exe "$BO/"
cd "$BO"
$p-ldd mkp224o.exe | grep -v 'not found' | awk '{print $3}' | xargs -r cp -v -t ./
done done
export PATH=$OPATH
# compress stuff
cd "$D/out"
export TZ=UTC
tar --portability --no-acls --no-selinux --no-xattrs --owner root:0 --group=root:0 --sort=name -c -f $SV.tar $SV
zopfli -c $SV.tar > $SV.tar.gz
zstd -19 -f $SV.tar -o $SV.tar.zst
rm $SV.tar
zip -9 -X -r $SV-w32.zip $SV-w32
zip -9 -X -r $SV-w64.zip $SV-w64