Fix some swig warnings and fix the issue that Node::mobility is not bound, update swig to 4.1.0 release (#13425)

* Update swig config, fix some warnings

* Update TextureBase.h, don't make _width, _height public

* Revert genbindings.js

* Update external to develop-8
This commit is contained in:
James Chen
2022-11-18 11:56:09 +08:00
committed by GitHub
parent 702b85e9b7
commit 32a6aba4fb
14 changed files with 41 additions and 7 deletions
+1 -2
View File
@@ -244,10 +244,9 @@ public:
/*@serializable*/
uint32_t _anisotropy{0};
protected:
uint32_t _width{1};
uint32_t _height{1};
protected:
ccstd::string _id;
gfx::SamplerInfo _samplerInfo;
gfx::Sampler *_gfxSampler{nullptr};
+1 -1
View File
@@ -3,6 +3,6 @@
"type": "github",
"owner": "cocos-creator",
"name": "engine-native-external",
"checkout": "develop-7"
"checkout": "develop-8"
}
}
+2
View File
@@ -39,6 +39,7 @@
//
%ignore UserData;
%ignore cc::RefCounted;
%ignore cc::UIMeshBuffer::requireFreeIA;
%ignore cc::UIMeshBuffer::createNewIA;
@@ -164,6 +165,7 @@
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/TypeDef.h"
%import "base/Ptr.h"
%import "base/memory/Memory.h"
+2
View File
@@ -49,6 +49,7 @@
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore cc::Asset::createNode; //FIXME: swig needs to support std::function
%ignore cc::IMemoryImageSource::data;
%ignore cc::IMemoryImageSource::compressed;
@@ -180,6 +181,7 @@
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/TypeDef.h"
%import "base/Ptr.h"
%import "base/memory/Memory.h"
+4 -1
View File
@@ -46,6 +46,7 @@
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%rename("$ignore", regextarget=1, fullname=1) "cc::Vec2::.*[^2]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Vec3::.*[^3]$";
@@ -54,7 +55,8 @@
%rename("$ignore", regextarget=1, fullname=1) "cc::Mat3::.*[^3]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Mat4::.*[^4]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Quaternion::.*[^n]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Color::.*[^n]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Color::.*[^r]$";
%rename("$ignore", regextarget=1, fullname=1) "cc::Color::r$";
namespace cc {
//%ignore ISystemWindowManager;
@@ -175,6 +177,7 @@ namespace cc {
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/memory/Memory.h"
%import "base/Data.h"
%import "base/Value.h"
+5
View File
@@ -31,6 +31,8 @@
// 2. namespace is needed
//
%ignore cc::RefCounted;
// ----- Rename Section ------
// Brief: Classes, methods or attributes needs to be renamed
//
@@ -81,6 +83,9 @@
// Note:
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "extensions/ExtensionExport.h"
%import "extensions/ExtensionMacros.h"
+7 -2
View File
@@ -232,8 +232,13 @@ function generateBindings(swigArgs, interfaceFile, generatedCppFile) {
const ret = spawnSync(SWIG_EXE, swigArgs, {
stdio: ['ignore', process.stdout, process.stderr],
});
if (ret.status !== 0) {
process.exit(ret.status);
let retCode = ret.status;
if (retCode !== 0) {
console.error(`==> ERROR: spawnSync returns ${retCode}`);
if (typeof retCode !== 'number') {
retCode = EXIT_CODE_SPAWN_ERROR;
}
process.exit(retCode);
}
} catch (error) {
console.error('ERROR:', error);
+2
View File
@@ -31,6 +31,7 @@
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore cc::geometry::AABB::getBoundary;
%ignore cc::geometry::AABB::aabbAabb;
%ignore cc::geometry::AABB::aabbFrustum;
@@ -102,6 +103,7 @@
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "math/MathBase.h"
%import "math/Vec2.h"
+3
View File
@@ -44,6 +44,8 @@
// 1. 'Rename Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
%ignore cc::RefCounted;
namespace cc { namespace gfx {
// TODO(cjh): use regex to ignore
@@ -248,6 +250,7 @@ namespace cc { namespace gfx {
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/memory/Memory.h"
// ----- Include Section ------
+2
View File
@@ -30,6 +30,7 @@
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore cc::network::Downloader::createDataTask;
%ignore cc::network::Downloader::createDownloadTask;
%ignore cc::network::Downloader::setOnError;
@@ -85,6 +86,7 @@
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
// ----- Include Section ------
// Brief: Include header files in which classes and methods will be bound
+3
View File
@@ -31,6 +31,7 @@
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%rename("$ignore", regextarget=1, fullname=1) "cc::physics::I[A-Za-z0-9]*(?:Body|World|Shape|Joint|Lifecycle)$";
@@ -83,6 +84,8 @@
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "core/event/Event.h"
%import "core/scene-graph/Node.h"
+3
View File
@@ -52,6 +52,8 @@ using namespace cc;
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore cc::pipeline::convertQueueSortFunc;
%ignore cc::pipeline::RenderPipeline::getFrameGraph;
%ignore cc::pipeline::RenderPipeline::setPipelineRuntime;
@@ -175,6 +177,7 @@ using namespace cc;
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/TypeDef.h"
%import "base/memory/Memory.h"
%import "base/Ptr.h"
+3 -1
View File
@@ -68,6 +68,7 @@ using namespace cc;
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore cc::scene::LODGroup::getVisibleLODLevel;
%ignore cc::scene::LODGroup::getLockedLODLevels;
@@ -284,7 +285,7 @@ using namespace cc;
%attribute_writeonly(cc::Node, Mat4&, matrix, setMatrix);
%attribute(cc::Node, uint32_t, hasChangedFlags, getChangedFlags, setChangedFlags);
%attribute(cc::Node, bool, _persistNode, isPersistNode, setPersistNode);
%attribute(cc::Node, cc::MobilityMode, _mobility, getMobility, setMobility);
%attribute(cc::Node, cc::MobilityMode, mobility, getMobility, setMobility);
%attribute(cc::scene::Ambient, cc::Vec4&, skyColor, getSkyColor, setSkyColor);
%attribute(cc::scene::Ambient, float, skyIllum, getSkyIllum, setSkyIllum);
@@ -537,6 +538,7 @@ using namespace cc;
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "base/TypeDef.h"
%import "base/memory/Memory.h"
%import "base/Ptr.h"
+3
View File
@@ -34,6 +34,7 @@ using namespace spine;
// 1. 'Ignore Section' should be placed before attribute definition and %import/%include
// 2. namespace is needed
//
%ignore cc::RefCounted;
%ignore *::rtti;
%ignore spine::SkeletonCache::SegmentData;
%ignore spine::SkeletonCache::BoneData;
@@ -245,6 +246,8 @@ using namespace spine;
// Note:
// %import "your_header_file.h" will not generate code for that header file
//
%import "base/Macros.h"
%import "base/RefCounted.h"
%import "editor-support/spine/dll.h"
%import "editor-support/spine/RTTI.h"
%import "editor-support/spine/SpineString.h"