mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 07:11:12 -06:00
Change Application name to OrcaSlicer
This commit is contained in:
parent
81ca7720e9
commit
5b0ba1207e
93 changed files with 5629 additions and 10221 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue