mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
connect to production server
This commit is contained in:
parent
4fd174175c
commit
27398d1717
4 changed files with 41 additions and 41 deletions
|
@ -65,19 +65,19 @@ std::string AppConfig::get_hms_host()
|
||||||
{
|
{
|
||||||
std::string sel = get("iot_environment");
|
std::string sel = get("iot_environment");
|
||||||
std::string host = "";
|
std::string host = "";
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
// #if !BBL_RELEASE_TO_PUBLIC
|
||||||
if (sel == ENV_DEV_HOST)
|
// if (sel == ENV_DEV_HOST)
|
||||||
host = "e-dev.bambu-lab.com";
|
// host = "e-dev.bambu-lab.com";
|
||||||
else if (sel == ENV_QAT_HOST)
|
// else if (sel == ENV_QAT_HOST)
|
||||||
host = "e-qa.bambu-lab.com";
|
// host = "e-qa.bambu-lab.com";
|
||||||
else if (sel == ENV_PRE_HOST)
|
// else if (sel == ENV_PRE_HOST)
|
||||||
host = "e-pre.bambu-lab.com";
|
// host = "e-pre.bambu-lab.com";
|
||||||
else if (sel == ENV_PRODUCT_HOST)
|
// else if (sel == ENV_PRODUCT_HOST)
|
||||||
host = "e.bambulab.com";
|
// host = "e.bambulab.com";
|
||||||
return host;
|
// return host;
|
||||||
#else
|
// #else
|
||||||
return "e.bambulab.com";
|
return "e.bambulab.com";
|
||||||
#endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::reset()
|
void AppConfig::reset()
|
||||||
|
@ -291,15 +291,15 @@ void AppConfig::set_defaults()
|
||||||
set("backup_interval", "10");
|
set("backup_interval", "10");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BBL_RELEASE_TO_PUBLIC
|
// #if BBL_RELEASE_TO_PUBLIC
|
||||||
if (get("iot_environment").empty()) {
|
if (get("iot_environment").empty()) {
|
||||||
set("iot_environment", "3");
|
set("iot_environment", "3");
|
||||||
}
|
}
|
||||||
#else
|
// #else
|
||||||
if (get("iot_environment").empty()) {
|
// if (get("iot_environment").empty()) {
|
||||||
set("iot_environment", "1");
|
// set("iot_environment", "1");
|
||||||
}
|
// }
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Remove legacy window positions/sizes
|
// Remove legacy window positions/sizes
|
||||||
erase("app", "main_frame_maximized");
|
erase("app", "main_frame_maximized");
|
||||||
|
@ -1028,29 +1028,29 @@ void AppConfig::update_last_backup_dir(const std::string& dir)
|
||||||
|
|
||||||
std::string AppConfig::get_region()
|
std::string AppConfig::get_region()
|
||||||
{
|
{
|
||||||
#if BBL_RELEASE_TO_PUBLIC
|
// #if BBL_RELEASE_TO_PUBLIC
|
||||||
return this->get("region");
|
return this->get("region");
|
||||||
#else
|
// #else
|
||||||
std::string sel = get("iot_environment");
|
// std::string sel = get("iot_environment");
|
||||||
std::string region;
|
// std::string region;
|
||||||
if (sel == ENV_DEV_HOST)
|
// if (sel == ENV_DEV_HOST)
|
||||||
region = "ENV_CN_DEV";
|
// region = "ENV_CN_DEV";
|
||||||
else if (sel == ENV_QAT_HOST)
|
// else if (sel == ENV_QAT_HOST)
|
||||||
region = "ENV_CN_QA";
|
// region = "ENV_CN_QA";
|
||||||
else if (sel == ENV_PRE_HOST)
|
// else if (sel == ENV_PRE_HOST)
|
||||||
region = "ENV_CN_PRE";
|
// region = "ENV_CN_PRE";
|
||||||
if (region.empty())
|
// if (region.empty())
|
||||||
return this->get("region");
|
// return this->get("region");
|
||||||
return region;
|
// return region;
|
||||||
#endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AppConfig::get_country_code()
|
std::string AppConfig::get_country_code()
|
||||||
{
|
{
|
||||||
std::string region = get_region();
|
std::string region = get_region();
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
// #if !BBL_RELEASE_TO_PUBLIC
|
||||||
if (is_engineering_region()) { return region; }
|
// if (is_engineering_region()) { return region; }
|
||||||
#endif
|
// #endif
|
||||||
if (region == "CHN" || region == "China")
|
if (region == "CHN" || region == "China")
|
||||||
return "CN";
|
return "CN";
|
||||||
else if (region == "USA")
|
else if (region == "USA")
|
||||||
|
|
|
@ -38,9 +38,9 @@ static std::vector<std::string> s_project_options {
|
||||||
"wipe_tower_y",
|
"wipe_tower_y",
|
||||||
"wipe_tower_rotation_angle",
|
"wipe_tower_rotation_angle",
|
||||||
"curr_bed_type",
|
"curr_bed_type",
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
// #if !BBL_RELEASE_TO_PUBLIC
|
||||||
"flush_multiplier",
|
"flush_multiplier",
|
||||||
#endif
|
// #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
//BBS: add BBL as default
|
//BBS: add BBL as default
|
||||||
|
|
|
@ -250,13 +250,13 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||||
this->AddSpacer(FromDIP(10));
|
this->AddSpacer(FromDIP(10));
|
||||||
this->AddStretchSpacer(1);
|
this->AddStretchSpacer(1);
|
||||||
|
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
// #if !BBL_RELEASE_TO_PUBLIC
|
||||||
/*wxBitmap m_publish_bitmap = create_scaled_bitmap("topbar_publish", nullptr, TOPBAR_ICON_SIZE);
|
/*wxBitmap m_publish_bitmap = create_scaled_bitmap("topbar_publish", nullptr, TOPBAR_ICON_SIZE);
|
||||||
m_publish_item = this->AddTool(ID_PUBLISH, "", m_publish_bitmap);
|
m_publish_item = this->AddTool(ID_PUBLISH, "", m_publish_bitmap);
|
||||||
wxBitmap m_publish_disable_bitmap = create_scaled_bitmap("topbar_publish_disable", nullptr, TOPBAR_ICON_SIZE);
|
wxBitmap m_publish_disable_bitmap = create_scaled_bitmap("topbar_publish_disable", nullptr, TOPBAR_ICON_SIZE);
|
||||||
m_publish_item->SetDisabledBitmap(m_publish_disable_bitmap);
|
m_publish_item->SetDisabledBitmap(m_publish_disable_bitmap);
|
||||||
this->AddSpacer(FromDIP(12));*/
|
this->AddSpacer(FromDIP(12));*/
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
/*wxBitmap model_store_bitmap = create_scaled_bitmap("topbar_store", nullptr, TOPBAR_ICON_SIZE);
|
/*wxBitmap model_store_bitmap = create_scaled_bitmap("topbar_store", nullptr, TOPBAR_ICON_SIZE);
|
||||||
m_model_store_item = this->AddTool(ID_MODEL_STORE, "", model_store_bitmap);
|
m_model_store_item = this->AddTool(ID_MODEL_STORE, "", model_store_bitmap);
|
||||||
|
|
|
@ -37,9 +37,9 @@ MediaPlayCtrl::MediaPlayCtrl(wxWindow *parent, wxMediaCtrl2 *media_ctrl, const w
|
||||||
media_proc();
|
media_proc();
|
||||||
});
|
});
|
||||||
|
|
||||||
#if BBL_RELEASE_TO_PUBLIC
|
// #if BBL_RELEASE_TO_PUBLIC
|
||||||
m_next_retry = wxDateTime::Now();
|
m_next_retry = wxDateTime::Now();
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
auto onShowHide = [this](auto &e) {
|
auto onShowHide = [this](auto &e) {
|
||||||
e.Skip();
|
e.Skip();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue