Skip to content

Fixed the SDL main entry point when using MSVC #20

Fixed the SDL main entry point when using MSVC

Fixed the SDL main entry point when using MSVC #20

Workflow file for this run

name: Build - Windows
on: [push, pull_request, workflow_dispatch]
jobs:
mingw:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: Install repo dependencies
run: |
sudo apt-get update && sudo apt-get install -y g++-mingw-w64 gettext
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
- name: Install prebuilt dependencies
run: curl -L 'https://github.com/mmatyas/openblok/releases/download/v0.6.0/windep.tar.xz' | sudo tar xJf - -C /opt/
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure
run: cmake
-DCMAKE_BUILD_TYPE=Release
-DINSTALL_PORTABLE=ON
-DCMAKE_INSTALL_PREFIX=/
-DCMAKE_CXX_FLAGS=-I/opt/sdl2/include
-DCMAKE_TOOLCHAIN_FILE=/opt/toolchain.cmake
-DCMAKE_EXE_LINKER_FLAGS='-static-libgcc -static-libstdc++'
- name: Build
run: make VERBOSE=1
- name: Deploy
run: |
make install DESTDIR=$PWD/install
i686-w64-mingw32-objdump -p install/openblok.exe | grep 'DLL Name' | sort
cp -av ./*.md /opt/sdl2/bin/*.dll /usr/i686-w64-mingw32/lib/libwinpthread-1.dll install/
(cd install && rm libFLAC* libmod* libopus* libtiff* libwebp*)
mv install openblok && zip -r openblok.zip openblok
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: openblok.zip