Fixed OSX build

This commit is contained in:
YuSanka 2024-02-20 14:41:32 +01:00 committed by Lukas Matena
parent d0e31a0e61
commit 7553d26b3c
3 changed files with 9 additions and 10 deletions

View File

@ -1,10 +1,8 @@
#import "ProfilesSharingUtils.hpp" #import "Utils/DirectoriesUtils.hpp"
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
namespace Slic3r { // Utils/DirectoriesUtils.hpp
// ProfilesSharingUtils.hpp
std::string GetDataDir() std::string GetDataDir()
{ {
NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory
@ -14,4 +12,3 @@ std::string GetDataDir()
return std::string([(CFStringRef)url.path UTF8String]); return std::string([(CFStringRef)url.path UTF8String]);
} }
}

View File

@ -11,11 +11,6 @@ std::string get_json_printer_models(PrinterTechnology printer_technology);
//std::string get_json_printer_profiles(const std::string& printer_model, const std::string& printer_variant); //std::string get_json_printer_profiles(const std::string& printer_model, const std::string& printer_variant);
std::string get_json_print_filament_profiles(const std::string& printer_profile); std::string get_json_print_filament_profiles(const std::string& printer_profile);
#if __APPLE__
//implemented at MacUtils.mm
std::string GetDataDir();
#endif //__APPLE__
class DynamicPrintConfig; class DynamicPrintConfig;
bool load_full_print_config(const std::string& print_preset, const std::string& filament_preset, const std::string& printer_preset, DynamicPrintConfig& out_config); bool load_full_print_config(const std::string& print_preset, const std::string& filament_preset, const std::string& printer_preset, DynamicPrintConfig& out_config);

View File

@ -1,6 +1,13 @@
#ifndef slic3r_DirectoriesUtils_hpp_ #ifndef slic3r_DirectoriesUtils_hpp_
#define slic3r_DirectoriesUtils_hpp_ #define slic3r_DirectoriesUtils_hpp_
#include <string>
#if __APPLE__
//implemented at MacUtils.mm
std::string GetDataDir();
#endif //__APPLE__
namespace Slic3r { namespace Slic3r {
std::string get_default_datadir(); std::string get_default_datadir();