mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Clean up the mess required for the legacy Perl bindings, which are now
used for Perl unit / integration tests only. With this commit, the code will be cleaner, but likely the unit tests will not run on Windows, if installed in a localized path.
This commit is contained in:
parent
489fba326e
commit
f474978db5
2 changed files with 5 additions and 10 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <boost/nowide/args.hpp>
|
#include <boost/nowide/args.hpp>
|
||||||
#include <boost/nowide/cenv.hpp>
|
#include <boost/nowide/cenv.hpp>
|
||||||
#include <boost/nowide/iostream.hpp>
|
#include <boost/nowide/iostream.hpp>
|
||||||
|
#include <boost/nowide/integration/filesystem.hpp>
|
||||||
|
|
||||||
#include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in
|
#include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in
|
||||||
|
|
||||||
|
@ -59,6 +60,9 @@ PrinterTechnology get_printer_technology(const DynamicConfig &config)
|
||||||
|
|
||||||
int CLI::run(int argc, char **argv)
|
int CLI::run(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
// Switch boost::filesystem to utf8.
|
||||||
|
boost::nowide::nowide_filesystem();
|
||||||
|
|
||||||
if (! this->setup(argc, argv))
|
if (! this->setup(argc, argv))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -499,6 +503,7 @@ int CLI::run(int argc, char **argv)
|
||||||
bool CLI::setup(int argc, char **argv)
|
bool CLI::setup(int argc, char **argv)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
Slic3r::set_logging_level(1);
|
||||||
const char *loglevel = boost::nowide::getenv("SLIC3R_LOGLEVEL");
|
const char *loglevel = boost::nowide::getenv("SLIC3R_LOGLEVEL");
|
||||||
if (loglevel != nullptr) {
|
if (loglevel != nullptr) {
|
||||||
if (loglevel[0] >= '0' && loglevel[0] <= '9' && loglevel[1] == 0)
|
if (loglevel[0] >= '0' && loglevel[0] <= '9' && loglevel[1] == 0)
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <boost/nowide/fstream.hpp>
|
#include <boost/nowide/fstream.hpp>
|
||||||
#include <boost/nowide/integration/filesystem.hpp>
|
|
||||||
#include <boost/nowide/convert.hpp>
|
#include <boost/nowide/convert.hpp>
|
||||||
#include <boost/nowide/cstdio.hpp>
|
#include <boost/nowide/cstdio.hpp>
|
||||||
|
|
||||||
|
@ -92,15 +91,6 @@ unsigned get_logging_level()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force set_logging_level(<=error) after loading of the DLL.
|
|
||||||
// Switch boost::filesystem to utf8.
|
|
||||||
static struct RunOnInit {
|
|
||||||
RunOnInit() {
|
|
||||||
boost::nowide::nowide_filesystem();
|
|
||||||
set_logging_level(1);
|
|
||||||
}
|
|
||||||
} g_RunOnInit;
|
|
||||||
|
|
||||||
void trace(unsigned int level, const char *message)
|
void trace(unsigned int level, const char *message)
|
||||||
{
|
{
|
||||||
boost::log::trivial::severity_level severity = level_to_boost(level);
|
boost::log::trivial::severity_level severity = level_to_boost(level);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue