mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 05:38:27 +08:00
Feature/flatpak improvement (#7692)
# Description <!-- > Please provide a summary of the changes made in this PR. Include details such as: > * What issue does this PR address or fix? > * What new features or enhancements does this PR introduce? > * Are there any breaking changes or dependencies that need to be considered? --> # Screenshots/Recordings/Graphs <!-- > Please attach relevant screenshots to showcase the UI changes. > Please attach images that can help explain the changes. --> ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. -->
This commit is contained in:
commit
83eb1366c7
39
.github/workflows/build_all.yml
vendored
39
.github/workflows/build_all.yml
vendored
@ -63,18 +63,47 @@ jobs:
|
|||||||
flatpak:
|
flatpak:
|
||||||
name: "Flatpak"
|
name: "Flatpak"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
date:
|
||||||
|
ver:
|
||||||
|
ver_pure:
|
||||||
container:
|
container:
|
||||||
image: bilelmoussaoui/flatpak-github-actions:gnome-46
|
image: bilelmoussaoui/flatpak-github-actions:gnome-46
|
||||||
options: --privileged
|
options: --privileged
|
||||||
|
volumes:
|
||||||
|
- /usr/local/lib/android:/usr/local/lib/android
|
||||||
|
- /usr/share/dotnet:/usr/share/dotnet
|
||||||
|
- /opt/ghc:/opt/ghc1
|
||||||
|
- /usr/local/share/boost:/usr/local/share/boost1
|
||||||
steps:
|
steps:
|
||||||
# maybe i'm too dumb and fucked up to do CI. OH WELL :D -ppd
|
|
||||||
- name: "Remove unneeded stuff to free disk space"
|
- name: "Remove unneeded stuff to free disk space"
|
||||||
run:
|
run:
|
||||||
sudo rm -rf /usr/share/dotnet /opt/ghc "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY"
|
sudo rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Get the version and date
|
||||||
|
run: |
|
||||||
|
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
ver="PR-${{ github.event.number }}"
|
||||||
|
else
|
||||||
|
ver=V$ver_pure
|
||||||
|
fi
|
||||||
|
echo "ver=$ver" >> $GITHUB_ENV
|
||||||
|
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||||
|
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
with:
|
with:
|
||||||
bundle: orcaslicer.flatpak
|
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak
|
||||||
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
|
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
|
||||||
cache-key: flatpak-builder-${{ github.sha }}
|
cache: true
|
||||||
cache: false
|
- name: Deploy Flatpak to nightly release
|
||||||
|
if: ${{github.ref == 'refs/heads/main'}}
|
||||||
|
uses: WebFreak001/deploy-nightly@v3.1.0
|
||||||
|
with:
|
||||||
|
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||||
|
release_id: 137995723
|
||||||
|
asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak
|
||||||
|
asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||||
|
10
.github/workflows/build_orca.yml
vendored
10
.github/workflows/build_orca.yml
vendored
@ -257,8 +257,8 @@ jobs:
|
|||||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||||
run: |
|
run: |
|
||||||
./BuildLinux.sh -isr
|
./BuildLinux.sh -isr
|
||||||
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||||
chmod +x ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||||
|
|
||||||
- name: Build orca_custom_preset_tests
|
- name: Build orca_custom_preset_tests
|
||||||
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
|
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
|
||||||
@ -277,7 +277,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||||
path: './build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
|
path: './build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
|
||||||
|
|
||||||
- name: Deploy Ubuntu release
|
- name: Deploy Ubuntu release
|
||||||
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||||
@ -287,8 +287,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
|
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||||
release_id: 137995723
|
release_id: 137995723
|
||||||
asset_path: ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||||
asset_name: OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<description>
|
<description>
|
||||||
<p>A 3D printer slicer forked from Bambu Studio, PrusaSlicer, and SuperSlicer with many more printer profiles, helpful calibration prints, and many more features to get your 3D printer printing perfectly!</p>
|
<p>A powerful, free and open-source 3D printer slicer that features cutting-edge technology.</p>
|
||||||
</description>
|
</description>
|
||||||
<branding>
|
<branding>
|
||||||
<color type="primary" scheme_preference="light">#009688</color>
|
<color type="primary" scheme_preference="light">#009688</color>
|
||||||
|
15
flatpak/setup_env_ubuntu24.04.sh
Executable file
15
flatpak/setup_env_ubuntu24.04.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install build-essential flatpak flatpak-builder gnome-software-plugin-flatpak -y
|
||||||
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
flatpak install flathub org.gnome.Platform//46 org.gnome.Sdk//46
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# in OrcaSlicer folder, run following command to build Orca
|
||||||
|
# # First time build
|
||||||
|
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user --force-clean build-dir flatpak/io.github.softfever.OrcaSlicer.yml
|
||||||
|
|
||||||
|
# # Subsequent builds (only rebuilding OrcaSlicer)
|
||||||
|
# flatpak-builder --state-dir=.flatpak-builder --keep-build-dirs --user build-dir flatpak/io.github.softfever.OrcaSlicer.yml --build-only=OrcaSlicer
|
Loading…
x
Reference in New Issue
Block a user