Enable video & webview lua-tests on windows

This commit is contained in:
halx99 2022-05-18 12:52:05 +08:00
parent 4ca80aee68
commit c584ee1e78
40 changed files with 274 additions and 221 deletions

View File

@ -486,3 +486,10 @@ function(cocos_use_pkg target pkg)
endif()
endfunction()
# The adxe preprocessors config helper macro
macro(adxe_config_pred target_name pred)
if(${pred})
target_compile_definitions(${target_name} PUBLIC ${pred}=1)
endif()
endmacro()

View File

@ -135,6 +135,31 @@ elseif(ANDROID)
manual/ui/lua_cocos2dx_video_manual.cpp
auto/lua_cocos2dx_video_auto.cpp
)
elseif(WINDOWS)
if(AX_ENABLE_MFMEDIA)
set(lua_bindings_manual_headers
${lua_bindings_manual_headers}
auto/lua_cocos2dx_video_auto.hpp
manual/ui/lua_cocos2dx_video_manual.hpp
)
set(lua_bindings_manual_files
${lua_bindings_manual_files}
manual/ui/lua_cocos2dx_video_manual.cpp
auto/lua_cocos2dx_video_auto.cpp
)
endif()
if(AX_ENABLE_MSEDGE_WEBVIEW2)
set(lua_bindings_manual_headers
${lua_bindings_manual_headers}
manual/ui/lua_cocos2dx_webview_manual.hpp
auto/lua_cocos2dx_webview_auto.hpp
)
set(lua_bindings_manual_files
${lua_bindings_manual_files}
manual/ui/lua_cocos2dx_webview_manual.cpp
auto/lua_cocos2dx_webview_auto.cpp
)
endif()
endif()
set(lua_bindings_files
@ -182,6 +207,12 @@ if(WINDOWS)
target_compile_definitions(${ADXE_LUA_LIB} PUBLIC _USRLUASTATIC)
endif()
if(AX_ENABLE_MSEDGE_WEBVIEW2)
endif()
adxe_config_pred(${ADXE_LUA_LIB} AX_ENABLE_MFMEDIA)
adxe_config_pred(${ADXE_LUA_LIB} AX_ENABLE_MSEDGE_WEBVIEW2)
set_target_properties(${ADXE_LUA_LIB}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"

View File

@ -2,14 +2,7 @@
#ifndef __cocos2dx_3d_h__
#define __cocos2dx_3d_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_3d(lua_State* tolua_S);

View File

@ -3,13 +3,7 @@
#ifndef __cocos2dx_audioengine_h__
#define __cocos2dx_audioengine_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_audioengine(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_h__
#define __cocos2dx_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_backend_h__
#define __cocos2dx_backend_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_backend(lua_State* tolua_S);

View File

@ -3,13 +3,7 @@
#ifndef __cocos2dx_controller_h__
#define __cocos2dx_controller_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_controller(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_csloader_h__
#define __cocos2dx_csloader_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_csloader(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_extension_h__
#define __cocos2dx_extension_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_extension(lua_State* tolua_S);

View File

@ -3,13 +3,7 @@
#ifndef __cocos2dx_navmesh_h__
#define __cocos2dx_navmesh_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_navmesh(lua_State* tolua_S);

View File

@ -3,13 +3,7 @@
#ifndef __cocos2dx_physics3d_h__
#define __cocos2dx_physics3d_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_physics3d(lua_State* tolua_S);

View File

@ -3,13 +3,7 @@
#ifndef __cocos2dx_physics_h__
#define __cocos2dx_physics_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_physics(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_spine_h__
#define __cocos2dx_spine_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_spine(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_studio_h__
#define __cocos2dx_studio_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_studio(lua_State* tolua_S);

View File

@ -2,13 +2,7 @@
#ifndef __cocos2dx_ui_h__
#define __cocos2dx_ui_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_ui(lua_State* tolua_S);

View File

@ -2,36 +2,8 @@
#ifndef __cocos2dx_video_h__
#define __cocos2dx_video_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_video(lua_State* tolua_S);
#endif // __cocos2dx_video_h__

View File

@ -25,14 +25,7 @@
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_COCOS3D_LUA_COCOS2DX_3D_MANUAL_H__
#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_COCOS3D_LUA_COCOS2DX_3D_MANUAL_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
/**
* @addtogroup lua
* @{

View File

@ -28,10 +28,6 @@
#include <unordered_map>
#include <string>
extern "C" {
#include "lua.h"
#include "tolua++.h"
}
#include <stdint.h>
#include "scripting/lua-bindings/manual/tolua_fix.h"

View File

@ -24,13 +24,7 @@
****************************************************************************/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
/**
* @addtogroup lua

View File

@ -25,10 +25,7 @@
#ifndef __LUA_SCRIPT_HANDLER_MGR_H__
#define __LUA_SCRIPT_HANDLER_MGR_H__
extern "C" {
#include "tolua++.h"
}
#include "base/CCRef.h"
#include "base/ccMacros.h"
#include "2d/CCActionInstant.h"

View File

@ -26,14 +26,7 @@
#ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_MANUAL_H
#define COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_MANUAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
#include "scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.h"
#include "base/CCEventListenerAcceleration.h"

View File

@ -25,11 +25,6 @@
#ifndef __COCOS_SCRIPTING_LUA_BINDING_MANUAL_COCOSTUDIO_LUA_STUDIO_CONVERSIONS_H__
#define __COCOS_SCRIPTING_LUA_BINDING_MANUAL_COCOSTUDIO_LUA_STUDIO_CONVERSIONS_H__
extern "C" {
#include "lua.h"
#include "tolua++.h"
}
#include "scripting/lua-bindings/manual/tolua_fix.h"
namespace cocostudio

View File

@ -25,13 +25,7 @@
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_CONTROLLER_MANUAL_H
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_CONTROLLER_MANUAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

View File

@ -25,13 +25,7 @@
#ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_LUA_COCOS2DX_EXTENSION_MANUAL_H
#define COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_LUA_COCOS2DX_EXTENSION_MANUAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
/**
* @addtogroup lua

View File

@ -27,11 +27,6 @@
#if CC_USE_NAVMESH
extern "C" {
# include "lua.h"
# include "tolua++.h"
}
# include "scripting/lua-bindings/manual/tolua_fix.h"
namespace cocos2d

View File

@ -27,13 +27,7 @@
#if CC_USE_NAVMESH
# ifdef __cplusplus
extern "C" {
# endif
# include "tolua++.h"
# ifdef __cplusplus
}
# endif
#include "tolua++.h"
/**
* @addtogroup lua

View File

@ -25,13 +25,7 @@
#ifndef __COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_NETWORK_LUA_COCOS2DX_NETWORK_MANUAL_H__
#define __COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_NETWORK_LUA_COCOS2DX_NETWORK_MANUAL_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
/**
* @addtogroup lua

View File

@ -27,13 +27,13 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
//#include "lua.hpp"
#ifdef __cplusplus
}
#endif
#include "tolua++.h"
TOLUA_API int register_downloader(lua_State* L);

View File

@ -24,12 +24,6 @@
****************************************************************************/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int register_xml_http_request(lua_State* L);

View File

@ -27,13 +27,7 @@
#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION
# ifdef __cplusplus
extern "C" {
# endif
# include "tolua++.h"
# ifdef __cplusplus
}
# endif
#include "tolua++.h"
/**
* @addtogroup lua

View File

@ -29,6 +29,15 @@
# include "scripting/lua-bindings/manual/ui/lua_cocos2dx_video_manual.hpp"
# include "scripting/lua-bindings/auto/lua_cocos2dx_webview_auto.hpp"
# include "scripting/lua-bindings/manual/ui/lua_cocos2dx_webview_manual.hpp"
#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
# if defined(AX_ENABLE_MFMEDIA)
# include "scripting/lua-bindings/auto/lua_cocos2dx_video_auto.hpp"
# include "scripting/lua-bindings/manual/ui/lua_cocos2dx_video_manual.hpp"
# endif
# if defined(AX_ENABLE_MSEDGE_WEBVIEW2)
# include "scripting/lua-bindings/auto/lua_cocos2dx_webview_auto.hpp"
# include "scripting/lua-bindings/manual/ui/lua_cocos2dx_webview_manual.hpp"
# endif
#endif
#include "scripting/lua-bindings/manual/tolua_fix.h"
@ -1239,6 +1248,15 @@ int register_ui_module(lua_State* L)
register_all_cocos2dx_video_manual(L);
register_all_cocos2dx_webview(L);
register_all_cocos2dx_webview_manual(L);
#elif CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
# if defined(AX_ENABLE_MFMEDIA)
register_all_cocos2dx_video(L);
register_all_cocos2dx_video_manual(L);
# endif
# if defined(AX_ENABLE_MSEDGE_WEBVIEW2)
register_all_cocos2dx_webview(L);
register_all_cocos2dx_webview_manual(L);
# endif
#endif
extendEventListenerFocusEvent(L);
}

View File

@ -25,13 +25,7 @@
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_GUI_MANUAL_H
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_GUI_MANUAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int register_all_cocos2dx_ui_manual(lua_State* L);

View File

@ -1,6 +1,6 @@
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) Bytedance Inc.
Copyright (c) 2021-2022 Bytedance Inc.
https://adxeproject.github.io/
@ -30,10 +30,6 @@
#include "scripting/lua-bindings/manual/CCLuaValue.h"
#include "scripting/lua-bindings/manual/CCLuaEngine.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || \
CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) && \
!defined(CC_PLATFORM_OS_TVOS)
static int lua_cocos2dx_video_VideoPlayer_addEventListener(lua_State* L)
{
@ -110,5 +106,3 @@ int register_all_cocos2dx_video_manual(lua_State* L)
return 0;
}
#endif

View File

@ -24,12 +24,6 @@
****************************************************************************/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int register_all_cocos2dx_video_manual(lua_State* L);

View File

@ -0,0 +1,199 @@
<?xml version="1.0"?>
<Project fullMode="0">
<assets>
<item path="src\cocos\framework\transition.lua" dflag="131076" />
<item path="src\cocos\network\NetworkConstants.lua" dflag="131076" />
<item path="src\cocos\ui\DeprecatedUIFunc.lua" dflag="131076" />
<item path="project\proj.ios_mac\mac\LuaObjectCBridgeTest.mm" dflag="131076" />
<item path="src\cocos\ui\GuiConstants.lua" dflag="131076" />
<item path="project\proj.android\gradle\wrapper\gradle-wrapper.properties" dflag="131076" />
<item path="project\proj.android\gradle.properties" dflag="131076" />
<item path="src\cocos\framework\package_support.lua" dflag="131076" />
<item path="src\cocos\framework\init.lua" dflag="131076" />
<item path="project\proj.android\app\src\org\cocos2dx\lua_tests\AppActivity.java" dflag="131076" />
<item path="src\cocos\ui\DeprecatedUIEnum.lua" dflag="131076" />
<item path="project\proj.ios_mac\ios\AppController.mm" dflag="131076" />
<item path="src\cocos\framework\extends\UITextField.lua" dflag="131076" />
<item path="src\cocos\init.lua" dflag="131076" />
<item path="src\cocos\cocos2d\DeprecatedCocos2dClass.lua" dflag="131076" />
<item path="project\proj.ios_mac\ios\LuaObjectCBridgeTest.h" dflag="131076" />
<item path="src\cocos\cocostudio\DeprecatedCocoStudioClass.lua" dflag="131076" />
<item path="src\cocos\network\DeprecatedNetworkEnum.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UIWidget.lua" dflag="131076" />
<item path="src\cocos\physics3d\physics3d-constants.lua" dflag="131076" />
<item path="src\cocos\cocos2d\bitExtend.lua" dflag="131076" />
<item path="src\cocos\spine\SpineConstants.lua" dflag="131076" />
<item path="src\cocos\cocos2d\luaoc.lua" dflag="131076" />
<item path="src\cocos\cocos2d\deprecated.lua" dflag="131076" />
<item path="src\cocos\network\DeprecatedNetworkFunc.lua" dflag="131076" />
<item path="src\cocos\cocos2d\DrawPrimitives.lua" dflag="131076" />
<item path="project\proj.ios_mac\ios\AppController.h" dflag="131076" />
<item path="src\cocos\cocostudio\CocoStudio.lua" dflag="131076" />
<item path="src\cocos\cocostudio\DeprecatedCocoStudioFunc.lua" dflag="131076" />
<item path="project\proj.ios_mac\mac\LuaObjectCBridgeTest.h" dflag="131076" />
<item path="src\cocos\framework\extends\UISlider.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UIEditBox.lua" dflag="131076" />
<item path="project\proj.ios_mac\ios\LuaObjectCBridgeTest.mm" dflag="131076" />
<item path="src\ActionsProgressTest\ActionsProgressTest.lua" dflag="131076" />
<item path="src\cocos\framework\extends\MenuEx.lua" dflag="131076" />
<item path="project\proj.ios_mac\ios\RootViewController.h" dflag="131076" />
<item path="project\proj.ios_mac\ios\RootViewController.mm" dflag="131076" />
<item path="build\CMakeCache.txt" dflag="131076" />
<item path="build\CMakeFiles\3.22.2\VCTargetsPath.txt" dflag="131076" />
<item path="build\CMakeFiles\TargetDirectories.txt" dflag="131076" />
<item path="build\CMakeFiles\3.22.2\CompilerIdCXX\CMakeCXXCompilerId.cpp" dflag="131076" />
<item path="build\lua-tests.dir\Debug\lua-tests.vcxproj.FileListAbsolute.txt" dflag="131076" />
<item path="project\Classes\lua_assetsmanager_test_sample.cpp" dflag="131076" />
<item path="build\CMakeFiles\3.22.2\CompilerIdC\CMakeCCompilerId.c" dflag="131076" />
<item path="project\proj.android\app\src\com\cocos2dx\sample\LuaJavaBridgeTest\LuaJavaBridgeTest.java" dflag="131076" />
<item path="project\Classes\AppDelegate.cpp" dflag="131076" />
<item path="project\Classes\lua_test_bindings.cpp" dflag="131076" />
<item path="project\proj.android\app\jni\main.cpp" dflag="131076" />
<item path="project\CMakeLists.txt" dflag="131076" />
<item path="project\proj.android\app\res\values\strings.xml" dflag="131076" />
<item path="project\Classes\AppDelegate.h" dflag="131076" />
<item path="project\proj.android\app\AndroidManifest.xml" dflag="131076" />
<item path="project\Classes\lua_test_bindings.h" dflag="131076" />
<item path="project\Classes\lua_assetsmanager_test_sample.h" dflag="131076" />
<item path="project\proj.android\app\get_environment.sh" dflag="131076" />
<item path="src\LuaLoaderTest\LuaLoaderTest.lua" dflag="131076" />
<item path="src\MaterialSystemTest\MaterialSystemTest.lua" dflag="131076" />
<item path="src\MenuTest\MenuTest.lua" dflag="131076" />
<item path="src\NavMeshTest\NavMeshTest.lua" dflag="131076" />
<item path="src\LuaLoaderTest\simple.lua" dflag="131076" />
<item path="src\NodeTest\NodeTest.lua" dflag="131076" />
<item path="src\OpenGLTest\OpenGLTest.lua" dflag="131076" />
<item path="src\LuaLoaderTest\in_dir\init.lua" dflag="131076" />
<item path="src\Particle3DTest\Particle3DTest.lua" dflag="131076" />
<item path="src\LuaBridgeTest\LuaBridgeTest.lua" dflag="131076" />
<item path="src\NewAudioEngineTest\NewAudioEngineTest.lua" dflag="131076" />
<item path="src\NewEventDispatcherTest\NewEventDispatcherTest.lua" dflag="131076" />
<item path="src\ParticleTest\ParticleTest.lua" dflag="131076" />
<item path="src\LightTest\LightTest.lua" dflag="131076" />
<item path="src\ParallaxTest\ParallaxTest.lua" dflag="131076" />
<item path="src\mainMenu.lua" dflag="131076" />
<item path="src\MotionStreakTest\MotionStreakTest.lua" dflag="131076" />
<item path="src\TouchesTest\Ball.lua" dflag="131076" />
<item path="src\Physics3DTest\Physics3DTest.lua" dflag="131076" />
<item path="src\RenderTextureTest\RenderTextureTest.lua" dflag="131076" />
<item path="src\SceneTest\SceneTest.lua" dflag="131076" />
<item path="src\SpriteTest\SpriteTest.lua" dflag="131076" />
<item path="src\TextInputTest\TextInputTest.lua" dflag="131076" />
<item path="src\Scene3DTest\Scene3DTest.lua" dflag="131076" />
<item path="src\TileMapTest\TileMapTest.lua" dflag="131076" />
<item path="src\TouchesTest\Paddle.lua" dflag="131076" />
<item path="src\SpineTest\SpineTest.lua" dflag="131076" />
<item path="src\PhysicsTest\PhysicsTest.lua" dflag="131076" />
<item path="src\RotateWorldTest\RotateWorldTest.lua" dflag="131076" />
<item path="src\Sprite3DTest\Sprite3DTest.lua" dflag="131076" />
<item path="src\SpritePolygonTest\SpritePolygonTest.lua" dflag="131076" />
<item path="src\testResource.lua" dflag="131076" />
<item path="src\Texture2dTest\Texture2dTest.lua" dflag="131076" />
<item path="src\TerrainTest\TerrainTest.lua" dflag="131076" />
<item path="src\TransitionsTest\TransitionsTest.lua" dflag="131076" />
<item path="src\TransitionsTest\TransitionsName.lua" dflag="131076" />
<item path="src\ZwoptexTest\ZwoptexTest.lua" dflag="131076" />
<item path="src\TouchesTest\TouchesTest.lua" dflag="131076" />
<item path="src\UserDefaultTest\UserDefaultTest.lua" dflag="131076" />
<item path="src\VibrateTest\VibrateTest.lua" dflag="131076" />
<item path="src\VisibleRect.lua" dflag="131076" />
<item path="src\VideoPlayerTest\VideoPlayerTest.lua" dflag="131076" />
<item path="src\XMLHttpRequestTest\XMLHttpRequestTest.lua" dflag="131076" />
<item path="src\WebViewTest\WebViewTest.lua" dflag="131076" />
<item path="src\cocos\framework\display.lua" dflag="131076" />
<item path="src\cocos\framework\extends\SpriteEx.lua" dflag="131076" />
<item path="src\cocos\framework\components\event.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UIPageView.lua" dflag="131076" />
<item path="src\cocos\extension\DeprecatedExtensionClass.lua" dflag="131076" />
<item path="src\cocos\framework\extends\NodeEx.lua" dflag="131076" />
<item path="src\cocos\cocos2d\Cocos2d.lua" dflag="131076" />
<item path="src\cocos\cocos2d\Cocos2dConstants.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UICheckBox.lua" dflag="131076" />
<item path="src\cocos\framework\extends\LayerEx.lua" dflag="131076" />
<item path="src\cocos\cocos2d\functions.lua" dflag="131076" />
<item path="src\cocos\framework\device.lua" dflag="131076" />
<item path="src\cocos\extension\DeprecatedExtensionFunc.lua" dflag="131076" />
<item path="src\cocos\extension\ExtensionConstants.lua" dflag="131076" />
<item path="src\cocos\controller\ControllerConstants.lua" dflag="131076" />
<item path="src\cocos\extension\DeprecatedExtensionEnum.lua" dflag="131076" />
<item path="src\cocos\3d\3dConstants.lua" dflag="131076" />
<item path="src\cocos\cocos2d\DeprecatedCocos2dFunc.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UIScrollView.lua" dflag="131076" />
<item path="src\cocos\framework\extends\UIListView.lua" dflag="131076" />
<item path="src\cocos\cocos2d\DeprecatedCocos2dEnum.lua" dflag="131076" />
<item path="src\cocos\cocos2d\luaj.lua" dflag="131076" />
<item path="src\AssetsManagerTest\AssetsManagerTest.lua" dflag="131076" />
<item path="src\ClickAndMoveTest\ClickAndMoveTest.lua" dflag="131076" />
<item path="src\ComponentTest\player.lua" dflag="131076" />
<item path="src\AssetsManagerExTest\AssetsManagerExTest.lua" dflag="131076" />
<item path="src\ComponentTest\projectile.lua" dflag="131076" />
<item path="src\controller.lua" dflag="131076" />
<item path="src\DownloaderTest\DownloaderTest.lua" dflag="131076" />
<item path="src\BillBoardTest\BillBoardTest.lua" dflag="131076" />
<item path="src\CaptureScreenTest\CaptureScreenTest.lua" dflag="131076" />
<item path="src\DrawPrimitivesTest\DrawPrimitivesTest.lua" dflag="131076" />
<item path="src\ActionsTest\ActionsTest.lua" dflag="131076" />
<item path="src\Camera3DTest\Camera3DTest.lua" dflag="131076" />
<item path="src\ComponentTest\gameoverscene.lua" dflag="131076" />
<item path="src\ComponentTest\main.lua" dflag="131076" />
<item path="src\BugsTest\BugsTest.lua" dflag="131076" />
<item path="src\ComponentTest\enemy.lua" dflag="131076" />
<item path="src\CurrentLanguageTest\CurrentLanguageTest.lua" dflag="131076" />
<item path="src\ComponentTest\scene.lua" dflag="131076" />
<item path="src\AssetsManagerTest\AssetsManagerModule.lua" dflag="131076" />
<item path="src\LabelTestNew\LabelTestNew.lua" dflag="131076" />
<item path="src\ExtensionTest\ExtensionTest.lua" dflag="131076" />
<item path="src\IntervalTest\IntervalTest.lua" dflag="131076" />
<item path="src\FastTiledMapTest\FastTiledMapTest.lua" dflag="131076" />
<item path="src\FontTest\FontTest.lua" dflag="131076" />
<item path="src\EffectsTest\EffectsTest.lua" dflag="131076" />
<item path="src\helper.lua" dflag="131076" />
<item path="src\LayerTest\LayerTest.lua" dflag="131076" />
<item path="src\KeypadTest\KeypadTest.lua" dflag="131076" />
<item path="src\EffectsAdvancedTest\EffectsAdvancedTest.lua" dflag="131076" />
<item path="src\EffectsTest\EffectsName.lua" dflag="131076" />
<item path="src\ExtensionTest\WebProxyTest.lua" dflag="131076" />
<item path="src\FileUtilsTest\FileUtilsTest.lua" dflag="131076" />
<item path="res\spine\license.txt" dflag="131076" />
<item path="res\NavMesh\geomset.txt" dflag="131076" />
<item path="res\strings\LabelFNTUNICODELanguages.xml" dflag="131076" />
<item path="res\strings\LabelFNTMultiLineAlignmentUNICODE.xml" dflag="131076" />
<item path="res\Misc\resources-widehd\test3.txt" dflag="131076" />
<item path="res\Misc\resources-machd\test1.txt" dflag="131076" />
<item path="res\Misc\resources-wide\test5.txt" dflag="131076" />
<item path="src\AccelerometerTest\AccelerometerTest.lua" dflag="131076" />
<item path="res\Misc\resources-iphone\test6.txt" dflag="131076" />
<item path="res\Misc\resources-mac\test2.txt" dflag="131076" />
<item path="src\ActionManagerTest\ActionManagerTest.lua" dflag="131076" />
<item path="res\Test.html" dflag="131076" />
<item path="src\ActionsEaseTest\ActionsEaseTest.lua" dflag="131076" />
<item path="res\Misc\searchpath2\resources-ipad\file2.txt" dflag="131076" />
<item path="res\zip\10k.txt" dflag="131076" />
<item path="res\Misc\searchpath1\file1.txt" dflag="131076" />
<item path="res\Misc\resources-ipadhd\test1.txt" dflag="131076" />
<item path="project\proj.win32\resource.h" dflag="131076" />
<item path="project\proj.linux\main.cpp" dflag="131076" />
<item path="project\proj.win32\main.cpp" dflag="131076" />
<item path="res\animations\grossini.plist.xml" dflag="131076" />
<item path="res\audio\SoundEffectsFX009\README.txt" dflag="131076" />
<item path="res\fonts\emoji.txt" dflag="131076" />
<item path="project\proj.ios_mac\mac\main.cpp" dflag="131076" />
<item path="project\proj.win32\lua-tests.rc" dflag="131076" />
<item path="res\Misc\resources-ipad\test2.txt" dflag="131076" />
<item path="res\Misc\resources-hd\test4.txt" dflag="131076" />
<item path="project\proj.win32\main.h" dflag="131076" />
<item path="src\cocos\network\DeprecatedNetworkClass.lua" dflag="131076" />
<item path="src\cocos\cocostudio\StudioConstants.lua" dflag="131076" />
</assets>
<debug-options>
<start-program>build\bin\lua-tests\Debug\lua-tests.exe</start-program>
<start-working-dir>.</start-working-dir>
<start-command></start-command>
<search-paths>
<item>src</item>
</search-paths>
</debug-options>
<project-home>.</project-home>
<ssheets />
<assets.ref />
</Project>

View File

@ -47,7 +47,7 @@ local function RenderTextureSave()
ret:registerScriptHandler(onNodeEvent)
-- create a render texture, this is what we are going to draw into
target = cc.RenderTexture:create(s.width, s.height, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888)
target = cc.RenderTexture:create(s.width, s.height, cc.TEXTURE_PF_RGBA8)
target:retain()
target:setPosition(cc.p(s.width / 2, s.height / 2))
@ -148,7 +148,7 @@ end
-- /* A2 & B2 setup */
-- local rend = cc.RenderTexture:create(32, 64, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888)
-- local rend = cc.RenderTexture:create(32, 64, cc.TEXTURE_PF_RGBA8)
-- if (NULL == rend)
@ -498,7 +498,7 @@ end
-- local s = cc.Director:getInstance():getWinSize()
-- rt = new cc.RenderTexture()
-- rt:initWithWidthAndHeight(s.width, s.height, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888)
-- rt:initWithWidthAndHeight(s.width, s.height, cc.TEXTURE_PF_RGBA8)
-- end
-- rt:beginWithClear(0.0, 0.0, 0.0, 1.0)
-- rt:end()

View File

@ -822,7 +822,7 @@ local function TexturePixelFormat()
ret:addChild(background, -1)
-- RGBA 8888 image (32-bit)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGBA8)
local sprite1 = cc.Sprite:create("Images/test-rgba1.png")
sprite1:setPosition(cc.p(1*s.width/7, s.height/2+32))
ret:addChild(sprite1, 0)
@ -831,7 +831,7 @@ local function TexturePixelFormat()
cc.Director:getInstance():getTextureCache():removeTexture(sprite1:getTexture())
-- RGBA 4444 image (16-bit)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A4444)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGBA4)
local sprite2 = cc.Sprite:create("Images/test-rgba1.png")
sprite2:setPosition(cc.p(2*s.width/7, s.height/2-32))
ret:addChild(sprite2, 0)
@ -840,7 +840,7 @@ local function TexturePixelFormat()
cc.Director:getInstance():getTextureCache():removeTexture(sprite2:getTexture())
-- RGB5A1 image (16-bit)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RGB5_A1)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGB5A1)
local sprite3 = cc.Sprite:create("Images/test-rgba1.png")
sprite3:setPosition(cc.p(3*s.width/7, s.height/2+32))
ret:addChild(sprite3, 0)
@ -849,7 +849,7 @@ local function TexturePixelFormat()
cc.Director:getInstance():getTextureCache():removeTexture(sprite3:getTexture())
-- RGB888 image
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RG_B888 )
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGB8 )
local sprite4 = cc.Sprite:create("Images/test-rgba1.png")
sprite4:setPosition(cc.p(4*s.width/7, s.height/2-32))
ret:addChild(sprite4, 0)
@ -858,7 +858,7 @@ local function TexturePixelFormat()
cc.Director:getInstance():getTextureCache():removeTexture(sprite4:getTexture())
-- RGB565 image (16-bit)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RG_B565)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGB565)
local sprite5 = cc.Sprite:create("Images/test-rgba1.png")
sprite5:setPosition(cc.p(5*s.width/7, s.height/2+32))
ret:addChild(sprite5, 0)
@ -867,7 +867,7 @@ local function TexturePixelFormat()
cc.Director:getInstance():getTextureCache():removeTexture(sprite5:getTexture())
-- A8 image (8-bit)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_A8 )
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_A8 )
local sprite6 = cc.Sprite:create("Images/test-rgba1.png")
sprite6:setPosition(cc.p(6*s.width/7, s.height/2-32))
ret:addChild(sprite6, 0)
@ -891,7 +891,7 @@ local function TexturePixelFormat()
sprite5:runAction(seq_4ever5)
-- restore default
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_DEFAULT)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGBA8)
print(cc.Director:getInstance():getTextureCache():getCachedTextureInfo())
return ret
end
@ -1368,7 +1368,7 @@ local function TexturePVRv3Premult()
transformSprite(pvr2)
-- PNG
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888)
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE_PF_RGBA8)
cc.Director:getInstance():getTextureCache():removeTextureForKey("Images/grossinis_sister1-testalpha.png")
local png = cc.Sprite:create("Images/grossinis_sister1-testalpha.png")
ret:addChild(png, 0)

