mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
fix build errors
This commit is contained in:
16
.github/workflows/generate_appcast.yml
vendored
16
.github/workflows/generate_appcast.yml
vendored
@@ -110,15 +110,15 @@ jobs:
|
|||||||
- name: Deploy appcast to Cloudflare KV
|
- name: Deploy appcast to Cloudflare KV
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
KV_NAMESPACE_ID: ${{ secrets.CF_KV_NAMESPACE_ID }}
|
KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_APPCAST_ID }}
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$CF_API_TOKEN" ] && [ -n "$CF_ACCOUNT_ID" ] && [ -n "$KV_NAMESPACE_ID" ]; then
|
if [ -n "$CLOUDFLARE_API_TOKEN" ] && [ -n "$CLOUDFLARE_ACCOUNT_ID" ] && [ -n "$KV_NAMESPACE_ID" ]; then
|
||||||
# Deploy appcast.xml
|
# Deploy appcast.xml
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/appcast.xml" \
|
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/appcast.xml" \
|
||||||
-H "Authorization: Bearer $CF_API_TOKEN" \
|
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
|
||||||
-H "Content-Type: text/plain" \
|
-H "Content-Type: text/plain" \
|
||||||
--data-binary @appcast.xml
|
--data-binary @appcast.xml
|
||||||
echo "Appcast deployed to Cloudflare KV"
|
echo "Appcast deployed to Cloudflare KV"
|
||||||
@@ -127,8 +127,8 @@ jobs:
|
|||||||
if [ -n "${{ steps.signatures.outputs.mac_signature }}" ]; then
|
if [ -n "${{ steps.signatures.outputs.mac_signature }}" ]; then
|
||||||
echo "${{ steps.signatures.outputs.mac_signature }}" > mac_signature.txt
|
echo "${{ steps.signatures.outputs.mac_signature }}" > mac_signature.txt
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/signatures/${{ steps.version.outputs.version }}/mac.sig" \
|
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/storage/kv/namespaces/$KV_NAMESPACE_ID/values/signatures/${{ steps.version.outputs.version }}/mac.sig" \
|
||||||
-H "Authorization: Bearer $CF_API_TOKEN" \
|
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
|
||||||
-H "Content-Type: text/plain" \
|
-H "Content-Type: text/plain" \
|
||||||
--data-binary @mac_signature.txt
|
--data-binary @mac_signature.txt
|
||||||
echo "macOS signature deployed to Cloudflare KV"
|
echo "macOS signature deployed to Cloudflare KV"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "UpdateManager.hpp"
|
#include "UpdateManager.hpp"
|
||||||
|
#include "libslic3r/libslic3r.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
@@ -12,18 +13,10 @@
|
|||||||
// macOS Implementation (Sparkle 2)
|
// macOS Implementation (Sparkle 2)
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
namespace Slic3r {
|
|
||||||
namespace GUI {
|
|
||||||
|
|
||||||
// Static member definitions (defined in UpdateManager.cpp for other platforms)
|
|
||||||
// For macOS, we need to define them here since UpdateManagerMac.mm is compiled instead
|
|
||||||
bool UpdateManager::s_initialized = false;
|
|
||||||
std::string UpdateManager::s_appcast_url;
|
|
||||||
std::string UpdateManager::s_public_key;
|
|
||||||
|
|
||||||
#ifdef ORCA_HAS_SPARKLE
|
#ifdef ORCA_HAS_SPARKLE
|
||||||
|
|
||||||
// Sparkle updater delegate for custom behavior
|
// Sparkle updater delegate for custom behavior
|
||||||
|
// NOTE: Objective-C declarations must be at global scope (outside C++ namespaces)
|
||||||
@interface OrcaSparkleDelegate : NSObject <SPUUpdaterDelegate>
|
@interface OrcaSparkleDelegate : NSObject <SPUUpdaterDelegate>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -69,6 +62,19 @@ std::string UpdateManager::s_public_key;
|
|||||||
static SPUStandardUpdaterController *s_updater_controller = nil;
|
static SPUStandardUpdaterController *s_updater_controller = nil;
|
||||||
static OrcaSparkleDelegate *s_updater_delegate = nil;
|
static OrcaSparkleDelegate *s_updater_delegate = nil;
|
||||||
|
|
||||||
|
#endif // ORCA_HAS_SPARKLE
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
namespace GUI {
|
||||||
|
|
||||||
|
// Static member definitions (defined in UpdateManager.cpp for other platforms)
|
||||||
|
// For macOS, we need to define them here since UpdateManagerMac.mm is compiled instead
|
||||||
|
bool UpdateManager::s_initialized = false;
|
||||||
|
std::string UpdateManager::s_appcast_url;
|
||||||
|
std::string UpdateManager::s_public_key;
|
||||||
|
|
||||||
|
#ifdef ORCA_HAS_SPARKLE
|
||||||
|
|
||||||
void UpdateManager::init(const std::string& appcast_url, const std::string& public_key)
|
void UpdateManager::init(const std::string& appcast_url, const std::string& public_key)
|
||||||
{
|
{
|
||||||
if (s_initialized) {
|
if (s_initialized) {
|
||||||
|
|||||||
Reference in New Issue
Block a user