Skip to content

Commit

Permalink
Merge branch 'main' into enh-open-ps-links
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocraftyone authored Mar 18, 2024
2 parents d04df7f + a9d23a2 commit 230cc7c
Show file tree
Hide file tree
Showing 474 changed files with 13,469 additions and 5,593 deletions.
Empty file added .gitattributes
Empty file.
6 changes: 4 additions & 2 deletions .github/workflows/build_check_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
valid-cache: ${{ steps.cache_deps.outputs.cache-hit }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: 'true'

- name: set outputs
id: set_outputs
Expand All @@ -38,7 +40,7 @@ jobs:
- name: load cache
id: cache_deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.set_outputs.outputs.cache-path }}
key: ${{ steps.set_outputs.outputs.cache-key }}
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ jobs:

# Setup the environment
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: 'true'

- name: load cached deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}

- name: setup dev on Windows
if: inputs.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2

- name: Get the date on Ubuntu and macOS
if: inputs.os != 'windows-latest'
Expand Down Expand Up @@ -70,12 +72,12 @@ jobs:
if: inputs.os == 'macos-12'
working-directory: ${{ github.workspace }}
run: |
brew install cmake git gettext automake texinfo
brew install cmake git gettext automake texinfo ninja
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
brew uninstall --ignore-dependencies zstd
./build_release_macos.sh -dp -a ${{ inputs.arch }} -t 10.15
./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15
brew install zstd
Expand All @@ -101,21 +103,21 @@ jobs:
# Upload Artifacts
- name: Upload Mac ${{ inputs.arch }} artifacts
if: inputs.os == 'macos-12'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
path: ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep*.tar.gz

- name: Upload Windows artifacts
if: inputs.os == 'windows-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_win64_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip

- name: Upload Ubuntu artifacts
if: inputs.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: 'true'

- name: load cached deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
Expand Down Expand Up @@ -75,7 +77,7 @@ jobs:
- name: Install tools mac
if: inputs.os == 'macos-12'
run: |
brew install cmake git gettext tree
brew install cmake git gettext tree ninja
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}}
Expand All @@ -85,7 +87,7 @@ jobs:
if: inputs.os == 'macos-12'
working-directory: ${{ github.workspace }}
run: |
./build_release_macos.sh -s -n -a ${{inputs.arch}} -t 10.15
./build_release_macos.sh -s -n -x -a ${{inputs.arch}} -t 10.15
# Thanks to RaySajuuk, it's working now
- name: Sign app and notary
Expand Down Expand Up @@ -123,14 +125,14 @@ jobs:
- name: Upload artifacts mac
if: inputs.os == 'macos-12'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}
path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg

- name: Deploy Mac release
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-12'
uses: WebFreak001/deploy-nightly@v3.0.0
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
Expand All @@ -142,7 +144,7 @@ jobs:
# Windows
- name: setup MSVC
if: inputs.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2

- name: Install nsis
if: inputs.os == 'windows-latest'
Expand Down Expand Up @@ -175,28 +177,28 @@ jobs:

- name: Upload artifacts Win zip
if: inputs.os == 'windows-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Windows_${{ env.ver }}_portable
path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip

- name: Upload artifacts Win installer
if: inputs.os == 'windows-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Windows_${{ env.ver }}
path: ${{ github.workspace }}/build/OrcaSlicer*.exe

- name: Upload artifacts Win PDB
if: inputs.os == 'windows-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: PDB
path: ${{ github.workspace }}/build/src/Release/Debug_PDB_${{ env.ver }}_for_developers_only.7z

- name: Deploy Windows release portable
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v3.0.0
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
Expand All @@ -207,7 +209,7 @@ jobs:

- name: Deploy Windows release installer
if: github.ref == 'refs/heads/main' && inputs.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@v3.0.0
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
Expand Down Expand Up @@ -256,14 +258,14 @@ jobs:
- name: Upload artifacts Ubuntu
if: inputs.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Linux_${{ env.ver }}
path: './build/OrcaSlicer_Linux_${{ env.ver }}.AppImage'

- name: Deploy Ubuntu release
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
uses: WebFreak001/deploy-nightly@v3.0.0
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
Expand All @@ -274,7 +276,7 @@ jobs:

- name: Deploy orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
uses: WebFreak001/deploy-nightly@v3.0.0
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install gettext
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# download
- name: Download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs_to_wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# 1. Clone the current wiki master branch to a folder named `tmp_wiki`
- name: Pull content from wiki
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
add_compile_options(-Wno-deprecated-declarations)
endif()

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 15)
add_compile_options(-Wno-error=enum-constexpr-conversion)
endif()

#GCC generates loads of -Wunknown-pragmas when compiling igl. The fix is not easy due to a bug in gcc, see
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943 or
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
Expand Down
16 changes: 16 additions & 0 deletions DockerBuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
PROJECT_ROOT=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")

