mirror of https://github.com/axmolengine/axmol.git
WASM: use shorten target platform name 'wasm' instead 'emscripten'
For examples: - win32 app build by msvc/clang and runs on windows - wasm app build by emscripten/emcc and runs on web browsers
This commit is contained in:
parent
f77174e3ed
commit
5a528b46e5
|
@ -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}")
|
||||
|
|
10
core/axmol.h
10
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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 <string>
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
#include "platform/FileUtils.h"
|
||||
#include "network/Downloader-emscripten.h"
|
||||
#include "network/Downloader-wasm.h"
|
||||
#include <emscripten.h>
|
||||
|
||||
using namespace std;
|
|
@ -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"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "network/HttpClient-emscripten.h"
|
||||
#include "network/HttpClient-wasm.h"
|
||||
#include <queue>
|
||||
#include "base/Director.h"
|
||||
#include "platform/FileUtils.h"
|
|
@ -254,6 +254,6 @@ NS_AX_END
|
|||
|
||||
#else
|
||||
|
||||
#include "network/HttpClient-emscripten.h"
|
||||
#include "network/HttpClient-wasm.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <GLFW/glfw3native.h>
|
||||
|
|
|
@ -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 <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <string>
|
||||
|
@ -198,5 +198,5 @@ LanguageType Application::getCurrentLanguage()
|
|||
|
||||
NS_AX_END
|
||||
|
||||
#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN
|
||||
#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM
|
||||
|
|
@ -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_ */
|
|
@ -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 <emscripten/emscripten.h>
|
||||
|
||||
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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__
|
|
@ -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 <emscripten.h>
|
||||
#include "base/UTF8.h"
|
||||
|
||||
|
@ -67,4 +67,4 @@ extern "C"
|
|||
}
|
||||
}
|
||||
|
||||
#endif // AX_TARGET_PLATFORM == AX_PLATFORM_EMSCRIPTEN
|
||||
#endif // AX_TARGET_PLATFORM == AX_PLATFORM_WASM
|
|
@ -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__
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"common": [
|
||||
"build.ps1",
|
||||
"templates/run.bat.in"
|
||||
]
|
||||
}
|
|
@ -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)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
#include "axmol.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
|
@ -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)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
#include "axmol.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) && \
|
||||
|
|
|
@ -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(); });
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
#include "axmol.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
|
@ -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)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
#include "axmol.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
|
@ -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)
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
USING_NS_AX;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
return Application::getInstance()->run();
|
||||
}
|
|
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
USING_NS_AX;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
return Application::getInstance()->run();
|
||||
}
|
|
@ -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)
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
USING_NS_AX;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
return Application::getInstance()->run();
|
||||
}
|
|
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
USING_NS_AX;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
return Application::getInstance()->run();
|
||||
}
|
|
@ -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 =
|
||||
|
||||
|
|
Loading…
Reference in New Issue