Fix generation appimage (#588)

* Update main.yml

* Update main.yml

* Update linux-compile.yml

* Update linux-compile.yml

* fix an error
This commit is contained in:
coco875 2025-12-10 01:41:11 +01:00 committed by GitHub
parent 5b79a1c910
commit e6acb59ef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 6 deletions

View File

@ -102,9 +102,14 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-linux && \
cmake --build build --parallel
cmake --build build --parallel && \
make -C torch type=release -j\$(nproc) && \
torch/cmake-build-release/torch pack assets build/spaghetti.o2r o2r
"
- name: Fix permissions
run: sudo chown -R $(id -u):$(id -g) build
- name: Generate AppImage
run: |
docker run --rm \
@ -118,7 +123,6 @@ jobs:
- name: Create Package
run: |
mkdir -p spaghetti-${{ matrix.config }}
cp build/Spaghettify spaghetti-${{ matrix.config }}/ || true
wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
mv gamecontrollerdb.txt spaghetti-${{ matrix.config }}/
cp build/*.appimage spaghetti-${{ matrix.config }}/ 2>/dev/null || true

View File

@ -371,7 +371,8 @@ jobs:
- name: Build spaghetti
run: docker run --rm -v ${PWD}:/project spaghetti cmake --build build-cmake --config ${{ matrix.config }} -j$(nproc)
build-docker:
build-linux-release-docker:
needs: generate-port-o2r
runs-on: ubuntu-latest
strategy:
matrix:
@ -422,6 +423,15 @@ jobs:
cmake --build build --parallel
"
- name: Fix permissions
run: sudo chown -R $(id -u):$(id -g) build
- name: Download spaghetti.o2r
uses: actions/download-artifact@v4
with:
name: spaghetti.o2r
path: ./build
- name: Generate AppImage
run: |
docker run --rm \
@ -435,7 +445,6 @@ jobs:
- name: Create Package
run: |
mkdir -p spaghetti-${{ matrix.config }}
cp build/Spaghettify spaghetti-${{ matrix.config }}/ || true
wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
mv gamecontrollerdb.txt spaghetti-${{ matrix.config }}/
cp build/*.appimage spaghetti-${{ matrix.config }}/ 2>/dev/null || true

View File

@ -1280,7 +1280,20 @@ void spawn_single_player_camera(u32 mode) {
void spawn_multiplayer_cameras(u32 mode) {
Camera* camera;
for (size_t i = 0; i < gPlayerCountSelection1; i++) {
size_t screens = 0;
switch(gActiveScreenMode) {
case SCREEN_MODE_1P:
screens = 1;
break;
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
screens = 2;
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
screens = 4;
break;
}
for (size_t i = 0; i < screens; i++) {
Vec3f spawn = {gPlayers[i].pos[0], gPlayers[i].pos[1], gPlayers[i].pos[2]};
camera = CM_AddCamera(spawn, gPlayers[i].rotation[1], mode);
if (camera) {
@ -1291,7 +1304,7 @@ void spawn_multiplayer_cameras(u32 mode) {
}
for (size_t i = 0; i < gPlayerCountSelection1; i++) {
for (size_t i = 0; i < screens; i++) {
Vec3f spawn = {gPlayers[i].pos[0], gPlayers[i].pos[1], gPlayers[i].pos[2]};
camera = CM_AddLookBehindCamera(spawn, gPlayers[i].rotation[1], mode);
if (camera) {