2016-08-04 12:56:49 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-10-18 13:50:14 +02:00
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source $ROOT_DIR/utils.sh
|
|
|
|
|
|
|
|
|
2016-08-04 12:56:49 +02:00
|
|
|
TARGET=$1
|
|
|
|
|
2016-10-13 14:41:15 +02:00
|
|
|
BUILD_TYPE=$2
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2016-10-18 13:50:14 +02:00
|
|
|
|
|
|
|
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2016-10-13 14:41:15 +02:00
|
|
|
if [[ -z $BUILD_TYPE ]]; then
|
|
|
|
BUILD_TYPE=Release
|
|
|
|
fi
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2016-10-13 14:41:15 +02:00
|
|
|
if [[ "$BUILD_TYPE" == "Release" ]]; then
|
2016-10-18 13:50:14 +02:00
|
|
|
echo "Release build"
|
2018-09-17 20:06:04 +02:00
|
|
|
ICU_FILES=(libicudt62.dll libicuin62.dll libicuio62.dll libicutu62.dll libicuuc62.dll)
|
2016-10-13 14:41:15 +02:00
|
|
|
else
|
|
|
|
echo "Debug build"
|
2018-09-17 20:06:04 +02:00
|
|
|
ICU_FILES=(libicudtd62.dll libicuind62.dll libicuiod62.dll libicutud62.dll libicuucd62.dll)
|
2016-10-13 14:41:15 +02:00
|
|
|
fi
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2018-10-13 19:40:05 +02:00
|
|
|
FILES=(zlib1.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libintl-8.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libfreetype-6.dll libbz2-1.dll libssp-0.dll libpcre2-16-0.dll libhidapi-0.dll)
|
2016-10-18 13:50:14 +02:00
|
|
|
|
|
|
|
platform=$(get_platform)
|
|
|
|
|
|
|
|
if [[ "$platform" == "mingw64" ]]; then
|
|
|
|
PLATFORM_FILES="libgcc_s_seh-1.dll"
|
|
|
|
elif [[ "$platform" == "mingw32" ]]; then
|
|
|
|
PLATFORM_FILES="libgcc_s_dw2-1.dll"
|
|
|
|
fi
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2017-10-20 16:02:47 +02:00
|
|
|
for f in "${FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2017-10-20 16:02:47 +02:00
|
|
|
for f in "${ICU_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
2016-10-18 13:50:14 +02:00
|
|
|
|
2017-10-20 16:02:47 +02:00
|
|
|
for f in "${PLATFORM_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
2016-08-04 12:56:49 +02:00
|
|
|
|
2018-06-27 02:59:47 +02:00
|
|
|
cp $ROOT_DIR/start-low-graphics-mode.bat $TARGET
|