mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 06:15:58 +08:00
Move ProfilesSharingUtils to backend (to libslic3r from GUI)
This commit is contained in:
parent
02b65b2366
commit
5f5147377e
@ -61,11 +61,10 @@
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/Thread.hpp"
|
||||
#include "libslic3r/BlacklistedLibraryCheck.hpp"
|
||||
#include "libslic3r/ProfilesSharingUtils.hpp"
|
||||
|
||||
#include "PrusaSlicer.hpp"
|
||||
|
||||
#include "slic3r/Utils/ProfilesSharingUtils.hpp"
|
||||
|
||||
#ifdef SLIC3R_GUI
|
||||
#include "slic3r/GUI/GUI_Init.hpp"
|
||||
#endif /* SLIC3R_GUI */
|
||||
|
@ -508,8 +508,16 @@ set(SLIC3R_SOURCES
|
||||
Arachne/WallToolPaths.hpp
|
||||
Arachne/WallToolPaths.cpp
|
||||
StaticMap.hpp
|
||||
ProfilesSharingUtils.hpp
|
||||
ProfilesSharingUtils.cpp
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND SLIC3R_SOURCES
|
||||
MacUtils.mm
|
||||
)
|
||||
endif ()
|
||||
|
||||
add_library(libslic3r STATIC ${SLIC3R_SOURCES})
|
||||
|
||||
if (WIN32)
|
||||
|
17
src/libslic3r/MacUtils.mm
Normal file
17
src/libslic3r/MacUtils.mm
Normal file
@ -0,0 +1,17 @@
|
||||
#import "ProfilesSharingUtils.hpp"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// ProfilesSharingUtils.hpp
|
||||
std::string GetDataDir()
|
||||
{
|
||||
NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory
|
||||
inDomain:NSUserDomainMask
|
||||
appropriateForURL:nil create:NO error:nil];
|
||||
|
||||
return std::string([(CFStringRef)url.path UTF8String]);
|
||||
}
|
||||
|
||||
}
|
@ -3,10 +3,10 @@
|
||||
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
///|/
|
||||
#include "ProfilesSharingUtils.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/format.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "Utils.hpp"
|
||||
#include "format.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include "PresetBundle.hpp"
|
||||
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
|
@ -335,8 +335,6 @@ set(SLIC3R_GUI_SOURCES
|
||||
Utils/WxFontUtils.hpp
|
||||
Utils/WifiScanner.hpp
|
||||
Utils/WifiScanner.cpp
|
||||
Utils/ProfilesSharingUtils.hpp
|
||||
Utils/ProfilesSharingUtils.cpp
|
||||
)
|
||||
|
||||
find_package(NanoSVG REQUIRED)
|
||||
|
@ -1,5 +1,4 @@
|
||||
#import "AppUpdater.hpp"
|
||||
#import "ProfilesSharingUtils.hpp"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@ -17,14 +16,4 @@ std::string get_downloads_path_mac()
|
||||
//return std::string();
|
||||
}
|
||||
|
||||
// ProfilesSharingUtils.hpp
|
||||
std::string GetDataDir()
|
||||
{
|
||||
NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory
|
||||
inDomain:NSUserDomainMask
|
||||
appropriateForURL:nil create:NO error:nil];
|
||||
|
||||
return std::string([(CFStringRef)url.path UTF8String]);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user