Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AiraYumi committed Apr 11, 2024
1 parent 66752cb commit 0c2ca99
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ source_environment_tempfile="$stage/source_environment.sh"
# Restore all .sos
restore_sos ()
{
for solib in "${stage}"/packages/lib/{debug,release}/lib*.so*.disable; do
for solib in "${stage}"/packages/lib64/{debug,release}/lib*.so*.disable; do
if [ -f "$solib" ]; then
mv -f "$solib" "${solib%.disable}"
fi
Expand All @@ -45,8 +45,8 @@ case "$AUTOBUILD_PLATFORM" in
load_vsvars

mkdir -p "$stage/include/SDL3"
mkdir -p "$stage/lib/debug"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/lib64/debug"
mkdir -p "$stage/lib64/release"

mkdir -p "build_debug"
pushd "build_debug"
Expand All @@ -60,8 +60,8 @@ case "$AUTOBUILD_PLATFORM" in
ctest -C Debug
fi

cp $stage/debug/bin/*.dll $stage/lib/debug/
cp $stage/debug/lib/*.lib $stage/lib/debug/
cp $stage/debug/bin/*.dll $stage/lib64/debug/
cp $stage/debug/lib64/*.lib $stage/lib64/debug/
popd

mkdir -p "build_release"
Expand All @@ -76,8 +76,8 @@ case "$AUTOBUILD_PLATFORM" in
ctest -C Release
fi

cp $stage/release/bin/*.dll $stage/lib/release/
cp $stage/release/lib/*.lib $stage/lib/release/
cp $stage/release/bin/*.dll $stage/lib64/release/
cp $stage/release/lib64/*.lib $stage/lib64/release/
cp $stage/release/include/SDL3/*.h $stage/include/SDL3/
popd
;;
Expand All @@ -102,8 +102,8 @@ case "$AUTOBUILD_PLATFORM" in
RELEASE_LDFLAGS="$ARCH_FLAGS $SDK_FLAGS -Wl,-headerpad_max_install_names"

mkdir -p "$stage/include/SDL3"
mkdir -p "$stage/lib/debug"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/lib64/debug"
mkdir -p "$stage/lib64/release"

PREFIX_DEBUG="$stage/temp_debug"
PREFIX_RELEASE="$stage/temp_release"
Expand Down Expand Up @@ -173,18 +173,18 @@ case "$AUTOBUILD_PLATFORM" in

cp -a $PREFIX_RELEASE/include/SDL3/*.* $stage/include/SDL3

cp -a $PREFIX_DEBUG/lib/*.dylib* $stage/lib/debug
cp -a $PREFIX_DEBUG/lib/libSDL3_test.a $stage/lib/debug
cp -a $PREFIX_DEBUG/lib64/*.dylib* $stage/lib64/debug
cp -a $PREFIX_DEBUG/lib64/libSDL3_test.a $stage/lib64/debug

cp -a $PREFIX_RELEASE/lib/*.dylib* $stage/lib/release
cp -a $PREFIX_RELEASE/lib/libSDL3_test.a $stage/lib/release
cp -a $PREFIX_RELEASE/lib64/*.dylib* $stage/lib64/release
cp -a $PREFIX_RELEASE/lib64/libSDL3_test.a $stage/lib64/release

pushd "${stage}/lib/debug"
pushd "${stage}/lib64/debug"
fix_dylib_id "libSDL3d.dylib"
strip -x -S libSDL3d.dylib
popd

pushd "${stage}/lib/release"
pushd "${stage}/lib64/release"
fix_dylib_id "libSDL3.dylib"
strip -x -S libSDL3.dylib
popd
Expand Down Expand Up @@ -217,8 +217,8 @@ case "$AUTOBUILD_PLATFORM" in
RELEASE_CPPFLAGS="-DPIC"

mkdir -p "$stage/include/SDL3"
mkdir -p "$stage/lib/debug"
mkdir -p "$stage/lib/release"
mkdir -p "$stage/lib64/debug"
mkdir -p "$stage/lib64/release"

PREFIX_DEBUG="$stage/temp_debug"
PREFIX_RELEASE="$stage/temp_release"
Expand All @@ -238,7 +238,7 @@ case "$AUTOBUILD_PLATFORM" in
# Force static linkage to libz by moving .sos out of the way
# (Libz is only packaging statics right now but keep this working.)
trap restore_sos EXIT
for solib in "${stage}"/packages/lib/{debug,release}/libz.so*; do
for solib in "${stage}"/packages/lib64/{debug,release}/libz.so*; do
if [ -f "$solib" ]; then
mv -f "$solib" "$solib".disable
fi
Expand Down Expand Up @@ -274,11 +274,11 @@ case "$AUTOBUILD_PLATFORM" in

cp -a $PREFIX_RELEASE/include/SDL3/*.* $stage/include/SDL3

cp -a $PREFIX_DEBUG/lib/*.so* $stage/lib/debug
cp -a $PREFIX_DEBUG/lib/libSDL3_test.a $stage/lib/debug
cp -a $PREFIX_DEBUG/lib64/*.so* $stage/lib64/debug
cp -a $PREFIX_DEBUG/lib64/libSDL3_test.a $stage/lib64/debug

cp -a $PREFIX_RELEASE/lib/*.so* $stage/lib/release
cp -a $PREFIX_RELEASE/lib/libSDL3_test.a $stage/lib/release
cp -a $PREFIX_RELEASE/lib64/*.so* $stage/lib64/release
cp -a $PREFIX_RELEASE/lib64/libSDL3_test.a $stage/lib64/release
;;

*)
Expand All @@ -287,7 +287,7 @@ case "$AUTOBUILD_PLATFORM" in
esac
popd

SDL_VERSION=$(sed -n -e 's/^Version: //p' "$TOP/$SDL_SOURCE_DIR/sdl3.pc")
SDL_VERSION=$(sed -n -e 's/^Version: //p' "$TOP/$SDL_SOURCE_DIR/build_release/sdl3.pc")

mkdir -p "$stage/LICENSES"
cp "$TOP/$SDL_SOURCE_DIR/LICENSE.txt" "$stage/LICENSES/SDL3.txt"
Expand Down

0 comments on commit 0c2ca99

Please sign in to comment.