diff --git a/.travis.yml b/.travis.yml index e5eaaee8f3..bb5300403c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,9 @@ env: matrix: - GEN_JSB=YES - PLATFORM=linux DEBUG=1 - # Native client port doesn't support c++ 11 fully, it seems that it doesn't support lambda, please refer to https://github.com/cocos2d/cocos2d-x/blob/develop/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp#L982 - # - PLATFORM=nacl DEBUG=1 + # Since switching to C++11 only the ARM version of the nactive client + # port currently builds. TODO(sbc): Re-enable all architectures. + - PLATFORM=nacl DEBUG=1 NACL_ARCH=arm - PLATFORM=android - PLATFORM=emscripten DEBUG=1 global: @@ -24,6 +25,7 @@ env: script: - export NACL_SDK_ROOT=$HOME/bin/nacl_sdk/pepper_canary - export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_x86_newlib/bin +- export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_arm_newlib/bin - export NDK_ROOT=$HOME/bin/android-ndk - export PYTHON=/usr/bin/python - export LLVM=$HOME/bin/clang+llvm-3.2/bin diff --git a/cocos2dx/platform/nacl/CCAccelerometer.h b/cocos2dx/platform/nacl/CCAccelerometer.h index eadeb7bbf0..9c633625f6 100644 --- a/cocos2dx/platform/nacl/CCAccelerometer.h +++ b/cocos2dx/platform/nacl/CCAccelerometer.h @@ -40,7 +40,7 @@ public: void removeDelegate(std::function function) {CC_UNUSED_PARAM(function);}; void addDelegate(std::function function) {CC_UNUSED_PARAM(function);}; - void setDelegate(AccelerometerDelegate* pDelegate) {CC_UNUSED_PARAM(pDelegate);}; + void setDelegate(std::function function) {CC_UNUSED_PARAM(function);}; void setAccelerometerInterval(float interval) {CC_UNUSED_PARAM(interval);}; }; diff --git a/cocos2dx/proj.nacl/cocos2dx.mk b/cocos2dx/proj.nacl/cocos2dx.mk index c709abe55d..41f7e4ee2c 100644 --- a/cocos2dx/proj.nacl/cocos2dx.mk +++ b/cocos2dx/proj.nacl/cocos2dx.mk @@ -9,11 +9,11 @@ NACL_ARCH ?= x86_64 NACL_AR ?= $(NACL_ARCH)-nacl-ar NACL_CC ?= $(NACL_ARCH)-nacl-gcc NACL_CXX ?= $(NACL_ARCH)-nacl-g++ -CCFLAGS += -Wall -Werror +CCFLAGS += -Wall -Werror -Wno-deprecated-declarations # GCC 4.6 is primary platform for cocos2d v.3, because it's default compiler for Android, # Blackberry, some Linux distributions.It supports all important features of c++11, but have # no flag "-std=c++11" (which was turned on in version 4.7). -CXXFLAGS += -Wall -Werror -std=gnu++0x +CXXFLAGS += -Wall -Werror -Wno-deprecated-declarations -std=gnu++0x ARFLAGS = cr THIS_MAKEFILE := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) diff --git a/extensions/proj.nacl/Makefile b/extensions/proj.nacl/Makefile index f5621ea907..33e1b93fa5 100644 --- a/extensions/proj.nacl/Makefile +++ b/extensions/proj.nacl/Makefile @@ -59,9 +59,38 @@ EXTENSIONS_SOURCES = ../CCBReader/CCBFileLoader.cpp \ ../spine/Slot.cpp \ ../spine/SlotData.cpp \ ../spine/extension.cpp \ +../spine/spine-cocos2dx.cpp \ ../spine/CCSkeleton.cpp \ ../spine/CCSkeletonAnimation.cpp \ -../spine/spine-cocos2dx.cpp +../CCArmature/CCArmature.cpp \ +../CCArmature/CCBone.cpp \ +../CCArmature/animation/CCArmatureAnimation.cpp \ +../CCArmature/animation/CCProcessBase.cpp \ +../CCArmature/animation/CCTween.cpp \ +../CCArmature/datas/CCDatas.cpp \ +../CCArmature/display/CCBatchNode.cpp \ +../CCArmature/display/CCDecorativeDisplay.cpp \ +../CCArmature/display/CCDisplayFactory.cpp \ +../CCArmature/display/CCDisplayManager.cpp \ +../CCArmature/display/CCShaderNode.cpp \ +../CCArmature/display/CCSkin.cpp \ +../CCArmature/external_tool/GLES-Render.cpp \ +../CCArmature/external_tool/Json/CSContentJsonDictionary.cpp \ +../CCArmature/external_tool/Json/lib_json/json_value.cpp \ +../CCArmature/external_tool/Json/lib_json/json_reader.cpp \ +../CCArmature/external_tool/Json/lib_json/json_writer.cpp \ +../CCArmature/physics/CCColliderDetector.cpp \ +../CCArmature/physics/CCPhysicsWorld.cpp \ +../CCArmature/utils/CCArmatureDataManager.cpp \ +../CCArmature/utils/CCDataReaderHelper.cpp \ +../CCArmature/utils/CCSpriteFrameCacheHelper.cpp \ +../CCArmature/utils/CCTransformHelp.cpp \ +../CCArmature/utils/CCTweenFunction.cpp \ +../CCArmature/utils/CCUtilMath.cpp \ +../Components/CCComAttribute.cpp \ +../Components/CCComAudio.cpp \ +../Components/CCComController.cpp \ +../Components/CCInputDelegate.cpp all: diff --git a/samples/Cpp/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp b/samples/Cpp/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp index 63910e3464..d9d23af156 100644 --- a/samples/Cpp/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp +++ b/samples/Cpp/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp @@ -51,6 +51,9 @@ CurrentLanguageTest::CurrentLanguageTest() case kLanguageNorwegian: labelLanguage->setString("current language is Norwegian"); break; + case kLanguagePolish: + labelLanguage->setString("current language is Polish"); + break; } addChild(labelLanguage); diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp index 35b819d447..98cec43852 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -3,7 +3,7 @@ #include "NotificationCenterTest/NotificationCenterTest.h" #include "ControlExtensionTest/CCControlSceneManager.h" #include "CocosBuilderTest/CocosBuilderTest.h" -#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && CC_TARGET_PLATFORM != CC_PLATFORM_NACL) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) #include "NetworkTest/HttpClientTest.h" #endif #include "TableViewTest/TableViewTestScene.h" @@ -43,7 +43,7 @@ static struct { pScene->release(); } }}, -#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && CC_TARGET_PLATFORM != CC_PLATFORM_NACL) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) && (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) { "HttpClientTest", [](Object *sender){ runHttpClientTest();} }, #endif diff --git a/samples/Cpp/TestCpp/Classes/controller.cpp b/samples/Cpp/TestCpp/Classes/controller.cpp index d5c066f86e..d6903c4813 100644 --- a/samples/Cpp/TestCpp/Classes/controller.cpp +++ b/samples/Cpp/TestCpp/Classes/controller.cpp @@ -33,11 +33,13 @@ struct { { "CocosDenshionTest", []() { return new CocosDenshionTestScene(); } }, { "ConfigurationTest", []() { return new ConfigurationTestScene(); } }, #if (CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN) +#if (CC_TARGET_PLATFORM != CC_PLATFORM_NACL) #if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE) #if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA) { "CurlTest", []() { return new CurlTestScene(); } }, #endif #endif +#endif #endif { "CurrentLanguageTest", []() { return new CurrentLanguageTestScene(); } }, { "DrawPrimitivesTest", [](){return new DrawPrimitivesTestScene();} }, diff --git a/samples/Lua/HelloLua/proj.nacl/Makefile b/samples/Lua/HelloLua/proj.nacl/Makefile index ce66f50fbc..d913caec49 100644 --- a/samples/Lua/HelloLua/proj.nacl/Makefile +++ b/samples/Lua/HelloLua/proj.nacl/Makefile @@ -17,6 +17,7 @@ SOURCES = main.cpp \ ../Classes/AppDelegate.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaEngine.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaStack.cpp \ + $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaValue.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/LuaCocos2d.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/tolua_fix.c \ diff --git a/samples/Lua/TestLua/proj.nacl/Makefile b/samples/Lua/TestLua/proj.nacl/Makefile index c4a697dc22..c8ce2f115a 100644 --- a/samples/Lua/TestLua/proj.nacl/Makefile +++ b/samples/Lua/TestLua/proj.nacl/Makefile @@ -17,6 +17,7 @@ SOURCES = main.cpp \ ../Classes/AppDelegate.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaEngine.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaStack.cpp \ + $(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaValue.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/LuaCocos2d.cpp \ $(COCOS_ROOT)/scripting/lua/cocos2dx_support/tolua_fix.c \ diff --git a/tools/travis-scripts/before-install.sh b/tools/travis-scripts/before-install.sh index efd141fce4..9fd123ece2 100755 --- a/tools/travis-scripts/before-install.sh +++ b/tools/travis-scripts/before-install.sh @@ -71,8 +71,10 @@ if [ "$PLATFORM"x = "linux"x ]; then fi if [ "$PLATFORM"x = "nacl"x ]; then + # NaCl compilers are built for 32-bit linux so we need to install + # the runtime support for this. sudo apt-get update - sudo apt-get install libc6:i386 + sudo apt-get install libc6:i386 libstdc++6:i386 echo "Download nacl_sdk ..." wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip echo "Decompress nacl_sdk.zip"