Skip to content

Commit

Permalink
add helpful build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bazz1tv committed Apr 1, 2022
1 parent a23c8ca commit f1574b1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions opt/build-win32-cross.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# 64-bit Windows cross build script

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' ')"

version="${version_major}.${version_minor}.${version_micro}"

echo "v${version}"

make clean
prefix=/usr/i686-w64-mingw32/usr CROSS_COMPILE=i686-w64-mingw32- make clean
prefix=/usr/i686-w64-mingw32/usr CROSS_COMPILE=i686-w64-mingw32- make
cp /usr/i686-w64-mingw32/usr/{bin/SDL2.dll,lib/libboost_filesystem.dll} \
/usr/lib/gcc/i686-w64-mingw32/9.3.0/{libgcc_s_sjlj-1.dll,libstdc++-6.dll} pc/bin
pushd pc
cp -r bin SNES\ Tracker\ v${version}-Win32
cd SNES\ Tracker\ v${version}-Win32
rm std.exe st.exe
popd

echo "v${version}"
echo "Remember to put in a README File bro!"
24 changes: 24 additions & 0 deletions opt/build-win64-cross.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# 64-bit Windows cross build script

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' ')"

version="${version_major}.${version_minor}.${version_micro}"

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
pushd pc
cp -r bin SNES\ Tracker\ v${version}-Win64
cd SNES\ Tracker\ v${version}-Win64
rm std.exe st.exe
popd

echo "v${version}"
echo "Remember to put in a README File bro!"

0 comments on commit f1574b1

Please sign in to comment.