diff --git a/resources/icons/PrusaSlicer_logo.svg b/resources/icons/PrusaSlicer_logo.svg new file mode 100644 index 00000000000..927c3e70ba9 --- /dev/null +++ b/resources/icons/PrusaSlicer_logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/resources/icons/Slic3r-console.ico b/resources/icons/Slic3r-console.ico index 7d168c87428..891de9b705c 100644 Binary files a/resources/icons/Slic3r-console.ico and b/resources/icons/Slic3r-console.ico differ diff --git a/resources/icons/Slic3r.icns b/resources/icons/Slic3r.icns index 04a2be211b1..1af7921b650 100644 Binary files a/resources/icons/Slic3r.icns and b/resources/icons/Slic3r.icns differ diff --git a/resources/icons/Slic3r.ico b/resources/icons/Slic3r.ico index 9a92bb10385..891de9b705c 100644 Binary files a/resources/icons/Slic3r.ico and b/resources/icons/Slic3r.ico differ diff --git a/resources/icons/Slic3r.png b/resources/icons/Slic3r.png index d480dc881e4..3d6b02641b9 100644 Binary files a/resources/icons/Slic3r.png and b/resources/icons/Slic3r.png differ diff --git a/resources/icons/Slic3r_128px.png b/resources/icons/Slic3r_128px.png index 006e95f517b..57a15b3d952 100644 Binary files a/resources/icons/Slic3r_128px.png and b/resources/icons/Slic3r_128px.png differ diff --git a/resources/icons/Slic3r_192px.png b/resources/icons/Slic3r_192px.png index 2e08916fcc8..5e495612924 100644 Binary files a/resources/icons/Slic3r_192px.png and b/resources/icons/Slic3r_192px.png differ diff --git a/resources/icons/Slic3r_192px_transparent.png b/resources/icons/Slic3r_192px_transparent.png index 8b7165a60b6..0d1e4e01ebb 100644 Binary files a/resources/icons/Slic3r_192px_transparent.png and b/resources/icons/Slic3r_192px_transparent.png differ diff --git a/resources/icons/Slic3r_32px.png b/resources/icons/Slic3r_32px.png index 9fb42e6f73a..6f3229e6a74 100644 Binary files a/resources/icons/Slic3r_32px.png and b/resources/icons/Slic3r_32px.png differ diff --git a/resources/icons/Slic3r_logo.png b/resources/icons/Slic3r_logo.png new file mode 100644 index 00000000000..9c278f6f0af Binary files /dev/null and b/resources/icons/Slic3r_logo.png differ diff --git a/resources/icons/SuperSlicer-console.ico b/resources/icons/SuperSlicer-console.ico new file mode 100644 index 00000000000..7d168c87428 Binary files /dev/null and b/resources/icons/SuperSlicer-console.ico differ diff --git a/resources/icons/SuperSlicer-gcodeviewer.ico b/resources/icons/SuperSlicer-gcodeviewer.ico new file mode 100644 index 00000000000..01ed65b6ad3 Binary files /dev/null and b/resources/icons/SuperSlicer-gcodeviewer.ico differ diff --git a/resources/icons/SuperSlicer-gcodeviewer_128px.png b/resources/icons/SuperSlicer-gcodeviewer_128px.png new file mode 100644 index 00000000000..a84ff52818d Binary files /dev/null and b/resources/icons/SuperSlicer-gcodeviewer_128px.png differ diff --git a/resources/icons/SuperSlicer-gcodeviewer_192px.png b/resources/icons/SuperSlicer-gcodeviewer_192px.png new file mode 100644 index 00000000000..d0b6b07427e Binary files /dev/null and b/resources/icons/SuperSlicer-gcodeviewer_192px.png differ diff --git a/resources/icons/SuperSlicer-gcodeviewer_32px.png b/resources/icons/SuperSlicer-gcodeviewer_32px.png new file mode 100644 index 00000000000..40d7a46fc02 Binary files /dev/null and b/resources/icons/SuperSlicer-gcodeviewer_32px.png differ diff --git a/resources/icons/SuperSlicer.icns b/resources/icons/SuperSlicer.icns new file mode 100644 index 00000000000..04a2be211b1 Binary files /dev/null and b/resources/icons/SuperSlicer.icns differ diff --git a/resources/icons/SuperSlicer.ico b/resources/icons/SuperSlicer.ico new file mode 100644 index 00000000000..9a92bb10385 Binary files /dev/null and b/resources/icons/SuperSlicer.ico differ diff --git a/resources/icons/SuperSlicer.png b/resources/icons/SuperSlicer.png new file mode 100644 index 00000000000..d480dc881e4 Binary files /dev/null and b/resources/icons/SuperSlicer.png differ diff --git a/resources/icons/SuperSlicer_128px.png b/resources/icons/SuperSlicer_128px.png new file mode 100644 index 00000000000..006e95f517b Binary files /dev/null and b/resources/icons/SuperSlicer_128px.png differ diff --git a/resources/icons/SuperSlicer_192px.png b/resources/icons/SuperSlicer_192px.png new file mode 100644 index 00000000000..2e08916fcc8 Binary files /dev/null and b/resources/icons/SuperSlicer_192px.png differ diff --git a/resources/icons/SuperSlicer_192px_transparent.png b/resources/icons/SuperSlicer_192px_transparent.png new file mode 100644 index 00000000000..8b7165a60b6 Binary files /dev/null and b/resources/icons/SuperSlicer_192px_transparent.png differ diff --git a/resources/icons/SuperSlicer_32px.png b/resources/icons/SuperSlicer_32px.png new file mode 100644 index 00000000000..9fb42e6f73a Binary files /dev/null and b/resources/icons/SuperSlicer_32px.png differ diff --git a/resources/icons/prusa_slicer_logo.svg b/resources/icons/SuperSlicer_logo.svg similarity index 100% rename from resources/icons/prusa_slicer_logo.svg rename to resources/icons/SuperSlicer_logo.svg diff --git a/resources/icons/super_slicer_logo.svg b/resources/icons/super_slicer_logo.svg deleted file mode 100644 index 44dde111447..00000000000 --- a/resources/icons/super_slicer_logo.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8e9fba86ca7..fce85d98ecb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,7 +92,7 @@ endif() # Create a SuperSlicer executable # Process mainfests for various platforms. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/SuperSlicer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.rc @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer-gcodeviewer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer-gcodeviewer.rc @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/gcodeviewer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/gcodeviewer.rc @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.manifest @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY) if (WIN32) @@ -148,35 +148,40 @@ if (WIN32) if (MINGW) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode") endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libslic3r/libslic3r_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h @ONLY) - add_executable(SuperSlicer_app_gui WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.rc) + add_executable(SuperSlicer_app_gui WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.rc ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h) + target_include_directories(SuperSlicer_app_gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) # Generate debug symbols even in release mode. if(MSVC) target_link_options(SuperSlicer_app_gui PUBLIC "$<$:/DEBUG>") endif() target_compile_definitions(SuperSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE) add_dependencies(SuperSlicer_app_gui SuperSlicer) - set_target_properties(SuperSlicer_app_gui PROPERTIES OUTPUT_NAME "superslicer") + set_target_properties(SuperSlicer_app_gui PROPERTIES OUTPUT_NAME "@SLIC3R_APP_CMD@") target_link_libraries(SuperSlicer_app_gui PRIVATE boost_headeronly) - add_executable(SuperSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.rc) + add_executable(SuperSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/SuperSlicer.rc ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h) + target_include_directories(SuperSlicer_app_console PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) # Generate debug symbols even in release mode. if (MSVC) target_link_options(SuperSlicer_app_console PUBLIC "$<$:/DEBUG>") endif () target_compile_definitions(SuperSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE) add_dependencies(SuperSlicer_app_console SuperSlicer) - set_target_properties(SuperSlicer_app_console PROPERTIES OUTPUT_NAME "superslicer_console") + set_target_properties(SuperSlicer_app_console PROPERTIES OUTPUT_NAME "@SLIC3R_APP_CMD@_console") target_link_libraries(SuperSlicer_app_console PRIVATE boost_headeronly) - add_executable(PrusaSlicer_app_gcodeviewer WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer-gcodeviewer.rc) + add_executable(PrusaSlicer_app_gcodeviewer WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/gcodeviewer.rc ${CMAKE_CURRENT_BINARY_DIR}/libslic3r_version.h) + target_include_directories(PrusaSlicer_app_gcodeviewer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) # Generate debug symbols even in release mode. if (MSVC) target_link_options(PrusaSlicer_app_gcodeviewer PUBLIC "$<$:/DEBUG>") endif () target_compile_definitions(PrusaSlicer_app_gcodeviewer PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE -DSLIC3R_WRAPPER_GCODEVIEWER) add_dependencies(PrusaSlicer_app_gcodeviewer SuperSlicer) - set_target_properties(PrusaSlicer_app_gcodeviewer PROPERTIES OUTPUT_NAME "prusa-gcodeviewer") + set_target_properties(PrusaSlicer_app_gcodeviewer PROPERTIES OUTPUT_NAME "@GCODEVIEWER_APP_CMD@") target_link_libraries(PrusaSlicer_app_gcodeviewer PRIVATE boost_headeronly) endif () diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index bdd7ef3bfc4..2d0d226a8b7 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -668,7 +668,7 @@ void CLI::print_help(bool include_print_options, PrinterTechnology printer_techn << " (without GUI support)" #endif /* SLIC3R_GUI */ << std::endl - << "https://github.com/prusa3d/PrusaSlicer" << std::endl << std::endl + << "https://github.com/" << SLIC3R_GITHUB << std::endl << std::endl << "Usage: superslicer [ ACTIONS ] [ TRANSFORM ] [ OPTIONS ] [ file.stl ... ]" << std::endl << std::endl << "Actions:" << std::endl; diff --git a/src/PrusaSlicer_app_msvc.cpp b/src/PrusaSlicer_app_msvc.cpp index a1b87e05b8f..7cd85b812c2 100644 --- a/src/PrusaSlicer_app_msvc.cpp +++ b/src/PrusaSlicer_app_msvc.cpp @@ -6,6 +6,7 @@ #include #include #include +#include "libslic3r/libslic3r_version.h" @@ -286,7 +287,7 @@ int wmain(int argc, wchar_t **argv) // printf("Loading SuperSlicer library: %S\n", path_to_slic3r); HINSTANCE hInstance_Slic3r = LoadLibraryExW(path_to_slic3r, nullptr, 0); if (hInstance_Slic3r == nullptr) { - printf("SuperSlicer.dll was not loaded, error code: %d\n", GetLastError()); + printf(SLIC3R_APP_NAME ".dll was not loaded, error code: %d\n", GetLastError()); return -1; } diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 9b9bf478812..d97f44176a3 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -24,7 +24,7 @@ namespace Slic3r { static const std::string VENDOR_PREFIX = "vendor:"; static const std::string MODEL_PREFIX = "model:"; -static const std::string VERSION_CHECK_URL = "https://api.github.com/repos/supermerill/superslicer/releases"; +static const std::string VERSION_CHECK_URL = "https://api.github.com/repos/" SLIC3R_GITHUB "/releases"; const std::string AppConfig::SECTION_FILAMENTS = "filaments"; const std::string AppConfig::SECTION_MATERIALS = "sla_materials"; @@ -208,7 +208,7 @@ std::string AppConfig::load() // we will rethrow this exception from the place of load() call, if returned value wouldn't be empty /* throw Slic3r::RuntimeError( - _utf8(L("Error parsing SuperSlicer config file, it is probably corrupted. " + _utf8(L("Error parsing " SLIC3R_APP_NAME " config file, it is probably corrupted. " "Try to manually delete the file to recover from the error. Your user profiles will not be affected.")) + "\n\n" + AppConfig::config_path() + "\n\n" + ex.what()); */ diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index fe3650c869c..d89228eb8bf 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -722,7 +722,7 @@ void ConfigBase::load_from_gcode_file(const std::string &file) strncmp(slic3rpp_gcode_header, firstline.c_str(), strlen(slic3rpp_gcode_header)) != 0 && strncmp(superslicer_gcode_header, firstline.c_str(), strlen(superslicer_gcode_header)) != 0 && strncmp(prusaslicer_gcode_header, firstline.c_str(), strlen(prusaslicer_gcode_header)) != 0) - throw Slic3r::RuntimeError("Not a PrusaSlicer / SuperSlicer generated g-code."); + throw Slic3r::RuntimeError("Not a Slic3r / PrusaSlicer / SuperSlicer generated g-code."); } ifs.seekg(0, ifs.end); auto file_length = ifs.tellg(); diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index cb6958b7e29..b286f6dcafd 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -863,7 +863,7 @@ void GCodeProcessor::process_file(const std::string& filename, bool apply_postpr } }); - // if the gcode was produced by SuperSlicer, + // if the gcode was produced by this slicer, // extract the config from it try { if (m_producer == EProducer::PrusaSlicer || m_producer == EProducer::SuperSlicer || m_producer == EProducer::Slic3rPE || m_producer == EProducer::Slic3r) { diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 87a437fbb34..6b13bb812f0 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -435,7 +435,8 @@ namespace Slic3r { { Unknown, PrusaSlicer, - SuperSlicer, Slic3rPE, + SuperSlicer, + Slic3rPE, Slic3r, Cura, Simplify3D, diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index df8e1a126fa..987e5784c3d 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1932,7 +1932,7 @@ void PrintConfigDef::init_fff_params() def->category = OptionCategory::infill; def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. " "If expressed as percentage (example: 15%) it is calculated over infill extrusion width. " - "PrusaSlicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment " + SLIC3R_APP_NAME " tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment " "shorter than infill_anchor_max is found, the infill line is connected to a perimeter segment at just one side " "and the length of the perimeter segment taken is limited to this parameter, but no longer than anchor_length_max. " "\nSet this parameter to zero to disable anchoring perimeters connected to a single infill line."); @@ -1959,7 +1959,7 @@ void PrintConfigDef::init_fff_params() def->category = def_infill_anchor_min->category; def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. " "If expressed as percentage (example: 15%) it is calculated over infill extrusion width. " - "PrusaSlicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment " + SLIC3R_APP_NAME " tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment " "shorter than this parameter is found, the infill line is connected to a perimeter segment at just one side " "and the length of the perimeter segment taken is limited to infill_anchor, but no longer than this parameter. " "\nIf set to 0, the old algorithm for infill connection will be used, it should create the same result as with 1000 & 0."); @@ -2903,7 +2903,7 @@ void PrintConfigDef::init_fff_params() "the slicing job and reducing memory usage. High-resolution models often carry " "more detail than printers can render. Set to zero to disable any simplification " "and use full resolution from input. " - "\nNote: SuperSlicer has an internal resolution of 0.000001mm." + "\nNote: " SLIC3R_APP_NAME " has an internal resolution of 0.000001mm." "\nInfill & Thin areas are simplified up to 0.0125mm."); def->sidetext = L("mm"); def->min = 0; @@ -5971,8 +5971,8 @@ CLIMiscConfigDef::CLIMiscConfigDef() def = this->add("single_instance", coBool); def->label = L("Single instance mode"); - def->tooltip = L("If enabled, the command line arguments are sent to an existing instance of GUI PrusaSlicer, " - "or an existing PrusaSlicer window is activated. " + def->tooltip = L("If enabled, the command line arguments are sent to an existing instance of GUI " SLIC3R_APP_NAME ", " + "or an existing " SLIC3R_APP_NAME " window is activated. " "Overrides the \"single_instance\" configuration value from application preferences."); /* diff --git a/src/libslic3r/SlicingAdaptive.cpp b/src/libslic3r/SlicingAdaptive.cpp index 7ab0c47b270..4cc3e0dd87d 100644 --- a/src/libslic3r/SlicingAdaptive.cpp +++ b/src/libslic3r/SlicingAdaptive.cpp @@ -24,7 +24,7 @@ lerr2=1./(0.3+cos(a)); plot(adeg, t, 'b', adeg, sqrt(t), 'g', adeg, 0.5 * lerr, 'm', adeg, 0.5 * lerr2, 'r') xlabel("angle(deg), 0 - horizontal wall, 90 - vertical wall"); ylabel("layer height"); -legend("tan(a) as cura - topographic lines distance limit", "sqrt(tan(a)) as PrusaSlicer - error triangle area limit", "old slic3r - max distance metric", "new slic3r - Waserfall paper"); +legend("tan(a) as cura - topographic lines distance limit", "sqrt(tan(a)) as "+SLIC3R_APP_NAME+" - error triangle area limit", "old slic3r - max distance metric", "new slic3r - Waserfall paper"); #endif #ifndef NDEBUG diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index 65a519b3f8f..a5e8f98ddac 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -2,9 +2,6 @@ #define _libslic3r_h_ #include "libslic3r_version.h" -#define GCODEVIEWER_APP_NAME "PrusaSlicer G-code Viewer" -#define GCODEVIEWER_APP_KEY "PrusaSlicerGcodeViewer" -#define GCODEVIEWER_BUILD_ID std::string("PrusaSlicer G-code Viewer-") + std::string(SLIC3R_VERSION) + std::string("-UNKNOWN") // this needs to be included early for MSVC (listing it in Build.PL is not enough) #include diff --git a/src/libslic3r/libslic3r_version.h.in b/src/libslic3r/libslic3r_version.h.in index a0bfb3097ea..c5de9cd02f3 100644 --- a/src/libslic3r/libslic3r_version.h.in +++ b/src/libslic3r/libslic3r_version.h.in @@ -2,9 +2,22 @@ #define __SLIC3R_VERSION_H #define SLIC3R_APP_NAME "@SLIC3R_APP_NAME@" +#define SLIC3R_APP_WNAME L"@SLIC3R_APP_NAME@" #define SLIC3R_APP_KEY "@SLIC3R_APP_KEY@" +#define SLIC3R_APP_CMD "@SLIC3R_APP_CMD@" +#define SLIC3R_APP_WCMD L"@SLIC3R_APP_CMD@" #define SLIC3R_VERSION "@SLIC3R_VERSION@" #define SLIC3R_VERSION_FULL "@SLIC3R_VERSION_FULL@" #define SLIC3R_BUILD_ID "@SLIC3R_BUILD_ID@" +#define GCODEVIEWER_APP_NAME "@GCODEVIEWER_APP_NAME@" +#define GCODEVIEWER_APP_KEY "@GCODEVIEWER_APP_KEY@" +#define GCODEVIEWER_APP_CMD "@GCODEVIEWER_APP_CMD@" +#define GCODEVIEWER_APP_WCMD L"@GCODEVIEWER_APP_CMD@" +#define GCODEVIEWER_BUILD_ID GCODEVIEWER_APP_NAME "-" SLIC3R_VERSION "-UNKNOWN" + +#define SLIC3R_BASED_ON "@SLIC3R_BASED_ON@" +#define SLIC3R_GITHUB "@SLIC3R_GITHUB@" +#define SLIC3R_INTRO "@SLIC3R_INTRO@" + #endif /* __SLIC3R_VERSION_H */ diff --git a/src/platform/msw/SuperSlicer.rc.in b/src/platform/msw/SuperSlicer.rc.in index 1507687b81e..b63721c550a 100644 --- a/src/platform/msw/SuperSlicer.rc.in +++ b/src/platform/msw/SuperSlicer.rc.in @@ -21,5 +21,5 @@ PRODUCTVERSION @SLIC3R_RC_VERSION@ VALUE "Translation", 0x409, 1252 } } -2 ICON "@SLIC3R_RESOURCES_DIR@/icons/slic3r.ico" +2 ICON "@SLIC3R_RESOURCES_DIR@/icons/SuperSlicer.ico" 1 24 "SuperSlicer.manifest" diff --git a/src/platform/msw/PrusaSlicer-gcodeviewer.rc.in b/src/platform/msw/gcodeviewer.rc.in similarity index 100% rename from src/platform/msw/PrusaSlicer-gcodeviewer.rc.in rename to src/platform/msw/gcodeviewer.rc.in diff --git a/src/slic3r/GUI/AboutDialog.cpp b/src/slic3r/GUI/AboutDialog.cpp index fa7bd167a4e..e0095d906b9 100644 --- a/src/slic3r/GUI/AboutDialog.cpp +++ b/src/slic3r/GUI/AboutDialog.cpp @@ -81,6 +81,8 @@ CopyrightsDialog::CopyrightsDialog() void CopyrightsDialog::fill_entries() { m_entries = { + { "Slic3r" , "2021 Slic3r" , "https://github.com/slic3r/slic3r" }, + { "Prusaslicer" , "2021 PrusaResearch" , "https://github.com/prusa3d/PrusaSlicer" }, { "wxWidgets" , "2019 wxWidgets" , "https://www.wxwidgets.org/" }, { "OpenGL" , "1997-2019 The Khronos Group Inc" , "https://www.opengl.org/" }, { "GNU gettext" , "1998, 2019 Free Software Foundation, Inc." , "https://www.gnu.org/software/gettext/" }, @@ -264,7 +266,7 @@ AboutDialog::AboutDialog() // TRN "Slic3r _is licensed under the_ License" const std::string is_lecensed_str = _utf8(L("is licensed under the")); const std::string license_str = _utf8(L("GNU Affero General Public License, version 3")); - const std::string based_on_str = _utf8(L("SuperSlicer is based on PrusaSlicer which is based on Slic3r by Alessandro Ranellucci and the RepRap community.")); + const std::string based_on_str = _utf8(L(SLIC3R_INTRO)); const std::string contributors_str = _utf8(L("Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Joseph Lenox, Y. Sapir, Mike Sheldrake, Vojtech Bubnik, Durand RĂ©mi and numerous others.")); const auto text = from_u8( (boost::format( diff --git a/src/slic3r/GUI/ConfigSnapshotDialog.cpp b/src/slic3r/GUI/ConfigSnapshotDialog.cpp index e59d1060a37..af17bae740a 100644 --- a/src/slic3r/GUI/ConfigSnapshotDialog.cpp +++ b/src/slic3r/GUI/ConfigSnapshotDialog.cpp @@ -48,7 +48,7 @@ static wxString generate_html_row(const Config::Snapshot &snapshot, bool row_eve text += " (" + wxString::FromUTF8(snapshot.comment.data()) + ")"; text += "
"; // End of row header. - text += _(L("SuperSlicer version")) + ": " + snapshot.slic3r_version_captured.to_string() + "
"; + text += _(L(SLIC3R_APP_NAME " version")) + ": " + snapshot.slic3r_version_captured.to_string() + "
"; bool has_fff = ! snapshot.print.empty() || ! snapshot.filaments.empty(); bool has_sla = ! snapshot.sla_print.empty() || ! snapshot.sla_material.empty(); if (has_fff || ! has_sla) { @@ -64,9 +64,9 @@ static wxString generate_html_row(const Config::Snapshot &snapshot, bool row_eve bool compatible = true; for (const Config::Snapshot::VendorConfig &vc : snapshot.vendor_configs) { text += _(L("vendor")) + ": " + vc.name +", " + _(L("version")) + ": " + vc.version.config_version.to_string() + - ", " + _(L("min SuperSlicer version")) + ": " + vc.version.min_slic3r_version.to_string(); + ", " + _(L("min " SLIC3R_APP_NAME " version")) + ": " + vc.version.min_slic3r_version.to_string(); if (vc.version.max_slic3r_version != Semver::inf()) - text += ", " + _(L("max SuperSlicer version")) + ": " + vc.version.max_slic3r_version.to_string(); + text += ", " + _(L("max " SLIC3R_APP_NAME " version")) + ": " + vc.version.max_slic3r_version.to_string(); text += "
"; for (const std::pair> &model : vc.models_variants_installed) { text += _(L("model")) + ": " + model.first + ", " + _(L("variants")) + ": "; diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index e31bbeb5b48..110bdfa1d92 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -1199,8 +1199,8 @@ PageReloadFromDisk::PageReloadFromDisk(ConfigWizard* parent) PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent) : ConfigWizardPage(parent, _L("Files association"), _L("Files association")) { - cb_3mf = new wxCheckBox(this, wxID_ANY, _L("Associate .3mf files to SuperSlicer")); - cb_stl = new wxCheckBox(this, wxID_ANY, _L("Associate .stl files to SuperSlicer")); + cb_3mf = new wxCheckBox(this, wxID_ANY, _L("Associate .3mf files to " SLIC3R_APP_NAME)); + cb_stl = new wxCheckBox(this, wxID_ANY, _L("Associate .stl files to " SLIC3R_APP_NAME)); // cb_gcode = new wxCheckBox(this, wxID_ANY, _L("Associate .gcode files to PrusaSlicer G-code Viewer")); append(cb_3mf); @@ -1213,7 +1213,7 @@ PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent) PageMode::PageMode(ConfigWizard *parent) : ConfigWizardPage(parent, _L("View mode"), _L("View mode")) { - append_text(_L("SuperSlicer's user interfaces comes in three variants:\nSimple, Advanced, and Expert.\n" + append_text(_L(SLIC3R_APP_NAME "'s user interfaces comes in three variants:\nSimple, Advanced, and Expert.\n" "The Simple mode shows only the most frequently used settings relevant for regular 3D printing. " "The other two offer progressively more sophisticated fine-tuning, " "they are suitable for advanced and expert users, respectively.")); diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp index 2fe699672c4..f99b0c0e597 100644 --- a/src/slic3r/GUI/FreeCADDialog.cpp +++ b/src/slic3r/GUI/FreeCADDialog.cpp @@ -228,7 +228,7 @@ FreeCADDialog::FreeCADDialog(GUI_App* app, MainFrame* mainframe) commands.emplace_back(PyCommand{"extrude", PyCommandType::pctOPERATION, "extrude(x,y,z,taper,[convexity=])"}); //redraw commands.emplace_back(PyCommand{"redraw", PyCommandType::pctOPERATION | PyCommandType::pctNO_PARAMETER, - "redraw(...obj3D)\nEvery object inside this command\nwill be added into SuperSlicer.\n"}); + "redraw(...obj3D)\nEvery object inside this command\nwill be added into " SLIC3R_APP_NAME ".\n"}); // beta / buggy commands.emplace_back(PyCommand{"scale", PyCommandType::pctMODIFIER | PyCommandType::pctDO_NOT_SHOW}); diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 47de3e30110..e5676c12d40 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -706,7 +706,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const } fprintf(fp, "# G-Code Toolpaths Materials\n"); - fprintf(fp, "# Generated by %s based on Slic3r\n", SLIC3R_BUILD_ID); + fprintf(fp, "# Generated by " SLIC3R_BUILD_ID " " SLIC3R_BASED_ON "\n"); unsigned int colors_count = 1; for (const Color& color : colors) { @@ -726,7 +726,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const } fprintf(fp, "# G-Code Toolpaths\n"); - fprintf(fp, "# Generated by %s based on Slic3r\n", SLIC3R_BUILD_ID); + fprintf(fp, "# Generated by " SLIC3R_BUILD_ID " " SLIC3R_BASED_ON "\n"); fprintf(fp, "\nmtllib ./%s\n", mat_filename.filename().string().c_str()); // get vertices data from vertex buffer on gpu diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 78358c6fcd1..db840a95a76 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -191,7 +191,7 @@ class SplashScreen : public wxSplashScreen BitmapCache bmp_cache; int logo_size = lround(width * 0.25); //uint32_t color = color_from_hex(Slic3r::GUI::wxGetApp().app_config->get("color_dark")); //uncomment if you also want to modify the icon color - wxBitmap logo_bmp = *bmp_cache.load_svg(wxGetApp().is_editor() ? "super_slicer_logo" : "add_gcode", logo_size, logo_size/*, color*/); + wxBitmap logo_bmp = *bmp_cache.load_svg(wxGetApp().is_editor() ? SLIC3R_APP_KEY "_logo" : "add_gcode", logo_size, logo_size/*, color*/); wxCoord margin = int(m_scale * 20); @@ -253,7 +253,7 @@ class SplashScreen : public wxSplashScreen version = _L("Version") + " " + std::string(SLIC3R_VERSION_FULL); // credits infornation - credits = title + " " + _L("is based on PrusaSlicer by Prusa and Slic3r by Alessandro Ranellucci and the RepRap community.") + "\n\n" + + credits = _L(SLIC3R_INTRO) + "\n\n" + title + " " + _L("is licensed under the") + " " + _L("GNU Affero General Public License, version 3") + "\n\n" + _L("Contributions by Vojtech Bubnik, Enrico Turri, Durand Remi, Oleksandra Iushchenko, Tamas Meszaros, Lukas Matena, Vojtech Kral, David Kocik and numerous others.") + "\n\n" + _L("Artwork model by Durand Remi"); @@ -826,7 +826,7 @@ bool GUI_App::on_init_inner() } // create splash screen with updated bmp - scrn = new SplashScreen(bmp.IsOk() ? bmp : create_scaled_bitmap("super_slicer_logo", nullptr, 400), + scrn = new SplashScreen(bmp.IsOk() ? bmp : create_scaled_bitmap( SLIC3R_APP_KEY "_logo", nullptr, 400), wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT, 4000, splashscreen_pos); #ifndef __linux__ wxYield(); @@ -1525,7 +1525,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("translation_language"); if (! language.empty()) - BOOST_LOG_TRIVIAL(trace) << boost::format("translation_language provided by SuperSlicer.ini: %1%") % language; + BOOST_LOG_TRIVIAL(trace) << boost::format("translation_language provided by " SLIC3R_APP_NAME ".ini: %1%") % language; // Get the system language. { @@ -1616,14 +1616,14 @@ bool GUI_App::load_language(wxString language, bool initial) if (! wxLocale::IsAvailable(language_info->Language)) { // Loading the language dictionary failed. - wxString message = "Switching SuperSlicer to language " + language_info->CanonicalName + " failed."; + wxString message = "Switching " SLIC3R_APP_NAME " 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, "SuperSlicer - Switching language failed", wxOK | wxICON_ERROR); + wxMessageBox(message, SLIC3R_APP_NAME " - Switching language failed", wxOK | wxICON_ERROR); if (initial) std::exit(EXIT_FAILURE); else @@ -2353,8 +2353,8 @@ void GUI_App::associate_3mf_files() ::GetModuleFileNameW(nullptr, app_path, sizeof(app_path)); std::wstring prog_path = L"\"" + std::wstring(app_path) + L"\""; - std::wstring prog_id = L"SuperSlicer.1"; - std::wstring prog_desc = L"SuperSlicer"; + std::wstring prog_id = SLIC3R_APP_WNAME L".1"; + std::wstring prog_desc = SLIC3R_APP_WNAME; std::wstring prog_command = prog_path + L" \"%1\""; std::wstring reg_base = L"Software\\Classes"; std::wstring reg_extension = reg_base + L"\\.3mf"; @@ -2378,8 +2378,8 @@ void GUI_App::associate_stl_files() ::GetModuleFileNameW(nullptr, app_path, sizeof(app_path)); std::wstring prog_path = L"\"" + std::wstring(app_path) + L"\""; - std::wstring prog_id = L"Prusa.Slicer.1"; - std::wstring prog_desc = L"PrusaSlicer"; + std::wstring prog_id = L"Super.Slicer.1"; + std::wstring prog_desc = SLIC3R_APP_WNAME; std::wstring prog_command = prog_path + L" \"%1\""; std::wstring reg_base = L"Software\\Classes"; std::wstring reg_extension = reg_base + L"\\.stl"; diff --git a/src/slic3r/GUI/GUI_Init.cpp b/src/slic3r/GUI/GUI_Init.cpp index 839782741f1..a5561d7a595 100644 --- a/src/slic3r/GUI/GUI_Init.cpp +++ b/src/slic3r/GUI/GUI_Init.cpp @@ -85,10 +85,10 @@ int GUI_Run(GUI_InitParams ¶ms) return result; } catch (const Slic3r::Exception &ex) { boost::nowide::cerr << ex.what() << std::endl; - wxMessageBox(boost::nowide::widen(ex.what()), _L("PrusaSlicer GUI initialization failed"), wxICON_STOP); + wxMessageBox(boost::nowide::widen(ex.what()), _L(SLIC3R_APP_NAME " GUI initialization failed"), wxICON_STOP); } catch (const std::exception &ex) { - boost::nowide::cerr << "PrusaSlicer GUI initialization failed: " << ex.what() << std::endl; - wxMessageBox(format_wxstr(_L("Fatal error, exception catched: %1%"), ex.what()), _L("PrusaSlicer GUI initialization failed"), wxICON_STOP); + boost::nowide::cerr << SLIC3R_APP_NAME << " GUI initialization failed: " << ex.what() << std::endl; + wxMessageBox(format_wxstr(_L("Fatal error, exception catched: %1%"), ex.what()), _L(SLIC3R_APP_NAME " GUI initialization failed"), wxICON_STOP); } // error diff --git a/src/slic3r/GUI/InstanceCheck.cpp b/src/slic3r/GUI/InstanceCheck.cpp index 6cfa879c830..74761574f02 100644 --- a/src/slic3r/GUI/InstanceCheck.cpp +++ b/src/slic3r/GUI/InstanceCheck.cpp @@ -80,7 +80,7 @@ namespace instance_check_internal return true; std::wstring classNameString(className); std::wstring wndTextString(wndText); - if (wndTextString.find(L"PrusaSlicer") != std::wstring::npos && classNameString == L"wxWindowNR") { + if (wndTextString.find(SLIC3R_APP_WNAME) != std::wstring::npos && classNameString == L"wxWindowNR") { //check if other instances has same instance hash //if not it is not same version(binary) as this version HANDLE handle = GetProp(hwnd, L"Instance_Hash_Minor"); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 2476be38007..6c7bb03c3d7 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -94,12 +94,12 @@ static wxIcon main_frame_icon(GUI_App::EAppMode app_mode) if (len > 0 && len < MAX_PATH) { path.erase(path.begin() + len, path.end()); if (app_mode == GUI_App::EAppMode::GCodeViewer) { - // Only in case the slicer was started with --gcodeviewer parameter try to load the icon from prusa-gcodeviewer.exe + // Only in case the slicer was started with --gcodeviewer parameter try to load the icon from gcodeviewer.exe // Otherwise load it from the exe. - for (const std::wstring_view exe_name : { std::wstring_view(L"superslicer.exe"), std::wstring_view(L"superslicer_console.exe") }) + for (const std::wstring_view exe_name : { std::wstring_view(SLIC3R_APP_WCMD L".exe"), std::wstring_view(SLIC3R_APP_WCMD L"_console.exe") }) if (boost::iends_with(path, exe_name)) { path.erase(path.end() - exe_name.size(), path.end()); - path += L"prusa-gcodeviewer.exe"; + path += GCODEVIEWER_APP_WCMD L".exe"; break; } } @@ -131,11 +131,11 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S default: case GUI_App::EAppMode::Editor: m_taskbar_icon = std::make_unique(wxTBI_DOCK); - m_taskbar_icon->SetIcon(wxIcon(Slic3r::var("Slic3r_128px.png"), wxBITMAP_TYPE_PNG), "SuperSlicer"); + m_taskbar_icon->SetIcon(wxIcon(Slic3r::var("Slic3r_128px.png"), wxBITMAP_TYPE_PNG), SLIC3R_APP_NAME); break; case GUI_App::EAppMode::GCodeViewer: m_taskbar_icon = std::make_unique(wxTBI_DOCK); - m_taskbar_icon->SetIcon(wxIcon(Slic3r::var("PrusaSlicer-gcodeviewer_128px.png"), wxBITMAP_TYPE_PNG), "G-code Viewer"); + m_taskbar_icon->SetIcon(wxIcon(Slic3r::var("PrusaSlicer-gcodeviewer_128px.png"), wxBITMAP_TYPE_PNG), GCODEVIEWER_APP_NAME); break; } #endif // __APPLE__ @@ -150,7 +150,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S m_statusbar->embed(this); m_statusbar->set_status_text(_L("Version") + " " + SLIC3R_VERSION + - _L("Remember to check for updates at https://github.com/supermerill/SuperSlicer/releases")); + _L("Remember to check for updates at https://github.com/" SLIC3R_GITHUB "/releases")); // initialize tabpanel and menubar init_tabpanel(); @@ -626,7 +626,7 @@ void MainFrame::update_title() title += wxString(SLIC3R_APP_NAME) + "_" + wxString(SLIC3R_VERSION) ; if (wxGetApp().is_editor() && !has_name) - title += (" " + _L("based on PrusaSlicer & Slic3r")); + title += (" " + _L(SLIC3R_BASED_ON)); SetTitle(title); } @@ -1050,20 +1050,20 @@ static const wxString sep_space = ""; static wxMenu* generate_help_menu() { wxMenu* helpMenu = new wxMenu(); - append_menu_item(helpMenu, wxID_ANY, _L("SuperSlicer Releases"), _L("Open the SuperSlicer releases page in your browser"), - [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/supermerill/SuperSlicer/releases"); }); - append_menu_item(helpMenu, wxID_ANY, _L("SuperSlicer wiki"), _L("Open the SuperSlicer wiki in your browser"), - [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/supermerill/SuperSlicer/wiki"); }); - append_menu_item(helpMenu, wxID_ANY, _L("SuperSlicer website"), _L("Open the SuperSlicer website in your browser"), - [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/supermerill/SuperSlicer"); }); + append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " Releases"), _L("Open the " SLIC3R_APP_NAME " github releases page in your browser"), + [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/" SLIC3R_GITHUB "/releases"); }); + append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " wiki"), _L("Open the " SLIC3R_APP_NAME " wiki in your browser"), + [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/" SLIC3R_GITHUB "/wiki"); }); + append_menu_item(helpMenu, wxID_ANY, _L(SLIC3R_APP_NAME " website"), _L("Open the " SLIC3R_APP_NAME " website in your browser"), + [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/" SLIC3R_GITHUB); }); append_menu_item(helpMenu, wxID_ANY, _L("Prusa Edition website"), _L("Open the Prusa Edition website in your browser"), [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/PrusaSlicer"); }); //# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{ //# wxTheApp->check_version(1); //# }); //# $versioncheck->Enable(wxTheApp->have_version_check); - append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("Slic3r Website")), - wxString::Format(_L("Open the Slic3r website in your browser")), + append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("Slic3r Manual")), + wxString::Format(_L("Open the Slic3r Manual in your browser")), // [this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); }); // append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Manual"), SLIC3R_APP_NAME), // wxString::Format(_L("Open the %s manual in your browser"), SLIC3R_APP_NAME), @@ -1074,7 +1074,7 @@ static wxMenu* generate_help_menu() append_menu_item(helpMenu, wxID_ANY, _L("Show &Configuration Folder"), _L("Show user configuration folder (datadir)"), [](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); }); append_menu_item(helpMenu, wxID_ANY, _L("Report an I&ssue"), wxString::Format(_L("Report an issue on %s"), SLIC3R_APP_NAME), - [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/supermerill/SuperSlicer/issues/new"); }); + [](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/" SLIC3R_GITHUB "/issues/new"); }); if (wxGetApp().is_editor()) append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("&About %s"), SLIC3R_APP_NAME), _L("Show about dialog"), @@ -1487,7 +1487,7 @@ void MainFrame::init_menubar_as_gcodeviewer() append_menu_item(fileMenu, wxID_ANY, _L("Export &toolpaths as OBJ") + dots, _L("Export toolpaths as OBJ"), [this](wxCommandEvent&) { if (m_plater != nullptr) m_plater->export_toolpaths_to_obj(); }, "export_plater", nullptr, [this]() {return can_export_toolpaths(); }, this); - append_menu_item(fileMenu, wxID_ANY, _L("Open &SuperSlicer") + dots, _L("Open SuperSlicer"), + append_menu_item(fileMenu, wxID_ANY, _L("O&pen " SLIC3R_APP_NAME) + dots, _L("Open " SLIC3R_APP_NAME), [this](wxCommandEvent&) { start_new_slicer(); }, "", nullptr, [this]() {return true; }, this); fileMenu->AppendSeparator(); diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp index 9252190efca..de720403874 100644 --- a/src/slic3r/GUI/NotificationManager.hpp +++ b/src/slic3r/GUI/NotificationManager.hpp @@ -474,7 +474,7 @@ class NotificationManager {NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotification, 20, _u8L("Configuration update is available."), _u8L("See more."), [](wxEvtHandler* evnthndlr){ if (evnthndlr != nullptr) wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED)); return true; }}, {NotificationType::NewAppAvailable, NotificationLevel::ImportantNotification, 20, _u8L("New version is available."), _u8L("See Releases page."), [](wxEvtHandler* evnthndlr){ - wxLaunchDefaultBrowser("https://github.com/prusa3d/PrusaSlicer/releases"); return true; }}, + wxLaunchDefaultBrowser("https://github.com/" SLIC3R_GITHUB "/releases"); return true; }}, {NotificationType::EmptyColorChangeCode, NotificationLevel::RegularNotification, 10, _u8L("You have just added a G-code for color change, but its value is empty.\n" "To export the G-code correctly, check the \"Color Change G-code\" in \"Printer Settings > Custom G-code\"") }, diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 2f1ed4523ad..123ca0bcfaf 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -94,7 +94,7 @@ void PreferencesDialog::build() // Please keep in sync with ConfigWizard def.label = L("Check for application updates"); def.type = coBool; - def.tooltip = L("If enabled, SuperSlicer will check for the new versions of itself online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done."); + def.tooltip = L("If enabled, " SLIC3R_APP_NAME " will check for the new versions of itself online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done."); def.set_default_value(new ConfigOptionBool(app_config->get("version_check") == "1")); option = Option(def, "version_check"); m_optgroup_general->append_single_option_line(option); @@ -110,16 +110,16 @@ void PreferencesDialog::build() #if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN #ifdef _WIN32 // Please keep in sync with ConfigWizard - def.label = L("Associate .3mf files to SuperSlicer"); + def.label = L("Associate .3mf files to " SLIC3R_APP_NAME); def.type = coBool; - def.tooltip = L("If enabled, sets SuperSlicer as default application to open .3mf files."); + def.tooltip = L("If enabled, sets " SLIC3R_APP_NAME " as default application to open .3mf files."); def.set_default_value(new ConfigOptionBool(app_config->get("associate_3mf") == "1")); option = Option(def, "associate_3mf"); m_optgroup_general->append_single_option_line(option); - def.label = L("Associate .stl files to SuperSlicer"); + def.label = L("Associate .stl files to " SLIC3R_APP_NAME); def.type = coBool; - def.tooltip = L("If enabled, sets SuperSlicer as default application to open .stl files."); + def.tooltip = L("If enabled, sets " SLIC3R_APP_NAME " as default application to open .stl files."); def.set_default_value(new ConfigOptionBool(app_config->get("associate_stl") == "1")); option = Option(def, "associate_stl"); m_optgroup_general->append_single_option_line(option); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 48b019a295d..9b4bd0fc70d 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1859,7 +1859,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page) "A new Physical Printer profile is created by clicking on the \"cog\" icon right of the Printer profiles combo box, " "by selecting the \"Add physical printer\" item in the Printer combo box. The Physical Printer profile editor opens " "also when clicking on the \"cog\" icon in the Printer settings tab. The Physical Printer profiles are being stored " - "into SuperSlicer/physical_printer directory."); + "into " SLIC3R_APP_NAME "/physical_printer directory."); current_line = { "", "" }; current_line.full_width = 1; diff --git a/src/slic3r/GUI/UpdateDialogs.cpp b/src/slic3r/GUI/UpdateDialogs.cpp index dd5f4506da8..aa4c94885f9 100644 --- a/src/slic3r/GUI/UpdateDialogs.cpp +++ b/src/slic3r/GUI/UpdateDialogs.cpp @@ -25,9 +25,9 @@ namespace Slic3r { namespace GUI { -static const char* URL_CHANGELOG = "https://files.prusa3d.com/?latest=slicer-stable&lng=%1%"; -static const char* URL_DOWNLOAD = "https://www.prusa3d.com/downloads&lng=%1%"; -static const char* URL_DEV = "https://github.com/supermerill/SuperSlicer/releases/tag/version_%1%"; +static const char* URL_CHANGELOG = "https://github.com/" SLIC3R_GITHUB "/releases"; +static const char* URL_DOWNLOAD = "https://github.com/" SLIC3R_GITHUB "/releases"; +static const char* URL_DEV = "https://github.com/" SLIC3R_GITHUB "/releases/tag/version_%1%"; static const std::string CONFIG_UPDATE_WIKI_URL("https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-PE-1.40-configuration-update"); @@ -285,7 +285,6 @@ MsgDataLegacy::MsgDataLegacy() : content_sizer->AddSpacer(VERT_SPACING); auto *text2 = new wxStaticText(this, wxID_ANY, _(L("For more information please visit Prusa wiki page:"))); - static const wxString url("https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-PE-1.40-configuration-update"); // The wiki page name is intentionally not localized: auto *link = new wxHyperlinkCtrl(this, wxID_ANY, wxString::Format("%s 1.40 configuration update", SLIC3R_APP_NAME), CONFIG_UPDATE_WIKI_URL); content_sizer->Add(text2); diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index ad15b424edf..722d330c267 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -473,7 +473,7 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version } if (recommended->config_version < vp.config_version) { - BOOST_LOG_TRIVIAL(warning) << format("Recommended config version for the currently running SuperSlicer is older than the currently installed config for vendor %1%. This should not happen.", idx.vendor()); + BOOST_LOG_TRIVIAL(warning) << format("Recommended config version for the currently running " SLIC3R_APP_NAME " is older than the currently installed config for vendor %1%. This should not happen.", idx.vendor()); continue; } @@ -544,7 +544,7 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version found = true; } else { BOOST_LOG_TRIVIAL(warning) << format("The recommended config version for vendor `%1%` in resources does not match the recommended\n" - " config version for this version of SuperSlicer. Corrupted installation?", idx.vendor()); + " config version for this version of " SLIC3R_APP_NAME ". Corrupted installation?", idx.vendor()); } } } diff --git a/src/slic3r/Utils/Process.cpp b/src/slic3r/Utils/Process.cpp index 06da87ad7b4..31f32e30e86 100644 --- a/src/slic3r/Utils/Process.cpp +++ b/src/slic3r/Utils/Process.cpp @@ -39,7 +39,7 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance wxString path; wxFileName::SplitPath(wxStandardPaths::Get().GetExecutablePath(), &path, nullptr, nullptr, wxPATH_NATIVE); path += "\\"; - path += (instance_type == NewSlicerInstanceType::Slicer) ? "superslicer.exe" : "prusa-gcodeviewer.exe"; + path += (instance_type == NewSlicerInstanceType::Slicer) ? SLIC3R_APP_CMD ".exe" : GCODEVIEWER_APP_CMD ".exe"; std::vector args; args.reserve(4); args.emplace_back(path.wc_str()); @@ -62,9 +62,9 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance { // Maybe one day we will be able to run PrusaGCodeViewer, but for now the Apple notarization // process refuses Apps with multiple binaries and Vojtech does not know any workaround. - // ((instance_type == NewSlicerInstanceType::Slicer) ? "PrusaSlicer" : "PrusaGCodeViewer"); - // Just run PrusaSlicer and give it a --gcodeviewer parameter. - bin_path = bin_path.parent_path() / "PrusaSlicer"; + // ((instance_type == NewSlicerInstanceType::Slicer) ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME); + // Just run the slicer and give it a --gcodeviewer parameter. + bin_path = bin_path.parent_path() / SLIC3R_APP_NAME; // On Apple the wxExecute fails, thus we use boost::process instead. BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << bin_path.string() << "\""; try { @@ -109,7 +109,7 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance std::string my_path; if (args.empty()) { // Binary path was not set to the AppImage in the Linux specific block above, call the application directly. - my_path = (bin_path.parent_path() / ((instance_type == NewSlicerInstanceType::Slicer) ? "superslicer" : "prusa-gcodeviewer")).string(); + my_path = (bin_path.parent_path() / ((instance_type == NewSlicerInstanceType::Slicer) ? SLIC3R_APP_CMD : GCODEVIEWER_APP_CMD)).string(); args.emplace_back(my_path.c_str()); } std::string to_open; diff --git a/version.inc b/version.inc index 0476c3b1342..931629c53af 100644 --- a/version.inc +++ b/version.inc @@ -3,8 +3,18 @@ set(SLIC3R_APP_NAME "SuperSlicer") set(SLIC3R_APP_KEY "SuperSlicer") +set(SLIC3R_APP_CMD "superslicer") set(SLIC3R_VERSION "2.3.55") set(SLIC3R_VERSION_FULL "2.3.55.5") set(SLIC3R_BUILD_ID "SuperSlicer_${SLIC3R_VERSION_FULL}") set(SLIC3R_RC_VERSION "2,3,55,5") set(SLIC3R_RC_VERSION_DOTS "${SLIC3R_VERSION_FULL}") + + +set(GCODEVIEWER_APP_NAME "G-code Viewer") +set(GCODEVIEWER_APP_KEY "GCodeViewer") +set(GCODEVIEWER_APP_CMD "gcodeviewer") + +set(SLIC3R_BASED_ON "based on PrusaSlicer and Slic3r") +set(SLIC3R_GITHUB "supermerill/SuperSlicer") +set(SLIC3R_INTRO "SuperSlicer is based on PrusaSlicer by Prusa and Slic3r by Alessandro Ranellucci and the RepRap community.") \ No newline at end of file