Skip to content

Commit

Permalink
fix crash when there are unicode string in the model path
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Oct 26, 2022
1 parent 96810ea commit 6447421
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ cmake --build . --config Release --target ALL_BUILD -- -m
cd %WP%
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake --build . --config Release --target ALL_BUILD -- -m
cmake --build . --target install --config Release
2 changes: 1 addition & 1 deletion build_release_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ make -j10
cd $WD
mkdir -p build
cd build
cmake .. -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON
cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON
cmake --build . --config Release --target all -j10
cmake --build . --target install --config Release -j10
cd BambuStudio-SoftFever
Expand Down
2 changes: 1 addition & 1 deletion build_relwithdebinfo.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ cmake --build . --config Release --target ALL_BUILD -- -m
cd %WP%
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake --build . --config RelWithDebInfo --target ALL_BUILD -- -m
@REM cmake --build . --target install --config RelWithDebInfo
2 changes: 0 additions & 2 deletions src/libslic3r/PresetBundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ static std::vector<std::string> s_project_options {
"wipe_tower_y",
"wipe_tower_rotation_angle",
"curr_bed_type",
// #if !BBL_RELEASE_TO_PUBLIC
"flush_multiplier",
// #endif
};

//BBS: add BBL as default
Expand Down
14 changes: 8 additions & 6 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,9 @@ Sidebar::Sidebar(Plater *parent)
std::vector<float> extruders = dlg.get_extruders();
(project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values = std::vector<double>(matrix.begin(), matrix.end());
(project_config.option<ConfigOptionFloats>("flush_volumes_vector"))->values = std::vector<double>(extruders.begin(), extruders.end());
#if !BBL_RELEASE_TO_PUBLIC
// #if !BBL_RELEASE_TO_PUBLIC
(project_config.option<ConfigOptionFloat>("flush_multiplier"))->set(new ConfigOptionFloat(dlg.get_flush_multiplier()));
#endif
// #endif

wxGetApp().plater()->update_project_dirty_from_presets();
wxPostEvent(parent, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, parent));
Expand Down Expand Up @@ -955,6 +955,8 @@ void Sidebar::update_all_preset_comboboxes()

if (p->combo_printer)
p->combo_printer->update();

p_mainframe->m_tabpanel->SetSelection(p_mainframe->m_tabpanel->GetSelection());
}

void Sidebar::update_presets(Preset::Type preset_type)
Expand Down Expand Up @@ -4217,7 +4219,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
return;

show_warning_dialog = true;
show_warning_dialog = false;
if (! output_path.empty()) {
background_process.schedule_export(output_path.string(), output_path_on_removable_media);
notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0);
Expand Down Expand Up @@ -4249,7 +4251,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
return;

show_warning_dialog = true;
show_warning_dialog = false;
if (! output_path.empty()) {
background_process.schedule_export(output_path.string(), output_path_on_removable_media);
notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0);
Expand Down Expand Up @@ -8355,7 +8357,7 @@ void Plater::export_gcode(bool prefer_removable)
unsigned int state = this->p->update_restart_background_process(false, false);
if (state & priv::UPDATE_BACKGROUND_PROCESS_INVALID)
return;
default_output_file = this->p->background_process.output_filepath_for_project(into_path(get_project_filename(".3mf")));
default_output_file = this->p->background_process.output_filepath_for_project("");
} catch (const Slic3r::PlaceholderParserError &ex) {
// Show the error with monospaced font.
show_error(this, ex.what(), true);
Expand Down Expand Up @@ -9079,7 +9081,7 @@ void Plater::send_gcode_legacy(int plate_idx, Export3mfProgressFn proFn, bool up
unsigned int state = this->p->update_restart_background_process(false, false);
if (state & priv::UPDATE_BACKGROUND_PROCESS_INVALID)
return;
default_output_file = this->p->background_process.output_filepath_for_project(into_path(get_project_filename(".3mf")));
default_output_file = this->p->background_process.output_filepath_for_project("");
} catch (const Slic3r::PlaceholderParserError& ex) {
// Show the error with monospaced font.
show_error(this, ex.what(), true);
Expand Down
6 changes: 3 additions & 3 deletions src/slic3r/GUI/SelectMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ SelectMachinePopup::SelectMachinePopup(wxWindow *parent)
m_scrolledWindow->Layout();
m_sizxer_scrolledWindow->Fit(m_scrolledWindow);

#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
m_sizer_search_bar = new wxBoxSizer(wxVERTICAL);
m_search_bar = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_search_bar->ShowSearchButton( true );
Expand Down Expand Up @@ -574,7 +574,7 @@ void SelectMachinePopup::update_other_devices()
if (i < m_other_list_machine_panel.size()) {
op = m_other_list_machine_panel[i]->mPanel;
op->Show();
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
}
Expand Down Expand Up @@ -691,7 +691,7 @@ void SelectMachinePopup::update_user_devices()
if (i < m_user_list_machine_panel.size()) {
op = m_user_list_machine_panel[i]->mPanel;
op->Show();
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
}
Expand Down
2 changes: 1 addition & 1 deletion version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ if(NOT DEFINED BBL_INTERNAL_TESTING)
set(BBL_INTERNAL_TESTING "1")
endif()
set(SLIC3R_VERSION "01.03.00.12")
set(SoftFever_VERSION "1.3.2 beta3")
set(SoftFever_VERSION "1.3.2 beta4")

0 comments on commit 6447421

Please sign in to comment.