2025-03-29 19:31:56 +09:00

50 lines
1.7 KiB
YAML

name: "Build NishBox"
on:
workflow_dispatch:
inputs:
release:
description: "release or not"
type: boolean
default: true
required: true
concurrency:
group: "build"
cancel-in-progress: true
jobs:
build-win32:
name: "Build for Windows 32-bit"
runs-on: ubuntu-latest
env:
ARCH: i686
BITS: 32
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install packages
run: sudo apt-get install mingw-w64
- name: Get my CMake files
run: git clone https://github.com/nishiowo/cmake cmake-files --depth=1
- name: Get and extract ODE
run: wget https://sourceforge.net/projects/opende/files/ODE/0.13/ode-0.13.tar.gz/download -O - | tar xvzf -
- name: Build ODE
run: cd ode-0.13 && ./configure --host=${{env.ARCH}}-w64-mingw32 --prefix=/ --disable-demos --without-drawstuff --enable-shared && make -j4
- name: Install ODE
run: make -C ode-0.13 install DESTDIR=`pwd`/deps
- name: Get Pawn
run: git clone https://github.com/nishiowo/pawn --depth=1
- name: Build Pawn
run: cd pawn && mkdir build && cd build && cmake -DDEBIAN=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake-files/windows.cmake -DARCH=${{env.ARCH}} .. -DCMAKE_INSTALL_PREFIX=/ && make -j4
- name: Install Pawn
run: make -C pawn/build install DESTDIR=`pwd`/deps
- name: Build NishBox
run: make PLATFORM=win${{env.BITS}}
- name: Copy DLL
run: cp `${{env.ARCH}}-w64-mingw32-gcc -print-file-name=libstdc++-6.dll` ./ && cp `${{env.ARCH}}-w64-mingw32-gcc -print-file-name=libgcc_s_seh-1.dll` ./ && cp deps/bin/*.dll ./