Solve the error in framework-compile tools.

This commit is contained in:
Bin Zhang 2015-06-26 21:00:32 +08:00
parent cc6f02584b
commit 0ac3da1636
8 changed files with 81 additions and 46 deletions

View File

@ -4,9 +4,19 @@
USING_NS_CC;
#pragma comment(lib,"libcocos2d.lib")
#pragma comment(lib,"libbox2d.lib")
#pragma comment(lib,"libSpine.lib")
#if _MSC_VER > 1800
#pragma comment(lib,"libcocos2d_2015.lib")
#pragma comment(lib,"libbox2d_2015.lib")
#pragma comment(lib,"libSpine_2015.lib")
#pragma comment(lib,"libbullet_2015.lib")
#pragma comment(lib,"librecast_2015.lib")
#else
#pragma comment(lib,"libcocos2d_2013.lib")
#pragma comment(lib,"libbox2d_2013.lib")
#pragma comment(lib,"libSpine_2013.lib")
#pragma comment(lib,"libbullet_2013.lib")
#pragma comment(lib,"librecast_2013.lib")
#endif
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,

View File

@ -2,11 +2,23 @@
#include "SimulatorWin.h"
#include <shellapi.h>
#pragma comment(lib,"libcocos2d.lib")
#pragma comment(lib,"libjscocos2d.lib")
#pragma comment(lib,"libbox2d.lib")
#pragma comment(lib,"libSpine.lib")
#pragma comment(lib,"libsimulator.lib")
#if _MSC_VER > 1800
#pragma comment(lib,"libcocos2d_2015.lib")
#pragma comment(lib,"libbox2d_2015.lib")
#pragma comment(lib,"libSpine_2015.lib")
#pragma comment(lib,"libbullet_2015.lib")
#pragma comment(lib,"librecast_2015.lib")
#pragma comment(lib,"libjscocos2d_2015.lib")
#pragma comment(lib,"libsimulator_2015.lib")
#else
#pragma comment(lib,"libcocos2d_2013.lib")
#pragma comment(lib,"libbox2d_2013.lib")
#pragma comment(lib,"libSpine_2013.lib")
#pragma comment(lib,"libbullet_2013.lib")
#pragma comment(lib,"librecast_2013.lib")
#pragma comment(lib,"libjscocos2d_2013.lib")
#pragma comment(lib,"libsimulator_2013.lib")
#endif
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,

View File

@ -2,12 +2,23 @@
#include "SimulatorWin.h"
#include <shellapi.h>
#pragma comment(lib,"libcocos2d.lib")
#pragma comment(lib,"libluacocos2d.lib")
#pragma comment(lib,"libbox2d.lib")
#pragma comment(lib,"libSpine.lib")
#pragma comment(lib,"libsimulator.lib")
#if _MSC_VER > 1800
#pragma comment(lib,"libcocos2d_2015.lib")
#pragma comment(lib,"libbox2d_2015.lib")
#pragma comment(lib,"libSpine_2015.lib")
#pragma comment(lib,"libbullet_2015.lib")
#pragma comment(lib,"librecast_2015.lib")
#pragma comment(lib,"libluacocos2d_2015.lib")
#pragma comment(lib,"libsimulator_2015.lib")
#else
#pragma comment(lib,"libcocos2d_2013.lib")
#pragma comment(lib,"libbox2d_2013.lib")
#pragma comment(lib,"libSpine_2013.lib")
#pragma comment(lib,"libbullet_2013.lib")
#pragma comment(lib,"librecast_2013.lib")
#pragma comment(lib,"libluacocos2d_2013.lib")
#pragma comment(lib,"libsimulator_2013.lib")
#endif
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,

View File

