mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-01-09 02:57:21 -03:00
more stuff
This commit is contained in:
parent
ef71219c2b
commit
b428196b5e
3 changed files with 57 additions and 10 deletions
|
@ -19,6 +19,9 @@ const int charcounts[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10 };
|
|||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
// TODO
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
printf(" |");
|
||||
for (size_t i = 0; i < sizeof(probs)/sizeof(probs[0]); ++i) {
|
||||
|
|
5
contrib/winbuild/.gitignore
vendored
5
contrib/winbuild/.gitignore
vendored
|
@ -1,3 +1,2 @@
|
|||
/winepfx
|
||||
/x86_64
|
||||
/i686
|
||||
/build
|
||||
/out
|
||||
|
|
|
@ -1,33 +1,78 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
set -eux
|
||||
|
||||
V=$1
|
||||
|
||||
D=$(realpath "$0")
|
||||
D=$(dirname "$D")
|
||||
cd "$D"
|
||||
|
||||
mkdir -p build
|
||||
|
||||
export WINEARCH=win64
|
||||
export WINEPREFIX=$(realpath ./winepfx)
|
||||
export WINEPREFIX=$(realpath ./build/winepfx)
|
||||
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
|
||||
do
|
||||
rm -rf "$w"
|
||||
mkdir "$w"
|
||||
cd "$w"
|
||||
cd "$B"
|
||||
rm -rf $w
|
||||
mkdir $w
|
||||
cd $w
|
||||
p=$w-w64-mingw32
|
||||
|
||||
case $w in
|
||||
i686)
|
||||
CFLAGS="-march=i686 -mtune=generic"
|
||||
W=32
|
||||
;;
|
||||
x86_64)
|
||||
CFLAGS="-march=x86-64 -mtune=generic"
|
||||
W=64
|
||||
;;
|
||||
esac
|
||||
CFLAGS="-O3 $CFLAGS -fomit-frame-pointer"
|
||||
|
||||
export PATH=/usr/$p/bin:$OPATH
|
||||
../../../configure --enable-regex --enable-donna --with-pcre2="/usr/$p/bin/pcre2-config" CC="$p-gcc" CFLAGS="$CFLAGS"
|
||||
make
|
||||
../../out/$SV/configure --enable-regex --enable-donna --with-pcre2="/usr/$p/bin/pcre2-config" CC="${p}-gcc" CFLAGS="$CFLAGS"
|
||||
make main util
|
||||
$p-strip mkp224o.exe
|
||||
$p-strip calcest.exe
|
||||
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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue