Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: when these extensions set to OFF, compiles #2347

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ CSLoader::CSLoader()
CREATE_CLASS_NODE_READER_INFO(Node3DReader);
CREATE_CLASS_NODE_READER_INFO(MeshReader);
CREATE_CLASS_NODE_READER_INFO(UserCameraReader);

#if defined(AX_ENABLE_EXT_PARTICLE3D)
CREATE_CLASS_NODE_READER_INFO(Particle3DReader);
#endif // defined(AX_ENABLE_EXT_PARTICLE3D)

CREATE_CLASS_NODE_READER_INFO(GameNode3DReader);
CREATE_CLASS_NODE_READER_INFO(Light3DReader);
CREATE_CLASS_NODE_READER_INFO(TabControlReader);
Expand Down
4 changes: 4 additions & 0 deletions extensions/cocostudio/src/cocostudio/CocoStudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#include "WidgetReader/Node3DReader/Node3DReader.h"
#include "WidgetReader/MeshReader/MeshReader.h"
#include "WidgetReader/UserCameraReader/UserCameraReader.h"
#if defined(AX_ENABLE_EXT_PARTICLE3D)
#include "WidgetReader/Particle3DReader/Particle3DReader.h"
#endif // defined(AX_ENABLE_EXT_PARTICLE3D)

namespace cocostudio
{
Expand Down Expand Up @@ -59,7 +61,9 @@ void destroyCocosStudio()
Node3DReader::destroyInstance();
MeshReader::destroyInstance();
UserCameraReader::destroyInstance();
#if defined(AX_ENABLE_EXT_PARTICLE3D)
Particle3DReader::destroyInstance();
#endif // defined(AX_ENABLE_EXT_PARTICLE3D)

ax::CSLoader::destroyInstance();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "platform/FileUtils.h"
#include "cocostudio/WidgetReader/Particle3DReader/Particle3DReader.h"
#if defined(AX_ENABLE_EXT_PARTICLE3D)

#include "cocostudio/CSParseBinary_generated.h"
#include "cocostudio/CSParse3DBinary_generated.h"
Expand Down Expand Up @@ -147,3 +148,5 @@ Node* Particle3DReader::createNodeWithFlatBuffers(const flatbuffers::Table* part
return ret;
}
} // namespace cocostudio

#endif // defined(AX_ENABLE_EXT_PARTICLE3D)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#ifndef __cocos2d_libs__Particle3DReader__
#define __cocos2d_libs__Particle3DReader__

#if defined(AX_ENABLE_EXT_PARTICLE3D)

#include "cocostudio/CocosStudioExport.h"
#include "cocostudio/WidgetReader/NodeReaderProtocol.h"
#include "cocostudio/WidgetReader/NodeReaderDefine.h"
Expand All @@ -49,4 +51,6 @@ class CCS_DLL Particle3DReader : public ax::Object, public NodeReaderProtocol
};
} // namespace cocostudio

#endif // defined(AX_ENABLE_EXT_PARTICLE3D)

#endif /* defined(__cocos2d_libs__Particle3DReader__) */
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if defined(AX_ENABLE_EXT_FAIRYGUI)
#include "axlua_fairygui_manual.hpp"
#include "lua-bindings/auto/axlua_fairygui_auto.hpp"
#include "lua-bindings/manual/tolua_fix.h"
Expand Down Expand Up @@ -1103,3 +1104,5 @@ int register_fairygui_module(lua_State* L)
lua_pop(L, 1);
return 1;
}

#endif // defined(AX_ENABLE_EXT_FAIRYGUI)
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#ifndef SCRIPTING_AXLUA_FAIRYGUI_MANUAL_H__
#define SCRIPTING_AXLUA_FAIRYGUI_MANUAL_H__
#if defined(AX_ENABLE_EXT_FAIRYGUI)

#include "tolua++.h"

TOLUA_API int register_fairygui_module(lua_State* L);

#endif // defined(AX_ENABLE_EXT_FAIRYGUI)

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ int lua_module_register(lua_State* L)
register_ui_module(L);
register_extension_module(L);
// TODO arnold
#if defined(AX_ENABLE_EXT_SPINE)
register_spine_module(L);
#endif // defined(AX_ENABLE_EXT_SPINE)
register_cocos3d_module(L);
register_audioengine_module(L);
#if defined(AX_ENABLE_3D_PHYSICS) && AX_ENABLE_BULLET_INTEGRATION
Expand All @@ -72,7 +74,9 @@ int lua_module_register(lua_State* L)
#if defined(AX_ENABLE_NAVMESH)
register_navmesh_module(L);
#endif
#if defined(AX_ENABLE_EXT_FAIRYGUI)
register_fairygui_module(L);
#endif // defined(AX_ENABLE_EXT_FAIRYGUI)
// register extensions: yaiso, lua-cjson
lua_register_extensions(L);
return 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#if defined(AX_ENABLE_EXT_SPINE)
#include "lua-bindings/manual/spine/axlua_spine_manual.hpp"
#include "lua-bindings/auto/axlua_spine_auto.hpp"

Expand Down Expand Up @@ -615,3 +616,5 @@ int register_spine_module(lua_State* L)

return 1;
}

#endif // defined(AX_ENABLE_EXT_SPINE)
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
****************************************************************************/
#ifndef SCRIPTING_AXLUA_SPINE_MANUAL_H
#define SCRIPTING_AXLUA_SPINE_MANUAL_H
#if defined(AX_ENABLE_EXT_SPINE)

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -53,4 +54,7 @@ TOLUA_API int register_spine_module(lua_State* L);

// end group
/// @}

#endif // defined(AX_ENABLE_EXT_SPINE)

#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_SPINE_MANUAL_H
Loading