summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilson E. Alvarez2017-01-04 16:44:08 -0400
committerWilson E. Alvarez2017-01-04 16:44:08 -0400
commit34329dcd851a1aa3054cc5211327c98b17ef07a0 (patch)
treee92e62356bb61c441261c11f2846538e5cbd712c
parent5e1dc36bda2e1684829db29b7749503309549a24 (diff)
downloadaur-34329dcd851a1aa3054cc5211327c98b17ef07a0.tar.gz
cocos2d-x V3.14
-rw-r--r--.SRCINFO108
-rw-r--r--CCFastTMXLayer.patch9
-rw-r--r--CCPhysicsBody.patch28
-rw-r--r--CCTMXLayer.patch4
-rw-r--r--CMakeLists.patch62
-rw-r--r--HelloWorldScene.cpp.patch30
-rw-r--r--HelloWorldScene.h.patch11
-rw-r--r--PKGBUILD163
-rw-r--r--RuntimeCCSImpl.patch12
-rw-r--r--SkeletonRenderer.patch9
-rw-r--r--SocketIO.patch17
-rw-r--r--ccShader_3D_Color.frag.patch23
-rw-r--r--ccShader_3D_ColorNormal.frag.patch134
-rw-r--r--ccShader_3D_ColorNormalTex.frag.patch214
-rw-r--r--ccShader_3D_ColorTex.frag.patch23
-rw-r--r--ccShader_3D_Particle.frag.patch28
-rw-r--r--ccShader_3D_Particle.vert.patch17
-rw-r--r--ccShader_3D_PositionNormalTex.vert.patch161
-rw-r--r--ccShader_3D_PositionTex.vert.patch18
-rw-r--r--ccShader_3D_Skybox.frag.patch22
-rw-r--r--ccShader_3D_Skybox.vert.patch16
-rw-r--r--ccShader_3D_Terrain.frag.patch33
-rw-r--r--ccShader_3D_Terrain.vert.patch27
-rw-r--r--ccShader_CameraClear.frag.patch23
-rw-r--r--ccShader_CameraClear.vert.patch31
-rw-r--r--ccShader_ETC1AS_PositionTextureColor.frag.patch22
-rw-r--r--ccShader_ETC1AS_PositionTextureGray.frag.patch22
-rw-r--r--ccShader_Label.vert.patch32
-rw-r--r--ccShader_Label_df.frag.patch20
-rw-r--r--ccShader_Label_df_glow.frag.patch20
-rw-r--r--ccShader_Label_normal.frag.patch22
-rw-r--r--ccShader_Label_outline.frag.patch37
-rw-r--r--ccShader_PositionColor.frag.patch23
-rw-r--r--ccShader_PositionColor.vert.patch28
-rw-r--r--ccShader_PositionColorLengthTexture.frag.patch30
-rw-r--r--ccShader_PositionColorLengthTexture.vert.patch38
-rw-r--r--ccShader_PositionColorTextureAsPointsize.vert.patch31
-rw-r--r--ccShader_PositionTexture.frag.patch23
-rw-r--r--ccShader_PositionTexture.vert.patch30
-rw-r--r--ccShader_PositionTextureA8Color.frag.patch23
-rw-r--r--ccShader_PositionTextureA8Color.vert.patch32
-rw-r--r--ccShader_PositionTextureColor.frag.patch22
-rw-r--r--ccShader_PositionTextureColor.vert.patch32
-rw-r--r--ccShader_PositionTextureColorAlphaTest.frag.patch23
-rw-r--r--ccShader_PositionTextureColor_noMVP.frag.patch23
-rw-r--r--ccShader_PositionTextureColor_noMVP.vert.patch31
-rw-r--r--ccShader_PositionTexture_uColor.frag.patch23
-rw-r--r--ccShader_PositionTexture_uColor.vert.patch28
-rw-r--r--ccShader_Position_uColor.frag.patch23
-rw-r--r--ccShader_Position_uColor.vert.patch30
-rw-r--r--ccShader_UI_Gray.frag.patch20
51 files changed, 1826 insertions, 85 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 72258b0c2302..26a1d492a089 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Sep 19 20:56:17 UTC 2016
+# Wed Jan 4 20:43:46 UTC 2017
pkgbase = cocos2d-x-src
pkgdesc = Cocos2D-X is a game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X
- pkgver = 3.13.1
- pkgrel = 2
+ pkgver = 3.14
+ pkgrel = 1
url = http://cdn.cocos2d-x.org/
arch = i686
arch = x86_64
@@ -22,24 +22,102 @@ pkgbase = cocos2d-x-src
options = !buildflags
options = !strip
options = staticlibs
- source = http://cdn.cocos2d-x.org/cocos2d-x-3.13.1.zip
+ source = http://cdn.cocos2d-x.org/cocos2d-x-3.14.zip
source = README
source = cocos2d-x.sh
source = cocos2d-x.csh
- source = RuntimeCCSImpl.patch
- source = SocketIO.patch
- source = CCTMXLayer.patch
- source = SkeletonRenderer.patch
- source = CCFastTMXLayer.patch
- sha1sums = 1138d61fbbebf3a2edd12d81f0d9834c5ead6df3
+ source = CMakeLists.patch
+ source = CCPhysicsBody.patch
+ source = HelloWorldScene.cpp.patch
+ source = HelloWorldScene.h.patch
+ source = ccShader_3D_Color.frag.patch
+ source = ccShader_3D_ColorNormal.frag.patch
+ source = ccShader_3D_ColorNormalTex.frag.patch
+ source = ccShader_3D_ColorTex.frag.patch
+ source = ccShader_3D_Particle.frag.patch
+ source = ccShader_3D_Particle.vert.patch
+ source = ccShader_3D_PositionNormalTex.vert.patch
+ source = ccShader_3D_PositionTex.vert.patch
+ source = ccShader_3D_Skybox.frag.patch
+ source = ccShader_3D_Skybox.vert.patch
+ source = ccShader_3D_Terrain.frag.patch
+ source = ccShader_3D_Terrain.vert.patch
+ source = ccShader_CameraClear.frag.patch
+ source = ccShader_CameraClear.vert.patch
+ source = ccShader_ETC1AS_PositionTextureColor.frag.patch
+ source = ccShader_ETC1AS_PositionTextureGray.frag.patch
+ source = ccShader_Label_df.frag.patch
+ source = ccShader_Label_df_glow.frag.patch
+ source = ccShader_Label_normal.frag.patch
+ source = ccShader_Label_outline.frag.patch
+ source = ccShader_Label.vert.patch
+ source = ccShader_PositionColor.frag.patch
+ source = ccShader_PositionColorLengthTexture.frag.patch
+ source = ccShader_PositionColorLengthTexture.vert.patch
+ source = ccShader_PositionColorTextureAsPointsize.vert.patch
+ source = ccShader_PositionColor.vert.patch
+ source = ccShader_PositionTextureA8Color.frag.patch
+ source = ccShader_PositionTextureA8Color.vert.patch
+ source = ccShader_PositionTextureColorAlphaTest.frag.patch
+ source = ccShader_PositionTextureColor.frag.patch
+ source = ccShader_PositionTextureColor_noMVP.frag.patch
+ source = ccShader_PositionTextureColor_noMVP.vert.patch
+ source = ccShader_PositionTextureColor.vert.patch
+ source = ccShader_PositionTexture.frag.patch
+ source = ccShader_PositionTexture_uColor.frag.patch
+ source = ccShader_PositionTexture_uColor.vert.patch
+ source = ccShader_PositionTexture.vert.patch
+ source = ccShader_Position_uColor.frag.patch
+ source = ccShader_Position_uColor.vert.patch
+ source = ccShader_UI_Gray.frag.patch
+ sha1sums = f510ae35c078d602d53f0c203be971d6fa4efdd3
sha1sums = 2cff669a51b66d513824be811688aa9da553e400
sha1sums = 353bdefe07bdb6eb7f53aff20d20e83b488c1c05
sha1sums = 49b7919fc38803c1dd2f5b1d47fb0c75fde1fec6
- sha1sums = 716869895fc2b071c66a58f727c643f48e927569
- sha1sums = b042a9fa4c7ea6d472985b1b61d0a57ebf56708a
- sha1sums = c6cf99ba9fcd7fa4f80c1f3014c6c0b5fd34120a
- sha1sums = 14a210d050111990b2e8fad6bd56eb513f415057
- sha1sums = c9f498fe41fb397e710ea05ccd89b7f808ae4d48
+ sha1sums = bcad039c11e29d4cbae9e371cb428d52f2eb15ff
+ sha1sums = 281f4c79226a94bf5d1152ccfc7f2d2bb71a2c87
+ sha1sums = 2c6801bae13956394ddcd94080861aac8a25be99
+ sha1sums = 0d70b91142ceece19d90a620c707cb5f86f45d32
+ sha1sums = 49838c03951aa76524fb651dcb78834393a17682
+ sha1sums = de5b8e9c89ead0ecffce6bc1450adf06e5c7e218
+ sha1sums = 7ffd26e2235ef54c854b079a0f8b3cd697d8c0d1
+ sha1sums = f02f01ec38f0e1a5eb71078a612628c2e11a1413
+ sha1sums = 49eeda555783089778035ed124e6759abdea1b62
+ sha1sums = c7fe0a570aebe7d4eda2fb263246823265642395
+ sha1sums = d45e1c0b739087f9f82d9b1f871403764e4530e4
+ sha1sums = 356bca989f7861cff720ecd3a53f52fd1a0315af
+ sha1sums = fa45ba55634b3af6fae6a1ad6a24abb51343f68b
+ sha1sums = 7ecd7bf3504f7b90bdaaee4994a44d102884e585
+ sha1sums = 91e32c7333705620803b058d9c5efd04d84e17ab
+ sha1sums = 6dbe3874af5295ccf48c9340be9426ef2e5e3760
+ sha1sums = 3e8c0f635f853d56901f625375d02c13458da087
+ sha1sums = 92d4fe63b27e5cf90ca1ce44cc25ede1ba94d234
+ sha1sums = fca5767e100a3af23eb65f731c93f415d69dcb05
+ sha1sums = 4d971dd9f306f1ffad5f6203ecb8b1074543f926
+ sha1sums = 32fe66982514e9e3b5743c31673990d0d5c39d4f
+ sha1sums = e08916384e815c551fb06c409ecb8a796b0eaf2d
+ sha1sums = f09d34eba8ee67eb4a003829b6a3e5c7abcdd682
+ sha1sums = c16f73e553d373aa5a6c64bc2a7a64273ca073c6
+ sha1sums = 52c7eb7fd0bb5c436578d6ba11359b0dd5f54ff0
+ sha1sums = 4b7925d294703e718e8627d807ed0f356b4828f0
+ sha1sums = a2ff2f92cf8a535e37b64278161fd1ce3d679588
+ sha1sums = c388ab06b5639d9fd5d179990cf03dabb470b356
+ sha1sums = 1d7dc7ea26aa75750e883ec31fbbb1b9c54d6174
+ sha1sums = 2a08b8532a42bb7fd647c3e01b803516430ad327
+ sha1sums = 02e5f3695ead2d34d7ad4013b2246cddbfbed863
+ sha1sums = f83994a7da0311c193f3b3578ac59dc83d9f9700
+ sha1sums = 4c1b8cd3779ffea607ffff6b59e272b938b6acd4
+ sha1sums = eae2679bc313b4368bfbf180f98985df71a9b3f9
+ sha1sums = 6837a4bb47269a17bdb498072670abcd5f437388
+ sha1sums = 4f93f13d4b8c6369fe97f94bed50e5d9649a7eda
+ sha1sums = 64b951ec9c2453fca2348a8a2bde483ada4a11f7
+ sha1sums = 43bbb35ed1e1c28f14a4ea333c463b87641e8238
+ sha1sums = 399ffc785562ee9ce25fb4b3dadb96fcc70bcfc6
+ sha1sums = 4d65c632745df2772f7c2c9507ba8bc228865c97
+ sha1sums = 166a5e48711c6c8f329af275e4a6e0a0203052df
+ sha1sums = d8e81b49baec4fd9e04822e1c460dd43f85762bb
+ sha1sums = ea81b894221a8cf42bd6eecd1ced44fff27ad5f4
+ sha1sums = c8caec1e9626d222c67a7c883c8cb94101799956
pkgname = cocos2d-x-src
diff --git a/CCFastTMXLayer.patch b/CCFastTMXLayer.patch
deleted file mode 100644
index 5a37a64317c2..000000000000
--- a/CCFastTMXLayer.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-@@ -130,7 +130,7 @@ TMXLayer::~TMXLayer()
- {
- CC_SAFE_RELEASE(_tileSet);
- CC_SAFE_RELEASE(_texture);
-- CC_SAFE_DELETE_ARRAY(_tiles);
-+ CC_SAFE_FREE(_tiles);
- CC_SAFE_RELEASE(_vData);
- CC_SAFE_RELEASE(_vertexBuffer);
- CC_SAFE_RELEASE(_indexBuffer);
diff --git a/CCPhysicsBody.patch b/CCPhysicsBody.patch
new file mode 100644
index 000000000000..f9faaac7301c
--- /dev/null
+++ b/CCPhysicsBody.patch
@@ -0,0 +1,28 @@
+--- CCPhysicsBody.cpp 2016-12-29 13:42:38.000000000 -0400
++++ /opt/cocos2d-x-git/cocos/physics/CCPhysicsBody.cpp 2017-01-04 13:22:53.445318965 -0400
+@@ -575,12 +575,6 @@
+
+ void PhysicsBody::setVelocity(const Vec2& velocity)
+ {
+- if (!_dynamic)
+- {
+- CCLOG("physics warning: your can't set velocity for a static body.");
+- return;
+- }
+-
+ cpBodySetVelocity(_cpBody, PhysicsHelper::point2cpv(velocity));
+ }
+
+@@ -601,12 +595,6 @@
+
+ void PhysicsBody::setAngularVelocity(float velocity)
+ {
+- if (!_dynamic)
+- {
+- CCLOG("physics warning: your can't set angular velocity for a static body.");
+- return;
+- }
+-
+ cpBodySetAngularVelocity(_cpBody, velocity);
+ }
+
diff --git a/CCTMXLayer.patch b/CCTMXLayer.patch
deleted file mode 100644
index 89abdd14ebc9..000000000000
--- a/CCTMXLayer.patch
+++ /dev/null
@@ -1,4 +0,0 @@
-148c148
-< CC_SAFE_DELETE_ARRAY(_tiles);
----
-> CC_SAFE_FREE(_tiles);
diff --git a/CMakeLists.patch b/CMakeLists.patch
new file mode 100644
index 000000000000..81483a148496
--- /dev/null
+++ b/CMakeLists.patch
@@ -0,0 +1,62 @@
+--- CMakeLists.txt 2016-12-29 13:42:40.000000000 -0400
++++ /opt/cocos2d-x-git/templates/cpp-template-default/CMakeLists.txt 2017-01-02 14:48:01.678168302 -0400
+@@ -34,12 +34,6 @@
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${COCOS2D_ROOT}/cmake/Modules/")
+ include(CocosBuildHelpers)
+
+-# libcocos2d
+-set(BUILD_CPP_EMPTY_TEST OFF CACHE BOOL "turn off build cpp-empty-test")
+-set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests")
+-set(BUILD_LUA_LIBS OFF CACHE BOOL "turn off build lua related targets")
+-set(BUILD_JS_LIBS OFF CACHE BOOL "turn off build js related targets")
+-add_subdirectory(${COCOS2D_ROOT})
+
+ # Some macro definitions
+ if(WINDOWS)
+@@ -69,15 +63,18 @@
+ # Compiler options
+ if(MSVC)
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcmt")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcmt")
+ else()
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libcmt")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libcmt")
+ endif()
+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+ -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
+ -wd4514 -wd4056 -wd4996 -wd4099)
+ else()
+- set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1")
++ if(CMAKE_BUILD_TYPE MATCHES Debug)
++ ADD_DEFINITIONS(-DCOCOS2D_DEBUG=1)
++ endif()
++ set(CMAKE_C_FLAGS_DEBUG "-g -Wall")
+ set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
+@@ -86,7 +83,6 @@
+ endif()
+ endif(MSVC)
+
+-
+ set(PLATFORM_SPECIFIC_SRC)
+ set(PLATFORM_SPECIFIC_HEADERS)
+
+@@ -139,6 +135,16 @@
+ ${PLATFORM_SPECIFIC_HEADERS}
+ )
+
++
++# Configure libcocos2d
++set(BUILD_CPP_EMPTY_TEST OFF CACHE BOOL "turn off build cpp-empty-test")
++set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests")
++set(BUILD_LUA_LIBS OFF CACHE BOOL "turn off build lua related targets")
++set(BUILD_JS_LIBS OFF CACHE BOOL "turn off build js related targets")
++add_subdirectory(${COCOS2D_ROOT})
++
++
++# MyGame
+ if( ANDROID )
+ add_library(${APP_NAME} SHARED ${GAME_SRC} ${GAME_HEADERS})
+ IF(CMAKE_BUILD_TYPE MATCHES RELEASE)
diff --git a/HelloWorldScene.cpp.patch b/HelloWorldScene.cpp.patch
new file mode 100644
index 000000000000..4ab4c048a583
--- /dev/null
+++ b/HelloWorldScene.cpp.patch
@@ -0,0 +1,30 @@
+--- HelloWorldScene.cpp 2016-12-21 13:43:14.000000000 -0400
++++ /opt/cocos2d-x-git/templates/cpp-template-default/Classes/HelloWorldScene.cpp 2017-01-04 12:22:47.004282988 -0400
+@@ -5,17 +5,7 @@
+
+ Scene* HelloWorld::createScene()
+ {
+- // 'scene' is an autorelease object
+- auto scene = Scene::create();
+-
+- // 'layer' is an autorelease object
+- auto layer = HelloWorld::create();
+-
+- // add layer as a child to scene
+- scene->addChild(layer);
+-
+- // return the scene
+- return scene;
++ return HelloWorld::create();
+ }
+
+ // on "init" you need to initialize your instance
+@@ -23,7 +13,7 @@
+ {
+ //////////////////////////////
+ // 1. super init first
+- if ( !Layer::init() )
++ if ( !Scene::init() )
+ {
+ return false;
+ }
diff --git a/HelloWorldScene.h.patch b/HelloWorldScene.h.patch
new file mode 100644
index 000000000000..a79adb2f25c9
--- /dev/null
+++ b/HelloWorldScene.h.patch
@@ -0,0 +1,11 @@
+--- HelloWorldScene.h 2016-12-21 13:43:14.000000000 -0400
++++ /opt/cocos2d-x-git/templates/cpp-template-default/Classes/HelloWorldScene.h 2017-01-04 12:22:47.004282988 -0400
+@@ -3,7 +3,7 @@
+
+ #include "cocos2d.h"
+
+-class HelloWorld : public cocos2d::Layer
++class HelloWorld : public cocos2d::Scene
+ {
+ public:
+ static cocos2d::Scene* createScene();
diff --git a/PKGBUILD b/PKGBUILD
index 3dd9d32881b7..b9a4abf422a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
_appname=cocos2d-x
pkgname=cocos2d-x-src
-pkgver=3.13.1
-pkgrel=2
+pkgver=3.14
+pkgrel=1
pkgdesc="Cocos2D-X is a game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X"
arch=('i686' 'x86_64')
url="http://cdn.cocos2d-x.org/"
@@ -17,22 +17,100 @@ source=(
"README"
"$_appname.sh"
"$_appname.csh"
-"RuntimeCCSImpl.patch"
-"SocketIO.patch"
-"CCTMXLayer.patch"
-"SkeletonRenderer.patch"
-"CCFastTMXLayer.patch"
+"CMakeLists.patch"
+"CCPhysicsBody.patch"
+"HelloWorldScene.cpp.patch"
+"HelloWorldScene.h.patch"
+"ccShader_3D_Color.frag.patch"
+"ccShader_3D_ColorNormal.frag.patch"
+"ccShader_3D_ColorNormalTex.frag.patch"
+"ccShader_3D_ColorTex.frag.patch"
+"ccShader_3D_Particle.frag.patch"
+"ccShader_3D_Particle.vert.patch"
+"ccShader_3D_PositionNormalTex.vert.patch"
+"ccShader_3D_PositionTex.vert.patch"
+"ccShader_3D_Skybox.frag.patch"
+"ccShader_3D_Skybox.vert.patch"
+"ccShader_3D_Terrain.frag.patch"
+"ccShader_3D_Terrain.vert.patch"
+"ccShader_CameraClear.frag.patch"
+"ccShader_CameraClear.vert.patch"
+"ccShader_ETC1AS_PositionTextureColor.frag.patch"
+"ccShader_ETC1AS_PositionTextureGray.frag.patch"
+"ccShader_Label_df.frag.patch"
+"ccShader_Label_df_glow.frag.patch"
+"ccShader_Label_normal.frag.patch"
+"ccShader_Label_outline.frag.patch"
+"ccShader_Label.vert.patch"
+"ccShader_PositionColor.frag.patch"
+"ccShader_PositionColorLengthTexture.frag.patch"
+"ccShader_PositionColorLengthTexture.vert.patch"
+"ccShader_PositionColorTextureAsPointsize.vert.patch"
+"ccShader_PositionColor.vert.patch"
+"ccShader_PositionTextureA8Color.frag.patch"
+"ccShader_PositionTextureA8Color.vert.patch"
+"ccShader_PositionTextureColorAlphaTest.frag.patch"
+"ccShader_PositionTextureColor.frag.patch"
+"ccShader_PositionTextureColor_noMVP.frag.patch"
+"ccShader_PositionTextureColor_noMVP.vert.patch"
+"ccShader_PositionTextureColor.vert.patch"
+"ccShader_PositionTexture.frag.patch"
+"ccShader_PositionTexture_uColor.frag.patch"
+"ccShader_PositionTexture_uColor.vert.patch"
+"ccShader_PositionTexture.vert.patch"
+"ccShader_Position_uColor.frag.patch"
+"ccShader_Position_uColor.vert.patch"
+"ccShader_UI_Gray.frag.patch"
)
sha1sums=(
-'1138d61fbbebf3a2edd12d81f0d9834c5ead6df3'
+'f510ae35c078d602d53f0c203be971d6fa4efdd3'
'2cff669a51b66d513824be811688aa9da553e400'
'353bdefe07bdb6eb7f53aff20d20e83b488c1c05'
'49b7919fc38803c1dd2f5b1d47fb0c75fde1fec6'
-'716869895fc2b071c66a58f727c643f48e927569'
-'b042a9fa4c7ea6d472985b1b61d0a57ebf56708a'
-'c6cf99ba9fcd7fa4f80c1f3014c6c0b5fd34120a'
-'14a210d050111990b2e8fad6bd56eb513f415057'
-'c9f498fe41fb397e710ea05ccd89b7f808ae4d48'
+'bcad039c11e29d4cbae9e371cb428d52f2eb15ff'
+'281f4c79226a94bf5d1152ccfc7f2d2bb71a2c87'
+'2c6801bae13956394ddcd94080861aac8a25be99'
+'0d70b91142ceece19d90a620c707cb5f86f45d32'
+'49838c03951aa76524fb651dcb78834393a17682'
+'de5b8e9c89ead0ecffce6bc1450adf06e5c7e218'
+'7ffd26e2235ef54c854b079a0f8b3cd697d8c0d1'
+'f02f01ec38f0e1a5eb71078a612628c2e11a1413'
+'49eeda555783089778035ed124e6759abdea1b62'
+'c7fe0a570aebe7d4eda2fb263246823265642395'
+'d45e1c0b739087f9f82d9b1f871403764e4530e4'
+'356bca989f7861cff720ecd3a53f52fd1a0315af'
+'fa45ba55634b3af6fae6a1ad6a24abb51343f68b'
+'7ecd7bf3504f7b90bdaaee4994a44d102884e585'
+'91e32c7333705620803b058d9c5efd04d84e17ab'
+'6dbe3874af5295ccf48c9340be9426ef2e5e3760'
+'3e8c0f635f853d56901f625375d02c13458da087'
+'92d4fe63b27e5cf90ca1ce44cc25ede1ba94d234'
+'fca5767e100a3af23eb65f731c93f415d69dcb05'
+'4d971dd9f306f1ffad5f6203ecb8b1074543f926'
+'32fe66982514e9e3b5743c31673990d0d5c39d4f'
+'e08916384e815c551fb06c409ecb8a796b0eaf2d'
+'f09d34eba8ee67eb4a003829b6a3e5c7abcdd682'
+'c16f73e553d373aa5a6c64bc2a7a64273ca073c6'
+'52c7eb7fd0bb5c436578d6ba11359b0dd5f54ff0'
+'4b7925d294703e718e8627d807ed0f356b4828f0'
+'a2ff2f92cf8a535e37b64278161fd1ce3d679588'
+'c388ab06b5639d9fd5d179990cf03dabb470b356'
+'1d7dc7ea26aa75750e883ec31fbbb1b9c54d6174'
+'2a08b8532a42bb7fd647c3e01b803516430ad327'
+'02e5f3695ead2d34d7ad4013b2246cddbfbed863'
+'f83994a7da0311c193f3b3578ac59dc83d9f9700'
+'4c1b8cd3779ffea607ffff6b59e272b938b6acd4'
+'eae2679bc313b4368bfbf180f98985df71a9b3f9'
+'6837a4bb47269a17bdb498072670abcd5f437388'
+'4f93f13d4b8c6369fe97f94bed50e5d9649a7eda'
+'64b951ec9c2453fca2348a8a2bde483ada4a11f7'
+'43bbb35ed1e1c28f14a4ea333c463b87641e8238'
+'399ffc785562ee9ce25fb4b3dadb96fcc70bcfc6'
+'4d65c632745df2772f7c2c9507ba8bc228865c97'
+'166a5e48711c6c8f329af275e4a6e0a0203052df'
+'d8e81b49baec4fd9e04822e1c460dd43f85762bb'
+'ea81b894221a8cf42bd6eecd1ced44fff27ad5f4'
+'c8caec1e9626d222c67a7c883c8cb94101799956'
)
@@ -42,18 +120,65 @@ prepare() {
python2 "download-deps.py" -r yes
}
+
package() {
install -d "$pkgdir/opt/$_appname"
install -Dm644 "README" "$pkgdir/opt/$_appname/README"
install -Dm755 "$_appname.sh" "$pkgdir/etc/profile.d/$_appname.sh"
install -Dm755 "$_appname.csh" "$pkgdir/etc/profile.d/$_appname.csh"
- # Patch found issues:
- patch "$srcdir"/$_appname-$pkgver/tools/simulator/libsimulator/lib/runtime/RuntimeCCSImpl.cpp RuntimeCCSImpl.patch
- patch "$srcdir"/$_appname-$pkgver/cocos/network/SocketIO.cpp SocketIO.patch
- patch "$srcdir"/$_appname-$pkgver/cocos/2d/CCTMXLayer.cpp CCTMXLayer.patch
- patch "$srcdir"/$_appname-$pkgver/cocos/editor-support/spine/SkeletonRenderer.cpp SkeletonRenderer.patch
- patch "$srcdir"/$_appname-$pkgver/cocos/2d/CCFastTMXLayer.cpp CCFastTMXLayer.patch
+ # Make sure COCOS2D_DEBUG spans libcocos2d correctly: https://github.com/cocos2d/cocos2d-x/pull/17033
+ patch -s "$srcdir"/$_appname-$pkgver/templates/cpp-template-default/CMakeLists.txt CMakeLists.patch
+
+ # Layer has been deprecated. Update the C++ templates: https://github.com/cocos2d/cocos2d-x/pull/17048
+ patch -s "$srcdir"/$_appname-$pkgver/templates/cpp-template-default/Classes/HelloWorldScene.cpp HelloWorldScene.cpp.patch
+ patch -s "$srcdir"/$_appname-$pkgver/templates/cpp-template-default/Classes/HelloWorldScene.h HelloWorldScene.h.patch
+
+ # Allow Chipmunk's kinematic bodies to be moved: https://github.com/cocos2d/cocos2d-x/pull/17033
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/physics/CCPhysicsBody.cpp CCPhysicsBody.patch
+
+ # Switch C++ multiline string literal to the STRINGIFY macro which uses less memory. See https://github.com/cocos2d/cocos2d-x/pull/16742
+ # TL;DR: For smoother development, using the C++ multiline string literal is convenient, however the STRINGIFY macro defined at ccShaders.cpp uses less memory.
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Color.frag ccShader_3D_Color.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_ColorNormal.frag ccShader_3D_ColorNormal.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_ColorNormalTex.frag ccShader_3D_ColorNormalTex.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_ColorTex.frag ccShader_3D_ColorTex.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Particle.frag ccShader_3D_Particle.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Particle.vert ccShader_3D_Particle.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_PositionNormalTex.vert ccShader_3D_PositionNormalTex.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_PositionTex.vert ccShader_3D_PositionTex.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Skybox.frag ccShader_3D_Skybox.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Skybox.vert ccShader_3D_Skybox.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Terrain.frag ccShader_3D_Terrain.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_3D_Terrain.vert ccShader_3D_Terrain.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_CameraClear.frag ccShader_CameraClear.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_CameraClear.vert ccShader_CameraClear.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_ETC1AS_PositionTextureColor.frag ccShader_ETC1AS_PositionTextureColor.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_ETC1AS_PositionTextureGray.frag ccShader_ETC1AS_PositionTextureGray.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Label_df.frag ccShader_Label_df.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Label_df_glow.frag ccShader_Label_df_glow.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Label_normal.frag ccShader_Label_normal.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Label_outline.frag ccShader_Label_outline.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Label.vert ccShader_Label.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionColor.frag ccShader_PositionColor.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionColorLengthTexture.frag ccShader_PositionColorLengthTexture.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionColorLengthTexture.vert ccShader_PositionColorLengthTexture.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionColorTextureAsPointsize.vert ccShader_PositionColorTextureAsPointsize.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionColor.vert ccShader_PositionColor.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureA8Color.frag ccShader_PositionTextureA8Color.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureA8Color.vert ccShader_PositionTextureA8Color.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag ccShader_PositionTextureColorAlphaTest.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureColor.frag ccShader_PositionTextureColor.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureColor_noMVP.frag ccShader_PositionTextureColor_noMVP.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureColor_noMVP.vert ccShader_PositionTextureColor_noMVP.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTextureColor.vert ccShader_PositionTextureColor.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTexture.frag ccShader_PositionTexture.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTexture_uColor.frag ccShader_PositionTexture_uColor.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTexture_uColor.vert ccShader_PositionTexture_uColor.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_PositionTexture.vert ccShader_PositionTexture.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Position_uColor.frag ccShader_Position_uColor.frag.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_Position_uColor.vert ccShader_Position_uColor.vert.patch
+ patch -s "$srcdir"/$_appname-$pkgver/cocos/renderer/ccShader_UI_Gray.frag ccShader_UI_Gray.frag.patch
# Necessary libfmod symbolic link
mkdir -p "$pkgdir/usr/lib"
diff --git a/RuntimeCCSImpl.patch b/RuntimeCCSImpl.patch
deleted file mode 100644
index 3cc1e5f9b6f6..000000000000
--- a/RuntimeCCSImpl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-@@ -86,9 +86,10 @@
- attribute = attribute->Next();
- }
- }
--
- }
-
-+ delete document;
-+
- if (Director::getInstance()->getRunningScene())
- {
- auto scene = Scene::create();
diff --git a/SkeletonRenderer.patch b/SkeletonRenderer.patch
deleted file mode 100644
index 556b929d4fb8..000000000000
--- a/SkeletonRenderer.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-@@ -98,7 +98,7 @@ SkeletonRenderer::~SkeletonRenderer () {
- spSkeleton_dispose(_skeleton);
- if (_atlas) spAtlas_dispose(_atlas);
- if (_attachmentLoader) spAttachmentLoader_dispose(_attachmentLoader);
-- delete _worldVertices;
-+ delete [] _worldVertices;
- }
-
- void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) {
diff --git a/SocketIO.patch b/SocketIO.patch
deleted file mode 100644
index e36bdfc2c0ec..000000000000
--- a/SocketIO.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-@@ -880,7 +880,6 @@
- int control2 = payload.at(0) - '0';
- CCLOGINFO("Message code: [%i]", control2);
-
-- SocketIOPacket *packetOut = SocketIOPacket::createPacketWithType("event", _version);
- std::string endpoint = "";
-
- std::string::size_type a = payload.find("/");
-@@ -902,8 +901,6 @@
- // we didn't find and endpoint and we are in the default namespace
- if (endpoint == "") endpoint = "/";
-
-- packetOut->setEndpoint(endpoint);
--
- c = getClient(endpoint);
-
- payload = payload.substr(1);
diff --git a/ccShader_3D_Color.frag.patch b/ccShader_3D_Color.frag.patch
new file mode 100644
index 000000000000..4ef0621f899e
--- /dev/null
+++ b/ccShader_3D_Color.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Color.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Color.frag 2017-01-04 15:03:03.130124792 -0400
+@@ -1,15 +1,15 @@
+
+-const char* cc3D_Color_frag = R"(
++const char* cc3D_Color_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 DestinationColor;
+-#else
++\n#else\n
+ varying vec4 DestinationColor;
+-#endif
++\n#endif\n
+ uniform vec4 u_color;
+
+ void main(void)
+ {
+ gl_FragColor = u_color;
+ }
+-)";
++);
diff --git a/ccShader_3D_ColorNormal.frag.patch b/ccShader_3D_ColorNormal.frag.patch
new file mode 100644
index 000000000000..ee1e2a47fecd
--- /dev/null
+++ b/ccShader_3D_ColorNormal.frag.patch
@@ -0,0 +1,134 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_ColorNormal.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_ColorNormal.frag 2017-01-04 15:03:03.186784936 -0400
+@@ -1,49 +1,49 @@
+
+-const char* cc3D_ColorNormal_frag = R"(
++const char* cc3D_ColorNormal_frag = STRINGIFY(
+
+-#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ uniform vec3 u_DirLightSourceColor[MAX_DIRECTIONAL_LIGHT_NUM];
+ uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#if (MAX_POINT_LIGHT_NUM > 0)
++\n#endif\n
++\n#if (MAX_POINT_LIGHT_NUM > 0)\n
+ uniform vec3 u_PointLightSourceColor[MAX_POINT_LIGHT_NUM];
+ uniform float u_PointLightSourceRangeInverse[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if (MAX_SPOT_LIGHT_NUM > 0)
++\n#endif\n
++\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
+ uniform vec3 u_SpotLightSourceColor[MAX_SPOT_LIGHT_NUM];
+ uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceInnerAngleCos[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceOuterAngleCos[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceRangeInverse[MAX_SPOT_LIGHT_NUM];
+-#endif
++\n#endif\n
+ uniform vec3 u_AmbientLightSourceColor;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 TextureCoordOut;
+-#if MAX_POINT_LIGHT_NUM
++\n#if MAX_POINT_LIGHT_NUM\n
+ varying mediump vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if MAX_SPOT_LIGHT_NUM
++\n#endif\n
++\n#if MAX_SPOT_LIGHT_NUM\n
+ varying mediump vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#endif\n
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ varying mediump vec3 v_normal;
+-#endif
++\n#endif\n
+
+-#else
++\n#else\n
+
+ varying vec2 TextureCoordOut;
+-#if MAX_POINT_LIGHT_NUM
++\n#if MAX_POINT_LIGHT_NUM\n
+ varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if MAX_SPOT_LIGHT_NUM
++\n#endif\n
++\n#if MAX_SPOT_LIGHT_NUM\n
+ varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#endif\n
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ varying vec3 v_normal;
+-#endif
++\n#endif\n
+
+-#endif
++\n#endif\n
+
+ uniform vec4 u_color;
+
+@@ -57,33 +57,33 @@
+
+ void main(void)
+ {
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ vec3 normal = normalize(v_normal);
+-#endif
++\n#endif\n
+
+ vec4 combinedColor = vec4(u_AmbientLightSourceColor, 1.0);
+
+ // Directional light contribution
+-#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i)
+ {
+ vec3 lightDirection = normalize(u_DirLightSourceDirection[i] * 2.0);
+ combinedColor.xyz += computeLighting(normal, -lightDirection, u_DirLightSourceColor[i], 1.0);
+ }
+-#endif
++\n#endif\n
+
+ // Point light contribution
+-#if (MAX_POINT_LIGHT_NUM > 0)
++\n#if (MAX_POINT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i)
+ {
+ vec3 ldir = v_vertexToPointLightDirection[i] * u_PointLightSourceRangeInverse[i];
+ float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
+ combinedColor.xyz += computeLighting(normal, normalize(v_vertexToPointLightDirection[i]), u_PointLightSourceColor[i], attenuation);
+ }
+-#endif
++\n#endif\n
+
+ // Spot light contribution
+-#if (MAX_SPOT_LIGHT_NUM > 0)
++\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i)
+ {
+ // Compute range attenuation
+@@ -101,13 +101,13 @@
+ attenuation = clamp(attenuation, 0.0, 1.0);
+ combinedColor.xyz += computeLighting(normal, vertexToSpotLightDirection, u_SpotLightSourceColor[i], attenuation);
+ }
+-#endif
++\n#endif\n
+
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ gl_FragColor = u_color * combinedColor;
+-#else
++\n#else\n
+ gl_FragColor = u_color;
+-#endif
++\n#endif\n
+
+ }
+-)";
++);
diff --git a/ccShader_3D_ColorNormalTex.frag.patch b/ccShader_3D_ColorNormalTex.frag.patch
new file mode 100644
index 000000000000..b2756784fd4d
--- /dev/null
+++ b/ccShader_3D_ColorNormalTex.frag.patch
@@ -0,0 +1,214 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_ColorNormalTex.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_ColorNormalTex.frag 2017-01-04 15:03:03.246778028 -0400
+@@ -1,78 +1,78 @@
+
+-const char* cc3D_ColorNormalTex_frag = R"(
++const char* cc3D_ColorNormalTex_frag = STRINGIFY(
+
+-#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ uniform vec3 u_DirLightSourceColor[MAX_DIRECTIONAL_LIGHT_NUM];
+ uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#if (MAX_POINT_LIGHT_NUM > 0)
++\n#endif\n
++\n#if (MAX_POINT_LIGHT_NUM > 0)\n
+ uniform vec3 u_PointLightSourceColor[MAX_POINT_LIGHT_NUM];
+ uniform float u_PointLightSourceRangeInverse[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if (MAX_SPOT_LIGHT_NUM > 0)
++\n#endif\n
++\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
+ uniform vec3 u_SpotLightSourceColor[MAX_SPOT_LIGHT_NUM];
+ uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceInnerAngleCos[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceOuterAngleCos[MAX_SPOT_LIGHT_NUM];
+ uniform float u_SpotLightSourceRangeInverse[MAX_SPOT_LIGHT_NUM];
+-#endif
++\n#endif\n
+ uniform vec3 u_AmbientLightSourceColor;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 TextureCoordOut;
+
+-#ifdef USE_NORMAL_MAPPING
+-#if MAX_DIRECTIONAL_LIGHT_NUM
++\n#ifdef USE_NORMAL_MAPPING\n
++\n#if MAX_DIRECTIONAL_LIGHT_NUM\n
+ varying mediump vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#endif
+-#if MAX_POINT_LIGHT_NUM
++\n#endif\n
++\n#endif\n
++\n#if MAX_POINT_LIGHT_NUM\n
+ varying mediump vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if MAX_SPOT_LIGHT_NUM
++\n#endif\n
++\n#if MAX_SPOT_LIGHT_NUM\n
+ varying mediump vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ varying mediump vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+-#ifndef USE_NORMAL_MAPPING
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#ifndef USE_NORMAL_MAPPING\n
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ varying mediump vec3 v_normal;
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+-#else
++\n#else\n
+
+ varying vec2 TextureCoordOut;
+
+-#ifdef USE_NORMAL_MAPPING
+-#if MAX_DIRECTIONAL_LIGHT_NUM
++\n#ifdef USE_NORMAL_MAPPING\n
++\n#if MAX_DIRECTIONAL_LIGHT_NUM\n
+ varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#endif
+-#if MAX_POINT_LIGHT_NUM
++\n#endif\n
++\n#endif\n
++\n#if MAX_POINT_LIGHT_NUM\n
+ varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if MAX_SPOT_LIGHT_NUM
++\n#endif\n
++\n#if MAX_SPOT_LIGHT_NUM\n
+ varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+-#ifndef USE_NORMAL_MAPPING
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#ifndef USE_NORMAL_MAPPING\n
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ varying vec3 v_normal;
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+-#endif
++\n#endif\n
+
+ uniform vec4 u_color;
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ uniform sampler2D u_normalTex;
+-#endif
++\n#endif\n
+
+ vec3 computeLighting(vec3 normalVector, vec3 lightDirection, vec3 lightColor, float attenuation)
+ {
+@@ -85,43 +85,43 @@
+ void main(void)
+ {
+
+-#ifdef USE_NORMAL_MAPPING
+- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#ifdef USE_NORMAL_MAPPING\n
++\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ vec3 normal = normalize(2.0 * texture2D(u_normalTex, TextureCoordOut).xyz - 1.0);
+- #endif
+-#else
+- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n #endif\n
++\n#else\n
++\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ vec3 normal = normalize(v_normal);
+- #endif
+-#endif
++\n #endif\n
++\n#endif\n
+
+ vec4 combinedColor = vec4(u_AmbientLightSourceColor, 1.0);
+
+ // Directional light contribution
+-#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i)
+ {
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ vec3 lightDirection = normalize(v_dirLightDirection[i] * 2.0);
+-#else
++\n#else\n
+ vec3 lightDirection = normalize(u_DirLightSourceDirection[i] * 2.0);
+-#endif
++\n#endif\n
+ combinedColor.xyz += computeLighting(normal, -lightDirection, u_DirLightSourceColor[i], 1.0);
+ }
+-#endif
++\n#endif\n
+
+ // Point light contribution
+-#if (MAX_POINT_LIGHT_NUM > 0)
++\n#if (MAX_POINT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i)
+ {
+ vec3 ldir = v_vertexToPointLightDirection[i] * u_PointLightSourceRangeInverse[i];
+ float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
+ combinedColor.xyz += computeLighting(normal, normalize(v_vertexToPointLightDirection[i]), u_PointLightSourceColor[i], attenuation);
+ }
+-#endif
++\n#endif\n
+
+ // Spot light contribution
+-#if (MAX_SPOT_LIGHT_NUM > 0)
++\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i)
+ {
+ // Compute range attenuation
+@@ -129,11 +129,11 @@
+ float attenuation = clamp(1.0 - dot(ldir, ldir), 0.0, 1.0);
+ vec3 vertexToSpotLightDirection = normalize(v_vertexToSpotLightDirection[i]);
+
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ vec3 spotLightDirection = normalize(v_spotLightDirection[i] * 2.0);
+-#else
++\n#else\n
+ vec3 spotLightDirection = normalize(u_SpotLightSourceDirection[i] * 2.0);
+-#endif
++\n#endif\n
+
+ // "-lightDirection" is used because light direction points in opposite direction to spot direction.
+ float spotCurrentAngleCos = dot(spotLightDirection, -vertexToSpotLightDirection);
+@@ -143,13 +143,13 @@
+ attenuation = clamp(attenuation, 0.0, 1.0);
+ combinedColor.xyz += computeLighting(normal, vertexToSpotLightDirection, u_SpotLightSourceColor[i], attenuation);
+ }
+-#endif
++\n#endif\n
+
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color * combinedColor;
+-#else
++\n#else\n
+ gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color;
+-#endif
++\n#endif\n
+
+ }
+-)";
++);
diff --git a/ccShader_3D_ColorTex.frag.patch b/ccShader_3D_ColorTex.frag.patch
new file mode 100644
index 000000000000..5142b3f2b658
--- /dev/null
+++ b/ccShader_3D_ColorTex.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_ColorTex.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_ColorTex.frag 2017-01-04 15:03:03.303438172 -0400
+@@ -1,15 +1,15 @@
+
+-const char* cc3D_ColorTex_frag = R"(
++const char* cc3D_ColorTex_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 TextureCoordOut;
+-#else
++\n#else\n
+ varying vec2 TextureCoordOut;
+-#endif
++\n#endif\n
+ uniform vec4 u_color;
+
+ void main(void)
+ {
+ gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * u_color;
+ }
+-)";
++);
diff --git a/ccShader_3D_Particle.frag.patch b/ccShader_3D_Particle.frag.patch
new file mode 100644
index 000000000000..1ff9d19874f7
--- /dev/null
+++ b/ccShader_3D_Particle.frag.patch
@@ -0,0 +1,28 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Particle.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Particle.frag 2017-01-04 15:03:03.356765365 -0400
+@@ -1,20 +1,20 @@
+
+-const char* cc3D_Particle_tex_frag = R"(
++const char* cc3D_Particle_tex_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 TextureCoordOut;
+ varying mediump vec4 ColorOut;
+-#else
++\n#else\n
+ varying vec4 ColorOut;
+ varying vec2 TextureCoordOut;
+-#endif
++\n#endif\n
+ uniform vec4 u_color;
+
+ void main(void)
+ {
+ gl_FragColor = texture2D(CC_Texture0, TextureCoordOut) * ColorOut * u_color;
+ }
+-)";
++);
+
+ const char* cc3D_Particle_color_frag = R"(
+
diff --git a/ccShader_3D_Particle.vert.patch b/ccShader_3D_Particle.vert.patch
new file mode 100644
index 000000000000..d606bdfbfd17
--- /dev/null
+++ b/ccShader_3D_Particle.vert.patch
@@ -0,0 +1,17 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Particle.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Particle.vert 2017-01-04 15:03:03.413425508 -0400
+@@ -1,5 +1,5 @@
+
+-const char* cc3D_Particle_vert = R"(
++const char* cc3D_Particle_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec4 a_color;
+@@ -15,4 +15,4 @@
+ gl_Position = CC_PMatrix * a_position;
+ }
+
+-)";
+\ No newline at end of file
++);
+\ No newline at end of file
diff --git a/ccShader_3D_PositionNormalTex.vert.patch b/ccShader_3D_PositionNormalTex.vert.patch
new file mode 100644
index 000000000000..2b111b205acb
--- /dev/null
+++ b/ccShader_3D_PositionNormalTex.vert.patch
@@ -0,0 +1,161 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_PositionNormalTex.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_PositionNormalTex.vert 2017-01-04 15:03:03.470085652 -0400
+@@ -1,70 +1,70 @@
+
+-const char* cc3D_PositionNormalTex_vert = R"(
++const char* cc3D_PositionNormalTex_vert = STRINGIFY(
+
+-#ifdef USE_NORMAL_MAPPING
+-#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n#ifdef USE_NORMAL_MAPPING\n
++\n#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#endif
+-#if (MAX_POINT_LIGHT_NUM > 0)
++\n#endif\n
++\n#endif\n
++\n#if (MAX_POINT_LIGHT_NUM > 0)\n
+ uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if (MAX_SPOT_LIGHT_NUM > 0)
++\n#endif\n
++\n#if (MAX_SPOT_LIGHT_NUM > 0)\n
+ uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec3 a_normal;
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ attribute vec3 a_tangent;
+ attribute vec3 a_binormal;
+-#endif
++\n#endif\n
+ varying vec2 TextureCoordOut;
+
+-#ifdef USE_NORMAL_MAPPING
+-#if MAX_DIRECTIONAL_LIGHT_NUM
++\n#ifdef USE_NORMAL_MAPPING\n
++\n#if MAX_DIRECTIONAL_LIGHT_NUM\n
+ varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
+-#endif
+-#endif
+-#if MAX_POINT_LIGHT_NUM
++\n#endif\n
++\n#endif\n
++\n#if MAX_POINT_LIGHT_NUM\n
+ varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
+-#endif
+-#if MAX_SPOT_LIGHT_NUM
++\n#endif\n
++\n#if MAX_SPOT_LIGHT_NUM\n
+ varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#ifdef USE_NORMAL_MAPPING
++\n#ifdef USE_NORMAL_MAPPING\n
+ varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+-#ifndef USE_NORMAL_MAPPING
+-#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#ifndef USE_NORMAL_MAPPING\n
++\n#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ varying vec3 v_normal;
+-#endif
+-#endif
++\n#endif\n
++\n#endif\n
+
+ void main(void)
+ {
+ vec4 ePosition = CC_MVMatrix * a_position;
+-#ifdef USE_NORMAL_MAPPING
+- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n#ifdef USE_NORMAL_MAPPING\n
++\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ vec3 eTangent = normalize(CC_NormalMatrix * a_tangent);
+ vec3 eBinormal = normalize(CC_NormalMatrix * a_binormal);
+ vec3 eNormal = normalize(CC_NormalMatrix * a_normal);
+- #endif
+- #if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
++\n #endif\n
++\n #if (MAX_DIRECTIONAL_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i)
+ {
+ v_dirLightDirection[i].x = dot(eTangent, u_DirLightSourceDirection[i]);
+ v_dirLightDirection[i].y = dot(eBinormal, u_DirLightSourceDirection[i]);
+ v_dirLightDirection[i].z = dot(eNormal, u_DirLightSourceDirection[i]);
+ }
+- #endif
++\n #endif\n
+
+- #if (MAX_POINT_LIGHT_NUM > 0)
++\n #if (MAX_POINT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i)
+ {
+ vec3 pointLightDir = u_PointLightSourcePosition[i].xyz - ePosition.xyz;
+@@ -72,9 +72,9 @@
+ v_vertexToPointLightDirection[i].y = dot(eBinormal, pointLightDir);
+ v_vertexToPointLightDirection[i].z = dot(eNormal, pointLightDir);
+ }
+- #endif
++\n #endif\n
+
+- #if (MAX_SPOT_LIGHT_NUM > 0)
++\n #if (MAX_SPOT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i)
+ {
+ vec3 spotLightDir = u_SpotLightSourcePosition[i] - ePosition.xyz;
+@@ -86,32 +86,32 @@
+ v_spotLightDirection[i].y = dot(eBinormal, u_SpotLightSourceDirection[i]);
+ v_spotLightDirection[i].z = dot(eNormal, u_SpotLightSourceDirection[i]);
+ }
+- #endif
+-#else
+- #if (MAX_POINT_LIGHT_NUM > 0)
++\n #endif\n
++\n#else\n
++\n #if (MAX_POINT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i)
+ {
+ v_vertexToPointLightDirection[i] = u_PointLightSourcePosition[i].xyz - ePosition.xyz;
+ }
+- #endif
++\n #endif\n
+
+- #if (MAX_SPOT_LIGHT_NUM > 0)
++\n #if (MAX_SPOT_LIGHT_NUM > 0)\n
+ for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i)
+ {
+ v_vertexToSpotLightDirection[i] = u_SpotLightSourcePosition[i] - ePosition.xyz;
+ }
+- #endif
++\n #endif\n
+
+- #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
++\n #if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))\n
+ v_normal = CC_NormalMatrix * a_normal;
+- #endif
+-#endif
++\n #endif\n
++\n#endif\n
+
+ TextureCoordOut = a_texCoord;
+ TextureCoordOut.y = 1.0 - TextureCoordOut.y;
+ gl_Position = CC_PMatrix * ePosition;
+ }
+-)";
++);
+
+ const char* cc3D_SkinPositionNormalTex_vert = R"(
+
diff --git a/ccShader_3D_PositionTex.vert.patch b/ccShader_3D_PositionTex.vert.patch
new file mode 100644
index 000000000000..042a58faf4b7
--- /dev/null
+++ b/ccShader_3D_PositionTex.vert.patch
@@ -0,0 +1,18 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_PositionTex.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_PositionTex.vert 2017-01-04 15:03:03.530078745 -0400
+@@ -1,5 +1,5 @@
+
+-const char* cc3D_PositionTex_vert = R"(
++const char* cc3D_PositionTex_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+@@ -12,7 +12,7 @@
+ TextureCoordOut = a_texCoord;
+ TextureCoordOut.y = 1.0 - TextureCoordOut.y;
+ }
+-)";
++);
+
+ const char* cc3D_SkinPositionTex_vert = R"(
+ attribute vec3 a_position;
diff --git a/ccShader_3D_Skybox.frag.patch b/ccShader_3D_Skybox.frag.patch
new file mode 100644
index 000000000000..44116ce7aba5
--- /dev/null
+++ b/ccShader_3D_Skybox.frag.patch
@@ -0,0 +1,22 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Skybox.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Skybox.frag 2017-01-04 15:03:03.586738888 -0400
+@@ -1,9 +1,9 @@
+-const char* cc3D_Skybox_frag = R"(
+-#ifdef GL_ES
++const char* cc3D_Skybox_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ varying mediump vec3 v_reflect;
+-#else
++\n#else\n
+ varying vec3 v_reflect;
+-#endif
++\n#endif\n
+ uniform samplerCube u_Env;
+ uniform vec4 u_color;
+
+@@ -11,4 +11,4 @@
+ {
+ gl_FragColor = textureCube(u_Env, v_reflect) * u_color;
+ }
+-)";
++);
diff --git a/ccShader_3D_Skybox.vert.patch b/ccShader_3D_Skybox.vert.patch
new file mode 100644
index 000000000000..8a3d260dcda1
--- /dev/null
+++ b/ccShader_3D_Skybox.vert.patch
@@ -0,0 +1,16 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Skybox.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Skybox.vert 2017-01-04 15:03:03.633400183 -0400
+@@ -1,4 +1,4 @@
+-const char* cc3D_Skybox_vert = R"(
++const char* cc3D_Skybox_vert = STRINGIFY(
+
+ uniform mat4 u_cameraRot;
+ attribute vec3 a_position;
+@@ -10,4 +10,4 @@
+ v_reflect = reflect.xyz;
+ gl_Position = vec4(a_position.xy, 1.0 , 1.0);
+ }
+-)";
+\ No newline at end of file
++);
+\ No newline at end of file
diff --git a/ccShader_3D_Terrain.frag.patch b/ccShader_3D_Terrain.frag.patch
new file mode 100644
index 000000000000..1fed1a335cf7
--- /dev/null
+++ b/ccShader_3D_Terrain.frag.patch
@@ -0,0 +1,33 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Terrain.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Terrain.frag 2017-01-04 15:03:03.693393276 -0400
+@@ -1,18 +1,18 @@
+
+-const char* cc3D_Terrain_frag = R"(
+-#ifdef GL_ES
++const char* cc3D_Terrain_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision mediump float;
+-#endif
++\n#endif\n
+ uniform vec3 u_color;
+ varying vec2 v_texCoord;
+ varying vec3 v_normal;
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ uniform lowp int u_has_alpha;
+ uniform lowp int u_has_light_map;
+-#else
++\n#else\n
+ uniform int u_has_alpha;
+ uniform int u_has_light_map;
+-#endif
++\n#endif\n
+ uniform sampler2D u_alphaMap;
+ uniform sampler2D u_texture0;
+ uniform sampler2D u_texture1;
+@@ -45,4 +45,4 @@
+ gl_FragColor = vec4(color.rgb*lightColor.rgb*lightFactor, 1.0);
+ }
+ }
+-)";
++);
diff --git a/ccShader_3D_Terrain.vert.patch b/ccShader_3D_Terrain.vert.patch
new file mode 100644
index 000000000000..138ac0ae5285
--- /dev/null
+++ b/ccShader_3D_Terrain.vert.patch
@@ -0,0 +1,27 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_3D_Terrain.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_3D_Terrain.vert 2017-01-04 15:03:03.753386368 -0400
+@@ -1,19 +1,19 @@
+
+-const char* cc3D_Terrain_vert = R"(
++const char* cc3D_Terrain_vert = STRINGIFY(
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec3 a_normal;
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 v_texCoord;
+ varying mediump vec3 v_normal;
+-#else
++\n#else\n
+ varying vec2 v_texCoord;
+ varying vec3 v_normal;
+-#endif
++\n#endif\n
+ void main()
+ {
+ gl_Position = CC_MVPMatrix * a_position;
+ v_texCoord = a_texCoord;
+ v_normal = a_normal;
+ }
+-)";
++);
diff --git a/ccShader_CameraClear.frag.patch b/ccShader_CameraClear.frag.patch
new file mode 100644
index 000000000000..98eca0e85e3d
--- /dev/null
+++ b/ccShader_CameraClear.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_CameraClear.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_CameraClear.frag 2017-01-04 15:03:03.806713562 -0400
+@@ -1,15 +1,15 @@
+
+-const char* ccCameraClearFrag = R"(
++const char* ccCameraClearFrag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 v_texCoord;
+ varying mediump vec3 v_color;
+-#else
++\n#else\n
+ varying vec2 v_texCoord;
+ varying vec3 v_color;
+-#endif
++\n#endif\n
+ void main()
+ {
+ gl_FragColor = vec4(v_color, 1.0);
+ }
+-)";
++);
diff --git a/ccShader_CameraClear.vert.patch b/ccShader_CameraClear.vert.patch
new file mode 100644
index 000000000000..01ebec8aecc9
--- /dev/null
+++ b/ccShader_CameraClear.vert.patch
@@ -0,0 +1,31 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_CameraClear.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_CameraClear.vert 2017-01-04 15:03:03.856707806 -0400
+@@ -1,18 +1,18 @@
+
+-const char* ccCameraClearVert = R"(
++const char* ccCameraClearVert = STRINGIFY(
+
+ uniform float depth;
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec3 a_color;
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 v_texCoord;
+ varying mediump vec3 v_color;
+-#else
++\n#else\n
+ varying vec2 v_texCoord;
+ varying vec3 v_color;
+-#endif
++\n#endif\n
+ void main()
+ {
+ gl_Position = a_position;
+@@ -21,4 +21,4 @@
+ v_texCoord = a_texCoord;
+ v_color = a_color;
+ }
+-)";
++);
diff --git a/ccShader_ETC1AS_PositionTextureColor.frag.patch b/ccShader_ETC1AS_PositionTextureColor.frag.patch
new file mode 100644
index 000000000000..26985699a2e9
--- /dev/null
+++ b/ccShader_ETC1AS_PositionTextureColor.frag.patch
@@ -0,0 +1,22 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_ETC1AS_PositionTextureColor.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_ETC1AS_PositionTextureColor.frag 2017-01-04 15:03:03.913367949 -0400
+@@ -23,10 +23,10 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccETC1ASPositionTextureColor_frag = R"(
+-#ifdef GL_ES
++const char* ccETC1ASPositionTextureColor_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision mediump float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -38,4 +38,4 @@
+
+ gl_FragColor = v_fragmentColor * texColor;
+ }
+-)";
++);
diff --git a/ccShader_ETC1AS_PositionTextureGray.frag.patch b/ccShader_ETC1AS_PositionTextureGray.frag.patch
new file mode 100644
index 000000000000..15769fa04468
--- /dev/null
+++ b/ccShader_ETC1AS_PositionTextureGray.frag.patch
@@ -0,0 +1,22 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_ETC1AS_PositionTextureGray.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_ETC1AS_PositionTextureGray.frag 2017-01-04 15:03:03.963362193 -0400
+@@ -23,10 +23,10 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccETC1ASPositionTextureGray_frag = R"(
+-#ifdef GL_ES
++const char* ccETC1ASPositionTextureGray_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision mediump float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -42,4 +42,4 @@
+ gl_FragColor.rgb = vec3(0.2126*texColor.r + 0.7152*texColor.g + 0.0722*texColor.b);
+ gl_FragColor.a = texColor.a;
+ }
+-)";
++);
diff --git a/ccShader_Label.vert.patch b/ccShader_Label.vert.patch
new file mode 100644
index 000000000000..abce62403bce
--- /dev/null
+++ b/ccShader_Label.vert.patch
@@ -0,0 +1,32 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Label.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Label.vert 2017-01-04 15:03:04.016689390 -0400
+@@ -23,19 +23,19 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccLabel_vert = R"(
++const char* ccLabel_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec4 a_color;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -43,4 +43,4 @@
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+ }
+-)";
++);
diff --git a/ccShader_Label_df.frag.patch b/ccShader_Label_df.frag.patch
new file mode 100644
index 000000000000..295ce593d6cb
--- /dev/null
+++ b/ccShader_Label_df.frag.patch
@@ -0,0 +1,20 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Label_df.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Label_df.frag 2017-01-04 15:03:04.066683647 -0400
+@@ -1,8 +1,8 @@
+-const char* ccLabelDistanceFieldNormal_frag = R"(
++const char* ccLabelDistanceFieldNormal_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -23,4 +23,4 @@
+ float alpha = smoothstep(0.5-width, 0.5+width, dist) * u_textColor.a;
+ gl_FragColor = v_fragmentColor * vec4(u_textColor.rgb,alpha);
+ }
+-)";
++);
diff --git a/ccShader_Label_df_glow.frag.patch b/ccShader_Label_df_glow.frag.patch
new file mode 100644
index 000000000000..dfc6919364d9
--- /dev/null
+++ b/ccShader_Label_df_glow.frag.patch
@@ -0,0 +1,20 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Label_df_glow.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Label_df_glow.frag 2017-01-04 15:03:04.120010854 -0400
+@@ -1,8 +1,8 @@
+-const char* ccLabelDistanceFieldGlow_frag = R"(
++const char* ccLabelDistanceFieldGlow_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -23,4 +23,4 @@
+ vec4 color = u_effectColor*(1.0-alpha) + u_textColor*alpha;
+ gl_FragColor = v_fragmentColor * vec4(color.rgb, max(alpha,mu)*color.a);
+ }
+-)";
++);
diff --git a/ccShader_Label_normal.frag.patch b/ccShader_Label_normal.frag.patch
new file mode 100644
index 000000000000..b4a3a8395e74
--- /dev/null
+++ b/ccShader_Label_normal.frag.patch
@@ -0,0 +1,22 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Label_normal.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Label_normal.frag 2017-01-04 15:03:04.176671012 -0400
+@@ -23,10 +23,10 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccLabelNormal_frag = R"(
+-#ifdef GL_ES
++const char* ccLabelNormal_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -39,4 +39,4 @@
+ u_textColor.a * texture2D(CC_Texture0, v_texCoord).a// A from texture & uniform
+ );
+ }
+-)";
++);
diff --git a/ccShader_Label_outline.frag.patch b/ccShader_Label_outline.frag.patch
new file mode 100644
index 000000000000..e846987d2713
--- /dev/null
+++ b/ccShader_Label_outline.frag.patch
@@ -0,0 +1,37 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Label_outline.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Label_outline.frag 2017-01-04 15:03:04.226665269 -0400
+@@ -1,10 +1,10 @@
+ /*
+ * LICENSE ???
+ */
+-const char* ccLabelOutline_frag = R"(
+-#ifdef GL_ES
++const char* ccLabelOutline_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -12,11 +12,11 @@
+ uniform vec4 u_effectColor;
+ uniform vec4 u_textColor;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ uniform lowp int u_effectType; // 0: None (Draw text), 1: Outline, 2: Shadow
+-#else
++\n#else\n
+ uniform int u_effectType;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -45,4 +45,4 @@
+ gl_FragColor = v_fragmentColor * vec4(u_effectColor.rgb, u_effectColor.a * outlineAlpha);
+ }
+ }
+-)";
++);
diff --git a/ccShader_PositionColor.frag.patch b/ccShader_PositionColor.frag.patch
new file mode 100644
index 000000000000..5af1bbcbb71f
--- /dev/null
+++ b/ccShader_PositionColor.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionColor.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionColor.frag 2017-01-04 15:03:04.283325426 -0400
+@@ -23,11 +23,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionColor_frag = R"(
++const char* ccPositionColor_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+
+@@ -35,4 +35,4 @@
+ {
+ gl_FragColor = v_fragmentColor;
+ }
+-)";
++);
diff --git a/ccShader_PositionColor.vert.patch b/ccShader_PositionColor.vert.patch
new file mode 100644
index 000000000000..ff68c20c7b0b
--- /dev/null
+++ b/ccShader_PositionColor.vert.patch
@@ -0,0 +1,28 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionColor.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionColor.vert 2017-01-04 15:03:04.323320831 -0400
+@@ -23,20 +23,20 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionColor_vert = R"(
++const char* ccPositionColor_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec4 a_color;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+ gl_Position = CC_MVPMatrix * a_position;
+ v_fragmentColor = a_color;
+ }
+-)";
++);
diff --git a/ccShader_PositionColorLengthTexture.frag.patch b/ccShader_PositionColorLengthTexture.frag.patch
new file mode 100644
index 000000000000..0e81e418f36e
--- /dev/null
+++ b/ccShader_PositionColorLengthTexture.frag.patch
@@ -0,0 +1,30 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionColorLengthTexture.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionColorLengthTexture.frag 2017-01-04 15:03:04.383313940 -0400
+@@ -19,17 +19,17 @@
+ * SOFTWARE.
+ */
+
+-const char* ccPositionColorLengthTexture_frag = R"(
++const char* ccPositionColorLengthTexture_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ // #extension GL_OES_standard_derivatives : enable
+
+ varying mediump vec4 v_color;
+ varying mediump vec2 v_texcoord;
+-#else
++\n#else\n
+ varying vec4 v_color;
+ varying vec2 v_texcoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -39,4 +39,4 @@
+ gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord));
+ // #endif
+ }
+-)";
++);
diff --git a/ccShader_PositionColorLengthTexture.vert.patch b/ccShader_PositionColorLengthTexture.vert.patch
new file mode 100644
index 000000000000..af4244e5bf2f
--- /dev/null
+++ b/ccShader_PositionColorLengthTexture.vert.patch
@@ -0,0 +1,38 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionColorLengthTexture.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionColorLengthTexture.vert 2017-01-04 15:03:04.443307047 -0400
+@@ -19,9 +19,9 @@
+ * SOFTWARE.
+ */
+
+-const char* ccPositionColorLengthTexture_vert = R"(
++const char* ccPositionColorLengthTexture_vert = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ attribute mediump vec4 a_position;
+ attribute mediump vec2 a_texcoord;
+ attribute mediump vec4 a_color;
+@@ -29,7 +29,7 @@
+ varying mediump vec4 v_color;
+ varying mediump vec2 v_texcoord;
+
+-#else
++\n#else\n
+
+ attribute vec4 a_position;
+ attribute vec2 a_texcoord;
+@@ -38,7 +38,7 @@
+ varying vec4 v_color;
+ varying vec2 v_texcoord;
+
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -47,4 +47,4 @@
+
+ gl_Position = CC_MVPMatrix * a_position;
+ }
+-)";
++);
diff --git a/ccShader_PositionColorTextureAsPointsize.vert.patch b/ccShader_PositionColorTextureAsPointsize.vert.patch
new file mode 100644
index 000000000000..f2a71f1b9097
--- /dev/null
+++ b/ccShader_PositionColorTextureAsPointsize.vert.patch
@@ -0,0 +1,31 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionColorTextureAsPointsize.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionColorTextureAsPointsize.vert 2017-01-04 15:03:04.499967205 -0400
+@@ -22,18 +22,18 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionColorTextureAsPointsize_vert = R"(
++const char* ccPositionColorTextureAsPointsize_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec4 a_color;
+
+ attribute vec2 a_texCoord;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -41,4 +41,4 @@
+ gl_PointSize = a_texCoord.x;
+ v_fragmentColor = a_color;
+ }
+-)";
++);
diff --git a/ccShader_PositionTexture.frag.patch b/ccShader_PositionTexture.frag.patch
new file mode 100644
index 000000000000..f4571358462a
--- /dev/null
+++ b/ccShader_PositionTexture.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTexture.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTexture.frag 2017-01-04 15:03:04.556627363 -0400
+@@ -23,11 +23,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTexture_frag = R"(
++const char* ccPositionTexture_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec2 v_texCoord;
+
+@@ -35,4 +35,4 @@
+ {
+ gl_FragColor = texture2D(CC_Texture0, v_texCoord);
+ }
+-)";
++);
diff --git a/ccShader_PositionTexture.vert.patch b/ccShader_PositionTexture.vert.patch
new file mode 100644
index 000000000000..c8da94fdc743
--- /dev/null
+++ b/ccShader_PositionTexture.vert.patch
@@ -0,0 +1,30 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTexture.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTexture.vert 2017-01-04 15:03:04.613287520 -0400
+@@ -23,20 +23,20 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTexture_vert = R"(
++const char* ccPositionTexture_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+ gl_Position = CC_MVPMatrix * a_position;
+ v_texCoord = a_texCoord;
+ }
+-)";
+\ No newline at end of file
++);
+\ No newline at end of file
diff --git a/ccShader_PositionTextureA8Color.frag.patch b/ccShader_PositionTextureA8Color.frag.patch
new file mode 100644
index 000000000000..fb816bcdbbf3
--- /dev/null
+++ b/ccShader_PositionTextureA8Color.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureA8Color.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureA8Color.frag 2017-01-04 15:03:04.669947678 -0400
+@@ -23,11 +23,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureA8Color_frag = R"(
++const char* ccPositionTextureA8Color_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -38,4 +38,4 @@
+ v_fragmentColor.a * texture2D(CC_Texture0, v_texCoord).a // A from texture & uniform
+ );
+ }
+-)";
++);
diff --git a/ccShader_PositionTextureA8Color.vert.patch b/ccShader_PositionTextureA8Color.vert.patch
new file mode 100644
index 000000000000..9ed1666828b6
--- /dev/null
+++ b/ccShader_PositionTextureA8Color.vert.patch
@@ -0,0 +1,32 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureA8Color.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureA8Color.vert 2017-01-04 15:03:04.726607836 -0400
+@@ -23,19 +23,19 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureA8Color_vert = R"(
++const char* ccPositionTextureA8Color_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec4 a_color;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -43,4 +43,4 @@
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+ }
+-)";
++);
diff --git a/ccShader_PositionTextureColor.frag.patch b/ccShader_PositionTextureColor.frag.patch
new file mode 100644
index 000000000000..bcb1250e2a47
--- /dev/null
+++ b/ccShader_PositionTextureColor.frag.patch
@@ -0,0 +1,22 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureColor.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureColor.frag 2017-01-04 15:03:04.783267993 -0400
+@@ -23,10 +23,10 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureColor_frag = R"(
+-#ifdef GL_ES
++const char* ccPositionTextureColor_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -35,4 +35,4 @@
+ {
+ gl_FragColor = v_fragmentColor * texture2D(CC_Texture0, v_texCoord);
+ }
+-)";
++);
diff --git a/ccShader_PositionTextureColor.vert.patch b/ccShader_PositionTextureColor.vert.patch
new file mode 100644
index 000000000000..5160cb453a09
--- /dev/null
+++ b/ccShader_PositionTextureColor.vert.patch
@@ -0,0 +1,32 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureColor.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureColor.vert 2017-01-04 15:03:04.819930449 -0400
+@@ -23,18 +23,18 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureColor_vert = R"(
++const char* ccPositionTextureColor_vert = STRINGIFY(
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec4 a_color;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -42,5 +42,5 @@
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+ }
+-)";
++);
+
diff --git a/ccShader_PositionTextureColorAlphaTest.frag.patch b/ccShader_PositionTextureColorAlphaTest.frag.patch
new file mode 100644
index 000000000000..d79fa537fdb5
--- /dev/null
+++ b/ccShader_PositionTextureColorAlphaTest.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureColorAlphaTest.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureColorAlphaTest.frag 2017-01-04 15:03:04.876590606 -0400
+@@ -22,11 +22,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureColorAlphaTest_frag = R"(
++const char* ccPositionTextureColorAlphaTest_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -44,4 +44,4 @@
+
+ gl_FragColor = texColor * v_fragmentColor;
+ }
+-)";
++);
diff --git a/ccShader_PositionTextureColor_noMVP.frag.patch b/ccShader_PositionTextureColor_noMVP.frag.patch
new file mode 100644
index 000000000000..0f653a96e8db
--- /dev/null
+++ b/ccShader_PositionTextureColor_noMVP.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureColor_noMVP.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureColor_noMVP.frag 2017-01-04 15:03:04.929917813 -0400
+@@ -23,10 +23,10 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureColor_noMVP_frag = R"(
+-#ifdef GL_ES
++const char* ccPositionTextureColor_noMVP_frag = STRINGIFY(
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -35,5 +35,5 @@
+ {
+ gl_FragColor = v_fragmentColor * texture2D(CC_Texture0, v_texCoord);
+ }
+-)";
++);
+
diff --git a/ccShader_PositionTextureColor_noMVP.vert.patch b/ccShader_PositionTextureColor_noMVP.vert.patch
new file mode 100644
index 000000000000..b03e394cddb3
--- /dev/null
+++ b/ccShader_PositionTextureColor_noMVP.vert.patch
@@ -0,0 +1,31 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTextureColor_noMVP.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTextureColor_noMVP.vert 2017-01-04 15:03:04.983245021 -0400
+@@ -23,18 +23,18 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTextureColor_noMVP_vert = R"(
++const char* ccPositionTextureColor_noMVP_vert = STRINGIFY(
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ attribute vec4 a_color;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -42,4 +42,4 @@
+ v_fragmentColor = a_color;
+ v_texCoord = a_texCoord;
+ }
+-)";
++);
diff --git a/ccShader_PositionTexture_uColor.frag.patch b/ccShader_PositionTexture_uColor.frag.patch
new file mode 100644
index 000000000000..3fda4a939c2c
--- /dev/null
+++ b/ccShader_PositionTexture_uColor.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTexture_uColor.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTexture_uColor.frag 2017-01-04 15:03:05.026573382 -0400
+@@ -23,11 +23,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTexture_uColor_frag = R"(
++const char* ccPositionTexture_uColor_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ uniform vec4 u_color;
+
+@@ -37,4 +37,4 @@
+ {
+ gl_FragColor = texture2D(CC_Texture0, v_texCoord) * u_color;
+ }
+-)";
++);
diff --git a/ccShader_PositionTexture_uColor.vert.patch b/ccShader_PositionTexture_uColor.vert.patch
new file mode 100644
index 000000000000..97f56e38f6e5
--- /dev/null
+++ b/ccShader_PositionTexture_uColor.vert.patch
@@ -0,0 +1,28 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_PositionTexture_uColor.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_PositionTexture_uColor.vert 2017-01-04 15:03:05.083233554 -0400
+@@ -23,20 +23,20 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPositionTexture_uColor_vert = R"(
++const char* ccPositionTexture_uColor_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying mediump vec2 v_texCoord;
+-#else
++\n#else\n
+ varying vec2 v_texCoord;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+ gl_Position = CC_MVPMatrix * a_position;
+ v_texCoord = a_texCoord;
+ }
+-)";
++);
diff --git a/ccShader_Position_uColor.frag.patch b/ccShader_Position_uColor.frag.patch
new file mode 100644
index 000000000000..8f44d84e3475
--- /dev/null
+++ b/ccShader_Position_uColor.frag.patch
@@ -0,0 +1,23 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Position_uColor.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Position_uColor.frag 2017-01-04 15:03:05.129894872 -0400
+@@ -23,11 +23,11 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPosition_uColor_frag = R"(
++const char* ccPosition_uColor_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision lowp float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+
+@@ -35,4 +35,4 @@
+ {
+ gl_FragColor = v_fragmentColor;
+ }
+-)";
++);
diff --git a/ccShader_Position_uColor.vert.patch b/ccShader_Position_uColor.vert.patch
new file mode 100644
index 000000000000..d421d0fe31f5
--- /dev/null
+++ b/ccShader_Position_uColor.vert.patch
@@ -0,0 +1,30 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_Position_uColor.vert 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_Position_uColor.vert 2017-01-04 15:03:05.183222092 -0400
+@@ -23,17 +23,17 @@
+ * THE SOFTWARE.
+ */
+
+-const char* ccPosition_uColor_vert = R"(
++const char* ccPosition_uColor_vert = STRINGIFY(
+
+ attribute vec4 a_position;
+ uniform vec4 u_color;
+ uniform float u_pointSize;
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ varying lowp vec4 v_fragmentColor;
+-#else
++\n#else\n
+ varying vec4 v_fragmentColor;
+-#endif
++\n#endif\n
+
+ void main()
+ {
+@@ -41,4 +41,4 @@
+ gl_PointSize = u_pointSize;
+ v_fragmentColor = u_color;
+ }
+-)";
++);
diff --git a/ccShader_UI_Gray.frag.patch b/ccShader_UI_Gray.frag.patch
new file mode 100644
index 000000000000..aa75bea7aff4
--- /dev/null
+++ b/ccShader_UI_Gray.frag.patch
@@ -0,0 +1,20 @@
+--- /opt/cocos2d-x/cocos/renderer/ccShader_UI_Gray.frag 2016-12-29 13:42:38.000000000 -0400
++++ /tmp/ccShader_UI_Gray.frag 2017-01-04 15:03:05.239882265 -0400
+@@ -1,8 +1,8 @@
+-const char* ccPositionTexture_GrayScale_frag = R"(
++const char* ccPositionTexture_GrayScale_frag = STRINGIFY(
+
+-#ifdef GL_ES
++\n#ifdef GL_ES\n
+ precision mediump float;
+-#endif
++\n#endif\n
+
+ varying vec4 v_fragmentColor;
+ varying vec2 v_texCoord;
+@@ -14,4 +14,4 @@
+ gl_FragColor.xyz = vec3(0.2126*c.r + 0.7152*c.g + 0.0722*c.b);
+ gl_FragColor.w = c.w;
+ }
+-)";
++);