@ -128,8 +128,21 @@ class CocosLibsCompiler(object):
# get the VS projects info
win32_proj_info = self.cfg_info[CocosLibsCompiler.KEY_VS_PROJS_INFO]
for vs_version in vs_cmd_info.keys():
for vs_version in compile_vs_versions:
if not vs_version in vs_cmd_info.keys():
continue
vs_command = vs_cmd_info[vs_version]
for key in win32_proj_info.keys():
# clean solutions
proj_path = os.path.join(self.repo_x, key)
clean_cmd = " ".join([
"\"%s\"" % vs_command,
"\"%s\"" % proj_path,
"/clean \"Release|Win32\""
])
utils_cocos.execute_command(clean_cmd)
for key in win32_proj_info.keys():
output_dir = os.path.join(self.lib_dir, "win32")
proj_path = os.path.join(self.repo_x, key)
@ -140,14 +153,6 @@ class CocosLibsCompiler(object):
if not os.path.exists(win32_output_dir):
os.makedirs(win32_output_dir)
# clean solution
# clean_cmd = " ".join([
# "\"%s\"" % vs_command,
# "\"%s\"" % proj_path,
# "/clean \"Release|Win32\""
# ])
# utils_cocos.execute_command(clean_cmd)
# build project
if self.use_incredibuild:
# use incredibuild, build whole sln
@ -354,7 +359,7 @@ if __name__ == "__main__":
parser.add_argument('--mac', dest='mac', action="store_true", help='compile mac platform')
parser.add_argument('--android', dest='android', action="store_true",help='complile android platform')
parser.add_argument('--dis-strip', "--disable-strip", dest='disable_strip', action="store_true", help='Disable the strip of the generated libs.')
parser.add_argument('--vs', dest='vs_version', type=int, help='visual studio version, such as 2013.', default=2013)
parser.add_argument('--vs', dest='vs_version', type=int, help='visual studio version, such as 2013.', default=None)
parser.add_argument("--app-abi", dest="app_abi",
help="Set the APP_ABI of ndk-build.Can be multi value separated with ':'. Sample : --app-aib armeabi:x86:mips. Default value is 'armeabi'.")

View File

@ -15,30 +15,16 @@
}
},
"vs_projs_info" : {
"build/cocos2d-win32.sln" : {
"build_targets" : [
"libluacocos2d"
],
"rename_targets" : [
"libcocos2d", "libluacocos2d", "libSpine", "libbox2d"
]
},
"build/cocos2d-js-win32.sln" : {
"build_targets" : [
"libjscocos2d"
],
"rename_targets" : [
"libjscocos2d"
]
},
"tools/simulator/frameworks/runtime-src/proj.win32/simulator.sln" : {
"build_targets" : [
"libsimulator"
"simulator"
],
"rename_targets" : [
"libSpine", "libbox2d", "libbullet", "librecast",
"libcocos2d", "libluacocos2d", "libjscocos2d",
"libsimulator"
]
}
},
"support_vs_versions" : [ 2013, 2015 ]
"support_vs_versions" : [ 2015, 2013 ]
}

View File

@ -4,6 +4,8 @@
"from": "templates/cpp-template-default",
"to": "cpp-template-binary",
"exclude": [
"*android-studio",
"*win10",
"*wp8",
"*win8.1-universal",
"*linux",
@ -25,6 +27,8 @@
"from": "templates/lua-template-default/frameworks",
"to": "lua-template-binary/frameworks",
"exclude": [
"*android-studio",
"*win10",
"*wp8",
"*win8.1-universal",
"*linux",
@ -42,6 +46,8 @@
"from": "templates/js-template-runtime",
"to": "js-template-binary",
"exclude": [
"*android-studio",
"*win10",
"*wp8",
"*win8.1-universal",
"*linux",
@ -52,10 +58,7 @@
},
{
"from": "web",
"to": "js-template-binary/frameworks/cocos2d-html5",
"exclude": [
".*"
]
"to": "js-template-binary/frameworks/cocos2d-html5"
},
{
"from": "tools/simulator/frameworks/runtime-src/Classes/ide-support",

View File

@ -22,6 +22,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\..\..\..
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\..\..\..\..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\..\..\..\..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -60,6 +62,10 @@ Global
{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32
{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32
{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32
{41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32
{41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32
{41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32
{41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -91,6 +91,7 @@
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile>$(ProjectDir)../../../runtime/win32/$(TargetName).pdb</ProgramDatabaseFile>
<OutputFile>$(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt)</OutputFile>
<IgnoreSpecificDefaultLibraries>libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>
@ -156,6 +157,7 @@ xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32"
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;mozjs-33.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<IgnoreSpecificDefaultLibraries>libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<ResourceCompile>
<Culture>0x0409</Culture>