diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2020-09-08 16:38:35 +0300 |
---|---|---|
committer | enricoturri1966 <enricoturri@seznam.cz> | 2020-09-08 16:38:35 +0300 |
commit | 8cb2636afcbfea526cca0be2507b2e68fc3d27f8 (patch) | |
tree | 8042627929ad82bd079b1642b7fd7d30e8c108ed /src/PrusaSlicer.cpp | |
parent | a13b732f278ad5a7afda879a5ad617648d1a85de (diff) | |
parent | ce06fc6cb7bc09df8fcc18b006b780f9f16da9d0 (diff) |
Fixed conflicts after merge with master
Diffstat (limited to 'src/PrusaSlicer.cpp')
-rw-r--r-- | src/PrusaSlicer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index ea56124e6..9874a9d4d 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -22,6 +22,7 @@ #include <cstring> #include <iostream> #include <math.h> +#include <boost/algorithm/string/predicate.hpp> #include <boost/filesystem.hpp> #include <boost/nowide/args.hpp> #include <boost/nowide/cenv.hpp> @@ -101,8 +102,14 @@ int CLI::run(int argc, char **argv) std::find(m_transforms.begin(), m_transforms.end(), "cut") == m_transforms.end() && std::find(m_transforms.begin(), m_transforms.end(), "cut_x") == m_transforms.end() && std::find(m_transforms.begin(), m_transforms.end(), "cut_y") == m_transforms.end(); - bool start_as_gcodeviewer = false; - + bool start_as_gcodeviewer = +#ifdef _WIN32 + false; +#else + // On Unix systems, the prusa-slicer binary may be symlinked to give the application a different meaning. + boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), "gcodeviewer"); +#endif // _WIN32 + const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->values; // load config files supplied via --load |