set -x

# Wishlist hint: For developers, creating a Docker Compose
# setup with persistent volumes for the build & deps directories
# would speed up recompile times significantly. For end users,
# the simplicity of a single Docker image and a one-time compilation
# seems better.
docker build -t orcaslicer \
--build-arg USER=$USER \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg NCORES=$NCORES \
$PROJECT_ROOT
25 changes: 25 additions & 0 deletions DockerRun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -x
# Just in case, here's some other things that might help:
# Force the container's hostname to be the same as your workstation
# -h $HOSTNAME \
# If there's problems with the X display, try this
# -v /tmp/.X11-unix:/tmp/.X11-unix \
docker run \
`# Use the hosts networking. Printer wifi and also dbus communication` \
--net=host \
`# Some X installs will not have permissions to talk to sockets for shared memory` \
--ipc host \
`# Run as your workstations username to keep permissions the same` \
-u $USER \
`# Bind mount your home directory into the container for loading/saving files` \
-v $HOME:/home/$USER \
`# Pass the X display number to the container` \
-e DISPLAY=$DISPLAY \
`# It seems that libGL and dbus things need privileged mode` \
--privileged=true \
`# Attach tty for running orca slicer with command line things` \
-ti \
`# Pass all parameters from this script to the orca slicer ENTRYPOINT binary` \
orcaslicer $*

95 changes: 95 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
FROM docker.io/ubuntu:22.04
LABEL maintainer "DeftDawg <[email protected]>"

# Disable interactive package configuration
RUN apt-get update && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Add a deb-src
RUN echo deb-src http://archive.ubuntu.com/ubuntu \
$(cat /etc/*release | grep VERSION_CODENAME | cut -d= -f2) main universe>> /etc/apt/sources.list

RUN apt-get update && apt-get install -y \
autoconf \
build-essential \
cmake \
curl \
eglexternalplatform-dev \
extra-cmake-modules \
file \
git \
gstreamer1.0-plugins-bad \
gstreamer1.0-libav \
libcairo2-dev \
libcurl4-openssl-dev \
libdbus-1-dev \
libglew-dev \
libglu1-mesa-dev \
libglu1-mesa-dev \
libgstreamer1.0-dev \
libgstreamerd-3-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-good1.0-dev \
libgtk-3-dev \
libgtk-3-dev \
libosmesa6-dev \
libsecret-1-dev \
libsoup2.4-dev \
libssl3 \
libssl-dev \
libudev-dev \
libwayland-dev \
libwebkit2gtk-4.0-dev \
libxkbcommon-dev \
locales \
locales-all \
m4 \
pkgconf \
sudo \
wayland-protocols \
wget

# Change your locale here if you want. See the output
# of `locale -a` to pick the correct string formatting.
ENV LC_ALL=en_US.utf8
RUN locale-gen $LC_ALL

# Set this so that Orca Slicer doesn't complain about
# the CA cert path on every startup
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

COPY ./ OrcaSlicer

WORKDIR OrcaSlicer

# These can run together, but we run them seperate for podman caching
# Update System dependencies
RUN ./BuildLinux.sh -u

# Build dependencies in ./deps
RUN ./BuildLinux.sh -d; exit 0

RUN apt-get install -y libcgal-dev
# Build slic3r
RUN ./BuildLinux.sh -s

# Build AppImage
ENV container podman
RUN ./BuildLinux.sh -i

# It's easier to run Orca Slicer as the same username,
# UID and GID as your workstation. Since we bind mount
# your home directory into the container, it's handy
# to keep permissions the same. Just in case, defaults
# are root.
SHELL ["/bin/bash", "-l", "-c"]
ARG USER=root
ARG UID=0
ARG GID=0
RUN [[ "$UID" != "0" ]] \
&& groupadd -f -g $GID $USER \
&& useradd -u $UID -g $GID $USER

# Using an entrypoint instead of CMD because the binary
# accepts several command line arguments.
ENTRYPOINT ["/OrcaSlicer/build/package/bin/orca-slicer"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ Explore the latest developments in Orca Slicer with our nightly builds. Feedback
# How to compile
- Windows 64-bit
- Tools needed: Visual Studio 2019, Cmake, git, Strawberry Perl.
- Tools needed: Visual Studio 2019, Cmake, git, git-lfs, Strawberry Perl.
- You will require cmake version 3.14 or later, which is available [on their website](https://cmake.org/download/).
- Strawberry Perl is [available on their github repository](https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/).
- Run `build_release.bat` in `x64 Native Tools Command Prompt for VS 2019`
- Note: Don't forget to run `git lfs pull` after cloning the repository to download tools on Windows

- Mac 64-bit
- Tools needed: Xcode, Cmake, git, gettext, libtool, automake, autoconf, texinfo
Expand Down
Loading

0 comments on commit 230cc7c

Please sign in to comment.