From 6305de4ff640f5e30b5a1ce06a22f087f7a6be6c Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 27 Apr 2012 11:35:09 +0800 Subject: [PATCH] issue #1191: Updated win32 template. --- cocos2d-win32.vc2008.sln | 43 ---------- .../CCAppWiz.win32/Scripts/1033/default.js | 75 +++++++++--------- .../Templates/1033/Templates.inf | 10 +-- .../1033/{win32 => proj.win32}/main.cpp | 0 .../1033/{win32 => proj.win32}/main.h | 0 .../1033/{win32 => proj.win32}/res/root.ico | Bin .../1033/{win32 => proj.win32}/resource.h | 0 .../1033/{win32 => proj.win32}/root.rc | 0 8 files changed, 43 insertions(+), 85 deletions(-) rename template/msvc/CCAppWiz.win32/Templates/1033/{win32 => proj.win32}/main.cpp (100%) rename template/msvc/CCAppWiz.win32/Templates/1033/{win32 => proj.win32}/main.h (100%) rename template/msvc/CCAppWiz.win32/Templates/1033/{win32 => proj.win32}/res/root.ico (100%) rename template/msvc/CCAppWiz.win32/Templates/1033/{win32 => proj.win32}/resource.h (100%) rename template/msvc/CCAppWiz.win32/Templates/1033/{win32 => proj.win32}/root.rc (100%) diff --git a/cocos2d-win32.vc2008.sln b/cocos2d-win32.vc2008.sln index dd19b3f98d..fe7841ea65 100644 --- a/cocos2d-win32.vc2008.sln +++ b/cocos2d-win32.vc2008.sln @@ -32,33 +32,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests\proj.win32\t {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello5.win32", "hello5\hello5.win32.vcproj", "{4DB5AE27-1695-47F3-98F2-A85D6F61F361}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobox2d.win32", "hellobox2d\hellobox2d.win32.vcproj", "{8F9F807A-875A-4A19-9326-D68776F38D45}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellochipmunk.win32", "hellochipmunk\hellochipmunk.win32.vcproj", "{CAF29F4C-B857-44B5-8BC3-89E227D225BD}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "helloluatest.win32", "helloluatest\helloluatest.win32.vcproj", "{C5C9CB75-5E49-420B-B2B2-9D8A776E4916}" - ProjectSection(ProjectDependencies) = postProject - {DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -97,22 +70,6 @@ Global {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 - {4DB5AE27-1695-47F3-98F2-A85D6F61F361}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DB5AE27-1695-47F3-98F2-A85D6F61F361}.Debug|Win32.Build.0 = Debug|Win32 - {4DB5AE27-1695-47F3-98F2-A85D6F61F361}.Release|Win32.ActiveCfg = Release|Win32 - {4DB5AE27-1695-47F3-98F2-A85D6F61F361}.Release|Win32.Build.0 = Release|Win32 - {8F9F807A-875A-4A19-9326-D68776F38D45}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F9F807A-875A-4A19-9326-D68776F38D45}.Debug|Win32.Build.0 = Debug|Win32 - {8F9F807A-875A-4A19-9326-D68776F38D45}.Release|Win32.ActiveCfg = Release|Win32 - {8F9F807A-875A-4A19-9326-D68776F38D45}.Release|Win32.Build.0 = Release|Win32 - {CAF29F4C-B857-44B5-8BC3-89E227D225BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAF29F4C-B857-44B5-8BC3-89E227D225BD}.Debug|Win32.Build.0 = Debug|Win32 - {CAF29F4C-B857-44B5-8BC3-89E227D225BD}.Release|Win32.ActiveCfg = Release|Win32 - {CAF29F4C-B857-44B5-8BC3-89E227D225BD}.Release|Win32.Build.0 = Release|Win32 - {C5C9CB75-5E49-420B-B2B2-9D8A776E4916}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5C9CB75-5E49-420B-B2B2-9D8A776E4916}.Debug|Win32.Build.0 = Debug|Win32 - {C5C9CB75-5E49-420B-B2B2-9D8A776E4916}.Release|Win32.ActiveCfg = Release|Win32 - {C5C9CB75-5E49-420B-B2B2-9D8A776E4916}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/template/msvc/CCAppWiz.win32/Scripts/1033/default.js b/template/msvc/CCAppWiz.win32/Scripts/1033/default.js index ca2f4f0f3b..26e328a8c3 100644 --- a/template/msvc/CCAppWiz.win32/Scripts/1033/default.js +++ b/template/msvc/CCAppWiz.win32/Scripts/1033/default.js @@ -78,7 +78,7 @@ function CreateCustomProject(strProjectName, strProjectPath) { else strUserTarget = strProjectName + ".win32.vcproj.user"; - var strUserPath = FileSys.BuildPath(strProjectPath, strUserTarget); + var strUserPath = FileSys.BuildPath(strProjectPath+"\\proj.win32", strUserTarget); var astrParentPath = new Array(); astrParentPath[0] = strProjectPath; @@ -93,6 +93,7 @@ function CreateCustomProject(strProjectName, strProjectPath) { } else { FileSys.CreateFolder(strPath); + FileSys.CreateFolder(strPath+"\\proj.win32"); } } @@ -114,21 +115,21 @@ function CreateCustomProject(strProjectName, strProjectPath) { + "\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" @@ -151,7 +152,7 @@ function CreateCustomProject(strProjectName, strProjectPath) { prj = prjItem.SubProject; } else { - prj = oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt); + prj = oTarget.AddFromTemplate(strProjTemplate, strProjectPath+"\\proj.win32\\", strProjectNameWithExt); } return prj; } @@ -217,46 +218,46 @@ function AddConfigurations(proj, strProjectName) { var CLTool = config.Tools('VCCLCompilerTool'); // Additional Inlcude Directories - var strAddIncludeDir = '.;.\\win32;.\\Classes'; - strAddIncludeDir += ';..\\cocos2dx'; - strAddIncludeDir += ';..\\cocos2dx\\actions'; - strAddIncludeDir += ';..\\cocos2dx\\base_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\cocoa'; - strAddIncludeDir += ';..\\cocos2dx\\effects'; - strAddIncludeDir += ';..\\cocos2dx\\include'; - strAddIncludeDir += ';..\\cocos2dx\\kazmath\\include'; - strAddIncludeDir += ';..\\cocos2dx\\keypad_dispatcher'; - strAddIncludeDir += ';..\\cocos2dx\\label_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\layers_scenes_transitions_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\menu_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\misc_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\particle_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\script_support'; - strAddIncludeDir += ';..\\cocos2dx\\shaders'; - strAddIncludeDir += ';..\\cocos2dx\\sprite_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\support'; - strAddIncludeDir += ';..\\cocos2dx\\text_input_node'; - strAddIncludeDir += ';..\\cocos2dx\\textures'; - strAddIncludeDir += ';..\\cocos2dx\\tileMap_parallax_nodes'; - strAddIncludeDir += ';..\\cocos2dx\\touch_dispatcher'; - strAddIncludeDir += ';..\\cocos2dx\\platform'; - strAddIncludeDir += ';..\\cocos2dx\\platform\\win32'; - strAddIncludeDir += ';..\\cocos2dx\\platform\\third_party\\win32'; - strAddIncludeDir += ';..\\cocos2dx\\platform\\third_party\\win32\\OGLES'; + var strAddIncludeDir = '.;..\\Classes'; + strAddIncludeDir += ';..\\..\\cocos2dx'; + strAddIncludeDir += ';..\\..\\cocos2dx\\actions'; + strAddIncludeDir += ';..\\..\\cocos2dx\\base_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\cocoa'; + strAddIncludeDir += ';..\\..\\cocos2dx\\effects'; + strAddIncludeDir += ';..\\..\\cocos2dx\\include'; + strAddIncludeDir += ';..\\..\\cocos2dx\\kazmath\\include'; + strAddIncludeDir += ';..\\..\\cocos2dx\\keypad_dispatcher'; + strAddIncludeDir += ';..\\..\\cocos2dx\\label_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\layers_scenes_transitions_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\menu_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\misc_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\particle_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\script_support'; + strAddIncludeDir += ';..\\..\\cocos2dx\\shaders'; + strAddIncludeDir += ';..\\..\\cocos2dx\\sprite_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\support'; + strAddIncludeDir += ';..\\..\\cocos2dx\\text_input_node'; + strAddIncludeDir += ';..\\..\\cocos2dx\\textures'; + strAddIncludeDir += ';..\\..\\cocos2dx\\tileMap_parallax_nodes'; + strAddIncludeDir += ';..\\..\\cocos2dx\\touch_dispatcher'; + strAddIncludeDir += ';..\\..\\cocos2dx\\platform'; + strAddIncludeDir += ';..\\..\\cocos2dx\\platform\\win32'; + strAddIncludeDir += ';..\\..\\cocos2dx\\platform\\third_party\\win32'; + strAddIncludeDir += ';..\\..\\cocos2dx\\platform\\third_party\\win32\\OGLES'; if (wizard.FindSymbol('CC_USE_BOX2D')) { - strAddIncludeDir += ';..\\'; + strAddIncludeDir += ';..\\..\\'; } if (wizard.FindSymbol('CC_USE_CHIPMUNK')) { - strAddIncludeDir += ';..\\chipmunk\\include\\chipmunk'; + strAddIncludeDir += ';..\\..\\chipmunk\\include\\chipmunk'; } if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) { - strAddIncludeDir += ';..\\CocosDenshion\\Include'; + strAddIncludeDir += ';..\\..\\CocosDenshion\\Include'; } if (wizard.FindSymbol('CC_USE_LUA')) { - strAddIncludeDir += ';..\\lua\\cocos2dx_support'; - strAddIncludeDir += ';..\\lua\\tolua'; - strAddIncludeDir += ';..\\lua\\lua'; + strAddIncludeDir += ';..\\..\\lua\\cocos2dx_support'; + strAddIncludeDir += ';..\\..\\lua\\tolua'; + strAddIncludeDir += ';..\\..\\lua\\lua'; } CLTool.AdditionalIncludeDirectories = strAddIncludeDir; diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/Templates.inf b/template/msvc/CCAppWiz.win32/Templates/1033/Templates.inf index ab85bf1d33..2d3b0c101e 100644 --- a/template/msvc/CCAppWiz.win32/Templates/1033/Templates.inf +++ b/template/msvc/CCAppWiz.win32/Templates/1033/Templates.inf @@ -1,9 +1,9 @@ -win32/res/root.ico -win32/root.rc -win32/resource.h +proj.win32/res/root.ico +proj.win32/root.rc +proj.win32/resource.h -win32/main.h -win32/main.cpp +proj.win32/main.h +proj.win32/main.cpp Classes/AppDelegate.h Classes/AppDelegate.cpp diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/win32/main.cpp b/template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/main.cpp similarity index 100% rename from template/msvc/CCAppWiz.win32/Templates/1033/win32/main.cpp rename to template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/main.cpp diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/win32/main.h b/template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/main.h similarity index 100% rename from template/msvc/CCAppWiz.win32/Templates/1033/win32/main.h rename to template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/main.h diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/win32/res/root.ico b/template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/res/root.ico similarity index 100% rename from template/msvc/CCAppWiz.win32/Templates/1033/win32/res/root.ico rename to template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/res/root.ico diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/win32/resource.h b/template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/resource.h similarity index 100% rename from template/msvc/CCAppWiz.win32/Templates/1033/win32/resource.h rename to template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/resource.h diff --git a/template/msvc/CCAppWiz.win32/Templates/1033/win32/root.rc b/template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/root.rc similarity index 100% rename from template/msvc/CCAppWiz.win32/Templates/1033/win32/root.rc rename to template/msvc/CCAppWiz.win32/Templates/1033/proj.win32/root.rc