mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Refactor folder (#10475)
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
This commit is contained in:
39
src/dev-utils/platform/unix/build_appimage.sh.in
Normal file
39
src/dev-utils/platform/unix/build_appimage.sh.in
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
APPIMAGETOOLURL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage"
|
||||
|
||||
|
||||
APP_IMAGE="@SLIC3R_APP_KEY@_Linux_V@SoftFever_VERSION@.AppImage"
|
||||
|
||||
wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
|
||||
chmod +x ../appimagetool.AppImage
|
||||
|
||||
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
|
||||
[Desktop Entry]
|
||||
Name=@SLIC3R_APP_KEY@
|
||||
Exec=AppRun %F
|
||||
Icon=@SLIC3R_APP_KEY@
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||
EOF
|
||||
|
||||
|
||||
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')
|
||||
else
|
||||
../appimagetool.AppImage . $([ ! -z "${container}" ] && echo '--appimage-extract-and-run')
|
||||
fi
|
||||
|
||||
mv @SLIC3R_APP_KEY@-$(uname -m).AppImage ${APP_IMAGE}
|
||||
chmod +x ${APP_IMAGE}
|
||||
Reference in New Issue
Block a user