mirror of https://github.com/axmolengine/axmol.git
test template lua
This commit is contained in:
parent
0f374ce838
commit
07e51e2c86
|
@ -30,7 +30,7 @@ How to start a new game
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
$ cd cocos2d-x/tools/project-creator
|
$ 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
|
$ cd /home/mygame
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* 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 */; };
|
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 */; };
|
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 */; };
|
15A8A4461834C43700142BE0 /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4271834BDA200142BE0 /* libcocos2dx-extensions iOS.a */; };
|
||||||
|
@ -219,6 +225,9 @@
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference 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 = "<group>"; };
|
||||||
|
01A8D32F187A504A001CC002 /* extern.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = extern.lua; path = ../cocos2d/cocos/scripting/lua/script/extern.lua; sourceTree = "<group>"; };
|
||||||
|
01A8D330187A504A001CC002 /* GuiConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = GuiConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/GuiConstants.lua; sourceTree = "<group>"; };
|
||||||
15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
|
15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
|
||||||
15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../cocos2d/cocos/scripting/lua/script/AudioEngine.lua; sourceTree = "<group>"; };
|
15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../cocos2d/cocos/scripting/lua/script/AudioEngine.lua; sourceTree = "<group>"; };
|
||||||
15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../cocos2d/cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = "<group>"; };
|
15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../cocos2d/cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = "<group>"; };
|
||||||
|
@ -370,6 +379,9 @@
|
||||||
1A0227A417A3AA1A00B867AD /* Lua Common */ = {
|
1A0227A417A3AA1A00B867AD /* Lua Common */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
01A8D32E187A5049001CC002 /* CocoStudio.lua */,
|
||||||
|
01A8D32F187A504A001CC002 /* extern.lua */,
|
||||||
|
01A8D330187A504A001CC002 /* GuiConstants.lua */,
|
||||||
15A8A4551834C6AD00142BE0 /* AudioEngine.lua */,
|
15A8A4551834C6AD00142BE0 /* AudioEngine.lua */,
|
||||||
15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */,
|
15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */,
|
||||||
15A8A4571834C6AD00142BE0 /* Cocos2d.lua */,
|
15A8A4571834C6AD00142BE0 /* Cocos2d.lua */,
|
||||||
|
@ -722,6 +734,9 @@
|
||||||
5023815717EBBCE400990C9B /* menu2.png in Resources */,
|
5023815717EBBCE400990C9B /* menu2.png in Resources */,
|
||||||
5023817617EBBE3400990C9B /* Icon.icns in Resources */,
|
5023817617EBBE3400990C9B /* Icon.icns in Resources */,
|
||||||
15A8A4651834C6AD00142BE0 /* AudioEngine.lua in Resources */,
|
15A8A4651834C6AD00142BE0 /* AudioEngine.lua in Resources */,
|
||||||
|
01A8D332187A504A001CC002 /* CocoStudio.lua in Resources */,
|
||||||
|
01A8D334187A504A001CC002 /* extern.lua in Resources */,
|
||||||
|
01A8D336187A504A001CC002 /* GuiConstants.lua in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -772,6 +787,9 @@
|
||||||
5023811A17EBBCAC00990C9B /* Default.png in Resources */,
|
5023811A17EBBCAC00990C9B /* Default.png in Resources */,
|
||||||
5091733817ECE17A00D62437 /* Icon-50.png in Resources */,
|
5091733817ECE17A00D62437 /* Icon-50.png in Resources */,
|
||||||
5023812117EBBCAC00990C9B /* Icon-72.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;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ cd ../cocos2d
|
||||||
sudo ./build/install-deps-linux.sh
|
sudo ./build/install-deps-linux.sh
|
||||||
mkdir -p linux-build
|
mkdir -p linux-build
|
||||||
cd 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 -j4
|
||||||
|
|
||||||
#make bin
|
#make bin
|
||||||
|
@ -24,3 +24,4 @@ cmake ../..
|
||||||
make -j4
|
make -j4
|
||||||
cd ..
|
cd ..
|
||||||
mv ../bin bin
|
mv ../bin bin
|
||||||
|
cp ../cocos2d/cocos/scripting/lua/script/* bin/Resources
|
||||||
|
|
|
@ -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}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
|
{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}
|
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159}
|
||||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
|
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
|
||||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
|
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
|
||||||
|
@ -33,6 +34,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
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}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
|
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -186,6 +186,9 @@ xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$(
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj">
|
<ProjectReference Include="..\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj">
|
||||||
<Project>{b57cf53f-2e49-4031-9822-047cc0e6bde2}</Project>
|
<Project>{b57cf53f-2e49-4031-9822-047cc0e6bde2}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj">
|
||||||
|
<Project>{b7c2a162-dec9-4418-972e-240ab3cbfcae}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj">
|
<ProjectReference Include="..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj">
|
||||||
<Project>{7e06e92c-537a-442b-9e4a-4761c84f8a1a}</Project>
|
<Project>{7e06e92c-537a-442b-9e4a-4761c84f8a1a}</Project>
|
||||||
|
|
|
@ -5,11 +5,11 @@ First you need install python environment.
|
||||||
There have double ways create new cocos project.
|
There have double ways create new cocos project.
|
||||||
Notice:The best of generate path is english path.
|
Notice:The best of generate path is english path.
|
||||||
##1.UI
|
##1.UI
|
||||||
* Windows: double click "create_project.pyw" file
|
* Windows: double click "create_project.py" file
|
||||||
* Mac: ./create_project.pyw
|
* 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
|
* 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
|
##2.console
|
||||||
$ cd cocos2d-x/tools/project-creator
|
$ cd cocos2d-x/tools/project-creator
|
||||||
$ ./project-creator.pyw --help
|
$ ./project-creator.py --help
|
||||||
$ ./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
|
$ cd /home/mygame
|
|
@ -1 +1 @@
|
||||||
6b36f5d803952b11046d0b2395c232fe66301b2f
|
96eb4f261ce2c1be3899e53508952d57bbd19d5d
|
|
@ -197,7 +197,7 @@ class CocosProject:
|
||||||
else:
|
else:
|
||||||
if os.path.exists(dstfile):
|
if os.path.exists(dstfile):
|
||||||
os.remove(dstfile)
|
os.remove(dstfile)
|
||||||
shutil.copyfile(srcfile, dstfile)
|
shutil.copy(srcfile, dstfile)
|
||||||
self.step = self.step + 1
|
self.step = self.step + 1
|
||||||
if self.callbackfun and self.step%int(self.totalStep/50) == 0:
|
if self.callbackfun and self.step%int(self.totalStep/50) == 0:
|
||||||
self.callbackfun(self.step,self.totalStep,fileList[index])
|
self.callbackfun(self.step,self.totalStep,fileList[index])
|
||||||
|
|
Loading…
Reference in New Issue