Add CAM and Cloud WebAssembly probes
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled

This commit is contained in:
2026-08-21 06:51:31 +08:00
parent b5a086fda5
commit c87b2871be
23 changed files with 2865 additions and 15 deletions

View File

@@ -34,9 +34,11 @@
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include <openssl/pem.h>
#include <openssl/sha.h>
#include <curl/curl.h>
#include <openssl/sha.h>
#include <curl/curl.h>
#include <boost/bind/bind.hpp>
#include <fastsignals/connection.h>
#include <App/Application.h>
#include <App/Document.h>
@@ -1484,7 +1486,11 @@ void Cloud::Module::LinkXSetValue(std::string filename)
string newName;
Document* currentDoc = GetApplication().getActiveDocument();
newName = GetApplication().getUniqueDocumentName("unnamed");
newDoc = GetApplication().newDocument(newName.c_str(), (const char*)path.c_str(), true);
newDoc = GetApplication().newDocument(
newName.c_str(),
(const char*)path.c_str(),
App::DocumentInitFlags{true, true}
);
GetApplication().setActiveDocument(newDoc);
this->cloudRestore((const char*)path.c_str());
GetApplication().setActiveDocument(currentDoc);
@@ -1496,7 +1502,9 @@ bool Cloud::Module::cloudRestore(const char* BucketName)
Document* doc = GetApplication().getActiveDocument();
// clean up if the document is not empty
// !TODO: mind exceptions while restoring!
doc->signalLinkXsetValue.connect(boost::bind(&Cloud::Module::LinkXSetValue, this, _1));
fastsignals::scoped_connection linkConnection = doc->signalLinkXsetValue.connect(
boost::bind(&Cloud::Module::LinkXSetValue, this, _1)
);
doc->clearUndos();
@@ -1553,6 +1561,5 @@ bool Cloud::Module::cloudRestore(const char* BucketName)
string uri;
uri = this->URL.getStrValue() + ":" + this->TCPPort.getStrValue() + "/" + string(BucketName);
doc->FileName.setValue(uri);
doc->signalLinkXsetValue.disconnect(boost::bind(&Cloud::Module::LinkXSetValue, this, _1));
return (true);
}
return (true);
}

View File

@@ -247,6 +247,10 @@ public:
{
return FileStream;
}
virtual const std::ostream& Stream(void) const
{
return FileStream;
}
virtual bool shouldWrite(const std::string& name, const Base::Persistence* Object) const;
void checkText(XERCES_CPP_NAMESPACE_QUALIFIER DOMText* text);
void checkXML(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node);

View File

@@ -52,9 +52,17 @@ IF(WIN32)
SET( CURL_FOUND False)
message( FATAL_ERROR "curl not found!" )
endif(EXISTS ${FREECAD_LIBPACK_DIR}/lib/libcurl.lib)
ELSE()
find_package(CURL REQUIRED)
ENDIF(WIN32)
ELSE()
find_package(CURL REQUIRED)
ENDIF(WIN32)
if(FREECAD_WEB)
# FindOpenSSL may append host pkg-config transitive flags even when its
# primary archive paths are pinned. The Web dependency closure is fully
# static and has no host-side dl/thread dependencies.
set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
set(CURL_LIBRARIES ${CURL_LIBRARY})
endif()
if(CURL_FOUND)