Skip to content

Commit d463d38

Browse files
committed
update build scripts for Native Windows (Mingw64)
1 parent ece218a commit d463d38

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

opt/build-win64-cross.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22
# 64-bit Windows cross build script
33

4+
# Libs
5+
# Default value: libs used on my Linux machine
6+
# Can be overridden.
7+
libs=${libs:-"$(echo -n /usr/x86_64-w64-mingw32/usr/{bin/SDL2.dll,lib/libboost_filesystem.dll} \
8+
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/{libgcc_s_seh-1.dll,libstdc++-6.dll})"}
9+
410
version_major="$(grep "APP_VER_MAJOR " pc/shared/Organization.h | cut -f3 -d' ')"
511
version_minor="$(grep "APP_VER_MINOR " pc/shared/Organization.h | cut -f3 -d' ')"
612
version_micro="$(grep "APP_VER_MICRO " pc/shared/Organization.h | cut -f3 -d' ')"
@@ -11,12 +17,12 @@ echo "v${version}"
1117

1218
make clean
1319
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make clean
14-
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make
15-
cp /usr/x86_64-w64-mingw32/usr/{bin/SDL2.dll,lib/libboost_filesystem.dll} \
16-
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/{libgcc_s_seh-1.dll,libstdc++-6.dll} pc/bin
20+
prefix=/usr/x86_64-w64-mingw32/usr CROSS_COMPILE=x86_64-w64-mingw32- make -j10
21+
cp $libs pc/bin
1722
pushd pc
18-
cp -r bin SNES\ Tracker\ v${version}-Win64
19-
cd SNES\ Tracker\ v${version}-Win64
23+
mkdir -p "SNES Tracker v${version}-Win64"
24+
cp -r bin/* "SNES Tracker v${version}-Win64"
25+
cd "SNES Tracker v${version}-Win64"
2026
rm std.exe st.exe
2127
popd
2228

opt/build-win64-native.sh

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

0 commit comments

Comments
 (0)