diff --git a/cmake/AXPlatform.cmake b/cmake/AXPlatform.cmake index 0e800742b6..61a6341ae9 100644 --- a/cmake/AXPlatform.cmake +++ b/cmake/AXPlatform.cmake @@ -39,9 +39,9 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(PLATFORM_FOLDER linux) endif() elseif(${CMAKE_SYSTEM_NAME} MATCHES "Emscripten") - set(EMSCRIPTEN TRUE) set(WASM TRUE) - set(PLATFORM_FOLDER emscripten) + set(EMSCRIPTEN TRUE) + set(PLATFORM_FOLDER wasm) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(APPLE TRUE) set(MACOSX TRUE) @@ -96,8 +96,8 @@ elseif(LINUX) set(platform_name linux) set(platform_spec_path linux) elseif(EMSCRIPTEN) - set(platform_name emscripten) - set(platform_spec_path emscripten) + set(platform_name wasm) + set(platform_spec_path wasm) endif() set(platform_spec_path "${_path_prefix}${platform_spec_path}") diff --git a/core/axmol.h b/core/axmol.h index 652fdea7d8..5f29061a2b 100644 --- a/core/axmol.h +++ b/core/axmol.h @@ -227,12 +227,12 @@ THE SOFTWARE. # include "platform/linux/StdC-linux.h" #endif // AX_TARGET_PLATFORM == AX_PLATFORM_LINUX -#if (AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) - #include "platform/emscripten/Application-emscripten.h" +#if (AX_TARGET_PLATFORM == AX_PLATFORM_WASM) + #include "platform/wasm/Application-wasm.h" #include "platform/desktop/GLViewImpl-desktop.h" - #include "platform/emscripten/GL-emscripten.h" - #include "platform/emscripten/StdC-emscripten.h" -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN + #include "platform/wasm/GL-wasm.h" + #include "platform/wasm/StdC-wasm.h" +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM // script_support #include "base/ScriptSupport.h" diff --git a/core/base/Config.h b/core/base/Config.h index 2bad104c78..1bd49a43dc 100644 --- a/core/base/Config.h +++ b/core/base/Config.h @@ -273,7 +273,7 @@ THE SOFTWARE. # if (AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || \ AX_TARGET_PLATFORM == AX_PLATFORM_WIN32 || AX_TARGET_PLATFORM == AX_PLATFORM_WINRT || \ AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || \ - AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) + AX_TARGET_PLATFORM == AX_PLATFORM_WASM) # define AX_USE_3D_PHYSICS 1 # endif #endif diff --git a/core/base/Controller.cpp b/core/base/Controller.cpp index bf72beaf54..1a0000a2b3 100644 --- a/core/base/Controller.cpp +++ b/core/base/Controller.cpp @@ -28,7 +28,7 @@ #if (AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || \ AX_TARGET_PLATFORM == AX_PLATFORM_MAC || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || \ - defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) + defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_WASM) # include "base/EventDispatcher.h" # include "base/EventController.h" @@ -128,4 +128,4 @@ void Controller::onAxisEvent(int axisCode, float value, bool isAnalog) NS_AX_END #endif // (AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == - // AX_PLATFORM_MAC || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) + // AX_PLATFORM_MAC || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_WASM) diff --git a/core/base/Controller.h b/core/base/Controller.h index 5649d46dc8..36586e5ab7 100644 --- a/core/base/Controller.h +++ b/core/base/Controller.h @@ -28,7 +28,7 @@ #if (AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || \ AX_TARGET_PLATFORM == AX_PLATFORM_MAC || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || \ defined(_WIN32) /* win32 & winuwp */ || \ -AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) +AX_TARGET_PLATFORM == AX_PLATFORM_WASM) # include "platform/PlatformMacros.h" # include diff --git a/core/network/CMakeLists.txt b/core/network/CMakeLists.txt index f2bd368140..8968e69af0 100644 --- a/core/network/CMakeLists.txt +++ b/core/network/CMakeLists.txt @@ -1,6 +1,6 @@ if(EMSCRIPTEN) set(_AX_NETWORK_HEADER - network/Downloader-emscripten.h + network/Downloader-wasm.h network/IDownloaderImpl.h network/Downloader.h network/Uri.h @@ -10,9 +10,9 @@ if(EMSCRIPTEN) ) set(_AX_NETWORK_SRC - network/HttpClient-emscripten.cpp + network/HttpClient-wasm.cpp network/Downloader.cpp - network/Downloader-emscripten.cpp + network/Downloader-wasm.cpp network/HttpCookie.cpp network/Uri.cpp ) diff --git a/core/network/Downloader-emscripten.cpp b/core/network/Downloader-wasm.cpp similarity index 99% rename from core/network/Downloader-emscripten.cpp rename to core/network/Downloader-wasm.cpp index f36ec6d340..6209678627 100644 --- a/core/network/Downloader-emscripten.cpp +++ b/core/network/Downloader-wasm.cpp @@ -25,7 +25,7 @@ #include "platform/FileUtils.h" -#include "network/Downloader-emscripten.h" +#include "network/Downloader-wasm.h" #include using namespace std; diff --git a/core/network/Downloader-emscripten.h b/core/network/Downloader-wasm.h similarity index 100% rename from core/network/Downloader-emscripten.h rename to core/network/Downloader-wasm.h diff --git a/core/network/Downloader.cpp b/core/network/Downloader.cpp index c2103107bf..99b98ca9cd 100644 --- a/core/network/Downloader.cpp +++ b/core/network/Downloader.cpp @@ -27,7 +27,7 @@ #include "network/Downloader.h" #if EMSCRIPTEN -#include "network/Downloader-emscripten.h" +#include "network/Downloader-wasm.h" #define DownloaderImpl DownloaderEmscripten #else #include "network/Downloader-curl.h" diff --git a/core/network/HttpClient-emscripten.cpp b/core/network/HttpClient-wasm.cpp similarity index 99% rename from core/network/HttpClient-emscripten.cpp rename to core/network/HttpClient-wasm.cpp index f7bfdbb95b..1874851eba 100644 --- a/core/network/HttpClient-emscripten.cpp +++ b/core/network/HttpClient-wasm.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "network/HttpClient-emscripten.h" +#include "network/HttpClient-wasm.h" #include #include "base/Director.h" #include "platform/FileUtils.h" diff --git a/core/network/HttpClient-emscripten.h b/core/network/HttpClient-wasm.h similarity index 100% rename from core/network/HttpClient-emscripten.h rename to core/network/HttpClient-wasm.h diff --git a/core/network/HttpClient.h b/core/network/HttpClient.h index d201af50c5..7f99301706 100644 --- a/core/network/HttpClient.h +++ b/core/network/HttpClient.h @@ -254,6 +254,6 @@ NS_AX_END #else -#include "network/HttpClient-emscripten.h" +#include "network/HttpClient-wasm.h" #endif diff --git a/core/platform/Application.h b/core/platform/Application.h index aa1cb1623a..b26db422e2 100644 --- a/core/platform/Application.h +++ b/core/platform/Application.h @@ -42,8 +42,8 @@ THE SOFTWARE. # include "platform/winrt/Application-winrt.h" #elif AX_TARGET_PLATFORM == AX_PLATFORM_LINUX # include "platform/linux/Application-linux.h" -#elif AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN -# include "platform/emscripten/Application-emscripten.h" +#elif AX_TARGET_PLATFORM == AX_PLATFORM_WASM +# include "platform/wasm/Application-wasm.h" #endif /// @endcond diff --git a/core/platform/CMakeLists.txt b/core/platform/CMakeLists.txt index 9e89c6d83d..a4f51cf5e3 100644 --- a/core/platform/CMakeLists.txt +++ b/core/platform/CMakeLists.txt @@ -150,18 +150,18 @@ elseif(EMSCRIPTEN) PUBLIC "${_AX_ROOT}/core" ) set(_AX_PLATFORM_SPECIFIC_HEADER - platform/emscripten/Application-emscripten.h - platform/emscripten/GL-emscripten.h - platform/emscripten/StdC-emscripten.h - platform/emscripten/FileUtils-emscripten.h - platform/emscripten/PlatformDefine-emscripten.h + platform/wasm/Application-wasm.h + platform/wasm/GL-wasm.h + platform/wasm/StdC-wasm.h + platform/wasm/FileUtils-wasm.h + platform/wasm/PlatformDefine-wasm.h platform/desktop/GLViewImpl-desktop.h # wasm can share GLviewImpl-desktop based on GLFW ) set(_AX_PLATFORM_SPECIFIC_SRC - platform/emscripten/FileUtils-emscripten.cpp - platform/emscripten/Common-emscripten.cpp - platform/emscripten/Application-emscripten.cpp - platform/emscripten/Device-emscripten.cpp + platform/wasm/FileUtils-wasm.cpp + platform/wasm/Common-wasm.cpp + platform/wasm/Application-wasm.cpp + platform/wasm/Device-wasm.cpp platform/desktop/GLViewImpl-desktop.cpp ) endif() diff --git a/core/platform/GL.h b/core/platform/GL.h index 082e786685..2a921d3552 100644 --- a/core/platform/GL.h +++ b/core/platform/GL.h @@ -39,8 +39,8 @@ THE SOFTWARE. # include "platform/winrt/GL-winrt.h" #elif AX_TARGET_PLATFORM == AX_PLATFORM_LINUX # include "platform/linux/GL-linux.h" -#elif AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN -# include "platform/emscripten/GL-emscripten.h" +#elif AX_TARGET_PLATFORM == AX_PLATFORM_WASM +# include "platform/wasm/GL-wasm.h" #elif AX_TARGET_PLATFORM == AX_PLATFORM_IOS # if defined(AX_USE_GL) # include "platform/ios/GL-ios.h" diff --git a/core/platform/PlatformConfig.h b/core/platform/PlatformConfig.h index 0af2552e07..e663fbf95f 100644 --- a/core/platform/PlatformConfig.h +++ b/core/platform/PlatformConfig.h @@ -50,7 +50,8 @@ THE SOFTWARE. #define AX_PLATFORM_WIN32 3 #define AX_PLATFORM_LINUX 5 #define AX_PLATFORM_MAC 8 -#define AX_PLATFORM_EMSCRIPTEN 10 +#define AX_PLATFORM_WASM 10 +#define AX_PLATFORM_EMSCRIPTEN AX_PLATFORM_WASM #define AX_PLATFORM_WINRT 13 // Determine target platform by compile environment macro. @@ -93,7 +94,7 @@ THE SOFTWARE. #if defined(__EMSCRIPTEN__) # undef AX_TARGET_PLATFORM -# define AX_TARGET_PLATFORM AX_PLATFORM_EMSCRIPTEN +# define AX_TARGET_PLATFORM AX_PLATFORM_WASM #endif // android, override linux @@ -141,7 +142,7 @@ Linux: Desktop GL/Vulkan #define AX_GLES_PROFILE_DEN 100 #if ((AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID) || (AX_TARGET_PLATFORM == AX_PLATFORM_IOS) || \ - (AX_TARGET_PLATFORM == AX_PLATFORM_WINRT) || (AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN)) + (AX_TARGET_PLATFORM == AX_PLATFORM_WINRT) || (AX_TARGET_PLATFORM == AX_PLATFORM_WASM)) # define AX_PLATFORM_MOBILE #else # define AX_PLATFORM_PC diff --git a/core/platform/PlatformDefine.h b/core/platform/PlatformDefine.h index a1bbb83a6d..988fbfff9e 100644 --- a/core/platform/PlatformDefine.h +++ b/core/platform/PlatformDefine.h @@ -41,6 +41,6 @@ THE SOFTWARE. # include "platform/linux/PlatformDefine-linux.h" #elif AX_TARGET_PLATFORM == AX_PLATFORM_WINRT # include "platform/winrt/PlatformDefine-winrt.h" -#elif AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN -# include "platform/emscripten/PlatformDefine-emscripten.h" +#elif AX_TARGET_PLATFORM == AX_PLATFORM_WASM +# include "platform/wasm/PlatformDefine-wasm.h" #endif diff --git a/core/platform/desktop/GLViewImpl-desktop.cpp b/core/platform/desktop/GLViewImpl-desktop.cpp index 04a9d31b99..cd6019c7d0 100644 --- a/core/platform/desktop/GLViewImpl-desktop.cpp +++ b/core/platform/desktop/GLViewImpl-desktop.cpp @@ -77,7 +77,7 @@ THE SOFTWARE. # endif #endif // #if (AX_TARGET_PLATFORM == AX_PLATFORM_MAC) -#if (AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN) +#if (AX_TARGET_PLATFORM == AX_PLATFORM_WASM) #else #include diff --git a/core/platform/emscripten/Application-emscripten.cpp b/core/platform/wasm/Application-wasm.cpp similarity index 97% rename from core/platform/emscripten/Application-emscripten.cpp rename to core/platform/wasm/Application-wasm.cpp index 749499a144..65291b8e54 100644 --- a/core/platform/emscripten/Application-emscripten.cpp +++ b/core/platform/wasm/Application-wasm.cpp @@ -25,9 +25,9 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM -#include "platform/emscripten/Application-emscripten.h" +#include "platform/wasm/Application-wasm.h" #include #include #include @@ -198,5 +198,5 @@ LanguageType Application::getCurrentLanguage() NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/core/platform/emscripten/Application-emscripten.h b/core/platform/wasm/Application-wasm.h similarity index 97% rename from core/platform/emscripten/Application-emscripten.h rename to core/platform/wasm/Application-wasm.h index 920c1f5e21..61b3667007 100644 --- a/core/platform/emscripten/Application-emscripten.h +++ b/core/platform/wasm/Application-wasm.h @@ -28,7 +28,7 @@ THE SOFTWARE. #define AXAPLICATION_H_ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "platform/Common.h" #include "platform/ApplicationProtocol.h" @@ -117,6 +117,6 @@ protected: NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM #endif /* AXAPLICATION_H_ */ diff --git a/core/platform/emscripten/Common-emscripten.cpp b/core/platform/wasm/Common-wasm.cpp similarity index 91% rename from core/platform/emscripten/Common-emscripten.cpp rename to core/platform/wasm/Common-wasm.cpp index 7a8f276453..f4bdd9fbe0 100644 --- a/core/platform/emscripten/Common-emscripten.cpp +++ b/core/platform/wasm/Common-wasm.cpp @@ -25,10 +25,10 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "platform/Common.h" -#include "platform/emscripten/StdC-emscripten.h" +#include "platform/wasm/StdC-wasm.h" #include "base/Console.h" #include @@ -48,4 +48,4 @@ void LuaLog(const char * format) NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/core/platform/emscripten/Device-emscripten.cpp b/core/platform/wasm/Device-wasm.cpp similarity index 98% rename from core/platform/emscripten/Device-emscripten.cpp rename to core/platform/wasm/Device-wasm.cpp index 1b4e707b66..e02d23b852 100644 --- a/core/platform/emscripten/Device-emscripten.cpp +++ b/core/platform/wasm/Device-wasm.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "platform/Device.h" #include "platform/FileUtils.h" @@ -158,4 +158,4 @@ void Device::selectionChanged() {} NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/core/platform/emscripten/FileUtils-emscripten.cpp b/core/platform/wasm/FileUtils-wasm.cpp similarity index 93% rename from core/platform/emscripten/FileUtils-emscripten.cpp rename to core/platform/wasm/FileUtils-wasm.cpp index e87ee8a73e..7888b0bc9a 100644 --- a/core/platform/emscripten/FileUtils-emscripten.cpp +++ b/core/platform/wasm/FileUtils-wasm.cpp @@ -25,10 +25,10 @@ THE SOFTWARE. ****************************************************************************/ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM -#include "platform/emscripten/FileUtils-emscripten.h" -#include "platform/emscripten/Application-emscripten.h" +#include "platform/wasm/FileUtils-wasm.h" +#include "platform/wasm/Application-wasm.h" #include "platform/Common.h" #include "base/Macros.h" #include "base/UTF8.h" @@ -102,4 +102,4 @@ bool FileUtilsEmscripten::isFileExistInternal(std::string_view path) const NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/core/platform/emscripten/FileUtils-emscripten.h b/core/platform/wasm/FileUtils-wasm.h similarity index 95% rename from core/platform/emscripten/FileUtils-emscripten.h rename to core/platform/wasm/FileUtils-wasm.h index d33bac1f5e..c714efe1b0 100644 --- a/core/platform/emscripten/FileUtils-emscripten.h +++ b/core/platform/wasm/FileUtils-wasm.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __AX_FILEUTILS_EMSCRIPTEN_H__ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "platform/FileUtils.h" #include "platform/PlatformMacros.h" @@ -62,6 +62,6 @@ private: NS_AX_END -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM #endif // __AX_FILEUTILS_EMSCRIPTEN_H__ diff --git a/core/platform/emscripten/GL-emscripten.h b/core/platform/wasm/GL-wasm.h similarity index 100% rename from core/platform/emscripten/GL-emscripten.h rename to core/platform/wasm/GL-wasm.h diff --git a/core/platform/emscripten/PlatformDefine-emscripten.h b/core/platform/wasm/PlatformDefine-wasm.h similarity index 100% rename from core/platform/emscripten/PlatformDefine-emscripten.h rename to core/platform/wasm/PlatformDefine-wasm.h diff --git a/core/platform/emscripten/StdC-emscripten.h b/core/platform/wasm/StdC-wasm.h similarity index 100% rename from core/platform/emscripten/StdC-emscripten.h rename to core/platform/wasm/StdC-wasm.h diff --git a/core/platform/emscripten/devtools-emscripten.cpp b/core/platform/wasm/devtools-wasm.cpp similarity index 89% rename from core/platform/emscripten/devtools-emscripten.cpp rename to core/platform/wasm/devtools-wasm.cpp index f12538017f..13077d7b81 100644 --- a/core/platform/emscripten/devtools-emscripten.cpp +++ b/core/platform/wasm/devtools-wasm.cpp @@ -1,7 +1,7 @@ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM -#include "devtools-emscripten.h" +#include "platform/devtools-wasm.h" #include #include "base/UTF8.h" @@ -67,4 +67,4 @@ extern "C" } } -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/core/platform/emscripten/devtools-emscripten.h b/core/platform/wasm/devtools-wasm.h similarity index 76% rename from core/platform/emscripten/devtools-emscripten.h rename to core/platform/wasm/devtools-wasm.h index 0ad97453b2..d3b3b87f01 100644 --- a/core/platform/emscripten/devtools-emscripten.h +++ b/core/platform/wasm/devtools-wasm.h @@ -2,7 +2,7 @@ #define __DEVTOOLS_EMSCRIPTEN_H__ #include "platform/PlatformConfig.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "base/CCScheduler.h" #include "base/CCDirector.h" @@ -30,5 +30,5 @@ private: Director* _director; }; -#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM #endif // __DEVTOOLS_EMSCRIPTEN_H__ \ No newline at end of file diff --git a/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp b/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp index fddf653e6e..c2ca766008 100644 --- a/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp +++ b/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.cpp @@ -1,5 +1,5 @@ #include "scripting/lua-bindings/auto/axlua_audioengine_auto.hpp" -#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_WASM #include "audio/AudioEngine.h" #include "scripting/lua-bindings/manual/tolua_fix.h" #include "scripting/lua-bindings/manual/LuaBasicConversions.h" diff --git a/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.hpp b/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.hpp index 591c6ccf02..ed5e3c840e 100644 --- a/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.hpp +++ b/extensions/scripting/lua-bindings/auto/axlua_audioengine_auto.hpp @@ -1,5 +1,5 @@ #include "base/Config.h" -#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_WASM #ifndef __ax_audioengine_h__ #define __ax_audioengine_h__ @@ -38,4 +38,4 @@ int register_all_ax_audioengine(lua_State* tolua_S); #endif // __ax_audioengine_h__ -#endif //#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +#endif //#if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_WASM diff --git a/templates/axmol_files.json b/templates/axmol_files.json deleted file mode 100644 index eddc8231f8..0000000000 --- a/templates/axmol_files.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "common": [ - "build.ps1", - "templates/run.bat.in" - ] -} diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index 06df2a7b96..74d6712d98 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -94,9 +94,9 @@ elseif(LINUX) proj.linux/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) -elseif(EMSCRIPTEN) +elseif(WASM) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/tests/fairygui-tests/proj.emscripten/main.cpp b/templates/cpp-template-default/proj.wasm/main.cpp similarity index 98% rename from tests/fairygui-tests/proj.emscripten/main.cpp rename to templates/cpp-template-default/proj.wasm/main.cpp index b265379f11..96e3ed2fae 100644 --- a/tests/fairygui-tests/proj.emscripten/main.cpp +++ b/templates/cpp-template-default/proj.wasm/main.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "AppDelegate.h" -#include "cocos2d.h" +#include "axmol.h" #include #include diff --git a/templates/lua-template-default/CMakeLists.txt b/templates/lua-template-default/CMakeLists.txt index 1c8b4b1b14..6dcaf61f4c 100644 --- a/templates/lua-template-default/CMakeLists.txt +++ b/templates/lua-template-default/CMakeLists.txt @@ -107,9 +107,9 @@ elseif(LINUX) proj.linux/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) -elseif(EMSCRIPTEN) +elseif(WASM) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/tests/cpp-tests/proj.emscripten/main.cpp b/templates/lua-template-default/proj.wasm/main.cpp similarity index 98% rename from tests/cpp-tests/proj.emscripten/main.cpp rename to templates/lua-template-default/proj.wasm/main.cpp index b265379f11..96e3ed2fae 100644 --- a/tests/cpp-tests/proj.emscripten/main.cpp +++ b/templates/lua-template-default/proj.wasm/main.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "AppDelegate.h" -#include "cocos2d.h" +#include "axmol.h" #include #include diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 0c7a7462b6..ddd682dc37 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -62,9 +62,9 @@ elseif(LINUX) proj.linux/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) -elseif(EMSCRIPTEN) +elseif(WASM) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/tests/cpp-tests/Source/CurlTest/CurlTest.cpp b/tests/cpp-tests/Source/CurlTest/CurlTest.cpp index edee52deb8..c2363e2a45 100644 --- a/tests/cpp-tests/Source/CurlTest/CurlTest.cpp +++ b/tests/cpp-tests/Source/CurlTest/CurlTest.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#if (AX_TARGET_PLATFORM != AX_PLATFORM_EMSCRIPTEN) +#if (AX_TARGET_PLATFORM != AX_PLATFORM_WASM) #include "platform/PlatformConfig.h" #include "CurlTest.h" diff --git a/tests/cpp-tests/Source/CurlTest/CurlTest.h b/tests/cpp-tests/Source/CurlTest/CurlTest.h index 2015bdd5fc..b90888983c 100644 --- a/tests/cpp-tests/Source/CurlTest/CurlTest.h +++ b/tests/cpp-tests/Source/CurlTest/CurlTest.h @@ -25,7 +25,7 @@ #ifndef _CURL_TEST_H_ #define _CURL_TEST_H_ -#if (AX_TARGET_PLATFORM != AX_PLATFORM_EMSCRIPTEN) +#if (AX_TARGET_PLATFORM != AX_PLATFORM_WASM) #include "axmol.h" #include "../BaseTest.h" diff --git a/tests/cpp-tests/Source/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Source/UITest/CocoStudioGUITest/CocosGUIScene.cpp index e552844daf..faa7a9ce26 100644 --- a/tests/cpp-tests/Source/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Source/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -62,7 +62,7 @@ GUIDynamicCreateTests::GUIDynamicCreateTests() { -#if (AX_TARGET_PLATFORM != AX_PLATFORM_LINUX && AX_TARGET_PLATFORM != AX_PLATFORM_EMSCRIPTEN) || defined(AX_ENABLE_VLC_MEDIA) +#if (AX_TARGET_PLATFORM != AX_PLATFORM_LINUX && AX_TARGET_PLATFORM != AX_PLATFORM_WASM) || defined(AX_ENABLE_VLC_MEDIA) addTest("VideoPlayer Test", []() { return new VideoPlayerTests; }); #endif #if (AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS) && \ diff --git a/tests/cpp-tests/Source/controller.cpp b/tests/cpp-tests/Source/controller.cpp index 2ff33f4d14..17234adcd5 100644 --- a/tests/cpp-tests/Source/controller.cpp +++ b/tests/cpp-tests/Source/controller.cpp @@ -71,7 +71,7 @@ public: addTest("Click and Move", []() { return new ClickAndMoveTest(); }); addTest("Configuration", []() { return new ConfigurationTests(); }); addTest("Console", []() { return new ConsoleTests(); }); -#if !defined(AX_PLATFORM_EMSCRIPTEN) +#if !defined(AX_PLATFORM_WASM) addTest("Curl", []() { return new CurlTests(); }); #endif addTest("Current Language", []() { return new CurrentLanguageTests(); }); diff --git a/templates/lua-template-default/proj.emscripten/main.cpp b/tests/cpp-tests/proj.wasm/main.cpp similarity index 98% rename from templates/lua-template-default/proj.emscripten/main.cpp rename to tests/cpp-tests/proj.wasm/main.cpp index b265379f11..96e3ed2fae 100644 --- a/templates/lua-template-default/proj.emscripten/main.cpp +++ b/tests/cpp-tests/proj.wasm/main.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "AppDelegate.h" -#include "cocos2d.h" +#include "axmol.h" #include #include diff --git a/tests/fairygui-tests/CMakeLists.txt b/tests/fairygui-tests/CMakeLists.txt index cab3f8c920..332ce8707b 100644 --- a/tests/fairygui-tests/CMakeLists.txt +++ b/tests/fairygui-tests/CMakeLists.txt @@ -74,9 +74,9 @@ elseif(LINUX) proj.linux/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) -elseif(EMSCRIPTEN) +elseif(WASM) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/templates/cpp-template-default/proj.emscripten/main.cpp b/tests/fairygui-tests/proj.wasm/main.cpp similarity index 98% rename from templates/cpp-template-default/proj.emscripten/main.cpp rename to tests/fairygui-tests/proj.wasm/main.cpp index b265379f11..96e3ed2fae 100644 --- a/templates/cpp-template-default/proj.emscripten/main.cpp +++ b/tests/fairygui-tests/proj.wasm/main.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ #include "AppDelegate.h" -#include "cocos2d.h" +#include "axmol.h" #include #include diff --git a/tests/live2d-tests/CMakeLists.txt b/tests/live2d-tests/CMakeLists.txt index e3e8806457..8627c6a927 100644 --- a/tests/live2d-tests/CMakeLists.txt +++ b/tests/live2d-tests/CMakeLists.txt @@ -76,7 +76,7 @@ elseif(LINUX) list(APPEND GAME_SOURCE ${common_content_files}) elseif(EMSCRIPTEN) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/tests/live2d-tests/proj.emscripten/main.cpp b/tests/live2d-tests/proj.emscripten/main.cpp deleted file mode 100644 index b265379f11..0000000000 --- a/tests/live2d-tests/proj.emscripten/main.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - https://axmolengine.github.io/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "AppDelegate.h" -#include "cocos2d.h" - -#include -#include -#include -#include - -USING_NS_AX; - -int main(int argc, char** argv) -{ - // create the application instance - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/tests/live2d-tests/proj.wasm/main.cpp b/tests/live2d-tests/proj.wasm/main.cpp new file mode 100644 index 0000000000..96e3ed2fae --- /dev/null +++ b/tests/live2d-tests/proj.wasm/main.cpp @@ -0,0 +1,40 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + https://axmolengine.github.io/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "axmol.h" + +#include +#include +#include +#include + +USING_NS_AX; + +int main(int argc, char** argv) +{ + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/tests/lua-tests/CMakeLists.txt b/tests/lua-tests/CMakeLists.txt index 939799e55b..0f6e952761 100644 --- a/tests/lua-tests/CMakeLists.txt +++ b/tests/lua-tests/CMakeLists.txt @@ -74,9 +74,9 @@ elseif(LINUX) proj.linux/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) -elseif(EMSCRIPTEN) +elseif(WASM) list(APPEND GAME_SOURCE - proj.emscripten/main.cpp + proj.wasm/main.cpp ) list(APPEND GAME_SOURCE ${common_content_files}) elseif(WINDOWS) diff --git a/tests/lua-tests/proj.emscripten/main.cpp b/tests/lua-tests/proj.emscripten/main.cpp deleted file mode 100644 index b265379f11..0000000000 --- a/tests/lua-tests/proj.emscripten/main.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** - Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. - - https://axmolengine.github.io/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "AppDelegate.h" -#include "cocos2d.h" - -#include -#include -#include -#include - -USING_NS_AX; - -int main(int argc, char** argv) -{ - // create the application instance - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/tests/lua-tests/proj.wasm/main.cpp b/tests/lua-tests/proj.wasm/main.cpp new file mode 100644 index 0000000000..96e3ed2fae --- /dev/null +++ b/tests/lua-tests/proj.wasm/main.cpp @@ -0,0 +1,40 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + https://axmolengine.github.io/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "axmol.h" + +#include +#include +#include +#include + +USING_NS_AX; + +int main(int argc, char** argv) +{ + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +} diff --git a/tools/tolua/ax_audioengine.ini b/tools/tolua/ax_audioengine.ini index 115525db24..e57844fc0d 100644 --- a/tools/tolua/ax_audioengine.ini +++ b/tools/tolua/ax_audioengine.ini @@ -7,7 +7,7 @@ prefix = ax_audioengine # all classes will be embedded in that namespace target_namespace = ax -macro_judgement = #if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN +macro_judgement = #if AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || defined(_WIN32) || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || AX_TARGET_PLATFORM == AX_PLATFORM_WASM android_headers =