Change Application name to OrcaSlicer

This commit is contained in:
SoftFever 2023-03-12 10:02:38 +08:00
parent 81ca7720e9
commit 5b0ba1207e
93 changed files with 5629 additions and 10221 deletions

View file

@ -374,7 +374,7 @@ static void copy_config_dir_single_level(const boost::filesystem::path &path_src
#if 0
if (! boost::filesystem::is_directory(path_dst) &&
! boost::filesystem::create_directory(path_dst))
throw Slic3r::RuntimeError(std::string("BambuStudio was unable to create a directory at ") + path_dst.string());
throw Slic3r::RuntimeError(std::string("OrcaSlicer was unable to create a directory at ") + path_dst.string());
for (auto &dir_entry : boost::filesystem::directory_iterator(path_src))
if (Slic3r::is_ini_file(dir_entry))
@ -593,8 +593,8 @@ bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot:
return true;
} catch (std::exception &err) {
RichMessageDialog dlg(static_cast<wxWindow*>(wxGetApp().mainframe),
_L("BambuStudio has encountered an error while taking a configuration snapshot.") + "\n\n" + from_u8(err.what()) + "\n\n" + from_u8(message),
_L("BambuStudio error"),
_L("OrcaSlicer has encountered an error while taking a configuration snapshot.") + "\n\n" + from_u8(err.what()) + "\n\n" + from_u8(message),
_L("OrcaSlicer error"),
wxYES_NO);
dlg.SetYesNoLabels(_L("Continue"), _L("Abort"));
return dlg.ShowModal() == wxID_YES;

View file

@ -147,9 +147,9 @@ wxString CopyrightsDialog::get_html_text()
"<font size=\"3\">",
bgr_clr_str, text_clr_str, text_clr_str,
_L("License"),
_L("Bambu Studio is licensed under "),
_L("Orca Slicer is licensed under "),
"https://www.gnu.org/licenses/agpl-3.0.html",_L("GNU Affero General Public License, version 3"),
_L("Bambu Studio is based on PrusaSlicer by Prusa Research, which is from Slic3r by Alessandro Ranellucci and the RepRap community"),
_L("Orca Slicer is based on BambuStudio by Bambulab, which is from PrusaSlicer by Prusa Research. PrusaSlicer is from Slic3r by Alessandro Ranellucci and the RepRap community"),
_L("Libraries"),
_L("This software uses open source components whose copyright and other proprietary rights belong to their respective owners"));
@ -220,7 +220,7 @@ AboutDialog::AboutDialog()
wxPanel *m_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(560), FromDIP(237)), wxTAB_TRAVERSAL);
wxBoxSizer *panel_versizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *vesizer = new wxBoxSizer(wxVERTICAL);
// wxBoxSizer *vesizer = new wxBoxSizer(wxVERTICAL);
m_panel->SetSizer(panel_versizer);
@ -230,18 +230,20 @@ AboutDialog::AboutDialog()
main_sizer->Add(m_panel, 1, wxEXPAND | wxALL, 0);
main_sizer->Add(ver_sizer, 0, wxEXPAND | wxALL, 0);
// logo
m_logo_bitmap = ScalableBitmap(this, "BambuStudio_about", 250);
m_logo = new wxStaticBitmap(this, wxID_ANY, m_logo_bitmap.bmp(), wxDefaultPosition,wxDefaultSize, 0);
m_logo->SetSizer(vesizer);
// // logo
// m_logo_bitmap = ScalableBitmap(this, "BambuStudio_about", 250);
// m_logo = new wxStaticBitmap(this, wxID_ANY, m_logo_bitmap.bmp(), wxDefaultPosition,wxDefaultSize, 0);
// m_logo->SetSizer(vesizer);
panel_versizer->Add(m_logo, 1, wxALL | wxEXPAND, 0);
// panel_versizer->Add(m_logo, 1, wxALL | wxEXPAND, 0);
// version
{
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
auto version_string = _L("SoftFever Version") + " " + std::string(SoftFever_VERSION);
panel_versizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
auto version_string = _L("Orca Slicer ") + " " + std::string(SoftFever_VERSION);
wxStaticText* version = new wxStaticText(this, wxID_ANY, version_string.c_str(), wxDefaultPosition, wxDefaultSize);
wxStaticText* bs_version = new wxStaticText(this, wxID_ANY, wxString::Format("Based on BambuStudio %s",std::string(SLIC3R_VERSION)), wxDefaultPosition, wxDefaultSize);
bs_version->SetFont(Label::Body_12);
wxFont version_font = GetFont();
#ifdef __WXMSW__
version_font.SetPointSize(version_font.GetPointSize()-1);
@ -250,21 +252,22 @@ AboutDialog::AboutDialog()
#endif
version_font.SetPointSize(FromDIP(16));
version->SetFont(version_font);
version->SetForegroundColour(wxColour("#FFFFFD"));
if(wxGetApp().dark_mode())
version->SetBackgroundColour(wxColour("#00675b"));
else
version->SetBackgroundColour(wxColour("#009688"));
// version->SetForegroundColour(wxColour("#FFFFFD"));
// if(wxGetApp().dark_mode())
// version->SetBackgroundColour(wxColour("#00675b"));
// else
// version->SetBackgroundColour(wxColour("#009688"));
vesizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
#if BBL_INTERNAL_TESTING
wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
build_time_text->SetForegroundColour(wxColour("#FFFFFE"));
build_time_text->SetBackgroundColour(wxColour("#00AF42"));
vesizer->Add(build_time_text, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
#endif
vesizer->Add(0, 0, 1, wxEXPAND, FromDIP(5));
panel_versizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
panel_versizer->Add(bs_version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
// #if BBL_INTERNAL_TESTING
// wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
// wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
// build_time_text->SetForegroundColour(wxColour("#FFFFFE"));
// build_time_text->SetBackgroundColour(wxColour("#00AF42"));
// vesizer->Add(build_time_text, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
// #endif
panel_versizer->Add(0, 0, 1, wxEXPAND, FromDIP(5));
}
wxBoxSizer *text_sizer_horiz = new wxBoxSizer(wxHORIZONTAL);
@ -272,11 +275,10 @@ AboutDialog::AboutDialog()
text_sizer_horiz->Add( 0, 0, 0, wxLEFT, FromDIP(23));
std::vector<wxString> text_list;
text_list.push_back(_L("Bambu Studio is based on PrusaSlicer by PrusaResearch and SuperSlicer by Merill(supermerill)."));
text_list.push_back(_L("OrcaSlicer is based on BambuStudio, PrusaSlicer, and SuperSlicer."));
text_list.push_back(_L("BambuStudio is originally based on PrusaSlicer by PrusaResearch."));
text_list.push_back(_L("PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci."));
text_list.push_back(_L("Slic3r was created by Alessandro Ranellucci with the help of many other contributors."));
text_list.push_back(_L("Bambu Studio also referenced some ideas from Cura by Ultimaker."));
text_list.push_back(_L("There many parts of the software that come from community contributions, so we're unable to list them one-by-one, and instead, they'll be attributed in the corresponding code comments."));
text_sizer->Add( 0, 0, 0, wxTOP, FromDIP(33));
bool is_zh = wxGetApp().app_config->get("language") == "zh_CN";
@ -319,7 +321,7 @@ AboutDialog::AboutDialog()
copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxALL,5);
copyright_hor_sizer->Add( 0, 0, 0, wxLEFT, FromDIP(120));
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2021-2023 Lunkuo All Rights Reserved", wxDefaultPosition, wxDefaultSize);
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2022-2023 Li Jiang All Rights Reserved", wxDefaultPosition, wxDefaultSize);
html_text->SetForegroundColour(wxColour(107, 107, 107));
copyright_ver_sizer->Add(html_text, 0, wxALL , 0);
@ -336,7 +338,7 @@ AboutDialog::AboutDialog()
(boost::format(
"<html>"
"<body>"
"<p style=\"text-align:left\"><a href=\"www.bambulab.com\">www.bambulab.com</ a></p>"
"<p style=\"text-align:left\"><a href=\"https://github.com/SoftFever/Orcaslicer\">https://github.com/SoftFever/Orcaslicer</ a></p>"
"</body>"
"</html>")
).str());

