diff --git a/native/cocos/core/assets/TextureBase.h b/native/cocos/core/assets/TextureBase.h index ba214ea28c..1f88ce1b18 100644 --- a/native/cocos/core/assets/TextureBase.h +++ b/native/cocos/core/assets/TextureBase.h @@ -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}; diff --git a/native/external-config.json b/native/external-config.json index 47421cc422..fd893e3d75 100644 --- a/native/external-config.json +++ b/native/external-config.json @@ -3,6 +3,6 @@ "type": "github", "owner": "cocos-creator", "name": "engine-native-external", - "checkout": "develop-7" + "checkout": "develop-8" } } \ No newline at end of file diff --git a/native/tools/swig-config/2d.i b/native/tools/swig-config/2d.i index 53810c1216..6435573a5c 100644 --- a/native/tools/swig-config/2d.i +++ b/native/tools/swig-config/2d.i @@ -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" diff --git a/native/tools/swig-config/assets.i b/native/tools/swig-config/assets.i index b6f2a701d4..f0a723ebfc 100644 --- a/native/tools/swig-config/assets.i +++ b/native/tools/swig-config/assets.i @@ -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" diff --git a/native/tools/swig-config/cocos.i b/native/tools/swig-config/cocos.i index f29ad5c0d8..fea738af9b 100644 --- a/native/tools/swig-config/cocos.i +++ b/native/tools/swig-config/cocos.i @@ -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" diff --git a/native/tools/swig-config/extension.i b/native/tools/swig-config/extension.i index 5cef04d741..ba8200595b 100644 --- a/native/tools/swig-config/extension.i +++ b/native/tools/swig-config/extension.i @@ -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" diff --git a/native/tools/swig-config/genbindings.js b/native/tools/swig-config/genbindings.js index 46797fc279..eee00a4180 100644 --- a/native/tools/swig-config/genbindings.js +++ b/native/tools/swig-config/genbindings.js @@ -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); diff --git a/native/tools/swig-config/geometry.i b/native/tools/swig-config/geometry.i index c542af9a0c..1b9b07b7dd 100644 --- a/native/tools/swig-config/geometry.i +++ b/native/tools/swig-config/geometry.i @@ -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" diff --git a/native/tools/swig-config/gfx.i b/native/tools/swig-config/gfx.i index 6f07ec9894..13edf51c04 100644 --- a/native/tools/swig-config/gfx.i +++ b/native/tools/swig-config/gfx.i @@ -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 ------ diff --git a/native/tools/swig-config/network.i b/native/tools/swig-config/network.i index ef1bd3d0ff..51e26d0ff9 100644 --- a/native/tools/swig-config/network.i +++ b/native/tools/swig-config/network.i @@ -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 diff --git a/native/tools/swig-config/physics.i b/native/tools/swig-config/physics.i index 8ad755b0de..2e7fe4df4f 100644 --- a/native/tools/swig-config/physics.i +++ b/native/tools/swig-config/physics.i @@ -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" diff --git a/native/tools/swig-config/pipeline.i b/native/tools/swig-config/pipeline.i index bd56cfd21e..442acd055e 100644 --- a/native/tools/swig-config/pipeline.i +++ b/native/tools/swig-config/pipeline.i @@ -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" diff --git a/native/tools/swig-config/scene.i b/native/tools/swig-config/scene.i index e1ed12b0e6..92b03e508a 100644 --- a/native/tools/swig-config/scene.i +++ b/native/tools/swig-config/scene.i @@ -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" diff --git a/native/tools/swig-config/spine.i b/native/tools/swig-config/spine.i index 84a8ad0d6b..f232f3517e 100644 --- a/native/tools/swig-config/spine.i +++ b/native/tools/swig-config/spine.i @@ -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"