mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-04-22 22:20:22 +08:00
Feature/build target 10.15 (#3252)
* Set target to 10.15, make porter templates explicit * CMAKE_OSX_DEPLOYMENT_TARGET refactor * Update build_release_macos.sh fix typo --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
141e74a5d9
commit
044e25d1cf
2
.github/workflows/build_deps.yml
vendored
2
.github/workflows/build_deps.yml
vendored
@ -75,7 +75,7 @@ jobs:
|
|||||||
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
|
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
|
||||||
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
|
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
|
||||||
brew uninstall --ignore-dependencies zstd
|
brew uninstall --ignore-dependencies zstd
|
||||||
./build_release_macos.sh -dp -a ${{ inputs.arch }}
|
./build_release_macos.sh -dp -a ${{ inputs.arch }} -t 10.15
|
||||||
brew install zstd
|
brew install zstd
|
||||||
|
|
||||||
|
|
||||||
|
2
.github/workflows/build_orca.yml
vendored
2
.github/workflows/build_orca.yml
vendored
@ -86,7 +86,7 @@ jobs:
|
|||||||
if: inputs.os == 'macos-12'
|
if: inputs.os == 'macos-12'
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
./build_release_macos.sh -s -n -a ${{inputs.arch}}
|
./build_release_macos.sh -s -n -a ${{inputs.arch}} -t 10.15
|
||||||
|
|
||||||
# Thanks to RaySajuuk, it's working now
|
# Thanks to RaySajuuk, it's working now
|
||||||
- name: Sign app and notary
|
- name: Sign app and notary
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
# if CMAKE_OSX_DEPLOYMENT_TARGET is not set, set it to 11.3
|
||||||
|
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
project(OrcaSlicer)
|
project(OrcaSlicer)
|
||||||
|
|
||||||
include("version.inc")
|
include("version.inc")
|
||||||
@ -52,7 +60,7 @@ if (APPLE)
|
|||||||
if (CMAKE_MACOSX_BUNDLE)
|
if (CMAKE_MACOSX_BUNDLE)
|
||||||
set(CMAKE_INSTALL_RPATH @executable_path/../Frameworks)
|
set(CMAKE_INSTALL_RPATH @executable_path/../Frameworks)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version" FORCE)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
||||||
SET(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.softfever3d.orca-slicer")
|
SET(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.softfever3d.orca-slicer")
|
||||||
|
|
||||||
message(STATUS "Orca: IS_CROSS_COMPILE: ${IS_CROSS_COMPILE}")
|
message(STATUS "Orca: IS_CROSS_COMPILE: ${IS_CROSS_COMPILE}")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
while getopts ":a:sdphn" opt; do
|
while getopts ":a:sdpt:hn" opt; do
|
||||||
case ${opt} in
|
case ${opt} in
|
||||||
d )
|
d )
|
||||||
export BUILD_TARGET="deps"
|
export BUILD_TARGET="deps"
|
||||||
@ -17,11 +17,15 @@ while getopts ":a:sdphn" opt; do
|
|||||||
n )
|
n )
|
||||||
export NIGHTLY_BUILD="1"
|
export NIGHTLY_BUILD="1"
|
||||||
;;
|
;;
|
||||||
|
t )
|
||||||
|
export OSX_DEPLOYMENT_TARGET="$OPTARG"
|
||||||
|
;;
|
||||||
h ) echo "Usage: ./build_release_macos.sh [-d]"
|
h ) echo "Usage: ./build_release_macos.sh [-d]"
|
||||||
echo " -d: Build deps only"
|
echo " -d: Build deps only"
|
||||||
echo " -a: Set ARCHITECTURE (arm64 or x86_64)"
|
echo " -a: Set ARCHITECTURE (arm64 or x86_64)"
|
||||||
echo " -s: Build slicer only"
|
echo " -s: Build slicer only"
|
||||||
echo " -n: Nightly build"
|
echo " -n: Nightly build"
|
||||||
|
echo " -t: Specify minimum version of the target platform, default is 11.3"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -34,7 +38,7 @@ fi
|
|||||||
|
|
||||||
echo "Arch: $ARCH"
|
echo "Arch: $ARCH"
|
||||||
echo "BUILD_TARGET: $BUILD_TARGET"
|
echo "BUILD_TARGET: $BUILD_TARGET"
|
||||||
|
echo "OSX_DEPLOYMENT_TARGET: $OSX_DEPLOYMENT_TARGET"
|
||||||
# if which -s brew; then
|
# if which -s brew; then
|
||||||
# brew --prefix libiconv
|
# brew --prefix libiconv
|
||||||
# brew --prefix zstd
|
# brew --prefix zstd
|
||||||
@ -58,8 +62,8 @@ mkdir -p $DEPS
|
|||||||
if [ "slicer." != $BUILD_TARGET. ];
|
if [ "slicer." != $BUILD_TARGET. ];
|
||||||
then
|
then
|
||||||
echo "building deps..."
|
echo "building deps..."
|
||||||
echo "cmake ../ -DDESTDIR=$DEPS -DOPENSSL_ARCH=darwin64-${ARCH}-cc -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH}"
|
echo "cmake ../ -DDESTDIR=$DEPS -DOPENSSL_ARCH=darwin64-${ARCH}-cc -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}"
|
||||||
cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-${ARCH}-cc" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH}
|
cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-${ARCH}-cc" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}
|
||||||
cmake --build . --config Release --target deps
|
cmake --build . --config Release --target deps
|
||||||
if [ "1." == "$PACK_DEPS". ];
|
if [ "1." == "$PACK_DEPS". ];
|
||||||
then
|
then
|
||||||
@ -77,7 +81,7 @@ cd $WD
|
|||||||
mkdir -p build_$ARCH
|
mkdir -p build_$ARCH
|
||||||
cd build_$ARCH
|
cd build_$ARCH
|
||||||
echo "building slicer..."
|
echo "building slicer..."
|
||||||
cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON -DCMAKE_OSX_ARCHITECTURES=${ARCH}
|
cmake .. -GXcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON -DCMAKE_OSX_ARCHITECTURES=${ARCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}
|
||||||
cmake --build . --config Release --target ALL_BUILD
|
cmake --build . --config Release --target ALL_BUILD
|
||||||
cd ..
|
cd ..
|
||||||
./run_gettext.sh
|
./run_gettext.sh
|
||||||
|
11
deps/CMakeLists.txt
vendored
11
deps/CMakeLists.txt
vendored
@ -20,8 +20,15 @@
|
|||||||
# therefore, unfortunatelly, the installation cannot be copied/moved elsewhere without re-installing wxWidgets.
|
# therefore, unfortunatelly, the installation cannot be copied/moved elsewhere without re-installing wxWidgets.
|
||||||
#
|
#
|
||||||
|
|
||||||
project(OrcaSlicer-deps)
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
if (APPLE)
|
||||||
|
# if CMAKE_OSX_DEPLOYMENT_TARGET is not set, set it to 11.3
|
||||||
|
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
project(OrcaSlicer-deps)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
include(ProcessorCount)
|
include(ProcessorCount)
|
||||||
@ -163,7 +170,7 @@ if (MSVC)
|
|||||||
endif ()
|
endif ()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}")
|
message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}")
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version" FORCE)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
||||||
if (CMAKE_OSX_DEPLOYMENT_TARGET)
|
if (CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
set(DEP_OSX_TARGET "${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
set(DEP_OSX_TARGET "${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
message("OS X Deployment Target: ${DEP_OSX_TARGET}")
|
message("OS X Deployment Target: ${DEP_OSX_TARGET}")
|
||||||
|
@ -242,7 +242,7 @@ void SelectMObjectPopup::Popup(wxWindow* WXUNUSED(focus))
|
|||||||
|
|
||||||
if (wxGetApp().is_user_login()) {
|
if (wxGetApp().is_user_login()) {
|
||||||
if (!get_print_info_thread) {
|
if (!get_print_info_thread) {
|
||||||
get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] {
|
get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr<int>(m_token)] {
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
unsigned int http_code;
|
unsigned int http_code;
|
||||||
std::string body;
|
std::string body;
|
||||||
|
@ -4736,7 +4736,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
|||||||
cancelFn = [this, dlg]() {
|
cancelFn = [this, dlg]() {
|
||||||
return m_is_closing || dlg->WasCanceled();
|
return m_is_closing || dlg->WasCanceled();
|
||||||
};
|
};
|
||||||
finishFn = [this, userid = m_agent->get_user_id(), dlg, t = std::weak_ptr(m_user_sync_token)](bool ok) {
|
finishFn = [this, userid = m_agent->get_user_id(), dlg, t = std::weak_ptr<int>(m_user_sync_token)](bool ok) {
|
||||||
CallAfter([=]{
|
CallAfter([=]{
|
||||||
dlg->Destroy();
|
dlg->Destroy();
|
||||||
if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings();
|
if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings();
|
||||||
@ -4744,7 +4744,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
finishFn = [this, userid = m_agent->get_user_id(), t = std::weak_ptr(m_user_sync_token)](bool ok) {
|
finishFn = [this, userid = m_agent->get_user_id(), t = std::weak_ptr<int>(m_user_sync_token)](bool ok) {
|
||||||
CallAfter([=] {
|
CallAfter([=] {
|
||||||
if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings();
|
if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings();
|
||||||
});
|
});
|
||||||
@ -4752,7 +4752,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_sync_update_thread = Slic3r::create_thread(
|
m_sync_update_thread = Slic3r::create_thread(
|
||||||
[this, progressFn, cancelFn, finishFn, t = std::weak_ptr(m_user_sync_token)] {
|
[this, progressFn, cancelFn, finishFn, t = std::weak_ptr<int>(m_user_sync_token)] {
|
||||||
// get setting list, update setting list
|
// get setting list, update setting list
|
||||||
std::string version = preset_bundle->get_vendor_profile_version(PresetBundle::BBL_BUNDLE).to_string();
|
std::string version = preset_bundle->get_vendor_profile_version(PresetBundle::BBL_BUNDLE).to_string();
|
||||||
int ret = m_agent->get_setting_list2(version, [this](auto info) {
|
int ret = m_agent->get_setting_list2(version, [this](auto info) {
|
||||||
|
@ -220,7 +220,7 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_
|
|||||||
optgroup->sidetext_width = 5;
|
optgroup->sidetext_width = 5;
|
||||||
optgroup->set_config_category_and_type(GUI::from_u8(group_category), Preset::TYPE_PRINT);
|
optgroup->set_config_category_and_type(GUI::from_u8(group_category), Preset::TYPE_PRINT);
|
||||||
|
|
||||||
std::weak_ptr weak_optgroup(optgroup);
|
std::weak_ptr<ConfigOptionsGroup> weak_optgroup(optgroup);
|
||||||
optgroup->m_on_change = [this, is_object, object, config, group_category](const t_config_option_key &opt_id, const boost::any &value) {
|
optgroup->m_on_change = [this, is_object, object, config, group_category](const t_config_option_key &opt_id, const boost::any &value) {
|
||||||
this->m_parent->Freeze();
|
this->m_parent->Freeze();
|
||||||
this->update_config_values(is_object, object, config, group_category);
|
this->update_config_values(is_object, object, config, group_category);
|
||||||
|
@ -433,7 +433,7 @@ void SelectMachinePopup::Popup(wxWindow *WXUNUSED(focus))
|
|||||||
|
|
||||||
if (wxGetApp().is_user_login()) {
|
if (wxGetApp().is_user_login()) {
|
||||||
if (!get_print_info_thread) {
|
if (!get_print_info_thread) {
|
||||||
get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] {
|
get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr<int>(m_token)] {
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
unsigned int http_code;
|
unsigned int http_code;
|
||||||
std::string body;
|
std::string body;
|
||||||
@ -2833,7 +2833,7 @@ void SelectMachineDialog::update_user_machine_list()
|
|||||||
{
|
{
|
||||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||||
if (m_agent && m_agent->is_user_login()) {
|
if (m_agent && m_agent->is_user_login()) {
|
||||||
boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] {
|
boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr<int>(m_token)] {
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
unsigned int http_code;
|
unsigned int http_code;
|
||||||
std::string body;
|
std::string body;
|
||||||
|
@ -813,7 +813,7 @@ void SendToPrinterDialog::update_user_machine_list()
|
|||||||
{
|
{
|
||||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||||
if (m_agent && m_agent->is_user_login()) {
|
if (m_agent && m_agent->is_user_login()) {
|
||||||
boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] {
|
boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr<int>(m_token)] {
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
unsigned int http_code;
|
unsigned int http_code;
|
||||||
std::string body;
|
std::string body;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user