mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
cherry pick Linux specific changes from 2.3 (#13205)
- add a new mode to build in docker - Improve AppImage 1. fix libbz2 soname differeence issue on appimage 2. Downgrade to 22.04 for better compatibility 3. improve appimage overall
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
APPIMAGETOOLURL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage"
|
||||
|
||||
|
||||
@@ -11,14 +11,13 @@ if [ -f /.dockerenv ] ; then # Only run if inside of a Docker Container
|
||||
sed '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' -i ../appimagetool.AppImage
|
||||
fi
|
||||
|
||||
sed -i -e 's#/usr#././#g' bin/@SLIC3R_APP_CMD@
|
||||
mv @SLIC3R_APP_CMD@ AppRun
|
||||
chmod +x AppRun
|
||||
|
||||
cp resources/images/@SLIC3R_APP_KEY@_192px.png @SLIC3R_APP_KEY@.png
|
||||
mkdir -p usr/share/icons/hicolor/192x192/apps
|
||||
cp resources/images/@SLIC3R_APP_KEY@_192px.png usr/share/icons/hicolor/192x192/apps/@SLIC3R_APP_KEY@.png
|
||||
cat <<EOF > @SLIC3R_APP_KEY@.desktop
|
||||
cat <<EOF > com.orcaslicer.@SLIC3R_APP_KEY@.desktop
|
||||
[Desktop Entry]
|
||||
Name=@SLIC3R_APP_KEY@
|
||||
Exec=AppRun %F
|
||||
@@ -28,13 +27,19 @@ Categories=Utility;
|
||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||
EOF
|
||||
|
||||
mkdir -p usr/share/applications
|
||||
cp com.orcaslicer.@SLIC3R_APP_KEY@.desktop usr/share/applications/
|
||||
|
||||
mkdir -p usr/share/metainfo
|
||||
cp @CMAKE_CURRENT_SOURCE_DIR@/scripts/flatpak/com.orcaslicer.@SLIC3R_APP_KEY@.metainfo.xml usr/share/metainfo/
|
||||
|
||||
|
||||
export ARCH=$(uname -m)
|
||||
|
||||
if [ -f /.dockerenv ] ; then # Only run if inside of a Docker Container
|
||||
../appimagetool.AppImage --appimage-extract-and-run . $([ ! -z "${container}" ] && echo '--appimage-extract-and-run')
|
||||
../appimagetool.AppImage --appimage-extract-and-run . $([ -n "${container}" ] && echo '--appimage-extract-and-run')
|
||||
else
|
||||
../appimagetool.AppImage . $([ ! -z "${container}" ] && echo '--appimage-extract-and-run')
|
||||
../appimagetool.AppImage . $([ -n "${container}" ] && echo '--appimage-extract-and-run')
|
||||
fi
|
||||
|
||||
mv @SLIC3R_APP_KEY@-$(uname -m).AppImage ${APP_IMAGE}
|
||||
|
||||
Reference in New Issue
Block a user