From 154e3cf863b0541db592f53b995108c59615fcca Mon Sep 17 00:00:00 2001 From: pandamicro Date: Fri, 30 Jun 2017 18:00:16 +0800 Subject: [PATCH] Support windows Spidermonkey v52 --- native/external/config.json | 2 +- native/templates/cocos2dx_files.json | 10 ++++++++-- .../runtime-src/proj.win32/HelloJavascript.vcxproj | 4 ++-- .../runtime-src/proj.win32/HelloJavascript.vcxproj | 4 ++-- .../runtime-src/proj.win32/HelloJavascript.vcxproj | 4 ++-- native/tools/bindings-generator | 2 +- native/tools/cocos2d-console | 2 +- .../frameworks/runtime-src/Classes/AppDelegate.cpp | 14 -------------- .../runtime-src/proj.win32/simulator.vcxproj | 7 ++----- .../proj.win32/simulator.vcxproj.filters | 9 --------- .../simulator/libsimulator/lib/cocos2dx_extra.h | 1 - 11 files changed, 19 insertions(+), 40 deletions(-) diff --git a/native/external/config.json b/native/external/config.json index 45866e7290..3f7e275fc2 100644 --- a/native/external/config.json +++ b/native/external/config.json @@ -1,5 +1,5 @@ { - "version": "v3-deps-29", + "version": "v3-deps-30", "zip_file_size": "74337963", "repo_name": "cocos2d-x-lite-external", "repo_parent": "https://github.com/cocos-creator/" diff --git a/native/templates/cocos2dx_files.json b/native/templates/cocos2dx_files.json index dce8a3e3ec..a4a122350d 100644 --- a/native/templates/cocos2dx_files.json +++ b/native/templates/cocos2dx_files.json @@ -4076,6 +4076,10 @@ "external/win32/libs/Debug/", "external/win32/libs/Debug/libchipmunk-2015.lib", "external/win32/libs/Debug/libchipmunk.lib", + "external/win32/libs/Debug/mozjs-52.lib", + "external/win32/libs/Debug/mozjs-52.dll", + "external/win32/libs/Debug/mozglue.lib", + "external/win32/libs/Debug/nspr4.dll", "external/win32/libs/OpenAL32.dll", "external/win32/libs/OpenAL32.lib", "external/win32/libs/freetype.lib", @@ -4112,8 +4116,10 @@ "external/win32/libs/libvorbisfile.lib", "external/win32/libs/libwebp.lib", "external/win32/libs/libzlib.lib", - "external/win32/libs/mozjs-33.dll", - "external/win32/libs/mozjs-33.lib", + "external/win32/libs/mozjs-52.lib", + "external/win32/libs/mozjs-52.dll", + "external/win32/libs/mozglue.lib", + "external/win32/libs/nspr4.dll", "external/win32/libs/sqlite3.dll", "external/win32/libs/sqlite3.lib", "external/win32/libs/ssleay32.lib", diff --git a/native/templates/js-template-binary/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj b/native/templates/js-template-binary/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj index c8c2484c2f..954d045802 100755 --- a/native/templates/js-template-binary/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj +++ b/native/templates/js-template-binary/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj @@ -116,7 +116,7 @@ xcopy /Y /Q "$(COCOS_X_ROOT)\prebuilt\win32\*.*" "$(OutDir)" - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) libcmt.lib true @@ -187,7 +187,7 @@ xcopy /Y /Q "$(COCOS_X_ROOT)\prebuilt\win32\*.*" "$(OutDir)" - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) libcmt.lib Windows diff --git a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj index 941d9717a3..d8d52a2654 100755 --- a/native/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj +++ b/native/templates/js-template-default/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj @@ -107,7 +107,7 @@ - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) true Windows @@ -170,7 +170,7 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) Windows MachineX86 diff --git a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj index 7fddccacdf..13be246613 100755 --- a/native/templates/js-template-link/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj +++ b/native/templates/js-template-link/frameworks/runtime-src/proj.win32/HelloJavascript.vcxproj @@ -107,7 +107,7 @@ - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) true Windows @@ -170,7 +170,7 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y - mozjs-33.lib;%(AdditionalDependencies) + mozjs-52.lib;mozglue.lib;%(AdditionalDependencies) $(OutDir);%(AdditionalLibraryDirectories) Windows MachineX86 diff --git a/native/tools/bindings-generator b/native/tools/bindings-generator index adaac57c0e..d352fc936d 160000 --- a/native/tools/bindings-generator +++ b/native/tools/bindings-generator @@ -1 +1 @@ -Subproject commit adaac57c0ea92c48348a34d9bfc679c96aebd528 +Subproject commit d352fc936d9793fbf2140a58d2572ce916a5a3c4 diff --git a/native/tools/cocos2d-console b/native/tools/cocos2d-console index 07ce97bd1c..006d77fdc2 160000 --- a/native/tools/cocos2d-console +++ b/native/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit 07ce97bd1cbf47dcd14e70959278237097945f27 +Subproject commit 006d77fdc263cb3df0eb6bf4604503ae9dc78fac diff --git a/native/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp b/native/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp index 0d2ab4a774..e965bd1fe2 100755 --- a/native/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/native/tools/simulator/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -18,10 +18,6 @@ #include "base/CCDirector.h" #include "base/CCEventDispatcher.h" -#include "ide-support/CodeIDESupport.h" -#include "runtime/Runtime.h" -#include "ide-support/RuntimeJsImpl.h" - USING_NS_CC; using namespace std; @@ -31,8 +27,6 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - // NOTE:Please don't remove this call if you want to debug with Cocos Code IDE - RuntimeEngine::getInstance()->end(); } //if you want a different context,just modify the value of glContextAttrs @@ -50,14 +44,6 @@ bool AppDelegate::applicationDidFinishLaunching() { // set default FPS Director::getInstance()->setAnimationInterval(1.0 / 60.0f); - - auto runtimeEngine = RuntimeEngine::getInstance(); - runtimeEngine->setEventTrackingEnable(true); - auto jsRuntime = RuntimeJsImpl::create(); - runtimeEngine->addRuntime(jsRuntime, kRuntimeEngineJs); - runtimeEngine->start(); - - // Runtime end cocos2d::log("iShow!"); return true; } diff --git a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj index 59245246f8..7e2a591c2b 100755 --- a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj +++ b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj @@ -92,7 +92,7 @@ MachineX86 true $(OutDir);$(EngineRoot)external\win32\libs;%(AdditionalLibraryDirectories) - libcurl.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) + libcurl.lib;websockets.lib;mozjs-52.lib;mozglue.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) $(ProjectDir)../../../runtime/win32/$(TargetName).pdb $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) libcmt.lib;%(IgnoreSpecificDefaultLibraries) @@ -158,7 +158,7 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" Windows MachineX86 $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) - libcurl.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) + libcurl.lib;websockets.lib;mozjs-52.lib;mozglue.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) false $(OutDir)$(ProjectName).exe libcmt.lib;%(IgnoreSpecificDefaultLibraries) @@ -209,8 +209,6 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" - - @@ -219,7 +217,6 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" - diff --git a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters index 4df1c7e9e4..2c3388ad1c 100755 --- a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters +++ b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj.filters @@ -29,12 +29,6 @@ win32 - - Classes\ide-support - - - Classes\ide-support - @@ -47,9 +41,6 @@ win32 - - Classes\ide-support - diff --git a/native/tools/simulator/libsimulator/lib/cocos2dx_extra.h b/native/tools/simulator/libsimulator/lib/cocos2dx_extra.h index cf7f3c8354..9df688f532 100755 --- a/native/tools/simulator/libsimulator/lib/cocos2dx_extra.h +++ b/native/tools/simulator/libsimulator/lib/cocos2dx_extra.h @@ -6,7 +6,6 @@ #include using namespace std; -using namespace cocos2d; #define NS_CC_EXTRA_BEGIN namespace cocos2d { namespace extra { #define NS_CC_EXTRA_END }}