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
10 changed files with 40 additions and 21 deletions
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 }}/OrcaSlicer_dep_${{ inputs.arch }}
|
||||
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
|
||||
|
||||
|
||||
|
|
2
.github/workflows/build_orca.yml
vendored
2
.github/workflows/build_orca.yml
vendored
|
@ -86,7 +86,7 @@ jobs:
|
|||
if: inputs.os == 'macos-12'
|
||||
working-directory: ${{ github.workspace }}
|
||||
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
|
||||
- name: Sign app and notary
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
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)
|
||||
|
||||
include("version.inc")
|
||||
|
@ -52,7 +60,7 @@ if (APPLE)
|
|||
if (CMAKE_MACOSX_BUNDLE)
|
||||
set(CMAKE_INSTALL_RPATH @executable_path/../Frameworks)
|
||||
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")
|
||||
|
||||
message(STATUS "Orca: IS_CROSS_COMPILE: ${IS_CROSS_COMPILE}")
|
||||
|
@ -786,4 +794,4 @@ set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt) # must also in
|
|||
|
||||
set(CPACK_WIX_UPGRADE_GUID "058245e8-20e0-4a95-9ab7-1acfe17ad511")
|
||||
set(CPACK_GENERATOR NSIS)
|
||||
include(CPack)
|
||||
include(CPack)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
while getopts ":a:sdphn" opt; do
|
||||
while getopts ":a:sdpt:hn" opt; do
|
||||
case ${opt} in
|
||||
d )
|
||||
export BUILD_TARGET="deps"
|
||||
|
@ -17,11 +17,15 @@ while getopts ":a:sdphn" opt; do
|
|||
n )
|
||||
export NIGHTLY_BUILD="1"
|
||||
;;
|
||||
t )
|
||||
export OSX_DEPLOYMENT_TARGET="$OPTARG"
|
||||
;;
|
||||
h ) echo "Usage: ./build_release_macos.sh [-d]"
|
||||
echo " -d: Build deps only"
|
||||
echo " -a: Set ARCHITECTURE (arm64 or x86_64)"
|
||||
echo " -s: Build slicer only"
|
||||
echo " -n: Nightly build"
|
||||
echo " -t: Specify minimum version of the target platform, default is 11.3"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
@ -34,7 +38,7 @@ fi
|
|||
|
||||
echo "Arch: $ARCH"
|
||||
echo "BUILD_TARGET: $BUILD_TARGET"
|
||||
|
||||
echo "OSX_DEPLOYMENT_TARGET: $OSX_DEPLOYMENT_TARGET"
|
||||
# if which -s brew; then
|
||||
# brew --prefix libiconv
|
||||
# brew --prefix zstd
|
||||
|
@ -58,8 +62,8 @@ mkdir -p $DEPS
|
|||
if [ "slicer." != $BUILD_TARGET. ];
|
||||
then
|
||||
echo "building deps..."
|
||||
echo "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}
|
||||
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} -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET}
|
||||
cmake --build . --config Release --target deps
|
||||
if [ "1." == "$PACK_DEPS". ];
|
||||
then
|
||||
|
@ -77,7 +81,7 @@ cd $WD
|
|||
mkdir -p build_$ARCH
|
||||
cd build_$ARCH
|
||||
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
|
||||
cd ..
|
||||
./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.
|
||||
#
|
||||
|
||||
project(OrcaSlicer-deps)
|
||||
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(ProcessorCount)
|
||||
|
@ -163,7 +170,7 @@ if (MSVC)
|
|||
endif ()
|
||||
elseif (APPLE)
|
||||
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)
|
||||
set(DEP_OSX_TARGET "${CMAKE_OSX_DEPLOYMENT_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 (!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();
|
||||
unsigned int http_code;
|
||||
std::string body;
|
||||
|
@ -716,4 +716,4 @@ CalibrationPanel::~CalibrationPanel() {
|
|||
delete m_refresh_timer;
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -4736,7 +4736,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
|||
cancelFn = [this, dlg]() {
|
||||
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([=]{
|
||||
dlg->Destroy();
|
||||
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 {
|
||||
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([=] {
|
||||
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(
|
||||
[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
|
||||
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) {
|
||||
|
|
|
@ -220,7 +220,7 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_
|
|||
optgroup->sidetext_width = 5;
|
||||
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) {
|
||||
this->m_parent->Freeze();
|
||||
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 (!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();
|
||||
unsigned int http_code;
|
||||
std::string body;
|
||||
|
@ -2833,7 +2833,7 @@ void SelectMachineDialog::update_user_machine_list()
|
|||
{
|
||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||
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();
|
||||
unsigned int http_code;
|
||||
std::string body;
|
||||
|
|
|
@ -813,7 +813,7 @@ void SendToPrinterDialog::update_user_machine_list()
|
|||
{
|
||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||
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();
|
||||
unsigned int http_code;
|
||||
std::string body;
|
||||
|
@ -1391,4 +1391,4 @@ SendToPrinterDialog::~SendToPrinterDialog()
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue