diff options
Diffstat (limited to 'manaplus.sh')
-rw-r--r-- | manaplus.sh | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/manaplus.sh b/manaplus.sh index e039b2a..215340b 100644 --- a/manaplus.sh +++ b/manaplus.sh @@ -13,6 +13,8 @@ dll_check(){ [[ "$err" != "" ]] && echo "ERR: missing: $err" && exit 1 || return; } +# CI_COMMIT_TAG="v2.1.1.1" # <- test version +# CI_COMMIT_TAG="s20210101" # <- test snapshot2 get_version_by_tag(){ IFS='.' read -r -a array <<< "$CI_COMMIT_TAG" # splits commit tag in array [ "${CI_COMMIT_TAG:0:1}" == "v" ] \ @@ -20,15 +22,35 @@ get_version_by_tag(){ [ "${CI_COMMIT_TAG:0:1}" == "s" ] \ && V="snapshot-${CI_COMMIT_TAG:1}" # just replace 's' with 'snapshot-' [ "${CI_COMMIT_TAG}" == "" ] \ - && echo "!WARN: no tag set, using test-99.99.99.99!" \ - && V="test-99.99.99.99" # test versions, (not running from tags) + && echo "!WARN: no tag set, using test-0.0.0.1!" \ + && V="test-0.0.0.1" # test versions, (not running from tags) export PRODUCT_VERSION=$V export VERSION=$V echo "PRODUCT_VERSION, VERSION = '$V'" } -# CI_COMMIT_TAG="v2.1.1.1" # <- test version -# CI_COMMIT_TAG="s20210101" # <- test snapshot2 -#get_version_by_tag # [WIP] + +make_portable(){ + dll_dir=$1 # handled different, needs to get cp before all others! (to /tmp/Mana/%) + root_dir="/manaplus/" + files_list=("build/tmp/src/manaplusd.exe build/tmp/src/manaplus.exe packaging/windows/portable.xml build/tmp/data/ build/tmp/docs/ AUTHORS COPYING NEWS README.txt") # build/tmp/src/gdb.exe (already included in dll_dir) + tmp_dir="/tmp/Mana/" + mkdir -p $tmp_dir + cp ${dll_dir}* $tmp_dir + + files=`tr -d ',' <<< $files_list` + for file in $files + do + cp -r $root_dir$file $tmp_dir + done + + cd ${root_dir}packaging/windows/ && ./make-translations.sh + cp -r $root_dir/translations/ ${tmp_dir} + cd /tmp + get_version_by_tag + zip -r manaplus-$VERSION.zip Mana/ + +} + cp /mxe/usr/i686-w64-mingw32.shared/bin/gdb.exe /libs/dll/ cp /manaplus/tools/ci/scripts/winvars.sh manaplus/build/ @@ -45,11 +67,18 @@ cp /mxe/usr/i686-w64-mingw32.shared/bin/gdb.exe /manaplus/build/tmp/src/ strip /manaplus/build/tmp/src/manaplus.exe # profiler (needs another build) -dlls=`/mxe/tools/copydlldeps.py -C/manaplus/build/tmp/src -L/mxe/usr/i686-w64-mingw32.shared/bin/ /libs/dll/` +dll_dir="/libs/dll/" + +dlls=`/mxe/tools/copydlldeps.py -C/manaplus/build/tmp/src -L/mxe/usr/i686-w64-mingw32.shared/bin/ ${dll_dir}` dll_check $dlls -./packwin || exit 1 +make_portable $dll_dir + +#./packwin || exit 1 # disabled (not required @mana-launcher) + # artifacts -cp /manaplus/packaging/windows/manaplus-*.exe /builds/jak89_1/docker-testing/build/ || exit 1 +#cp /manaplus/packaging/windows/manaplus-*.exe /builds/jak89_1/docker-testing/build/ || exit 1 +cp /tmp/*.zip /builds/jak89_1/docker-testing/build/ || exit 1 # copy portable client zip file +# TODO: checksum [zip->sha->{version?}.sha] /builds/jak89_1/docker-testing/build/ cp /manaplus/build/tmp/config.log /builds/jak89_1/docker-testing/logs/ || true cp /manaplus/build/make2.log /builds/jak89_1/docker-testing/logs/ || true |