View file

@ -316,7 +316,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
}
}
if(target_dir_icons.empty()) {
BOOST_LOG_TRIVIAL(error) << "Copying BambuStudio icon to icons directory failed.";
BOOST_LOG_TRIVIAL(error) << "Copying OrcaSlicer icon to icons directory failed.";
} else
// save path to icon
app_config->set("desktop_integration_icon_slicer_path", GUI::format("%1%/images/%2%BambuStudio%3%.png", target_dir_icons, icon_theme_path, version_suffix));
@ -330,7 +330,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
// Write slicer desktop file
std::string desktop_file = GUI::format(
"[Desktop Entry]\n"
"Name=BambuStudio%1%\n"
"Name=OrcaSlicer%1%\n"
"GenericName=3D Printing Software\n"
"Icon=BambuStudio%2%\n"
"Exec=\"%3%\" %%F\n"
@ -342,13 +342,13 @@ void DesktopIntegrationDialog::perform_desktop_integration()
"StartupNotify=false\n"
"StartupWMClass=orca-slicer\n", name_suffix, version_suffix, excutable_path);
std::string path = GUI::format("%1%/applications/BambuStudio%2%.desktop", target_dir_desktop, version_suffix);
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
if (create_desktop_file(path, desktop_file)){
BOOST_LOG_TRIVIAL(debug) << "BambuStudio.desktop file installation success.";
BOOST_LOG_TRIVIAL(debug) << "OrcaSlicer.desktop file installation success.";
break;
} else {
// write failed - try another path
BOOST_LOG_TRIVIAL(debug) << "Attempt to BambuStudio.desktop file installation failed. failed path: " << target_candidates[i];
BOOST_LOG_TRIVIAL(debug) << "Attempt to OrcaSlicer.desktop file installation failed. failed path: " << target_candidates[i];
target_dir_desktop.clear();
}
// if all failed - try creating default home folder
@ -357,7 +357,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
// create desktop file
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
std::string path = GUI::format("%1%/applications/BambuStudio%2%.desktop", target_dir_desktop, version_suffix);
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
if (contains_path_dir(target_dir_desktop, "applications")) {
if (!create_desktop_file(path, desktop_file)) {
// Desktop file not written - end desktop integration
@ -379,7 +379,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
return;
}
// save path to desktop file
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/BambuStudio%2%.desktop", target_dir_desktop, version_suffix));
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix));
// Repeat for Gcode viewer - use same paths as for slicer files
// Do NOT add gcode viewer desktop file on ChromeOS
@ -410,13 +410,13 @@ void DesktopIntegrationDialog::perform_desktop_integration()
"Keywords=3D;Printing;Slicer;\n"
"StartupNotify=false\n", name_suffix, version_suffix, excutable_path);
std::string desktop_path = GUI::format("%1%/applications/BambuStudioGcodeViewer%2%.desktop", target_dir_desktop, version_suffix);
std::string desktop_path = GUI::format("%1%/applications/OrcaSlicerGcodeViewer%2%.desktop", target_dir_desktop, version_suffix);
if (create_desktop_file(desktop_path, desktop_file))
// save path to desktop file
app_config->set("desktop_integration_app_viewer_path", desktop_path);
else {
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed - could not create Gcodeviewer desktop file";
show_error(nullptr, _L("Performing desktop integration failed - could not create Gcodeviewer desktop file. BambuStudio desktop file was probably created successfully."));
show_error(nullptr, _L("Performing desktop integration failed - could not create Gcodeviewer desktop file. OrcaSlicer desktop file was probably created successfully."));
}
}

