mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 16:25:57 +08:00
Revise CircleCI, change build_appimage for icons, etc
This commit is contained in:
parent
fa55a89762
commit
20901cf652
@ -9,16 +9,50 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Build with CMake
|
name: Build with CMake
|
||||||
|
environment:
|
||||||
|
- CC=gcc
|
||||||
|
- CXX=g++
|
||||||
command: |
|
command: |
|
||||||
mkdir /build/build
|
mkdir /build/build
|
||||||
cd /build/cmake
|
cd /build/cmake
|
||||||
DCC=gcc CXX=g++ cmake /build -DCMAKE_INSTALL_PREFIX=/build.Slic3r -DCMAKE_PREFIX_PATH=/opt/dependencies/destdir/usr/local -DSLIC3R_STATIC=1 -DSLIC3R_BUILD_TESTS=OFF
|
cmake /build -DCMAKE_INSTALL_PREFIX=/build.Slic3r \
|
||||||
cmake --build . -j4
|
-DCMAKE_PREFIX_PATH=/opt/dependencies/destdir/usr/local \
|
||||||
|
-DSLIC3R_STATIC=1\
|
||||||
|
-DSLIC3R_BUILD_TESTS=OFF
|
||||||
|
make -j4 Slic3r
|
||||||
cmake --install .
|
cmake --install .
|
||||||
pushd /build.Slic3r
|
pushd /build.Slic3r
|
||||||
echo -e '#!/bin/bash\nDIR=$(readlink -f "$0" | xargs dirname)\nexport LD_LIBRARY_PATH="$DIR/bin"\nexec "$DIR/bin/Slic3r" "$@"' > /build.Slic3r/Slic3r
|
echo -e '#!/bin/bash\nDIR=$(readlink -f "$0" | xargs dirname)\nexport LD_LIBRARY_PATH="$DIR/bin"\nexec "$DIR/bin/Slic3r" "$@"' > /build.Slic3r/Slic3r
|
||||||
chmod u+x Slic3r
|
chmod u+x Slic3r
|
||||||
tar -czf /build/Slic3r.tar.gz .
|
tar -czf /build/Slic3r.tar.gz .
|
||||||
popd
|
popd
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: /build
|
||||||
|
paths:
|
||||||
|
- /build/Slic3r.tar.gz
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: /build/Slic3r.tar.gz
|
path: /build/Slic3r.tar.gz
|
||||||
|
package_appimage:
|
||||||
|
machine:
|
||||||
|
image: ubuntu-1604:202007-01
|
||||||
|
working_directory: /build
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Package AppImage
|
||||||
|
command: |
|
||||||
|
chmod +x /build/src/platform/unix/build_appimage.sh
|
||||||
|
pushd /tmp/workspace
|
||||||
|
tar -xzf Slic3r.tar.gz
|
||||||
|
/build/src/platform/unix/build_appimage.sh /build/Slic3r.AppImage
|
||||||
|
- store_artifacts:
|
||||||
|
path: /build/Slic3r.AppImage
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build_and_package:
|
||||||
|
jobs:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- package_appimage
|
||||||
|
@ -3,11 +3,11 @@ Name=Slic3r
|
|||||||
GenericName=3D Printing Software
|
GenericName=3D Printing Software
|
||||||
Comment=G-code generator for 3D printers
|
Comment=G-code generator for 3D printers
|
||||||
Icon=Slic3r
|
Icon=Slic3r
|
||||||
Exec=superslicer %F
|
Exec=Slic3r %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||||
Categories=Graphics;3DGraphics;Engineering;
|
Categories=Graphics;3DGraphics;Engineering;
|
||||||
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
|
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
StartupWMClass=superslicer
|
StartupWMClass=Slic3r
|
||||||
|
@ -7,16 +7,16 @@ APP_IMAGE=$1
|
|||||||
wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
|
wget ${APPIMAGETOOLURL} -O ../appimagetool.AppImage
|
||||||
chmod +x ../appimagetool.AppImage
|
chmod +x ../appimagetool.AppImage
|
||||||
|
|
||||||
sed -i -e 's#/usr#././#g' bin/superslicer
|
sed -i -e 's#/usr#././#g' bin/Slic3r
|
||||||
mv superslicer AppRun
|
mv Slic3r AppRun
|
||||||
chmod +x AppRun
|
chmod +x AppRun
|
||||||
|
|
||||||
cp resources/icons/Slic3r_192px.png superslicer.png
|
cp resources/icons/Slic3r_192px.png Slic3r.png
|
||||||
cat <<EOF > Slic3r.desktop
|
cat <<EOF > Slic3r.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Slic3r
|
Name=Slic3r
|
||||||
Exec=AppRun %F
|
Exec=AppRun %F
|
||||||
Icon=superslicer
|
Icon=Slic3r
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Utility;
|
Categories=Utility;
|
||||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user