View File

@ -93,9 +93,11 @@ local function VideoPlayerTest()
------------------------------------------------------------
local function menuResourceVideoCallback(tag, sender)
if nil ~= videoPlayer then
print('start play video')
local videoFullPath = cc.FileUtils:getInstance():fullPathForFilename("cocosvideo.mp4")
videoPlayer:setFileName(videoFullPath)
videoPlayer:play()
print('start play video succeed')
end
end

View File

@ -211,7 +211,7 @@ function CreateTestMenu()
if obj.name == "WebViewTest"
or obj.name == "VibrateTest"
or obj.name == "VideoPlayerTest" then
if cc.PLATFORM_OS_IPHONE ~= targetPlatform and cc.PLATFORM_OS_ANDROID ~= targetPlatform then
if cc.PLATFORM_OS_IPHONE ~= targetPlatform and cc.PLATFORM_OS_ANDROID ~= targetPlatform and cc.PLATFORM_OS_WINDOWS ~= targetPlatform then
testMenuItem:setEnabled(false)
end
end

View File

@ -10,12 +10,6 @@ $macro_judgement
#end for
#end if
\#ifdef __cplusplus
extern "C" {
\#endif
\#include "tolua++.h"
\#ifdef __cplusplus
}
\#endif
int register_all_${prefix}(lua_State* tolua_S);