View file

@ -18,7 +18,7 @@ public:
// methods that actually do / undo desktop integration. Static to be accesible from anywhere.
// returns true if path to BambuStudio.desktop is stored in App Config and existence of desktop file.
// returns true if path to OrcaSlicer.desktop is stored in App Config and existence of desktop file.
// Does not check if desktop file leads to this binary or existence of icons and viewer desktop file.
static bool is_integrated();
// true if appimage

View file

@ -1909,7 +1909,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
}
fprintf(fp, "# G-Code Toolpaths Materials\n");
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SLIC3R_VERSION);
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SoftFever_VERSION);
unsigned int colors_count = 1;
for (const Color& color : colors) {
@ -1929,7 +1929,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
}
fprintf(fp, "# G-Code Toolpaths\n");
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SLIC3R_VERSION);
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SoftFever_VERSION);
fprintf(fp, "\nmtllib ./%s\n", mat_filename.filename().string().c_str());
const size_t floats_per_vertex = t_buffer.vertices.vertex_size_floats();

View file

@ -333,7 +333,7 @@ static void add_config_substitutions(const ConfigSubstitutions& conf_substitutio
static wxString substitution_message(const wxString& changes)
{
return
_L("The configuration may be generated by a newer version of BambuStudio.") + " " +
_L("The configuration may be generated by a newer version of OrcaSlicer.") + " " +
_L("Some values have been replaced. Please check them:") + "\n" + changes + "\n";
}

View file

@ -179,7 +179,7 @@ bool is_associate_files(std::wstring extend)
wchar_t app_path[MAX_PATH];
::GetModuleFileNameW(nullptr, app_path, sizeof(app_path));
std::wstring prog_id = L" Bambu.Studio.1";
std::wstring prog_id = L" Orca.Slicer.1";
std::wstring reg_base = L"Software\\Classes";
std::wstring reg_extension = reg_base + L"\\." + extend;
@ -290,13 +290,13 @@ public:
memDc.DrawLabel(m_constant_text.version, version_rect, wxALIGN_LEFT | wxALIGN_BOTTOM);
// #if BBL_INTERNAL_TESTING
auto sf_version = wxString::Format("SoftFever %s",std::string(SoftFever_VERSION)).ToStdString();
wxSize text_rect = memDc.GetTextExtent(sf_version);
int start_x = (title_rect.GetLeft() + version_rect.GetRight()) / 2 - text_rect.GetWidth();
auto bs_version = wxString::Format("Based on BambuStudio %s",std::string(SLIC3R_VERSION)).ToStdString();
memDc.SetFont(Label::Body_12);
wxSize text_rect = memDc.GetTextExtent(bs_version);
int start_x = (title_rect.GetLeft() + version_rect.GetRight()) / 2 - text_rect.GetWidth()/2;
int start_y = version_rect.GetBottom() + 10;
wxRect internal_sign_rect(wxPoint(start_x, start_y), wxSize(text_rect));
memDc.SetFont(m_constant_text.version_font);
memDc.DrawLabel(sf_version, internal_sign_rect, wxALIGN_CENTER);
memDc.DrawLabel(bs_version, internal_sign_rect, wxALIGN_RIGHT);
// #endif
// load bitmap for logo
@ -568,7 +568,7 @@ private:
// #if BBL_INTERNAL_TESTING
// version = _L("Internal Version") + " " + std::string(SLIC3R_VERSION);
// #else
version = _L("SoftFever Version") + " " + std::string(SoftFever_VERSION);
// version = _L("") + " " + std::string(SoftFever_VERSION);
// #endif
// credits infornation
@ -951,7 +951,7 @@ static void generic_exception_handle()
} catch (const std::bad_alloc& ex) {
// bad_alloc in main thread is most likely fatal. Report immediately to the user (wxLogError would be delayed)
// and terminate the app so it is at least certain to happen now.
wxString errmsg = wxString::Format(_L("BambuStudio will terminate because of running out of memory."
wxString errmsg = wxString::Format(_L("OrcaSlicer will terminate because of running out of memory."
"It may be a bug. It will be appreciated if you report the issue to our team."));
wxMessageBox(errmsg + "\n\n" + wxString(ex.what()), _L("Fatal error"), wxOK | wxICON_ERROR);
BOOST_LOG_TRIVIAL(error) << boost::format("std::bad_alloc exception: %1%") % ex.what();
@ -959,14 +959,14 @@ static void generic_exception_handle()
std::terminate();
//throw;
} catch (const boost::io::bad_format_string& ex) {
wxString errmsg = _L("BambuStudio will terminate because of a localization error. "
wxString errmsg = _L("OrcaSlicer will terminate because of a localization error. "
"It will be appreciated if you report the specific scenario this issue happened.");
wxMessageBox(errmsg + "\n\n" + wxString(ex.what()), _L("Critical error"), wxOK | wxICON_ERROR);
BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
std::terminate();
//throw;
} catch (const std::exception& ex) {
wxLogError(format_wxstr(_L("BambuStudio got an unhandled exception: %1%"), ex.what()));
wxLogError(format_wxstr(_L("OrcaSlicer got an unhandled exception: %1%"), ex.what()));
BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
throw;
}
@ -1856,9 +1856,12 @@ static boost::optional<Semver> parse_semver_from_ini(std::string path)
std::stringstream buffer;
buffer << stream.rdbuf();
std::string body = buffer.str();
size_t start = body.find("BambuStudio ");
if (start == std::string::npos)
return boost::none;
size_t start = body.find("OrcaSlicer ");
if (start == std::string::npos) {
start = body.find("BambuStudio ");
if (start == std::string::npos)
return boost::none;
}
body = body.substr(start + 12);
size_t end = body.find_first_of(" \n");
if (end < body.size())
@ -1887,7 +1890,7 @@ void GUI_App::init_download_path()
void GUI_App::init_app_config()
{
// Profiles for the alpha are stored into the PrusaSlicer-alpha directory to not mix with the current release.
SetAppName("OrcaSlicer");
SetAppName(SLIC3R_APP_KEY);
// SetAppName(SLIC3R_APP_KEY "-alpha");
// SetAppName(SLIC3R_APP_KEY "-beta");
// SetAppDisplayName(SLIC3R_APP_NAME);
@ -1898,12 +1901,11 @@ void GUI_App::init_app_config()
// Mac : "~/Library/Application Support/Slic3r"
if (data_dir().empty()) {
boost::filesystem::path data_dir_path;
#ifndef __linux__
std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
//BBS create folder if not exists
boost::filesystem::path data_dir_path(data_dir);
if (!boost::filesystem::exists(data_dir_path))
boost::filesystem::create_directory(data_dir_path);
data_dir_path = boost::filesystem::path(data_dir);
set_data_dir(data_dir);
#else
// Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}.
@ -1912,10 +1914,18 @@ void GUI_App::init_app_config()
if (! wxGetEnv(wxS("XDG_CONFIG_HOME"), &dir) || dir.empty() )
dir = wxFileName::GetHomeDir() + wxS("/.config");
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
boost::filesystem::path data_dir_path(data_dir());
if (!boost::filesystem::exists(data_dir_path))
boost::filesystem::create_directory(data_dir_path);
data_dir_path = boost::filesystem::path(data_dir());
#endif
if (!boost::filesystem::exists(data_dir_path)){
auto older_data_dir = data_dir_path.parent_path() / "BambuStudio-SoftFever";
if(boost::filesystem::exists(older_data_dir)){
copy_directory_recursively(older_data_dir,data_dir_path);
boost::filesystem::rename(data_dir_path / "BambuStudio.conf", data_dir_path / "OrcaSlicer.conf");
boost::filesystem::rename(data_dir_path / "BambuStudio.conf.bak", data_dir_path / "OrcaSlicer.conf.bak");
}
else
boost::filesystem::create_directory(data_dir_path);
}
} else {
m_datadir_redefined = true;
}
@ -1932,7 +1942,7 @@ void GUI_App::init_app_config()
if (!error.empty()) {
// Error while parsing config file. We'll customize the error message and rethrow to be displayed.
throw Slic3r::RuntimeError(
_u8L("BambuStudio configuration file may be corrupted and is not abled to be parsed."
_u8L("OrcaSlicer configuration file may be corrupted and is not abled to be parsed."
"Please delete the file and try again.") +
"\n\n" + app_config->config_path() + "\n\n" + error);
}
@ -2260,7 +2270,7 @@ bool GUI_App::on_init_inner()
/* wxString tips = wxString::Format(_L("Click to download new version in default browser: %s"), version_info.version_str);
DownloadDialog dialog(this->mainframe,
tips,
_L("New version of Bambu Studio"),
_L("New version of Orca Slicer"),
false,
wxCENTER | wxICON_INFORMATION);
@ -2308,7 +2318,7 @@ bool GUI_App::on_init_inner()
wxString tips = wxString::Format(_L("Click to download new version in default browser: %s"), version_str);
DownloadDialog dialog(this->mainframe,
tips,
_L("The Bambu Studio needs an upgrade"),
_L("The Orca Slicer needs an upgrade"),
false,
wxCENTER | wxICON_INFORMATION);
dialog.SetExtendedMessage(description_text);
@ -4132,19 +4142,10 @@ void GUI_App::no_new_version()
std::string GUI_App::version_display = "";
std::string GUI_App::format_display_version()
{
if (!version_display.empty()) return version_display;
if (!version_display.empty())
return version_display;
auto version_text = std::string(SLIC3R_VERSION);
int len = version_text.length();
for (int i = 0, j = 0; i < len; ++i) {
if (!(version_text[i] == '0' && j == 0))
version_display += version_text[i];
if (version_text[i] == '.')
j = 0;
else
++j;
}
version_display = SoftFever_VERSION;
return version_display;
}
@ -4600,7 +4601,7 @@ bool GUI_App::load_language(wxString language, bool initial)
// Get the active language from PrusaSlicer.ini, or empty string if the key does not exist.
language = app_config->get("language");
if (! language.empty())
BOOST_LOG_TRIVIAL(trace) << boost::format("language provided by PBambuStudio.conf: %1%") % language;
BOOST_LOG_TRIVIAL(trace) << boost::format("language provided by OrcaSlicer.conf: %1%") % language;
else {
// Get the system language.
const wxLanguage lang_system = wxLanguage(wxLocale::GetSystemLanguage());
@ -4668,7 +4669,7 @@ bool GUI_App::load_language(wxString language, bool initial)
}
if (language_info != nullptr && language_info->LayoutDirection == wxLayout_RightToLeft) {
BOOST_LOG_TRIVIAL(trace) << boost::format("The following language code requires right to left layout, which is not supported by BambuStudio: %1%") % language_info->CanonicalName.ToUTF8().data();
BOOST_LOG_TRIVIAL(trace) << boost::format("The following language code requires right to left layout, which is not supported by OrcaSlicer: %1%") % language_info->CanonicalName.ToUTF8().data();
language_info = nullptr;
}
@ -4752,14 +4753,14 @@ bool GUI_App::load_language(wxString language, bool initial)
if (! wxLocale::IsAvailable(language_info->Language)) {
// Loading the language dictionary failed.
wxString message = "Switching Bambu Studio to language " + language_info->CanonicalName + " failed.";
wxString message = "Switching Orca Slicer to language " + language_info->CanonicalName + " failed.";
#if !defined(_WIN32) && !defined(__APPLE__)
// likely some linux system
message += "\nYou may need to reconfigure the missing locales, likely by running the \"locale-gen\" and \"dpkg-reconfigure locales\" commands.\n";
#endif
if (initial)
message + "\n\nApplication will close.";
wxMessageBox(message, "Bambu Studio - Switching language failed", wxOK | wxICON_ERROR);
wxMessageBox(message, "Orca Slicer - Switching language failed", wxOK | wxICON_ERROR);
if (initial)
std::exit(EXIT_FAILURE);
else
@ -5375,7 +5376,7 @@ void GUI_App::OSXStoreOpenFiles(const wxArrayString &fileNames)
if (is_gcode_file(into_u8(filename)))
++ num_gcodes;
if (fileNames.size() == num_gcodes) {
// Opening PrusaSlicer by drag & dropping a G-Code onto BambuStudio icon in Finder,
// Opening PrusaSlicer by drag & dropping a G-Code onto OrcaSlicer icon in Finder,
// just G-codes were passed. Switch to G-code viewer mode.
m_app_mode = EAppMode::GCodeViewer;
unlock_lockfile(get_instance_hash_string() + ".lock", data_dir() + "/cache/");
@ -5969,7 +5970,7 @@ void GUI_App::associate_files(std::wstring extend)
::GetModuleFileNameW(nullptr, app_path, sizeof(app_path));
std::wstring prog_path = L"\"" + std::wstring(app_path) + L"\"";
std::wstring prog_id = L" Bambu.Studio.1";
std::wstring prog_id = L" Orca.Slicer.1";
std::wstring prog_desc = L"OrcaSlicer";
std::wstring prog_command = prog_path + L" \"%1\"";
std::wstring reg_base = L"Software\\Classes";
@ -5992,7 +5993,7 @@ void GUI_App::disassociate_files(std::wstring extend)
::GetModuleFileNameW(nullptr, app_path, sizeof(app_path));
std::wstring prog_path = L"\"" + std::wstring(app_path) + L"\"";
std::wstring prog_id = L" Bambu.Studio.1";
std::wstring prog_id = L" Orca.Slicer.1";
std::wstring prog_desc = L"OrcaSlicer";
std::wstring prog_command = prog_path + L" \"%1\"";
std::wstring reg_base = L"Software\\Classes";

View file

@ -65,10 +65,10 @@ int GUI_Run(GUI_InitParams &params)
}
} catch (const Slic3r::Exception &ex) {
BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
wxMessageBox(boost::nowide::widen(ex.what()), _L("Bambu Studio GUI initialization failed"), wxICON_STOP);
wxMessageBox(boost::nowide::widen(ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
} catch (const std::exception &ex) {
BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
wxMessageBox(format_wxstr(_L("Fatal error, exception catched: %1%"), ex.what()), _L("Bambu Studio GUI initialization failed"), wxICON_STOP);
wxMessageBox(format_wxstr(_L("Fatal error, exception catched: %1%"), ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
}
// error
return 1;

View file

@ -236,10 +236,10 @@ namespace instance_check_internal
dbus_uint32_t serial = 0;
const char* sigval = message_text.c_str();
//std::string interface_name = "com.prusa3d.prusaslicer.InstanceCheck";
std::string interface_name = "com.bbl.bambuslicer.InstanceCheck.Object" + version;
std::string interface_name = "com.softfever3d.orcaslicer.InstanceCheck.Object" + version;
std::string method_name = "AnotherInstance";
//std::string object_name = "/com/prusa3d/prusaslicer/InstanceCheck";
std::string object_name = "/com/BambuLab/BambuStudio/InstanceCheck/Object" + version;
std::string object_name = "/com/softfever3d/OrcaSlicer/InstanceCheck/Object" + version;
// initialise the error value
@ -538,7 +538,7 @@ namespace MessageHandlerDBusInternal
" <arg name=\"data\" direction=\"out\" type=\"s\" />"
" </method>"
" </interface>"
" <interface name=\"com.bbl.bambuslicer.InstanceCheck\">"
" <interface name=\"com.softfever3d.orcaslicer.InstanceCheck\">"
" <method name=\"AnotherInstance\">"
" <arg name=\"data\" direction=\"in\" type=\"s\" />"
" </method>"
@ -550,7 +550,7 @@ namespace MessageHandlerDBusInternal
dbus_connection_send(connection, reply, NULL);
dbus_message_unref(reply);
}
//method AnotherInstance receives message from another BambuStudio instance
//method AnotherInstance receives message from another OrcaSlicer instance
static void handle_method_another_instance(DBusConnection *connection, DBusMessage *request)
{
DBusError err;
@ -576,7 +576,7 @@ namespace MessageHandlerDBusInternal
{
const char* interface_name = dbus_message_get_interface(message);
const char* member_name = dbus_message_get_member(message);
std::string our_interface = "com.BambuLab.BambuStudio.InstanceCheck.Object" + wxGetApp().get_instance_hash_string();
std::string our_interface = "com.softfever3d.OrcaSlicer.InstanceCheck.Object" + wxGetApp().get_instance_hash_string();
BOOST_LOG_TRIVIAL(trace) << "DBus message received: interface: " << interface_name << ", member: " << member_name;
if (0 == strcmp("org.freedesktop.DBus.Introspectable", interface_name) && 0 == strcmp("Introspect", member_name)) {
respond_to_introspect(connection, message);
@ -596,8 +596,8 @@ void OtherInstanceMessageHandler::listen()
int name_req_val;
DBusObjectPathVTable vtable;
std::string instance_hash = wxGetApp().get_instance_hash_string();
std::string interface_name = "com.BambuLab.BambuStudio.InstanceCheck.Object" + instance_hash;
std::string object_name = "/com/BambuLab/BambuStudio/InstanceCheck/Object" + instance_hash;
std::string interface_name = "com.softfever3d.OrcaSlicer.InstanceCheck.Object" + instance_hash;
std::string object_name = "/com/softfever3d/OrcaSlicer/InstanceCheck/Object" + instance_hash;
//BOOST_LOG_TRIVIAL(debug) << "init dbus listen " << interface_name << " " << object_name;
dbus_error_init(&err);
@ -625,7 +625,7 @@ void OtherInstanceMessageHandler::listen()
return;
}
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != name_req_val) {
BOOST_LOG_TRIVIAL(error) << "Not primary owner of DBus name - probably another BambuStudio instance is running.";
BOOST_LOG_TRIVIAL(error) << "Not primary owner of DBus name - probably another OrcaSlicer instance is running.";
BOOST_LOG_TRIVIAL(error) << "Dbus Messages listening terminating.";
dbus_connection_unref(conn);
return;

View file

@ -1499,7 +1499,7 @@ wxBoxSizer* MainFrame::create_side_tools()
p->append_button(export_gcode_btn);
}
else {
//Bambu Studio Buttons
//Orca Slicer Buttons
SideButton* print_plate_btn = new SideButton(p, _L("Print plate"), "");
print_plate_btn->SetCornerRadius(0);

View file

@ -202,9 +202,9 @@ void Mouse3DController::init()
// Registration is done either by 4letter constant (CFBundleSignature - obsolete
//and we dont have that) or Executable name in pascal string(first byte is string lenght).
//If no packets are recieved the name might be different - check cmake. If debugging try commenting
// set_target_properties(BambuStudio PROPERTIES OUTPUT_NAME "orca-slicer")
// set_target_properties(OrcaSlicer PROPERTIES OUTPUT_NAME "orca-slicer")
clientID = RegisterConnexionClient(
0, "\013BambuStudio", kConnexionClientModeTakeOver, kConnexionMaskAxis);
0, "\013OrcaSlicer", kConnexionClientModeTakeOver, kConnexionMaskAxis);
BOOST_LOG_TRIVIAL(info) << "3dx mac handler registered";
}
}

View file

@ -1450,7 +1450,7 @@ void Sidebar::sync_ams_list()
wxGetApp().app_config ->set("ams_filament_ids", p->ams_list_device, ams_filament_ids);
if (unknowns > 0) {
MessageDialog dlg(this,
_L("There are some unknown filaments mapped to generic preset. Please update Bambu Studio or restart Bambu Studio to check if there is an update to system presets."),
_L("There are some unknown filaments mapped to generic preset. Please update Orca Slicer or restart Orca Slicer to check if there is an update to system presets."),
_L("Sync filaments with AMS"), wxOK);
dlg.ShowModal();
}
@ -3125,7 +3125,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
q->select_plate(0);
if (load_type != LoadType::LoadGeometry) {
if (en_3mf_file_type == En3mfType::From_BBS)
show_info(q, _L("The 3mf is generated by old Bambu Studio, load geometry data only."), _L("Load 3mf"));
show_info(q, _L("The 3mf is generated by old Orca Slicer, load geometry data only."), _L("Load 3mf"));
else
show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf"));
}
@ -7466,7 +7466,7 @@ void Plater::priv::bring_instance_forward() const
BOOST_LOG_TRIVIAL(debug) << "Couldnt bring instance forward - mainframe is null";
return;
}
BOOST_LOG_TRIVIAL(debug) << "Bambu Studio window going forward";
BOOST_LOG_TRIVIAL(debug) << "Orca Slicer window going forward";
//this code maximize app window on Fedora
{
main_frame->Iconize(false);
@ -11673,7 +11673,7 @@ void Plater::show_object_info()
#ifndef __WINDOWS__
if (non_manifold_edges > 0) {
info_manifold += into_u8("\n" + _L("Tips:") + "\n" +_L("\"Fix Model\" feature is currently only on Windows. Please repair the model on Bambu Studio(windows) or CAD softwares."));
info_manifold += into_u8("\n" + _L("Tips:") + "\n" +_L("\"Fix Model\" feature is currently only on Windows. Please repair the model on Orca Slicer(windows) or CAD softwares."));
}
#endif //APPLE & LINUX

View file

@ -826,15 +826,15 @@ wxWindow* PreferencesDialog::create_general_page()
auto item_user_sync = create_item_checkbox(_L("Auto sync user presets(Printer/Filament/Process)"), page, _L("User Sync"), 50, "sync_user_preset");
#ifdef _WIN32
auto title_associate_file = create_item_title(_L("Associate files to BambuStudio"), page, _L("Associate files to BambuStudio"));
auto title_associate_file = create_item_title(_L("Associate files to OrcaSlicer"), page, _L("Associate files to OrcaSlicer"));
// associate file
auto item_associate_3mf = create_item_checkbox(_L("Associate .3mf files to BambuStudio"), page,
_L("If enabled, sets BambuStudio as default application to open .3mf files"), 50, "associate_3mf");
auto item_associate_stl = create_item_checkbox(_L("Associate .stl files to BambuStudio"), page,
_L("If enabled, sets BambuStudio as default application to open .stl files"), 50, "associate_stl");
auto item_associate_step = create_item_checkbox(_L("Associate .step/.stp files to BambuStudio"), page,
_L("If enabled, sets BambuStudio as default application to open .step files"), 50, "associate_step");
auto item_associate_3mf = create_item_checkbox(_L("Associate .3mf files to OrcaSlicer"), page,
_L("If enabled, sets OrcaSlicer as default application to open .3mf files"), 50, "associate_3mf");
auto item_associate_stl = create_item_checkbox(_L("Associate .stl files to OrcaSlicer"), page,
_L("If enabled, sets OrcaSlicer as default application to open .stl files"), 50, "associate_stl");
auto item_associate_step = create_item_checkbox(_L("Associate .step/.stp files to OrcaSlicer"), page,
_L("If enabled, sets OrcaSlicer as default application to open .step files"), 50, "associate_step");
#endif // _WIN32

View file

@ -134,7 +134,7 @@ UpdatePluginDialog::UpdatePluginDialog(wxWindow* parent /*= nullptr*/)
m_text_up_info->SetForegroundColour(wxColour(0x26, 0x2E, 0x30));
operation_tips = new ::Label(this, _L("Click OK to update the Network plug-in when Bambu Studio launches next time."));
operation_tips = new ::Label(this, _L("Click OK to update the Network plug-in when Orca Slicer launches next time."));
operation_tips->SetFont(::Label::Body_12);
operation_tips->SetMinSize(wxSize(FromDIP(260), -1));
operation_tips->SetMaxSize(wxSize(FromDIP(260), -1));
@ -255,7 +255,7 @@ void UpdatePluginDialog::update_info(std::string json_path)
}
UpdateVersionDialog::UpdateVersionDialog(wxWindow *parent)
: DPIDialog(parent, wxID_ANY, _L("New version of Bambu Studio"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
: DPIDialog(parent, wxID_ANY, _L("New version of Orca Slicer"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
{
std::string icon_path = (boost::format("%1%/images/BambuStudioTitle.ico") % resources_dir()).str();
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
@ -974,7 +974,7 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent)
auto m_line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1));
m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
comfirm_before_enter_text = _L("Step 1, please confirm Bambu Studio and your printer are in the same LAN.");
comfirm_before_enter_text = _L("Step 1, please confirm Orca Slicer and your printer are in the same LAN.");
comfirm_after_enter_text = _L("Step 2, if the IP and Access Code below are different from the actual values on your printer, please correct them.");

View file

@ -210,7 +210,7 @@ static bool should_dialog_be_shown()
// Following function saves current BambuStudio version into app config.
// Following function saves current OrcaSlicer version into app config.
// It will be later used to decide whether to open the dialog or not.
static void save_version()
{

View file

@ -1064,7 +1064,7 @@ void SendToPrinterDialog::show_status(PrintDialogStatus status, std::vector<wxSt
Enable_Refresh_Button(true);
}
else if (status == PrintDialogStatus::PrintStatusNotOnTheSameLAN) {
wxString msg_text = _L("The printer is required to be in the same LAN as Bambu Studio.");
wxString msg_text = _L("The printer is required to be in the same LAN as Orca Slicer.");
update_print_status_msg(msg_text, true, true);
Enable_Send_Button(false);
Enable_Refresh_Button(true);

View file

@ -147,7 +147,7 @@ SysInfoDialog::SysInfoDialog()
#ifdef WIN32
std::wstring blacklisted_libraries = BlacklistedLibraryCheck::get_instance().get_blacklisted_string().c_str();
if (! blacklisted_libraries.empty())
blacklisted_libraries_message = wxString("<br><b>") + _L("Blacklisted libraries loaded into BambuStudio process:") + "</b><br>" + blacklisted_libraries;
blacklisted_libraries_message = wxString("<br><b>") + _L("Blacklisted libraries loaded into OrcaSlicer process:") + "</b><br>" + blacklisted_libraries;
#endif // WIN32
const auto text = GUI::format_wxstr(
"<html>"

View file

@ -31,7 +31,7 @@ using namespace nlohmann;
namespace Slic3r { namespace GUI {
DownPluginFrame::DownPluginFrame(GUI_App *pGUI) : wxDialog((wxWindow *) (pGUI->mainframe), wxID_ANY, "Bambu Studio"), m_appconfig_new()
DownPluginFrame::DownPluginFrame(GUI_App *pGUI) : wxDialog((wxWindow *) (pGUI->mainframe), wxID_ANY, "Orca Slicer"), m_appconfig_new()
{
// INI
m_MainPtr = pGUI;

View file

@ -41,7 +41,7 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
SetBackgroundColour(*wxWHITE);
// INI
m_SectionName = "firstguide";
PrivacyUse = true;
PrivacyUse = false;
InstallNetplugin = false;
m_MainPtr = pGUI;
@ -524,11 +524,12 @@ bool GuideFrame::IsFirstUse()
int GuideFrame::SaveProfile()
{
// SoftFever: don't collect info
//privacy
if (PrivacyUse == true) {
m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "1");
} else
m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
// if (PrivacyUse == true) {
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "1");
// } else
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
m_MainPtr->app_config->set("region", m_Region);

View file

@ -130,7 +130,7 @@ void wxMediaCtrl2::Load(wxURI url)
if (!hasplugins) {
Slic3r::GUI::wxGetApp().CallAfter([] {
wxMessageBox(_L("Your system is missing H.264 codecs for GStreamer, which are required to play video. (Try installing the gstreamer1.0-plugins-bad or gstreamer1.0-libav packages, then restart Bambu Studio?)"), _L("Error"), wxOK);
wxMessageBox(_L("Your system is missing H.264 codecs for GStreamer, which are required to play video. (Try installing the gstreamer1.0-plugins-bad or gstreamer1.0-libav packages, then restart Orca Slicer?)"), _L("Error"), wxOK);
});
m_error = 101;
wxMediaEvent event(wxEVT_MEDIA_STATECHANGED);

View file

@ -71,39 +71,6 @@ void copy_file_fix(const fs::path &source, const fs::path &target)
fs::permissions(target, perms);
}
//BBS: add directory copy
void copy_directory_fix(const fs::path &source, const fs::path &target)
{
BOOST_LOG_TRIVIAL(debug) << format("PresetUpdater: Copying %1% -> %2%", source, target);
std::string error_message;
if (fs::exists(target))
fs::remove_all(target);
fs::create_directories(target);
for (auto &dir_entry : boost::filesystem::directory_iterator(source))
{
std::string source_file = dir_entry.path().string();
std::string name = dir_entry.path().filename().string();
std::string target_file = target.string() + "/" + name;
if (boost::filesystem::is_directory(dir_entry)) {
const auto target_path = target / name;
copy_directory_fix(dir_entry, target_path);
}
else {
//CopyFileResult cfr = Slic3r::GUI::copy_file_gui(source_file, target_file, error_message, false);
CopyFileResult cfr = copy_file(source_file, target_file, error_message, false);
if (cfr != CopyFileResult::SUCCESS) {
BOOST_LOG_TRIVIAL(error) << "Copying failed(" << cfr << "): " << error_message;
throw Slic3r::CriticalException(GUI::format(
_L("Copying directory %1% to %2% failed: %3%"),
source, target, error_message));
}
}
}
return;
}
struct Update
{
fs::path source;
@ -137,7 +104,7 @@ struct Update
void install() const
{
if (is_directory) {
copy_directory_fix(source, target);
copy_directory_recursively(source, target);
}
else {
copy_file_fix(source, target);

View file

@ -14,7 +14,7 @@
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
// For starting another BambuStudio instance on OSX.
// For starting another OrcaSlicer instance on OSX.
// Fails to compile on Windows on the build server.
#ifdef __APPLE__
#include <boost/process/spawn.hpp>
@ -51,7 +51,7 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance
args.emplace_back(L"--single-instance");
args.emplace_back(nullptr);
BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << into_u8(path) << "\"";
// Don't call with wxEXEC_HIDE_CONSOLE, BambuStudio in GUI mode would just show the splash screen. It would not open the main window though, it would
// Don't call with wxEXEC_HIDE_CONSOLE, OrcaSlicer in GUI mode would just show the splash screen. It would not open the main window though, it would
// just hang in the background.
if (wxExecute(const_cast<wchar_t**>(args.data()), wxEXEC_ASYNC) <= 0)
BOOST_LOG_TRIVIAL(error) << "Failed to spawn a new slicer \"" << into_u8(path);