OrcaSlicer/src/platform/unix/build_appimage.sh.in
DeftDawg f5a4862da5 Add Linux related build scripts
including following changes:
- Linux build scripts from SuperSlicer project;
- Update BuildLinux dev dependencies, remove unused bits;
- Update BuildLinuxImage to use nproc for cpus;
- CMake: render BuildLinuxImage and build_appimage templates;
- Fix "DSO missing" linking problems;
- Add Podman Containerfile for building;
- Update BuildLinux.sh to work better in container build;
- fixes to create AppImage inside container;
- add env to build environment;
- Update build instructions in Containerfile;

Change-Id: I73e30ab488cda8c1b0886cd34858e125596f282b
(cherry picked from commit 83fc26670ca592c91c7af1d4033a04b587cfd4cd)
2022-09-15 16:03:53 +08:00

30 lines
982 B
Bash

#!/bin/sh
APPIMAGETOOLURL="https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage"
APP_IMAGE="@SLIC3R_APP_KEY@_ubu64.AppImage"
wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
chmod +x ../appimagetool.AppImage
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
../appimagetool.AppImage . $([ ! -z "${container}" ] && echo '--appimage-extract-and-run')
mv @SLIC3R_APP_KEY@-x86_64.AppImage ${APP_IMAGE}
chmod +x ${APP_IMAGE}