mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-11 06:23:08 +00:00
fix privacy policy flags not work bug
This commit is contained in:
@@ -116,6 +116,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/msw/Snapmaker_Orca
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
|
||||
if (WIN32)
|
||||
add_library(Snapmaker_Orca SHARED Snapmaker_Orca.cpp Snapmaker_Orca.hpp dev-utils/BaseException.cpp dev-utils/BaseException.h dev-utils/StackWalker.cpp dev-utils/StackWalker.h sentry_wrapper/SentryWrapper.hpp sentry_wrapper/SentryWrapper.cpp bury_cfg/bury_point.hpp bury_cfg/bury_point.cpp common_func/common_func.hpp common_func/common_func.cpp)
|
||||
target_compile_definitions(Snapmaker_Orca PRIVATE BURY_EXPORTS)
|
||||
else ()
|
||||
add_executable(Snapmaker_Orca Snapmaker_Orca.cpp Snapmaker_Orca.hpp sentry_wrapper/SentryWrapper.hpp sentry_wrapper/SentryWrapper.cpp bury_cfg/bury_point.hpp bury_cfg/bury_point.cpp common_func/common_func.hpp common_func/common_func.cpp)
|
||||
endif ()
|
||||
@@ -181,7 +182,8 @@ if (WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode")
|
||||
endif()
|
||||
|
||||
add_executable(Snapmaker_Orca_app_gui WIN32 Snapmaker_Orca_app_msvc.cpp sentry_wrapper/SentryWrapper.cpp bury_cfg/bury_point.cpp common_func/common_func.cpp ${CMAKE_CURRENT_BINARY_DIR}/Snapmaker_Orca.rc)
|
||||
|
||||
add_executable(Snapmaker_Orca_app_gui WIN32 Snapmaker_Orca_app_msvc.cpp sentry_wrapper/SentryWrapper.cpp common_func/common_func.cpp ${CMAKE_CURRENT_BINARY_DIR}/Snapmaker_Orca.rc)
|
||||
# Generate debug symbols even in release mode.
|
||||
if(MSVC)
|
||||
target_link_options(Snapmaker_Orca_app_gui PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
|
||||
@@ -189,10 +191,11 @@ if (WIN32)
|
||||
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||
add_dependencies(Snapmaker_Orca_app_gui Snapmaker_Orca)
|
||||
set_target_properties(Snapmaker_Orca_app_gui PROPERTIES OUTPUT_NAME "snapmaker-orca")
|
||||
|
||||
if (SLIC3R_SENTRY)
|
||||
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly sentry::sentry nlohmann_json)
|
||||
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly sentry::sentry nlohmann_json Snapmaker_Orca)
|
||||
else()
|
||||
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly nlohmann_json)
|
||||
target_link_libraries(Snapmaker_Orca_app_gui PRIVATE boost_headeronly nlohmann_json Snapmaker_Orca)
|
||||
endif()
|
||||
if (SLIC3R_SENTRY)
|
||||
target_compile_definitions(Snapmaker_Orca_app_gui PRIVATE SLIC3R_SENTRY)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
static std::atomic<bool> isAgreeSlice(true);
|
||||
bool get_privacy_policy()
|
||||
{
|
||||
return isAgreeSlice;
|
||||
|
||||
@@ -4,6 +4,16 @@
|
||||
#include <iostream>
|
||||
#include <atomic>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef BURY_EXPORTS
|
||||
#define BURY_API __declspec(dllexport)
|
||||
#else
|
||||
#define BURY_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define BURY_API extern
|
||||
#endif
|
||||
|
||||
#define BURY_POINT "bury_point"
|
||||
|
||||
#define BP_START_SOFT "bury_point_start_soft"
|
||||
@@ -36,14 +46,10 @@
|
||||
|
||||
//webview bury point
|
||||
|
||||
|
||||
|
||||
static std::atomic<bool> isAgreeSlice = true;
|
||||
|
||||
bool get_privacy_policy();
|
||||
void set_privacy_policy(bool isAgree);
|
||||
extern std::string get_timestamp_seconds();
|
||||
extern long long get_time_timestamp();
|
||||
extern std::string get_works_time(const long long& timestamp);
|
||||
BURY_API bool get_privacy_policy();
|
||||
BURY_API void set_privacy_policy(bool isAgree);
|
||||
BURY_API std::string get_timestamp_seconds();
|
||||
BURY_API long long get_time_timestamp();
|
||||
BURY_API std::string get_works_time(const long long& timestamp);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user