diff --git a/cocos2d-win32.vc2010.sln b/cocos2d-win32.vc2010.sln index e36260d3d2..6f159b22bd 100644 --- a/cocos2d-win32.vc2010.sln +++ b/cocos2d-win32.vc2010.sln @@ -39,6 +39,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "samples\Moo EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatermelonWithMe", "samples\WatermelonWithMe\proj.win32\WatermelonWithMe.vcxproj", "{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDragonJS", "samples\CocosDragonJS\proj.win32\CocosDragonJS.vcxproj", "{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}" +EndProject Global GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} @@ -100,6 +102,10 @@ Global {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.Build.0 = Debug|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.ActiveCfg = Release|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.Build.0 = Release|Win32 + {68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.Build.0 = Debug|Win32 + {68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.ActiveCfg = Release|Win32 + {68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extensions/CCBReader/CCBSelectorResolver.h b/extensions/CCBReader/CCBSelectorResolver.h index b71cff9426..197ca32ad5 100644 --- a/extensions/CCBReader/CCBSelectorResolver.h +++ b/extensions/CCBReader/CCBSelectorResolver.h @@ -21,7 +21,7 @@ class CCBSelectorResolver { virtual ~CCBSelectorResolver() {}; virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName) = 0; - virtual extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) = 0; + virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) = 0; }; diff --git a/samples/CocosDragonJS/proj.android/.project b/samples/CocosDragonJS/proj.android/.project index 578fe9eef9..3ee65ad661 100644 --- a/samples/CocosDragonJS/proj.android/.project +++ b/samples/CocosDragonJS/proj.android/.project @@ -1,6 +1,6 @@ - TestJavascript + CocosDragonJS diff --git a/samples/CocosDragonJS/proj.android/build_native.sh b/samples/CocosDragonJS/proj.android/build_native.sh index 004c62e127..62abc12bd8 100755 --- a/samples/CocosDragonJS/proj.android/build_native.sh +++ b/samples/CocosDragonJS/proj.android/build_native.sh @@ -1,4 +1,4 @@ -NDK_ROOT="/opt/android/android-ndk" +#NDK_ROOT="/opt/android/android-ndk" APPNAME="CocosDragonJS" # options @@ -68,8 +68,8 @@ fi mkdir "$APP_ANDROID_ROOT"/assets -# copy "cocos2d-js-tests/res" into "assets/res" -cp -rf "$APP_ROOT"/CocosDragonJS/ "$APP_ANDROID_ROOT"/assets +# copy "Resources" into "assets" +cp -rf "$APP_ROOT"/Resources/* "$APP_ANDROID_ROOT"/assets # copy bindings/*.js into assets' root cp -f "$APP_ROOT"/bindings/*.js "$APP_ANDROID_ROOT"/assets diff --git a/samples/CocosDragonJS/proj.android/jni/Android.mk b/samples/CocosDragonJS/proj.android/jni/Android.mk index 05af70ea6e..1575e28b83 100644 --- a/samples/CocosDragonJS/proj.android/jni/Android.mk +++ b/samples/CocosDragonJS/proj.android/jni/Android.mk @@ -2,11 +2,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := test_javascript_shared +LOCAL_MODULE := cocosdragonjs_shared -LOCAL_MODULE_FILENAME := libtestjavascript +LOCAL_MODULE_FILENAME := libcocosdragonjs -LOCAL_SRC_FILES := testjavascript/main.cpp \ +LOCAL_SRC_FILES := cocosdragonjs/main.cpp \ ../../Classes/AppDelegate.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes diff --git a/samples/CocosDragonJS/proj.android/jni/testjavascript/main.cpp b/samples/CocosDragonJS/proj.android/jni/cocosdragonjs/main.cpp similarity index 100% rename from samples/CocosDragonJS/proj.android/jni/testjavascript/main.cpp rename to samples/CocosDragonJS/proj.android/jni/cocosdragonjs/main.cpp diff --git a/samples/CocosDragonJS/proj.android/src/org/cocos2dx/cocosdragonjs/CocosDragonJS.java b/samples/CocosDragonJS/proj.android/src/org/cocos2dx/cocosdragonjs/CocosDragonJS.java index f8070414a4..05b7271009 100644 --- a/samples/CocosDragonJS/proj.android/src/org/cocos2dx/cocosdragonjs/CocosDragonJS.java +++ b/samples/CocosDragonJS/proj.android/src/org/cocos2dx/cocosdragonjs/CocosDragonJS.java @@ -34,6 +34,6 @@ public class CocosDragonJS extends Cocos2dxActivity{ } static { - System.loadLibrary("testjavascript"); + System.loadLibrary("cocosdragonjs"); } } diff --git a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj similarity index 89% rename from samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj rename to samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj index 01da0653af..fdfb0ce5e8 100644 --- a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj +++ b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj @@ -1,215 +1,209 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {D0F06A44-A245-4D13-A498-0120C203B539} - TestJavascript - - - - Application - Unicode - - - Application - Unicode - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)testjs.tlb - testjs.h - - - testjs_i.c - testjs_p.c - - - Disabled - $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4267;4251;4244;%(DisableSpecificWarnings) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - - + + + + + Debug + Win32 + + + Release + Win32 + + + + {68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7} + CocosDragonJS + + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + false + Win32 + true + $(IntDir)testjs.tlb + testjs.h + + + testjs_i.c + testjs_p.c + + + Disabled + $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;_DEBUG;DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + 4267;4251;4244;%(DisableSpecificWarnings) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + $(IntDir);%(AdditionalIncludeDirectories) + + if not exist "$(OutDir)" mkdir "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)" - - - - libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir);%(AdditionalLibraryDirectories) - true - Windows - MachineX86 - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\TestJavascriptRes" rd /s /q "$(OutDir)\TestJavascriptRes" -mkdir "$(OutDir)\TestJavascriptRes" -xcopy "$(ProjectDir)..\cocos2d-js-tests\res" "$(OutDir)\TestJavascriptRes\res\" /e /Y -xcopy "$(ProjectDir)..\bindings\*.js" "$(OutDir)\TestJavascriptRes" /e /Y -xcopy "$(ProjectDir)..\cocos2d-js-tests\src" "$(OutDir)\TestJavascriptRes\src\" /e /Y - - - - Copy js and resource files. - - - - - NDEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)testjs.tlb - testjs.h - - - testjs_i.c - testjs_p.c - - - $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDLL - - - Level3 - - - 4267;4251;4244;%(DisableSpecificWarnings) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - $(IntDir);%(AdditionalIncludeDirectories) - - + + + + libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +if exist "$(OutDir)\CocosDragonJSRes" rd /s /q "$(OutDir)\CocosDragonJSRes" +mkdir "$(OutDir)\CocosDragonJSRes" +xcopy "$(ProjectDir)..\bindings\*.js" "$(OutDir)\CocosDragonJSRes" /e /Y +xcopy "$(ProjectDir)..\Resources" "$(OutDir)\CocosDragonJSRes\" /e /Y + + + Copy js and resource files. + + + + + NDEBUG;%(PreprocessorDefinitions) + false + Win32 + true + $(IntDir)testjs.tlb + testjs.h + + + testjs_i.c + testjs_p.c + + + $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_JAVASCRIPT=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDLL + + + Level3 + + + 4267;4251;4244;%(DisableSpecificWarnings) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + $(IntDir);%(AdditionalIncludeDirectories) + + if not exist "$(OutDir)" mkdir "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\lib\*.*" "$(OutDir)" - - - - libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir);%(AdditionalLibraryDirectories) - Windows - MachineX86 - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\TestJavascriptRes" rd /s /q "$(OutDir)\TestJavascriptRes" -mkdir "$(OutDir)\TestJavascriptRes" -xcopy "$(ProjectDir)..\cocos2d-js-tests\res" "$(OutDir)\TestJavascriptRes\res\" /e /Y -xcopy "$(ProjectDir)..\bindings\*.js" "$(OutDir)\TestJavascriptRes" /e /Y -xcopy "$(ProjectDir)..\cocos2d-js-tests\src" "$(OutDir)\TestJavascriptRes\src\" /e /Y - - Copy js and resource files. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - false - - - {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - false - - - - - + + + + libcocos2d.lib;libExtensions.lib;opengl32.lib;glew32.lib;libCocosDenshion.lib;libchipmunk.lib;mozjs.lib;ws2_32.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) + Windows + MachineX86 + + + if not exist "$(OutDir)" mkdir "$(OutDir)" +if exist "$(OutDir)\CocosDragonJSRes" rd /s /q "$(OutDir)\CocosDragonJSRes" +mkdir "$(OutDir)\CocosDragonJSRes" +xcopy "$(ProjectDir)..\bindings\*.js" "$(OutDir)\CocosDragonJSRes" /e /Y +xcopy "$(ProjectDir)..\Resources" "$(OutDir)\CocosDragonJSRes\" /e /Y + Copy js and resource files. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} + false + + + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} + false + + + + + \ No newline at end of file diff --git a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.filters b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.filters similarity index 94% rename from samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.filters rename to samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.filters index 6fefb1e0e8..e2dddfc6f6 100644 --- a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.filters +++ b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.filters @@ -1,131 +1,125 @@ - - - - - {58ebb5df-595d-4e27-8c01-555be6f1c625} - - - {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest - - - {ccb2323b-1cfa-41ea-bcf4-ba5f07309396} - - - {e93a77e1-af1e-4400-87d3-504b62ebdbb0} - - - {146f26cf-13e1-4106-891b-4b0118ceac2b} - - - - - win32 - - - Classes - - - bindings\generated - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - - - win32 - - - win32 - - - Classes - - - bindings\generated - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - bindings - - - - - resource - - - - - resource - - + + + + + {58ebb5df-595d-4e27-8c01-555be6f1c625} + + + {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest + + + {ccb2323b-1cfa-41ea-bcf4-ba5f07309396} + + + {e93a77e1-af1e-4400-87d3-504b62ebdbb0} + + + {146f26cf-13e1-4106-891b-4b0118ceac2b} + + + + + win32 + + + Classes + + + bindings\generated + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + + + win32 + + + win32 + + + Classes + + + bindings\generated + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + bindings + + + + + resource + + + + + resource + + \ No newline at end of file diff --git a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.user b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.user similarity index 68% rename from samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.user rename to samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.user index b56720d077..9d1dc0a360 100644 --- a/samples/CocosDragonJS/proj.win32/TestJavascript.vcxproj.user +++ b/samples/CocosDragonJS/proj.win32/CocosDragonJS.vcxproj.user @@ -1,11 +1,11 @@  - $(OutDir)\TestJavascriptRes + $(OutDir)\CocosDragonJSRes WindowsLocalDebugger - $(OutDir)\TestJavascriptRes + $(OutDir)\CocosDragonJSRes WindowsLocalDebugger \ No newline at end of file diff --git a/samples/CocosDragonJS/proj.win32/main.cpp b/samples/CocosDragonJS/proj.win32/main.cpp index 312eec8d7f..6a84a0be6e 100644 --- a/samples/CocosDragonJS/proj.win32/main.cpp +++ b/samples/CocosDragonJS/proj.win32/main.cpp @@ -25,7 +25,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; CCEGLView* eglView = CCEGLView::sharedOpenGLView(); - eglView->setFrameSize(800, 450); + eglView->setFrameSize(320, 480); int ret = CCApplication::sharedApplication()->run(); diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp index ffc68f1efa..f126465cdc 100644 --- a/samples/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -42,6 +42,7 @@ bool AppDelegate::applicationDidFinishLaunching() CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance(); CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine); ScriptingCore::getInstance()->runScript("js/MoonWarriors-native.js"); + return true; } diff --git a/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj index a519dd4f0f..03f631039d 100644 --- a/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj +++ b/samples/MoonWarriors/proj.win32/MoonWarriors.vcxproj @@ -64,7 +64,7 @@ Disabled .;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(SolutionDir)extensions;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;_DEBUG;DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -107,7 +107,7 @@ xcopy /Y /Q "$(SolutionDir)scripting\javascript\spidermonkey-win32\lib\*.*" "$(O .;..\Classes;$(SolutionDir)scripting\javascript\spidermonkey-win32\include;$(SolutionDir)external\chipmunk\include\chipmunk;$(SolutionDir)scripting\javascript\bindings;$(SolutionDir)extensions;$(SolutionDir)cocos2dx;$(SolutionDir)cocos2dx\include;$(SolutionDir)cocos2dx\kazmath\include;$(SolutionDir)cocos2dx\platform\win32;$(SolutionDir)cocos2dx\platform\third_party\win32;$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/samples/TestJavascript/proj.win32/TestJavascript.vcxproj b/samples/TestJavascript/proj.win32/TestJavascript.vcxproj index 3255f97c5d..b151d42b80 100644 --- a/samples/TestJavascript/proj.win32/TestJavascript.vcxproj +++ b/samples/TestJavascript/proj.win32/TestJavascript.vcxproj @@ -64,7 +64,7 @@ Disabled $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;DEBUG;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -119,7 +119,7 @@ xcopy "$(ProjectDir)..\cocos2d-js-tests\src" "$(OutDir)\TestJavascriptRes\src\" $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj index e2aa4de6c8..a496bb2259 100644 --- a/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj +++ b/samples/WatermelonWithMe/proj.win32/WatermelonWithMe.vcxproj @@ -64,7 +64,7 @@ Disabled $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;_DEBUG;DEBUG;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -121,7 +121,7 @@ copy "$(ProjectDir)..\*.js" "$(OutDir)\WatermelonWithMeRes\" /Y $(ProjectDir)..\Classes;$(ProjectDir)..\..\..\scripting\javascript\spidermonkey-win32\include;$(ProjectDir)..\..\..\external\chipmunk\include\chipmunk;$(ProjectDir)..\..\..\extensions;$(ProjectDir)..\..\..\scripting\javascript\bindings;$(ProjectDir)..\..\..\cocos2dx;$(ProjectDir)..\..\..\cocos2dx\include;$(ProjectDir)..\..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32;$(ProjectDir)..\..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\..\CocosDenshion\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/scripting/javascript/bindings/Android.mk b/scripting/javascript/bindings/Android.mk index 04422fcf77..b55f21a165 100644 --- a/scripting/javascript/bindings/Android.mk +++ b/scripting/javascript/bindings/Android.mk @@ -10,7 +10,6 @@ LOCAL_SRC_FILES := ScriptingCore.cpp \ cocos2d_specifics.cpp \ js_manual_conversions.cpp \ cocosjs_manual_conversions.cpp \ - js_bindings_ccbreader.cpp \ js_bindings_chipmunk_manual.cpp \ js_bindings_chipmunk_functions.cpp \ js_bindings_chipmunk_auto_classes.cpp \ diff --git a/scripting/javascript/bindings/ScriptingCore.cpp b/scripting/javascript/bindings/ScriptingCore.cpp index d0acedb755..aed900a5fa 100644 --- a/scripting/javascript/bindings/ScriptingCore.cpp +++ b/scripting/javascript/bindings/ScriptingCore.cpp @@ -457,7 +457,7 @@ JSBool ScriptingCore::runScript(const char *path, JSObject* global, JSContext* c JSAutoCompartment ac(cx, global); evaluatedOK = JS_ExecuteScript(cx, global, script, &rval); if (JS_FALSE == evaluatedOK) { - fprintf(stderr, "(evaluatedOK == JS_FALSE)\n"); + CCLog("(evaluatedOK == JS_FALSE)"); } } return evaluatedOK; diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp b/scripting/javascript/bindings/cocos2d_specifics.cpp index 851b751817..a1ab3e63f3 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp @@ -1158,45 +1158,6 @@ JSBool js_cocos2dx_release(JSContext *cx, uint32_t argc, jsval *vp) return JS_FALSE; } - -JSBool js_cocos2dx_CCNode_removeChild(JSContext *cx, uint32_t argc, jsval *vp) -{ - jsval *argv = JS_ARGV(cx, vp); - JSObject *obj = JS_THIS_OBJECT(cx, vp); - js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); - cocos2d::CCNode* cobj = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); - TEST_NATIVE_OBJECT(cx, cobj) - - if (argc == 2) { - cocos2d::CCNode* arg0; - JSBool arg1; - do { - js_proxy_t *proxy; - JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); - JS_GET_NATIVE_PROXY(proxy, tmpObj); - arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); - TEST_NATIVE_OBJECT(cx, arg0) - } while (0); - JS_ValueToBoolean(cx, argv[1], &arg1); - cobj->removeChild(arg0, arg1); - return JS_TRUE; - } else if(argc == 1) { - cocos2d::CCNode* arg0; - do { - js_proxy_t *proxy; - JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); - JS_GET_NATIVE_PROXY(proxy, tmpObj); - arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); - TEST_NATIVE_OBJECT(cx, arg0) - } while (0); - cobj->removeChild(arg0, true); - return JS_TRUE; - } - - JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); - return JS_FALSE; -} - JSBool js_cocos2dx_CCSet_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JSObject *obj; @@ -2071,7 +2032,6 @@ void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); - JS_DefineFunction(cx, js_cocos2dx_CCNode_prototype, "removeChild", js_cocos2dx_CCNode_removeChild, 0, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCSprite_prototype, "setBlendFunc", js_cocos2dx_CCSprite_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, js_cocos2dx_CCSpriteBatchNode_prototype, "setBlendFunc", js_cocos2dx_CCSpriteBatchNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); diff --git a/scripting/javascript/spidermonkey-win32/include/js-config.h b/scripting/javascript/spidermonkey-win32/include/js-config.h index dfb0f39115..276e3873df 100755 --- a/scripting/javascript/spidermonkey-win32/include/js-config.h +++ b/scripting/javascript/spidermonkey-win32/include/js-config.h @@ -20,7 +20,7 @@ /* Define to 1 if SpiderMonkey should support the ability to perform entirely too much GC. */ -/* #undef JS_GC_ZEAL */ +#define JS_GC_ZEAL 1 /* Define to 1 if the header is present and useable. See jscpucfg.h. */ @@ -60,7 +60,7 @@ /* Some mozilla code uses JS-friend APIs that depend on JS_METHODJIT being correct. */ -/* #undef JS_METHODJIT */ +#define JS_METHODJIT 1 /* Define to 1 to enable support for E4X (ECMA-357), 0 to disable it. */ #define JS_HAS_XML_SUPPORT 1 diff --git a/scripting/javascript/spidermonkey-win32/lib/mozjs.dll.REMOVED.git-id b/scripting/javascript/spidermonkey-win32/lib/mozjs.dll.REMOVED.git-id index 475323979b..418fea8c97 100644 --- a/scripting/javascript/spidermonkey-win32/lib/mozjs.dll.REMOVED.git-id +++ b/scripting/javascript/spidermonkey-win32/lib/mozjs.dll.REMOVED.git-id @@ -1 +1 @@ -da504065669dce359843f03a46e60f49be6d156b \ No newline at end of file +addb99612208912260540ce3f0c83c10691113ee \ No newline at end of file diff --git a/scripting/javascript/spidermonkey-win32/lib/mozjs.lib.REMOVED.git-id b/scripting/javascript/spidermonkey-win32/lib/mozjs.lib.REMOVED.git-id index 8fdaf0200b..bb1c897766 100644 --- a/scripting/javascript/spidermonkey-win32/lib/mozjs.lib.REMOVED.git-id +++ b/scripting/javascript/spidermonkey-win32/lib/mozjs.lib.REMOVED.git-id @@ -1 +1 @@ -93e1d9a90e40ffa0608ad24dff1ba734d8413375 \ No newline at end of file +779037ed47868bd3ac30b54b6609721f40b669eb \ No newline at end of file