Skip to content

Commit

Permalink
Add script to cross-compile for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
hckr committed Sep 5, 2017
1 parent e731451 commit 34d2c9a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ CMakeLists.txt.user
# dist folder except assets
dist/*
!dist/assets
dist-win32
22 changes: 22 additions & 0 deletions cross-compile-for-win32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

pushd . > /dev/null

cd "${0%/*}" # change cwd to script location

rm -rf dist-win32
mkdir dist-win32
cd dist-win32

cp -r ../dist/assets .
perl -pi -e 's/\n/\r\n/' assets/*.txt
perl -pi -e 's/\n/\r\n/' assets/levels/*

i686-w64-mingw32-cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel
make -j 4

find . -path '*[M|m]ake*' -delete

MINGW_BUNDLEDLLS_SEARCH_PATH=/usr/i686-w64-mingw32/bin mingw-bundledlls --copy space-logic-adventure.exe # https://github.com/mpreisler/mingw-bundledlls

popd > /dev/null

0 comments on commit 34d2c9a

Please sign in to comment.