|
@@ -7,7 +7,7 @@ BUILD_DIR="winbuild" |
|
|
|
|
|
|
|
|
# Build zlib from source |
|
|
# Build zlib from source |
|
|
if [ ! -d "zlib" ]; then |
|
|
if [ ! -d "zlib" ]; then |
|
|
git clone -b v1.2.13 https://github.com/madler/zlib && cd zlib |
|
|
|
|
|
|
|
|
git clone --depth 1 -b v1.2.13 https://github.com/madler/zlib && cd zlib |
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|
cmake --build build -j$(nproc) |
|
|
cmake --build build -j$(nproc) |
|
|
cmake --build build --target install |
|
|
cmake --build build --target install |
|
@@ -16,7 +16,7 @@ fi |
|
|
|
|
|
|
|
|
# Build libpng from source |
|
|
# Build libpng from source |
|
|
if [ ! -d "libpng" ]; then |
|
|
if [ ! -d "libpng" ]; then |
|
|
git clone -b v1.6.39 https://github.com/glennrp/libpng && cd libpng |
|
|
|
|
|
|
|
|
git clone --depth 1 -b v1.6.39 https://github.com/glennrp/libpng && cd libpng |
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|
cmake --build build -j$(nproc) |
|
|
cmake --build build -j$(nproc) |
|
|
cmake --build build --target install |
|
|
cmake --build build --target install |
|
@@ -32,9 +32,24 @@ if [ ! -d libsndfile-1.2.0-win64 ]; then |
|
|
cp "libsndfile-1.2.0-win64/lib/sndfile.lib" $TEMP_PATH/lib |
|
|
cp "libsndfile-1.2.0-win64/lib/sndfile.lib" $TEMP_PATH/lib |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
find_dll() { |
|
|
|
|
|
filename=$(x86_64-w64-mingw32-gcc -print-file-name=$1) |
|
|
|
|
|
if [ -f $filename ]; then |
|
|
|
|
|
echo $filename |
|
|
|
|
|
else |
|
|
|
|
|
filename=$(x86_64-w64-mingw32-gcc -print-sysroot)/mingw/bin/$1 |
|
|
|
|
|
if [ -f $filename ]; then |
|
|
|
|
|
echo $filename |
|
|
|
|
|
else |
|
|
|
|
|
echo "Could not find $1" >&2 |
|
|
|
|
|
return 1 |
|
|
|
|
|
fi |
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
# Copy required GCC libs |
|
|
# Copy required GCC libs |
|
|
cp $(find /usr | grep libgcc_s_seh-1.dll | head -n 1) $TEMP_PATH/bin |
|
|
|
|
|
cp $(find /usr | grep libwinpthread-1.dll | head -n 1) $TEMP_PATH/bin |
|
|
|
|
|
|
|
|
cp $(find_dll file-name=libgcc_s_seh-1.dll) $TEMP_PATH/bin |
|
|
|
|
|
cp $(find_dll file-name=libwinpthread-1.dll) $TEMP_PATH/bin |
|
|
|
|
|
|
|
|
# Build aptdec |
|
|
# Build aptdec |
|
|
cmake -B $BUILD_DIR -DCMAKE_BUILD_TYPE=$1 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|
cmake -B $BUILD_DIR -DCMAKE_BUILD_TYPE=$1 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH |
|
|