mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 11:29:00 +08:00
create appimage for ubuntu
This commit is contained in:
parent
7e9e4cb196
commit
245a39a18b
12
.github/workflows/ccpp_ubuntu.yml
vendored
12
.github/workflows/ccpp_ubuntu.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -72,8 +72,12 @@ jobs:
|
||||
- name: build appimage
|
||||
working-directory: ./build/package
|
||||
run: |
|
||||
chmod +x ../../src/platform/unix/build_appimage.sh "/home/runner/work/SuperSlicer/SuperSlicer"
|
||||
"../../src/platform/unix/build_appimage.sh SuperSlicer_${{ github.event.release.tag_name }}_ubu64_${{steps.date.outputs.date}}.AppImage"
|
||||
|
||||
chmod +x ../../src/platform/unix/build_appimage.sh
|
||||
../../src/platform/unix/build_appimage.sh SuperSlicer_ubu64.AppImage
|
||||
- name: Upload appimage
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: SuperSlicer-AppImage.tar
|
||||
path: build/package/SuperSlicer_ubu64.AppImage
|
||||
|
||||
|
28
src/platform/unix/build_appimage.sh
Normal file
28
src/platform/unix/build_appimage.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
APPIMAGETOOLURL="https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage"
|
||||
|
||||
|
||||
APP_IMAGE=$1
|
||||
|
||||
wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
|
||||
chmod +x ../appimagetool.AppImage
|
||||
|
||||
sed -i -e 's#/usr#././#g' bin/superslicer
|
||||
mv superslicer AppRun
|
||||
chmod +x AppRun
|
||||
|
||||
cp resources/icons/Slic3r_192px.png superslicer.png
|
||||
cat <<EOF > SuperSlicer.desktop
|
||||
[Desktop Entry]
|
||||
Name=SuperSlicer
|
||||
Exec=AppRun %F
|
||||
Icon=superslicer
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||
EOF
|
||||
|
||||
|
||||
../appimagetool.AppImage .
|
||||
mv SuperSlicer-x86_64.AppImage ${APP_IMAGE}
|
||||
chmod +x ${APP_IMAGE}
|
Loading…
x
Reference in New Issue
Block a user