mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-21 07:52:32 +00:00
Merge pull request #85 from Snapmaker/dev_bury_point_alves
Dev bury point alves
This commit is contained in:
@@ -151,7 +151,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy Flatpak to nightly release
|
||||
if: ${{github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0'}}
|
||||
if: ${{github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1'}}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
|
||||
# Thanks to RaySajuuk, it's working now
|
||||
- name: Sign app and notary
|
||||
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || github.ref == 'refs/heads/2.2.0') && inputs.os == 'macos-14'
|
||||
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || github.ref == 'refs/heads/2.2.1') && inputs.os == 'macos-14'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||
@@ -175,7 +175,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Create DMG without notary
|
||||
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14' && github.ref != 'refs/heads/2.2.0'
|
||||
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14' && github.ref != 'refs/heads/2.2.1'
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/build/universal/Snapmaker_Orca_dmg
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Deploy Mac release
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'macos-14'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'macos-14'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
|
||||
- name: Check if profile validator DMG exists
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'macos-14'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'macos-14'
|
||||
id: check_dmg
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
@@ -242,7 +242,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Deploy Mac Snapmaker_Orca_profile_validator DMG release
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'macos-14' && steps.check_dmg.outputs.exists == 'true'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'macos-14' && steps.check_dmg.outputs.exists == 'true'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
path: ${{ github.workspace }}/build/src/Release/Snapmaker_Orca_profile_validator.exe
|
||||
|
||||
- name: Deploy Windows release portable
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'windows-latest'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'windows-latest'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -329,7 +329,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy Windows release installer
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'windows-latest'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'windows-latest'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -340,7 +340,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy Windows Snapmaker_Orca_profile_validator release
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'windows-latest'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'windows-latest'
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
@@ -386,7 +386,7 @@ jobs:
|
||||
chmod +x ./build/Snapmaker_Orca_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
|
||||
- name: Build orca_custom_preset_tests
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'ubuntu-24.04'
|
||||
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04'
|
||||
working-directory: ${{ github.workspace }}/build/src/Release
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -414,7 +414,7 @@ jobs:
|
||||
path: './build/src/Release/Snapmaker_Orca_profile_validator'
|
||||
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||
env:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
@@ -426,7 +426,7 @@ jobs:
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'ubuntu-24.04' }}
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' }}
|
||||
uses: rickstaa/action-create-tag@v1
|
||||
with:
|
||||
tag: "nightly-builds"
|
||||
@@ -435,7 +435,7 @@ jobs:
|
||||
message: "nightly-builds"
|
||||
|
||||
- name: Deploy Ubuntu Snapmaker_Orca_profile_validator release
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
|
||||
env:
|
||||
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
@@ -448,7 +448,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy orca_custom_preset_tests
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'ubuntu-24.04' }}
|
||||
if: ${{ ! env.ACT && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.1') && inputs.os == 'ubuntu-24.04' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label}
|
||||
|
||||
@@ -59,6 +59,14 @@ include("version.inc")
|
||||
include(GNUInstallDirs)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# Set SLIC3R_BUILD_ID from Snapmaker_VERSION if not already defined
|
||||
if(NOT DEFINED SLIC3R_BUILD_ID OR SLIC3R_BUILD_ID STREQUAL "")
|
||||
set(SLIC3R_BUILD_ID "${Snapmaker_VERSION}")
|
||||
endif()
|
||||
|
||||
# Create Windows RC compatible version format (comma-separated: MAJOR,MINOR,PATCH,0)
|
||||
set(SLIC3R_RC_VERSION "${ORCA_VERSION_MAJOR},${ORCA_VERSION_MINOR},${ORCA_VERSION_PATCH},0")
|
||||
|
||||
set(SLIC3R_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
|
||||
file(TO_NATIVE_PATH "${SLIC3R_RESOURCES_DIR}" SLIC3R_RESOURCES_DIR_WIN)
|
||||
|
||||
|
||||
+21
-14
@@ -5,7 +5,7 @@ var LangText = {
|
||||
t3: "User Agreement",
|
||||
t4: "Disagree",
|
||||
t5: "Agree",
|
||||
t6: "We kindly request your help to improve everyone's printing.<br/>Come and Join our Customer Experience Improvement Program",
|
||||
t6: "User Experience Improvement Program",
|
||||
t7: "Join our Customer Experience Improvement Program",
|
||||
t8: "Back",
|
||||
t9: "Next",
|
||||
@@ -49,11 +49,13 @@ var LangText = {
|
||||
t50: "Log out",
|
||||
t52: "Skip",
|
||||
t53: "Join",
|
||||
t54: "In the 3D Printing community, we learn from each other's successes and failures to adjust our own slicing parameters and settings. Snapmaker Orca follows the same principle and uses machine learning to improve its performance from the successes and failures of the vast number of prints by our users. We are training Snapmaker Orca to be smarter by feeding them the real-world data. If you are willing, this service will access information from your error logs and usage logs, which may include information described in ",
|
||||
t55: "Privacy Policy",
|
||||
t56: ". We will not collect any Personal Data by which an individual can be identified directly or indirectly, including without limitation names, addresses, payment information, or phone numbers. By enabling this service, you agree to these terms and the statement about Privacy Policy.",
|
||||
t57: "",
|
||||
t58: "",
|
||||
t54: "Snapmaker Orca will accumulate insights from the print logs (including error logs and usage logs) of a large number of users to enhance printing and software performance. If you consent, we will collect your error logs, usage logs, and other relevant information (details are subject to the description in our ",
|
||||
t55: "<u>Privacy Policy</u>",
|
||||
t56: "). After de-identifying such information, we will use it for statistics, analysis, and prediction purposes to improve our products and services, thereby providing you with a better user experience. We will not collect any personally identifiable information (PII)—whether directly or indirectly—including but not limited to names, addresses, payment information, and phone numbers. By enabling this program, you agree to these terms and the statements in our Privacy Policy.<br>  Certain features of our product utilize services provided by overseas vendors. If you use these features, some of your personal information may be transferred overseas. Please review our ",
|
||||
t_566: "<u>Personal Information Cross-Border Transfer Notice</u>",
|
||||
t_567: " carefully, which lists details of the overseas recipients and the measures we take to protect personal information transferred overseas.<br>  You may modify your participation status at any time in the Preferences settings, where you can opt out of the User Experience Improvement Program.",
|
||||
t57: " Please read and agree to the User Experience Improvement Program Terms and the ",
|
||||
t58: "<u>Personal Information Cross-Border Transfer Notice</u>",
|
||||
t59: ".",
|
||||
t60: "Europe",
|
||||
t61: "North America",
|
||||
@@ -107,8 +109,9 @@ var LangText = {
|
||||
t110: "Custom Filaments",
|
||||
t111: "Create New",
|
||||
t112: "Join the Program",
|
||||
t113: "You may change your choice in preference anytime.",
|
||||
t113: "",
|
||||
t114: "Device Management",
|
||||
t115: "Please first check this box to agree to the Personal Information Cross-Border Transfer Notice for the User Experience Improvement Program.",
|
||||
orca1: "Edit Project Info",
|
||||
orca2: "no model information",
|
||||
orca3: "Stealth Mode",
|
||||
@@ -667,7 +670,7 @@ var LangText = {
|
||||
t3: "用户使用协议",
|
||||
t4: "拒绝",
|
||||
t5: "同意",
|
||||
t6: "帮助提升Snapmaker Orca性能",
|
||||
t6: "Snapmaker 用户体验改进计划",
|
||||
t7: "允许发送匿名数据",
|
||||
t8: "上一步",
|
||||
t9: "下一步",
|
||||
@@ -711,11 +714,13 @@ var LangText = {
|
||||
t50: "退出登录",
|
||||
t52: "忽略",
|
||||
t53: "同意",
|
||||
t54: "在3D打印社区,我们从彼此的成功和失败中学习调整自己的切片参数和设置。Snapmaker Orca遵循同样的原则,通过机器学习的方式从大量用户打印的成功和失败中获取经验,从而改善打印性能。我们正在通过向Snapmaker Orca提供真实世界的数据来训练他们变得更聪明。如果您愿意,此服务将访问您的错误日志和使用日志中的信息,其中可能包括",
|
||||
t55: "隐私政策",
|
||||
t56: "中描述的信息。我们不会收集任何可以直接或间接识别个人的个人数据,包括但不限于姓名、地址、支付信息或电话号码。启用此服务即表示您同意这些条款和有关隐私政策的声明。",
|
||||
t57: "",
|
||||
t58: "",
|
||||
t54: "Snapmaker Orca 会从大量用户的打印日志(含异常日志、使用日志)中积累经验,提升打印与软件性能。若您同意,我们将获取您的错误日志、使用日志等信息(具体以《",
|
||||
t55: "<u>隐私政策</u>",
|
||||
t56: "》描述为准),并在进行去标识化处理后,用于统计、分析和预测用途,以改进我们的产品和服务,为您提供更好的用户体验;我们不会收集任何可直接/间接识别个人的信息(包括但不限于姓名、地址、支付信息、电话号码)。启用本计划即表示您同意本条款及隐私政策声明。<br>  我们的部分功能使用了境外供应商的服务,如您使用该部分功能,您的部分个人信息可能被传输至境外。请仔细阅读我们的",
|
||||
t_566: "<u>《个人信息出境告知书》</u>",
|
||||
t_567: ",其中列举了境外接收方的信息以及我们如何保护被传输至境外的个人信息。<br>  您可以随时在偏好配置中更改,选择退出用户体验改进计划。",
|
||||
t57: "请阅读并同意用户体验改进计划的",
|
||||
t58: "<u>《个人信息出境告知书》</u>",
|
||||
t59: "。",
|
||||
t60: "欧洲",
|
||||
t61: "北美",
|
||||
@@ -769,8 +774,10 @@ var LangText = {
|
||||
t110: "自建材料",
|
||||
t111: "新建",
|
||||
t112: "加入该计划",
|
||||
t113: "您可以随时更改您的偏好。",
|
||||
t113: "",
|
||||
t114: "设备管理",
|
||||
t115: "请先勾选此框,以同意用户体验改进计划的《个人信息出境告知书》",
|
||||
t116: "",
|
||||
wk1: "快速入门指南",
|
||||
wk2: "本文介绍了Snapmaker Orca的最基本用法。它指导用户配置软件,创建项目,并逐步完成第一个打印任务。",
|
||||
wk3: "基于项目的工作流",
|
||||
|
||||
@@ -40,13 +40,29 @@ function GotoBackPage()
|
||||
|
||||
function GotoNextPage()
|
||||
{
|
||||
var checkbox = document.getElementById('agreeCheckbox');
|
||||
var errorTip = document.getElementById('errorTip');
|
||||
|
||||
if (!checkbox.checked) {
|
||||
errorTip.style.display = 'block';
|
||||
return;
|
||||
}
|
||||
|
||||
errorTip.style.display = 'none';
|
||||
SendPrivacyChoice("agree");
|
||||
|
||||
|
||||
window.location.href="../21/index.html";
|
||||
}
|
||||
|
||||
function OnCheckboxChange()
|
||||
{
|
||||
var checkbox = document.getElementById('agreeCheckbox');
|
||||
var errorTip = document.getElementById('errorTip');
|
||||
|
||||
if (checkbox.checked) {
|
||||
errorTip.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function GotoSkipPage()
|
||||
{
|
||||
@@ -75,7 +91,7 @@ function OpenPrivacyPolicy()
|
||||
var privacyUrl = "";
|
||||
|
||||
|
||||
if(m_Region === "China") {
|
||||
if(m_Region === "Chinese Mainland") {
|
||||
privacyUrl = "https://www.snapmaker.cn/privacy-policy.html";
|
||||
} else {
|
||||
privacyUrl = "https://www.snapmaker.com/privacy-policy";
|
||||
@@ -90,3 +106,22 @@ function OpenPrivacyPolicy()
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
function OpenCrossBorderNotice()
|
||||
{
|
||||
var noticeUrl = "";
|
||||
|
||||
if(m_Region === "Chinese Mainland") {
|
||||
noticeUrl = "https://snapmaker.cn/personal-info-export";
|
||||
} else {
|
||||
noticeUrl = "https://www.snapmaker.com/personal-info-export";
|
||||
}
|
||||
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="common_openurl";
|
||||
tSend['url']=noticeUrl;
|
||||
tSend['local']=m_Region
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
@@ -20,12 +20,15 @@
|
||||
</div>
|
||||
<div id="Content">
|
||||
<div id="PolicyTxt" class="TextS2 TextArea1 ZScrol">
|
||||
<a class="trans" tid="t54">In the 3D Printing community, we learn from each other’s successes and failures to adjust our own slicing parameters and settings. Bambu Studio follows the same principle and uses machine learning to improve its performance from the successes and failures of the vast number of prints by our users. We are training Bambu Studio to be smarter by feeding them the real-world data. If you are willing, this service will access information from your error logs and usage logs, which may include information described in </a><a class="HyperLink trans" tid="t55" onClick="OpenPrivacyPolicy()">Privacy Policy</a><a class="trans" tid="t56">
|
||||
. We will not collect any Personal Data by which an individual can be identified directly or indirectly, including without limitation names, addresses, payment information, or phone numbers. By enabling this service, you agree to these terms and the statement about Privacy Policy.
|
||||
</a>
|
||||
<p class="trans" tid="t113" style="text-indent:2em;">You may change your choice in preference anytime.</p>
|
||||
<a class="trans" tid="t54"></a><a class="HyperLink trans" tid="t55" onClick="OpenPrivacyPolicy()"></a><a class="trans" tid="t56"></a><a class="HyperLink trans" tid="t_566" onClick="OpenCrossBorderNotice()"></a><a class="trans" tid="t_567"></a>
|
||||
</div>
|
||||
<div id="AgreeArea" style="margin-top:10px;display:flex;flex-direction:column;">
|
||||
<label style="display:flex;align-items:flex-start;cursor:pointer;">
|
||||
<input type="checkbox" id="agreeCheckbox" style="width:13px;min-width:13px;margin-top:3px;margin-right:6px;" onchange="OnCheckboxChange()">
|
||||
<span><a class="trans" tid="t57" style="margin-left:7px;"></a><a class="HyperLink trans" tid="t58" onClick="OpenCrossBorderNotice()"></a></span>
|
||||
</label>
|
||||
<p id="errorTip" class="trans" tid="t115" style="color:red;display:none;margin-top:5px;margin-left:0px;"></p>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<div id="AcceptArea">
|
||||
<div class="GrayBtn trans" tid="t8" id="PreBtn" onclick="GotoBackPage()">Back</div>
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ if(ORCA_TOOLS)
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${SLIC3R_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${SLIC3R_VERSION}"
|
||||
MACOSX_BUNDLE_IDENTIFIER "com.Snapmaker.Snapmaker_Orca.profile-validator"
|
||||
MACOSX_BUNDLE_COPYRIGHT "© 2024 SoftFever"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2024-2026 Snapmaker. All rights reserved."
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.Snapmaker.Snapmaker_Orca.profile-validator"
|
||||
)
|
||||
else()
|
||||
@@ -294,7 +294,7 @@ else ()
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "Snapmaker Orca"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${Snapmaker_VERSION}
|
||||
MACOSX_BUNDLE_COPYRIGHT "Copyright(C) 2022-2024 Li Jiang All Rights Reserved")
|
||||
MACOSX_BUNDLE_COPYRIGHT "Copyright © 2024-2026 Snapmaker. All rights reserved.")
|
||||
# Get the bundle directory by going up from the executable to the .app bundle
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
set(BIN_RESOURCES_DIR "$<TARGET_FILE_DIR:Snapmaker_Orca>/../Resources")
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
#define BURY_POINT "bury_point"
|
||||
|
||||
#define BP_START_SOFT "bury_point_start_soft"
|
||||
#define BP_SOFT_WORKS_TIME "soft_works_time"
|
||||
#define BP_SOFT_WORKS_TIME "bury_point_soft_works_time"
|
||||
|
||||
#define BP_DEIVCE_CONNECT "bury_point_device_connect"
|
||||
#define BP_CONNECT_DEVICE_ID "device_id"
|
||||
#define BP_CONNECT_NET_TYPE "net_type"
|
||||
#define BP_CONNECT_DEVICE_ID "bury_point_device_id"
|
||||
#define BP_CONNECT_NET_TYPE "bury_point_net_type"
|
||||
|
||||
#define BP_LOGIN "bury_point_login"
|
||||
#define BP_LOGIN_USER_ID "user_id"
|
||||
#define BP_LOGIN_HTTP_CODE "http_code"
|
||||
#define BP_LOGIN_USER_ID "bury_point_user_id"
|
||||
#define BP_LOGIN_HTTP_CODE "bury_point_http_code"
|
||||
|
||||
#define BP_VIDEO_START "bury_point_video_start"
|
||||
#define BP_VIDEO_STATUS "video_status"
|
||||
#define BP_VIDEO_STATUS "bury_point_video_status"
|
||||
|
||||
#define BP_DEVICE_ERROR "bury_point_device_error"
|
||||
#define BP_DEVICE_ERROR_STATUS "error_status"
|
||||
#define BP_DEVICE_ERROR_STATUS "bury_point_error_status"
|
||||
|
||||
#define BP_UPLOAD "bury_point_upload"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#define BP_VIDEO_ABNORMAL "bury_point_video_abnormal"
|
||||
|
||||
#define BP_SLICE_DURATION "bury_point_slice_duration"
|
||||
#define BP_SLICE_DURATION_TIME "slice_duration_time"
|
||||
#define BP_SLICE_DURATION_TIME "bury_point_slice_duration_time"
|
||||
|
||||
#define BP_WEB_VIEW "bury_point_webview"
|
||||
|
||||
@@ -51,9 +51,15 @@
|
||||
#define BP_LOCAL_SERVER_ERROR_CODE "bury_point_local_server_error_code"
|
||||
|
||||
#define BP_LOCAL_SERVER "bury_point_local_server"
|
||||
#define BP_LOCAL_SERVER_ERR_CODE "bury_local_server_err_code"
|
||||
#define BP_LOCAL_SERVER_ERR_CODE "bury_point_local_server_err_code"
|
||||
|
||||
|
||||
//device connect error info
|
||||
#define DEVICE_CONNECT_ERR "error_device_connect"
|
||||
#define DEVICE_SUBSCRIBE_ERR "error_device_subscribe"
|
||||
#define DEVICE_PBLISH_ERR "error_device_publish"
|
||||
#define DEVICE_SET_ENGINE_ERR "error_device_set_engine"
|
||||
|
||||
|
||||
//webview bury point
|
||||
|
||||
|
||||
@@ -4,9 +4,16 @@
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <Shlobj.h>
|
||||
|
||||
#include <iphlpapi.h>
|
||||
#pragma comment(lib, "iphlpapi.lib")
|
||||
#elif __APPLE__
|
||||
#include <stdlib.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/network/IONetworkInterface.h>
|
||||
#include <IOKit/network/IONetworkController.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
@@ -19,6 +26,52 @@ namespace common
|
||||
return boost::asio::ip::host_name();
|
||||
}
|
||||
|
||||
std::string getMachineId()
|
||||
{
|
||||
std::string machineId = std::string();
|
||||
#ifdef _WIN32
|
||||
|
||||
auto wstringTostring = [](std::wstring wTmpStr) -> std::string {
|
||||
std::string resStr = std::string();
|
||||
int len = WideCharToMultiByte(CP_UTF8, 0, wTmpStr.c_str(), -1, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
if (len <= 0)
|
||||
return std::string();
|
||||
std::string desStr(len, 0);
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0, wTmpStr.c_str(), -1, &desStr[0], len, nullptr, nullptr);
|
||||
|
||||
resStr = desStr;
|
||||
|
||||
return resStr;
|
||||
};
|
||||
|
||||
HKEY key = NULL;
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Cryptography", 0, KEY_READ | KEY_WOW64_64KEY, &key) == ERROR_SUCCESS) {
|
||||
wchar_t buffer[1024];
|
||||
memset(buffer, 0, sizeof(wchar_t) * 1024);
|
||||
DWORD size = sizeof(buffer);
|
||||
bool ok = (RegQueryValueEx(key, L"MachineGuid", NULL, NULL, (LPBYTE) buffer, &size) == ERROR_SUCCESS);
|
||||
RegCloseKey(key);
|
||||
if (ok) {
|
||||
machineId = wstringTostring(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
#elif __APPLE__
|
||||
FILE* fp = NULL;
|
||||
char buffer[1024];
|
||||
|
||||
memset(buffer, 0, 1024);
|
||||
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
|
||||
CFStringRef strRef = (CFStringRef) IORegistryEntryCreateCFProperty(service, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
|
||||
CFStringGetCString(strRef, buffer, 1024, kCFStringEncodingMacRoman);
|
||||
machineId = buffer;
|
||||
|
||||
#endif // _WIN32
|
||||
return machineId;
|
||||
}
|
||||
|
||||
std::string get_flutter_version()
|
||||
{
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ namespace common
|
||||
std::string get_pc_name();
|
||||
|
||||
std::string get_flutter_version();
|
||||
} // namespace common
|
||||
|
||||
std::string getMachineId();
|
||||
|
||||
} // namespace common
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION @SLIC3R_VERSION@
|
||||
PRODUCTVERSION @SLIC3R_VERSION@
|
||||
FILEVERSION @SLIC3R_RC_VERSION@
|
||||
PRODUCTVERSION @SLIC3R_RC_VERSION@
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
@@ -12,7 +12,7 @@ PRODUCTVERSION @SLIC3R_VERSION@
|
||||
VALUE "ProductName", "@SLIC3R_APP_NAME@ G-code Viewer"
|
||||
VALUE "ProductVersion", "@SLIC3R_BUILD_ID@"
|
||||
VALUE "InternalName", "@SLIC3R_APP_NAME@ G-code Viewer"
|
||||
VALUE "LegalCopyright", ""
|
||||
VALUE "LegalCopyright", "Copyright © 2024-2026 Snapmaker. All rights reserved."
|
||||
VALUE "OriginalFilename", "bambu-gcodeviewer.exe"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION @SLIC3R_VERSION@
|
||||
PRODUCTVERSION @SLIC3R_VERSION@
|
||||
FILEVERSION @SLIC3R_RC_VERSION@
|
||||
PRODUCTVERSION @SLIC3R_RC_VERSION@
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
@@ -12,8 +12,8 @@ PRODUCTVERSION @SLIC3R_VERSION@
|
||||
VALUE "ProductName", "@SLIC3R_APP_NAME@"
|
||||
VALUE "ProductVersion", "@SLIC3R_BUILD_ID@"
|
||||
VALUE "InternalName", "@SLIC3R_APP_NAME@"
|
||||
VALUE "LegalCopyright", ""
|
||||
VALUE "OriginalFilename", "snapmaker-orca.exe"
|
||||
VALUE "LegalCopyright", "Copyright © 2024-2026 Snapmaker. All rights reserved."
|
||||
VALUE "OriginalFilename", "Snapmaker_Orca.exe"
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@SLIC3R_APP_KEY@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@SLIC3R_APP_NAME@ Copyright(C) 2021-2023 Lunkuo All Rights Reserved</string>
|
||||
<string>@SLIC3R_APP_NAME@ Copyright © 2024-2026 Snapmaker. All rights reserved.</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>images/Snapmaker_Orca.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
@@ -13,7 +13,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SLIC3R_APP_NAME@ @SLIC3R_BUILD_ID@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.softfever3d.orca-slic3r/</string>
|
||||
<string>com.snapmaker.snapmaker-orca</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
||||
@@ -89,13 +89,6 @@ bool AppConfig::get_stealth_mode()
|
||||
return true;
|
||||
}
|
||||
|
||||
auto isAgree = get("snapmaker_privacy_policy", "isagree");
|
||||
|
||||
if (isAgree.empty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return get_bool("stealth_mode");
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,7 @@ static sentry_value_t on_crash_callback(const sentry_ucontext_t* uctx, sentry_va
|
||||
|
||||
static sentry_value_t before_send(sentry_value_t event, void* hint, void* data)
|
||||
{
|
||||
if (!get_privacy_policy())
|
||||
{
|
||||
sentry_value_decref(event);
|
||||
return sentry_value_new_null();
|
||||
}
|
||||
|
||||
|
||||
sentry_value_t level_val = sentry_value_get_by_key(event, SENTRY_KEY_LEVEL);
|
||||
std::string levelName = sentry_value_as_string(level_val);
|
||||
@@ -88,6 +84,12 @@ static sentry_value_t before_send(sentry_value_t event, void* hint, void* data)
|
||||
}
|
||||
}
|
||||
|
||||
if (!get_privacy_policy() && levelName == SENTRY_EVENT_TRACE) {
|
||||
|
||||
sentry_value_decref(event);
|
||||
return sentry_value_new_null();
|
||||
}
|
||||
|
||||
if (SENTRY_EVENT_FATAL == eventLevel ||
|
||||
SENTRY_EVENT_ERROR == eventLevel ||
|
||||
SENTRY_EVENT_TRACE == eventLevel)
|
||||
@@ -190,9 +192,6 @@ void initSentryEx()
|
||||
if (!dataBaseDir.empty())
|
||||
sentry_options_set_database_path(options, dataBaseDir.c_str());
|
||||
|
||||
std::string softVersion = "snapmaker_orca_2.2.0_beta2";
|
||||
sentry_options_set_release(options, softVersion.c_str());
|
||||
|
||||
#if defined(_DEBUG) || !defined(NDEBUG)
|
||||
sentry_options_set_debug(options, 1);
|
||||
#else
|
||||
@@ -219,7 +218,13 @@ void initSentryEx()
|
||||
if (!flutterVersion.empty())
|
||||
sentry_set_tag("flutter_version", flutterVersion.c_str());
|
||||
|
||||
//sentryReportLog(SENTRY_LOG_ERROR, "init sentry error", "initSentry module");
|
||||
std::string machineID = common::getMachineId();
|
||||
if (!machineID.empty())
|
||||
sentry_set_tag("machine_id", machineID.c_str());
|
||||
|
||||
std::string pcName = common::get_pc_name();
|
||||
if (!pcName.empty())
|
||||
sentry_set_tag("pc_name", pcName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ AboutDialog::AboutDialog()
|
||||
|
||||
copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxLEFT, FromDIP(20));
|
||||
|
||||
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright (C) 2024 Snapmaker All Rights Reserved", wxDefaultPosition, wxDefaultSize);
|
||||
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright © 2024-2026 Snapmaker. All rights reserved.", wxDefaultPosition, wxDefaultSize);
|
||||
html_text->SetForegroundColour(wxColour(107, 107, 107));
|
||||
|
||||
copyright_ver_sizer->Add(html_text, 0, wxALL , 0);
|
||||
|
||||
@@ -3764,9 +3764,6 @@ if (res) {
|
||||
} catch (std::exception &) {
|
||||
// wxMessageBox(e.what(), "", MB_OK);
|
||||
}
|
||||
auto isAgree = wxGetApp().app_config->get("snapmaker_privacy_policy", "isagree");
|
||||
|
||||
set_privacy_policy(isAgree == "true");
|
||||
}
|
||||
|
||||
void GUI_App::ShowDownNetPluginDlg() {
|
||||
@@ -7072,7 +7069,7 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
||||
mainframe->refresh_plugin_tips();
|
||||
// BBS: remove SLA related message
|
||||
}
|
||||
auto isAgree = wxGetApp().app_config->get("snapmaker_privacy_policy", "isagree");
|
||||
auto isAgree = wxGetApp().app_config->get("app", "privacy_policy_isagree");
|
||||
|
||||
set_privacy_policy(isAgree == "true");
|
||||
|
||||
@@ -7293,10 +7290,14 @@ void GUI_App::user_login_notify(const json& res)
|
||||
|
||||
bool GUI_App::config_wizard_startup()
|
||||
{
|
||||
auto isAgree = wxGetApp().app_config->get("app", "privacy_policy_isagree");
|
||||
set_privacy_policy(isAgree == "true");
|
||||
|
||||
if (!m_app_conf_exists || preset_bundle->printers.only_default_printers()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "run wizard...";
|
||||
run_wizard(ConfigWizard::RR_DATA_EMPTY);
|
||||
BOOST_LOG_TRIVIAL(info) << "finished run wizard";
|
||||
|
||||
return true;
|
||||
} /*else if (get_app_config()->legacy_datadir()) {
|
||||
// Looks like user has legacy pre-vendorbundle data directory,
|
||||
@@ -7308,6 +7309,13 @@ bool GUI_App::config_wizard_startup()
|
||||
run_wizard(ConfigWizard::RR_DATA_LEGACY);
|
||||
return true;
|
||||
}*/
|
||||
|
||||
if (isAgree.empty())
|
||||
{
|
||||
run_wizard(ConfigWizard::RR_DATA_EMPTY); // Compatible with older versions
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ void HttpServer::start()
|
||||
server_->io_service.run();
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "HTTP server error: " << e.what();
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_FATAL,std::string("HttpServer::start ") + e.what(), BP_LOCAL_SERVER);
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_FATAL,std::string("bury_point_HttpServer::start ") + e.what(), BP_LOCAL_SERVER);
|
||||
start_http_server = false;
|
||||
}
|
||||
});
|
||||
@@ -315,7 +315,7 @@ void HttpServer::start()
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to start HTTP server: " << e.what();
|
||||
std::string error_msg = "Failed to start HTTP server on port " + std::to_string(port) + ": " + e.what();
|
||||
std::string error_msg = "bury_point_Failed to start HTTP server on port " + std::to_string(port) + ": " + e.what();
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_FATAL, error_msg.c_str(), BP_LOCAL_SERVER);
|
||||
start_http_server = false;
|
||||
throw;
|
||||
@@ -464,7 +464,7 @@ void HttpServer::start_health_check()
|
||||
BOOST_LOG_TRIVIAL(info) << "HTTP server restart completed by health check thread";
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to restart HTTP server: " << e.what();
|
||||
std::string error_msg = "HTTP server restart failed after health check on port " + std::to_string(port) + ": " + e.what();
|
||||
std::string error_msg = "bury_point_HTTP server restart failed after health check on port " + std::to_string(port) + ": " + e.what();
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, error_msg.c_str(), BP_LOCAL_SERVER);
|
||||
}
|
||||
} else if (start_http_server) {
|
||||
@@ -662,7 +662,7 @@ std::shared_ptr<HttpServer::Response> HttpServer::bbl_auth_handle_request(const
|
||||
user_account = user_j["account"].get<std::string>();
|
||||
} catch (const std::exception& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to parse user profile JSON: " << e.what();
|
||||
std::string error_msg = "User profile JSON parse error: " + std::string(e.what());
|
||||
std::string error_msg = "bury_point_User profile JSON parse error: " + std::string(e.what());
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, error_msg.c_str(), BP_LOCAL_SERVER);
|
||||
}
|
||||
json j;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <wx/display.h>
|
||||
#include <map>
|
||||
|
||||
#include "sentry_wrapper/SentryWrapper.hpp"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#ifdef _MSW_DARK_MODE
|
||||
#include "dark_mode.hpp"
|
||||
@@ -746,6 +748,11 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||
app_config->set_bool(param, checkbox->GetValue());
|
||||
app_config->save();
|
||||
|
||||
if (param == "privacy_policy_isagree")
|
||||
{
|
||||
app_config->set("app", "privacy_policy_isagree", checkbox->GetValue());
|
||||
set_privacy_policy(checkbox->GetValue());
|
||||
}
|
||||
// if (param == "staff_pick_switch") {
|
||||
// bool pbool = app_config->get("staff_pick_switch") == "true";
|
||||
// wxGetApp().switch_staff_pick(pbool);
|
||||
@@ -1285,6 +1292,22 @@ wxWindow* PreferencesDialog::create_general_page()
|
||||
auto item_darkmode = create_item_darkmode_checkbox(_L("Enable Dark mode"), page,_L("Enable Dark mode"), 50, "dark_color_mode");
|
||||
#endif
|
||||
|
||||
std::string enUrl = "https://www.snapmaker.com/privacy-policy";
|
||||
std::string cnUrl = "https://www.snapmaker.cn/privacy-policy";
|
||||
auto app_config = wxGetApp().app_config;
|
||||
std::string region = app_config->get("language");
|
||||
|
||||
auto title_user_experience = create_item_title(_L("User Experience"), page, _L("User Experience"));
|
||||
auto item_priv_policy = create_item_checkbox(_L("Join Customer Experience Improvement Program."), page, _L(""), 50, "privacy_policy_isagree");
|
||||
wxHyperlinkCtrl* hyperlink = nullptr;
|
||||
if (region.empty() || region != "zh_CN")
|
||||
hyperlink = new wxHyperlinkCtrl(page, wxID_ANY, _L("What data would be collected?"), enUrl);
|
||||
else
|
||||
hyperlink = new wxHyperlinkCtrl(page, wxID_ANY, _L("What data would be collected?"), cnUrl);
|
||||
|
||||
hyperlink->SetFont(Label::Head_13);
|
||||
item_priv_policy->Add(hyperlink, 0, wxALIGN_CENTER, 0);
|
||||
|
||||
auto title_develop_mode = create_item_title(_L("Develop mode"), page, _L("Develop mode"));
|
||||
auto item_develop_mode = create_item_checkbox(_L("Develop mode"), page, _L("Develop mode"), 50, "developer_mode");
|
||||
auto item_skip_ams_blacklist_check = create_item_checkbox(_L("Skip AMS blacklist check"), page, _L("Skip AMS blacklist check"), 50, "skip_ams_blacklist_check");
|
||||
@@ -1364,6 +1387,9 @@ wxWindow* PreferencesDialog::create_general_page()
|
||||
sizer_page->Add(title_develop_mode, 0, wxTOP | wxEXPAND, FromDIP(20));
|
||||
sizer_page->Add(item_develop_mode, 0, wxTOP, FromDIP(3));
|
||||
sizer_page->Add(item_skip_ams_blacklist_check, 0, wxTOP, FromDIP(3));
|
||||
|
||||
sizer_page->Add(title_user_experience, 0, wxTOP, FromDIP(20));
|
||||
sizer_page->Add(item_priv_policy, 0, wxTOP, FromDIP(3));
|
||||
|
||||
page->SetSizer(sizer_page);
|
||||
page->Layout();
|
||||
|
||||
@@ -4709,6 +4709,8 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_connect()
|
||||
try {
|
||||
if (!m_param_data.count("id") || !m_param_data["id"].is_string()) {
|
||||
handle_general_fail(-1, "param [id] is required or wrong type");
|
||||
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_connect param [id] is required or wrong type"), DEVICE_CONNECT_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4716,6 +4718,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_connect()
|
||||
|
||||
if (!validate_id(id)) {
|
||||
handle_general_fail(-1, "id is illegal");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_connect id is illegal"),DEVICE_CONNECT_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4807,6 +4810,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_subscribe()
|
||||
try {
|
||||
if (!m_param_data.count("id") || !m_param_data["id"].is_string()) {
|
||||
handle_general_fail(-1, "param [id] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_subscribe param [id] is required or wrong type"), DEVICE_SUBSCRIBE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4814,11 +4818,13 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_subscribe()
|
||||
|
||||
if (!validate_id(id)) {
|
||||
handle_general_fail(-1, "id is illegal");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_subscribe id is illegal with:")+id,DEVICE_SUBSCRIBE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_event_id == "") {
|
||||
handle_general_fail(-1, "event_id is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_subscribe event_id is required or wrong type with:") + id,DEVICE_SUBSCRIBE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4826,6 +4832,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_subscribe()
|
||||
|
||||
if (!m_param_data.count("topic") || !m_param_data["topic"].is_string()) {
|
||||
handle_general_fail(-1, "param [topic] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_subscribe param [topic] is required or wrong type"),DEVICE_SUBSCRIBE_ERR);
|
||||
return;
|
||||
}
|
||||
std::string topic = m_param_data["topic"].get<std::string>();
|
||||
@@ -4836,6 +4843,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_subscribe()
|
||||
|
||||
if (!m_param_data.count("qos") || !m_param_data["qos"].is_number()) {
|
||||
handle_general_fail(-1, "param [qos] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_subscribe param [qos] is required or wrong type"), DEVICE_SUBSCRIBE_ERR);
|
||||
return;
|
||||
}
|
||||
int qos = m_param_data["qos"].get<int>();
|
||||
@@ -4947,6 +4955,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_set_engine()
|
||||
try {
|
||||
if (!m_param_data.count("engine_id") || !m_param_data["engine_id"].is_string()) {
|
||||
handle_general_fail(-1, "param [engine_id] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine param [engine_id] is required or wrong type"),DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4954,17 +4963,20 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_set_engine()
|
||||
|
||||
if (!validate_id(engine_id)) {
|
||||
handle_general_fail(-1, "id is illegal");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine id is illegal with:") + engine_id, DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_param_data.count("ip") || !m_param_data["ip"].is_string()) {
|
||||
handle_general_fail(-1, "param [ip] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine param [ip] is required or wrong type"),DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
std::string ip = m_param_data["ip"].get<std::string>();
|
||||
|
||||
if (!m_param_data.count("port") || !m_param_data["port"].is_number()) {
|
||||
handle_general_fail(-1, "param [port] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine param [port] is required or wrong type"), DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4991,6 +5003,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_set_engine()
|
||||
|
||||
if (engine == nullptr) {
|
||||
handle_general_fail(-1, "invalid engine");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine invalid engine"),DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4999,6 +5012,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_set_engine()
|
||||
if (!engine->CheckConnected()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "[SSWCP_MqttAgent_Instance] 引擎连接状态异常";
|
||||
handle_general_fail(-1, "engine connection lost");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine engine connection lost"), DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "[SSWCP_MqttAgent_Instance] 引擎连接状态正常";
|
||||
@@ -5091,6 +5105,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_set_engine()
|
||||
|
||||
if (!host) {
|
||||
handle_general_fail(-1, "host created failed");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_set_engine host created failed"), DEVICE_SET_ENGINE_ERR);
|
||||
return;
|
||||
} else {
|
||||
auto weak_self = std::weak_ptr<SSWCP_Instance>(shared_from_this());
|
||||
@@ -5532,6 +5547,7 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_publish()
|
||||
try {
|
||||
if (!m_param_data.count("id") || !m_param_data["id"].is_string()) {
|
||||
handle_general_fail(-1, "param [id] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_publish host created failed"), DEVICE_PBLISH_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5539,23 +5555,27 @@ void SSWCP_MqttAgent_Instance::sw_mqtt_publish()
|
||||
|
||||
if (!validate_id(id)) {
|
||||
handle_general_fail(-1, "id is illegal");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_publish id is illegal"), DEVICE_PBLISH_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_param_data.count("topic") || !m_param_data["topic"].is_string()) {
|
||||
handle_general_fail(-1, "param [topic] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_publish param [topic] is required or wrong type"), DEVICE_PBLISH_ERR);
|
||||
return;
|
||||
}
|
||||
std::string topic = m_param_data["topic"].get<std::string>();
|
||||
|
||||
if (!m_param_data.count("qos") || !m_param_data["qos"].is_number()) {
|
||||
handle_general_fail(-1, "param [qos] is required or wrong type");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_publish param [qos] is required or wrong type"), DEVICE_PBLISH_ERR);
|
||||
return;
|
||||
}
|
||||
int qos = m_param_data["qos"].get<int>();
|
||||
|
||||
if (!m_param_data.count("payload") || !m_param_data["payload"].is_string()) {
|
||||
handle_general_fail(-1, "param [payload] required");
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_ERROR, std::string("device_publish param [payload] required"), DEVICE_PBLISH_ERR);
|
||||
return;
|
||||
}
|
||||
std::string payload = m_param_data["payload"].get<std::string>();
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <libslic3r/Utils.hpp>
|
||||
#include "CreatePresetsDialog.hpp"
|
||||
#include <mutex>
|
||||
#include "bury_cfg/bury_point.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
@@ -521,7 +522,7 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
|
||||
std::string url = j["url"];
|
||||
std::string local = j["local"];
|
||||
if (!url.empty()) {
|
||||
wxLaunchDefaultBrowser(url);
|
||||
wxLaunchDefaultBrowser(url.c_str());
|
||||
}
|
||||
}
|
||||
else if (strCmd == "network_plugin_install") {
|
||||
@@ -648,7 +649,8 @@ int GuideFrame::SaveProfile()
|
||||
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "1");
|
||||
// } else
|
||||
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
|
||||
m_MainPtr->app_config->set("snapmaker_privacy_policy", "isagree", PrivacyUse);
|
||||
m_MainPtr->app_config->set("app", "privacy_policy_isagree", PrivacyUse);
|
||||
set_privacy_policy(PrivacyUse);
|
||||
m_MainPtr->app_config->set("region", m_Region);
|
||||
m_MainPtr->app_config->set_bool("stealth_mode", StealthMode);
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ void SMUserLogin::OnNavigationRequest(wxWebViewEvent &evt)
|
||||
}
|
||||
})
|
||||
.on_error([&](std::string body, std::string error, unsigned status) {
|
||||
std::string http_code = BP_LOGIN_HTTP_CODE + string(":") + std::to_string(status);
|
||||
std::string http_code = BP_LOGIN_HTTP_CODE + string(":") + std::to_string(status) + "\n" + error + "\n" + body;
|
||||
sentryReportLog(SENTRY_LOG_TRACE, http_code, BP_LOGIN);
|
||||
})
|
||||
.perform_sync();
|
||||
|
||||
@@ -314,7 +314,7 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, wxString const & url)
|
||||
webView->EnableContextMenu(true);
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(fatal) << __FUNCTION__ << ": failed. Use fake web view.";
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_FATAL, "create webview fail and use fakewebview", BP_WEB_VIEW);
|
||||
Slic3r::sentryReportLog(Slic3r::SENTRY_LOG_FATAL, "bury_point_create webview fail and use fakewebview", BP_WEB_VIEW);
|
||||
webView = new FakeWebView;
|
||||
}
|
||||
webView->SetRefData(new WebViewRef(webView));
|
||||
|
||||
@@ -2289,7 +2289,7 @@ void Moonraker_Mqtt::async_camera_start(const std::string& domain, int interval,
|
||||
callback) {
|
||||
BOOST_LOG_TRIVIAL(error) << "[Moonraker_Mqtt] 发送启动摄像头监控请求失败";
|
||||
wcp_loger.add_log("发送启动摄像头监控请求失败", false, "", "Moonraker_Mqtt", "error");
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "open video cmd error", BP_VIDEO_ABNORMAL);
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "bury_point_open video cmd error", BP_VIDEO_ABNORMAL);
|
||||
callback(json::value_t::null);
|
||||
}
|
||||
}
|
||||
@@ -2339,7 +2339,7 @@ void Moonraker_Mqtt::async_canmera_stop(const std::string& domain, std::function
|
||||
callback) {
|
||||
BOOST_LOG_TRIVIAL(error) << "[Moonraker_Mqtt] 发送停止摄像头监控请求失败";
|
||||
wcp_loger.add_log("发送停止摄像头监控请求失败", false, "", "Moonraker_Mqtt", "error");
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "stop video cmd error", BP_VIDEO_ABNORMAL);
|
||||
sentryReportLog(SENTRY_LOG_TRACE, "bury_point_stop video cmd error", BP_VIDEO_ABNORMAL);
|
||||
callback(json::value_t::null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user