diff --git a/README.md b/README.md index 7c71a9a713..92e6e9c9a3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ How to start a new game Example: $ cd cocos2d-x/tools/project-creator - $ ./project-creator.pyw -n mygame -k com.your_company.mygame -l cpp -p /home/mygame + $ ./project-creator.py -n mygame -k com.your_company.mygame -l cpp -p /home/mygame $ cd /home/mygame diff --git a/cocos/editor-support/cocostudio/CCSSceneReader.cpp b/cocos/editor-support/cocostudio/CCSSceneReader.cpp index 36d0adc97d..44bd667507 100644 --- a/cocos/editor-support/cocostudio/CCSSceneReader.cpp +++ b/cocos/editor-support/cocostudio/CCSSceneReader.cpp @@ -146,7 +146,7 @@ Node* SceneReader::createObject(const rapidjson::Value &dict, cocos2d::Node* par } else { - CC_SAFE_RELEASE(com); + CC_SAFE_RELEASE_NULL(com); } } if(_fnSelector != nullptr) diff --git a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp index 7b6abad014..3243c8f05c 100644 --- a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp +++ b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp @@ -49,7 +49,7 @@ bool AppDelegate::applicationDidFinishLaunching() searchPaths.push_back("hd/scenetest/AttributeComponentTest"); searchPaths.push_back("hd/scenetest/BackgroundComponentTest"); searchPaths.push_back("hd/scenetest/EffectComponentTest"); - searchPaths.push_back("hd/scenetest/loadSceneEdtiorFileTest"); + searchPaths.push_back("hd/scenetest/LoadSceneEdtiorFileTest"); searchPaths.push_back("hd/scenetest/ParticleComponentTest"); searchPaths.push_back("hd/scenetest/SpriteComponentTest"); searchPaths.push_back("hd/scenetest/TmxMapComponentTest"); @@ -63,7 +63,7 @@ bool AppDelegate::applicationDidFinishLaunching() searchPaths.push_back("scenetest/AttributeComponentTest"); searchPaths.push_back("scenetest/BackgroundComponentTest"); searchPaths.push_back("scenetest/EffectComponentTest"); - searchPaths.push_back("scenetest/loadSceneEdtiorFileTest"); + searchPaths.push_back("scenetest/LoadSceneEdtiorFileTest"); searchPaths.push_back("scenetest/ParticleComponentTest"); searchPaths.push_back("scenetest/SpriteComponentTest"); searchPaths.push_back("scenetest/TmxMapComponentTest"); diff --git a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp index 5d985b57ea..d5d37f513a 100644 --- a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp +++ b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp @@ -59,7 +59,7 @@ bool AppDelegate::applicationDidFinishLaunching() "res/scenetest/AttributeComponentTest", "res/scenetest/BackgroundComponentTest", "res/scenetest/EffectComponentTest", - "res/scenetest/loadSceneEdtiorFileTest", + "res/scenetest/LoadSceneEdtiorFileTest", "res/scenetest/ParticleComponentTest", "res/scenetest/SpriteComponentTest", "res/scenetest/TmxMapComponentTest", diff --git a/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index 76f9c16c73..eecc14f8cb 100644 --- a/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -7,6 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 01A8D331187A504A001CC002 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32E187A5049001CC002 /* CocoStudio.lua */; }; + 01A8D332187A504A001CC002 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32E187A5049001CC002 /* CocoStudio.lua */; }; + 01A8D333187A504A001CC002 /* extern.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32F187A504A001CC002 /* extern.lua */; }; + 01A8D334187A504A001CC002 /* extern.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32F187A504A001CC002 /* extern.lua */; }; + 01A8D335187A504A001CC002 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D330187A504A001CC002 /* GuiConstants.lua */; }; + 01A8D336187A504A001CC002 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D330187A504A001CC002 /* GuiConstants.lua */; }; 15A8A4441834C43700142BE0 /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4291834BDA200142BE0 /* libchipmunk iOS.a */; }; 15A8A4451834C43700142BE0 /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4251834BDA200142BE0 /* libcocos2dx iOS.a */; }; 15A8A4461834C43700142BE0 /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4271834BDA200142BE0 /* libcocos2dx-extensions iOS.a */; }; @@ -219,6 +225,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 01A8D32E187A5049001CC002 /* CocoStudio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CocoStudio.lua; path = ../cocos2d/cocos/scripting/lua/script/CocoStudio.lua; sourceTree = ""; }; + 01A8D32F187A504A001CC002 /* extern.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = extern.lua; path = ../cocos2d/cocos/scripting/lua/script/extern.lua; sourceTree = ""; }; + 01A8D330187A504A001CC002 /* GuiConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = GuiConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/GuiConstants.lua; sourceTree = ""; }; 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../cocos2d/cocos/scripting/lua/script/AudioEngine.lua; sourceTree = ""; }; 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../cocos2d/cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = ""; }; @@ -370,6 +379,9 @@ 1A0227A417A3AA1A00B867AD /* Lua Common */ = { isa = PBXGroup; children = ( + 01A8D32E187A5049001CC002 /* CocoStudio.lua */, + 01A8D32F187A504A001CC002 /* extern.lua */, + 01A8D330187A504A001CC002 /* GuiConstants.lua */, 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */, 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */, 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */, @@ -722,6 +734,9 @@ 5023815717EBBCE400990C9B /* menu2.png in Resources */, 5023817617EBBE3400990C9B /* Icon.icns in Resources */, 15A8A4651834C6AD00142BE0 /* AudioEngine.lua in Resources */, + 01A8D332187A504A001CC002 /* CocoStudio.lua in Resources */, + 01A8D334187A504A001CC002 /* extern.lua in Resources */, + 01A8D336187A504A001CC002 /* GuiConstants.lua in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -772,6 +787,9 @@ 5023811A17EBBCAC00990C9B /* Default.png in Resources */, 5091733817ECE17A00D62437 /* Icon-50.png in Resources */, 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */, + 01A8D331187A504A001CC002 /* CocoStudio.lua in Resources */, + 01A8D333187A504A001CC002 /* extern.lua in Resources */, + 01A8D335187A504A001CC002 /* GuiConstants.lua in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/template/multi-platform-lua/proj.linux/build.sh b/template/multi-platform-lua/proj.linux/build.sh index 99dcf294d3..d1408e62a4 100755 --- a/template/multi-platform-lua/proj.linux/build.sh +++ b/template/multi-platform-lua/proj.linux/build.sh @@ -12,7 +12,7 @@ cd ../cocos2d sudo ./build/install-deps-linux.sh mkdir -p linux-build cd linux-build -cmake .. -DBUILD_LIBS_LUA=OFF -DBUILD_HelloCpp=OFF -DBUILD_TestCpp=OFF -DBUILD_HelloLua=OFF -DBUILD_TestLua=OFF +cmake .. -DBUILD_HelloCpp=OFF -DBUILD_TestCpp=OFF -DBUILD_HelloLua=OFF -DBUILD_TestLua=OFF make -j4 #make bin @@ -24,3 +24,4 @@ cmake ../.. make -j4 cd .. mv ../bin bin +cp ../cocos2d/cocos/scripting/lua/script/* bin/Resources diff --git a/template/multi-platform-lua/proj.win32/HelloLua.sln b/template/multi-platform-lua/proj.win32/HelloLua.sln index 1da75a564c..5f6caa40b0 100644 --- a/template/multi-platform-lua/proj.win32/HelloLua.sln +++ b/template/multi-platform-lua/proj.win32/HelloLua.sln @@ -4,6 +4,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" ProjectSection(ProjectDependencies) = postProject {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} {DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159} {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} @@ -33,6 +34,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -79,6 +82,10 @@ Global {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32 {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32 {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 + {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj b/template/multi-platform-lua/proj.win32/HelloLua.vcxproj index df4d1907a2..dade088c62 100644 --- a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj +++ b/template/multi-platform-lua/proj.win32/HelloLua.vcxproj @@ -186,6 +186,9 @@ xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$( {b57cf53f-2e49-4031-9822-047cc0e6bde2} + + + {b7c2a162-dec9-4418-972e-240ab3cbfcae} {7e06e92c-537a-442b-9e4a-4761c84f8a1a} diff --git a/tools/project-creator/README.md b/tools/project-creator/README.md index 06fb84e3ba..a7f888fbfd 100644 --- a/tools/project-creator/README.md +++ b/tools/project-creator/README.md @@ -5,11 +5,11 @@ First you need install python environment. There have double ways create new cocos project. Notice:The best of generate path is english path. ##1.UI -* Windows: double click "create_project.pyw" file -* Mac: ./create_project.pyw +* Windows: double click "create_project.py" file +* Mac: ./create_project.py * Linux: The tkinter was not installed in the linux's default python,therefore, in order to use the gui operate, you have to install the tkinter libaray manually. There is another way to create project by command line. see below for details ##2.console $ cd cocos2d-x/tools/project-creator - $ ./project-creator.pyw --help - $ ./project-creator.pyw -n mygame -k com.your_company.mygame -l cpp -p /home/mygame + $ ./project-creator.py --help + $ ./project-creator.py -n mygame -k com.your_company.mygame -l cpp -p /home/mygame $ cd /home/mygame \ No newline at end of file diff --git a/tools/project-creator/config-create/create_config.py b/tools/project-creator/config-create/create_config.py old mode 100644 new mode 100755 diff --git a/tools/project-creator/module/cocos_files.json.REMOVED.git-id b/tools/project-creator/module/cocos_files.json.REMOVED.git-id index 60eb92e773..cf2d710a7d 100644 --- a/tools/project-creator/module/cocos_files.json.REMOVED.git-id +++ b/tools/project-creator/module/cocos_files.json.REMOVED.git-id @@ -1 +1 @@ -6b36f5d803952b11046d0b2395c232fe66301b2f \ No newline at end of file +96eb4f261ce2c1be3899e53508952d57bbd19d5d \ No newline at end of file diff --git a/tools/project-creator/module/core.py b/tools/project-creator/module/core.py index fbbe0d43bd..f12ce71553 100644 --- a/tools/project-creator/module/core.py +++ b/tools/project-creator/module/core.py @@ -197,7 +197,7 @@ class CocosProject: else: if os.path.exists(dstfile): os.remove(dstfile) - shutil.copyfile(srcfile, dstfile) + shutil.copy(srcfile, dstfile) self.step = self.step + 1 if self.callbackfun and self.step%int(self.totalStep/50) == 0: self.callbackfun(self.step,self.totalStep,fileList[index])