Skip to content

Commit

Permalink
update build scripts for Native Windows (Mingw64)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazz1tv committed Apr 1, 2022
1 parent ece218a commit d463d38
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
16 changes: 11 additions & 5 deletions opt/build-win64-cross.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
# 64-bit Windows cross build script

# Libs
# Default value: libs used on my Linux machine
# Can be overridden.
libs=${libs:-"$(echo -n /usr/x86_64-w64-mingw32/usr/{bin/SDL2.dll,lib/libboost_filesystem.dll} \
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/{libgcc_s_seh-1.dll,libstdc++-6.dll})"}

version_major="$(grep "APP_VER_MAJOR " pc/shared/Organization.h | cut -f3 -d' ')"
version_minor="$(grep "APP_VER_MINOR " pc/shared/Organization.h | cut -f3 -d' ')"
version_micro="$(grep "APP_VER_MICRO " pc/shared/Organization.h | cut -f3 -d' ')"
Expand All @@ -11,12 +17,12 @@ echo "v${version}"

make clean
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make clean
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make
cp /usr/x86_64-w64-mingw32/usr/{bin/SDL2.dll,lib/libboost_filesystem.dll} \
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/{libgcc_s_seh-1.dll,libstdc++-6.dll} pc/bin
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make -j10
cp $libs pc/bin
pushd pc
cp -r bin SNES\ Tracker\ v${version}-Win64
cd SNES\ Tracker\ v${version}-Win64
mkdir -p "SNES Tracker v${version}-Win64"
cp -r bin/* "SNES Tracker v${version}-Win64"
cd "SNES Tracker v${version}-Win64"
rm std.exe st.exe
popd

Expand Down
6 changes: 6 additions & 0 deletions opt/build-win64-native.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# 64-bit Windows cross build script
# Calls the 64-bit cross script but with specific libs from my win10 machine
libs="$(echo -n /mingw64/bin/{libstdc++-6.dll,libgcc_s_seh-1.dll} \
/mingw64/x86_64-w64-mingw32/{lib/libboost_*-*.dll,bin/SDL2.dll} \
/mingw64/bin/libwinpthread-1.dll)" opt/build-win64-cross.sh

0 comments on commit d463d38

Please sign in to comment.