Skip to content

fix dm change without level crash #151

fix dm change without level crash

fix dm change without level crash #151

Workflow file for this run

name: Build and package for linux
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
BUILD_TYPE: Release
LOVE_ARTIFACT_URL: "https://api.github.com/repos/love2d/love/actions/artifacts/1142100887/zip"
jobs:
build:
# should be as old as possible
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Build sqlite3
run: |
wget https://www.sqlite.org/2023/sqlite-amalgamation-3430100.zip
7z x sqlite-amalgamation-3430100.zip
mkdir lib
gcc -shared -fPIC sqlite-amalgamation-3430100/sqlite3.c -o lib/libsqlite3.so
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVIDEO_EXPORT=0
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install .
- name: Create App image
run: |
# required for app image creation
sudo apt install desktop-file-utils
# create directory (git doesn't push empty directories)
mkdir -p extra/linux/squashfs-root/share/games/oh3
cp -r *.lua assets compat extlibs game game_handler server ui input_schemes extra/linux/squashfs-root/share/games/oh3
# extract love over everything
cd extra/linux
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --output love12.zip --url "${{ env.LOVE_ARTIFACT_URL }}"
7z x love12.zip
chmod +x love-*.AppImage
./love-*.AppImage --appimage-extract
# put libs in their place
cp ../../lib/luv.so squashfs-root/share/games/oh3
cp ../../lib/libsqlite3.so squashfs-root/lib
# remove unneeded parts
rm -r squashfs-root/share/applications/ squashfs-root/share/icons/ squashfs-root/share/lua squashfs-root/share/mime/ squashfs-root/share/pixmaps/ squashfs-root/love.desktop squashfs-root/love.svg
# replace AppRun with custom one
mv squashfs-root/AppRun_replace squashfs-root/AppRun
# use appimagetool to create app image
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage squashfs-root oh3.AppImage
- name: Upload artifact
uses: actions/[email protected]
with:
name: oh3.AppImage
path: extra/linux/oh3.AppImage