mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12442 from natural-law/update-templates
Update the VS projects of templates.
This commit is contained in:
commit
1bf8292e06
|
@ -101,8 +101,7 @@
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<CustomBuildStep>
|
<CustomBuildStep>
|
||||||
<Command>
|
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
||||||
xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"
|
|
||||||
xcopy "$(ProjectDir)..\Resources" "$(OutDir)" /D /E /I /F /Y
|
xcopy "$(ProjectDir)..\Resources" "$(OutDir)" /D /E /I /F /Y
|
||||||
</Command>
|
</Command>
|
||||||
<Outputs>$(TargetName).cab</Outputs>
|
<Outputs>$(TargetName).cab</Outputs>
|
||||||
|
@ -140,9 +139,7 @@
|
||||||
</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
<Command></Command>
|
||||||
xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"
|
|
||||||
xcopy "$(ProjectDir)..\Resources" "$(OutDir)" /D /E /I /F /Y</Command>
|
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -99,9 +99,7 @@
|
||||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
<Command></Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)"
|
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
@ -111,14 +109,10 @@ xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y
|
<Command></Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y
|
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Copy js and resource files.</Message>
|
<Command></Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
|
@ -165,9 +159,7 @@ copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
||||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
<Command></Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)"
|
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
@ -177,12 +169,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y
|
<Command></Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y
|
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
|
||||||
<Message>Copy js and resource files.</Message>
|
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -55,6 +55,10 @@ Global
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.Build.0 = Debug|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.ActiveCfg = Release|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.Build.0 = Release|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{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.ActiveCfg = Debug|Win32
|
||||||
{41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = 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.ActiveCfg = Release|Win32
|
||||||
|
|
|
@ -104,33 +104,43 @@
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\debug-build\*.*" "$(OutDir)"
|
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
<OutputFile>$(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt)</OutputFile>
|
<OutputFile>$(ProjectDir)../../../simulator/win32/$(TargetName)$(TargetExt)</OutputFile>
|
||||||
<ProgramDatabaseFile>$(ProjectDir)../../../runtime/win32/$(TargetName).pdb</ProgramDatabaseFile>
|
<ProgramDatabaseFile>$(ProjectDir)../../../simulator/win32/$(TargetName).pdb</ProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y
|
<Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y
|
</Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Copy js and resource files.</Message>
|
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\"
|
<Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\"</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<CustomBuildStep>
|
||||||
|
<Command>if not exist "$(LocalDebuggerWorkingDirectory)" mkdir "$(LocalDebuggerWorkingDirectory)"
|
||||||
|
xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(LocalDebuggerWorkingDirectory)\script" /D /E /I /F /Y
|
||||||
|
xcopy "$(ProjectDir)..\..\..\src" "$(LocalDebuggerWorkingDirectory)\src" /D /E /I /F /Y
|
||||||
|
xcopy "$(ProjectDir)..\..\..\res" "$(LocalDebuggerWorkingDirectory)\res" /D /E /I /F /Y
|
||||||
|
copy "$(ProjectDir)..\..\..\main.js" "$(LocalDebuggerWorkingDirectory)" /Y
|
||||||
|
copy "$(ProjectDir)..\..\..\project.json" "$(LocalDebuggerWorkingDirectory)" /Y
|
||||||
|
xcopy /Y /Q "$(OutDir)*.dll" "$(LocalDebuggerWorkingDirectory)"
|
||||||
|
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(LocalDebuggerWorkingDirectory)"</Command>
|
||||||
|
<Outputs>$(TargetName).cab</Outputs>
|
||||||
|
<Inputs>$(TargetFileName)</Inputs>
|
||||||
|
</CustomBuildStep>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Midl>
|
<Midl>
|
||||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
@ -166,23 +176,19 @@ xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\ru
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\release-build\*.*" "$(OutDir)"
|
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\..\cocos2d-x\external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
|
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;mozjs-33.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\js-bindings\script" "$(OutDir)\script" /D /E /I /F /Y
|
<Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\src" /D /E /I /F /Y
|
</Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\res" /D /E /I /F /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\main.js" "$(OutDir)\" /Y
|
|
||||||
copy "$(ProjectDir)..\..\..\project.json" "$(OutDir)\" /Y</Command>
|
|
||||||
<Message>Copy js and resource files.</Message>
|
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LocalDebuggerWorkingDirectory>$(OutDir)../../../../runtime/win32/</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(OutDir)../../../../simulator/win32</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<LocalDebuggerCommand>$(OutDir)../../../../runtime/win32/$(TargetFileName)</LocalDebuggerCommand>
|
<LocalDebuggerCommand>$(OutDir)../../../../simulator/win32/$(TargetFileName)</LocalDebuggerCommand>
|
||||||
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LocalDebuggerWorkingDirectory>$(OutDir)\Resource</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -52,6 +52,10 @@ Global
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.Build.0 = Debug|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.ActiveCfg = Release|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.Build.0 = Release|Win32
|
{001B324A-BB91-4E83-875C-C92F75C40857}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{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.ActiveCfg = Debug|Win32
|
||||||
{41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = 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.ActiveCfg = Release|Win32
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
@ -90,8 +90,9 @@
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories);$(_COCOS_LIB_PATH_WIN32_BEGIN);$(_COCOS_LIB_PATH_WIN32_END)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)</AdditionalDependencies>
|
||||||
<ProgramDatabaseFile>$(ProjectDir)../../../runtime/win32/$(TargetName).pdb</ProgramDatabaseFile>
|
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<OutputFile>$(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt)</OutputFile>
|
<ProgramDatabaseFile>$(ProjectDir)../../../simulator/win32/$(TargetName).pdb</ProgramDatabaseFile>
|
||||||
|
<OutputFile>$(ProjectDir)../../../simulator/win32/$(TargetName)$(TargetExt)</OutputFile>
|
||||||
</Link>
|
</Link>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
|
@ -111,26 +112,25 @@
|
||||||
</DllDataFileName>
|
</DllDataFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>if not exist "$(LocalDebuggerWorkingDirectory)" mkdir "$(LocalDebuggerWorkingDirectory)"</Command>
|
<Command>
|
||||||
<Message>copy files</Message>
|
</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>
|
<Command>
|
||||||
</Command>
|
</Command>
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\"
|
<Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\"
|
</Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(ProjectDir)..\..\..\runtime\win32\res" /D /E /I /F /Y
|
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /E /I /F /Y</Command>
|
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<CustomBuildStep>
|
<CustomBuildStep>
|
||||||
<Command>xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\"
|
<Command>if not exist "$(LocalDebuggerWorkingDirectory)" mkdir "$(LocalDebuggerWorkingDirectory)"
|
||||||
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\"
|
xcopy /Y /Q "$(OutDir)*.dll" "$(LocalDebuggerWorkingDirectory)"
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(ProjectDir)..\..\..\runtime\win32\res" /D /E /I /F /Y
|
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(LocalDebuggerWorkingDirectory)"
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /E /I /F /Y</Command>
|
xcopy "$(ProjectDir)..\..\..\res" "$(LocalDebuggerWorkingDirectory)\res" /D /E /I /F /Y
|
||||||
|
xcopy "$(ProjectDir)..\..\..\src" "$(LocalDebuggerWorkingDirectory)\src" /D /E /I /F /Y</Command>
|
||||||
<Outputs>$(TargetName).cab</Outputs>
|
<Outputs>$(TargetName).cab</Outputs>
|
||||||
<Inputs>$(TargetFileName)</Inputs>
|
<Inputs>$(TargetFileName)</Inputs>
|
||||||
</CustomBuildStep>
|
</CustomBuildStep>
|
||||||
|
@ -159,7 +159,7 @@ xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /
|
||||||
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)</AdditionalDependencies>
|
<AdditionalDependencies>libcurl_imp.lib;websockets.lib;%(AdditionalDependencies);$(_COCOS_LIB_WIN32_BEGIN);$(_COCOS_LIB_WIN32_END)</AdditionalDependencies>
|
||||||
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<OutputFile>$(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt)</OutputFile>
|
<OutputFile>$(ProjectDir)../../../simulator/win32/$(TargetName)$(TargetExt)</OutputFile>
|
||||||
</Link>
|
</Link>
|
||||||
<ResourceCompile>
|
<ResourceCompile>
|
||||||
<Culture>0x0409</Culture>
|
<Culture>0x0409</Culture>
|
||||||
|
@ -179,18 +179,16 @@ xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /
|
||||||
</DllDataFileName>
|
</DllDataFileName>
|
||||||
</Midl>
|
</Midl>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>if not exist "$(LocalDebuggerWorkingDirectory)" mkdir "$(LocalDebuggerWorkingDirectory)"</Command>
|
<Command>
|
||||||
<Message>copy files</Message>
|
</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreLinkEvent>
|
<PreLinkEvent>
|
||||||
<Command>
|
<Command>
|
||||||
</Command>
|
</Command>
|
||||||
</PreLinkEvent>
|
</PreLinkEvent>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32\"
|
<Command>
|
||||||
xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(ProjectDir)..\..\..\runtime\win32\"
|
</Command>
|
||||||
xcopy "$(ProjectDir)..\..\..\res" "$(ProjectDir)..\..\..\runtime\win32\res" /D /E /I /F /Y
|
|
||||||
xcopy "$(ProjectDir)..\..\..\src" "$(ProjectDir)..\..\..\runtime\win32\src" /D /E /I /F /Y</Command>
|
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ShowAllFiles>false</ShowAllFiles>
|
<ShowAllFiles>false</ShowAllFiles>
|
||||||
<LocalDebuggerWorkingDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)../../../../runtime/win32</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)../../../../simulator/win32</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LocalDebuggerWorkingDirectory>$(OutDir)../../../../runtime/win32</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(OutDir)../../../../simulator/win32</LocalDebuggerWorkingDirectory>
|
||||||
<LocalDebuggerCommand>$(OutDir)../../../../runtime/win32/$(TargetFileName)</LocalDebuggerCommand>
|
<LocalDebuggerCommand>$(OutDir)../../../../simulator/win32/$(TargetFileName)</LocalDebuggerCommand>
|
||||||
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>-workdir $(ProjectDir)../../../</LocalDebuggerCommandArguments>
|
||||||
<LocalDebuggerCommand>$(OutDir)../../../../runtime/win32/$(TargetFileName)</LocalDebuggerCommand>
|
<LocalDebuggerCommand>$(OutDir)../../../../simulator/win32/$(TargetFileName)</LocalDebuggerCommand>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -10,7 +10,7 @@ from argparse import ArgumentParser
|
||||||
class CocosBinTemplateGenerator(object):
|
class CocosBinTemplateGenerator(object):
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
print "Generate cocos binary template"
|
print("Generate cocos binary template")
|
||||||
|
|
||||||
self.cur_dir = os.path.realpath(os.path.dirname(__file__))
|
self.cur_dir = os.path.realpath(os.path.dirname(__file__))
|
||||||
self.repo_x = os.path.realpath(args.repo_x)
|
self.repo_x = os.path.realpath(args.repo_x)
|
||||||
|
@ -21,7 +21,7 @@ class CocosBinTemplateGenerator(object):
|
||||||
try:
|
try:
|
||||||
self.is_for_package = args.is_for_package
|
self.is_for_package = args.is_for_package
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "[Warn] %s" % e
|
print("[Warn] %s" % e)
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
self.clean_template()
|
self.clean_template()
|
||||||
|
|
|
@ -59,7 +59,7 @@ def execute_command(cmdstring, cwd=None, timeout=None, shell=True):
|
||||||
try:
|
try:
|
||||||
sub = subprocess.Popen(cmdstring_list, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
|
sub = subprocess.Popen(cmdstring_list, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "execute command fail:%s" % cmdstring
|
print("execute command fail:%s" % cmdstring)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
# subprocess.poll()方法:检查子进程是否结束了,如果结束了,设定并返回码,放在subprocess.returncode变量中
|
# subprocess.poll()方法:检查子进程是否结束了,如果结束了,设定并返回码,放在subprocess.returncode变量中
|
||||||
|
@ -71,7 +71,7 @@ def execute_command(cmdstring, cwd=None, timeout=None, shell=True):
|
||||||
|
|
||||||
if 0 != sub.returncode :
|
if 0 != sub.returncode :
|
||||||
errStr = "[ERROR] execute command fail:%s" % cmdstring
|
errStr = "[ERROR] execute command fail:%s" % cmdstring
|
||||||
print errStr
|
print(errStr)
|
||||||
raise Exception(errStr)
|
raise Exception(errStr)
|
||||||
|
|
||||||
return sub.returncode
|
return sub.returncode
|
||||||
|
@ -80,7 +80,7 @@ def execute_command(cmdstring, cwd=None, timeout=None, shell=True):
|
||||||
class CocosLibsCompiler(object):
|
class CocosLibsCompiler(object):
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
print "Compiler init function"
|
print("Compiler init function")
|
||||||
|
|
||||||
# argsments check and set
|
# argsments check and set
|
||||||
self.clean = args.clean
|
self.clean = args.clean
|
||||||
|
@ -101,7 +101,7 @@ class CocosLibsCompiler(object):
|
||||||
self.lib_dir = os.path.realpath(os.path.join(self.cur_dir, os.path.pardir, "libs"))
|
self.lib_dir = os.path.realpath(os.path.join(self.cur_dir, os.path.pardir, "libs"))
|
||||||
|
|
||||||
def compile(self):
|
def compile(self):
|
||||||
print "compile function"
|
print("compile function")
|
||||||
if self.clean:
|
if self.clean:
|
||||||
self.clean_libs()
|
self.clean_libs()
|
||||||
if self.build_win:
|
if self.build_win:
|
||||||
|
@ -124,7 +124,7 @@ class CocosLibsCompiler(object):
|
||||||
|
|
||||||
def compile_win(self):
|
def compile_win(self):
|
||||||
if not os_is_win32():
|
if not os_is_win32():
|
||||||
print "this is not win platform, needn't compile"
|
print("this is not win platform, needn't compile")
|
||||||
return
|
return
|
||||||
|
|
||||||
win32_proj_info = {
|
win32_proj_info = {
|
||||||
|
@ -244,9 +244,9 @@ class CocosLibsCompiler(object):
|
||||||
|
|
||||||
def compile_mac_ios(self):
|
def compile_mac_ios(self):
|
||||||
if not os_is_mac():
|
if not os_is_mac():
|
||||||
print "this is not mac platform, needn't compile"
|
print("this is not mac platform, needn't compile")
|
||||||
return
|
return
|
||||||
print "to compile mac"
|
print("to compile mac")
|
||||||
|
|
||||||
xcode_proj_info = {
|
xcode_proj_info = {
|
||||||
"build/cocos2d_libs.xcodeproj" : {
|
"build/cocos2d_libs.xcodeproj" : {
|
||||||
|
@ -282,21 +282,21 @@ class CocosLibsCompiler(object):
|
||||||
build_cmd = XCODE_CMD_FMT % (proj_path, "%s iOS" % target, "-sdk iphonesimulator ARCHS=\"i386 x86_64\" VALID_ARCHS=\"i386 x86_64\"", ios_sim_libs_dir)
|
build_cmd = XCODE_CMD_FMT % (proj_path, "%s iOS" % target, "-sdk iphonesimulator ARCHS=\"i386 x86_64\" VALID_ARCHS=\"i386 x86_64\"", ios_sim_libs_dir)
|
||||||
retVal = execute_command(build_cmd)
|
retVal = execute_command(build_cmd)
|
||||||
if 0 != retVal:
|
if 0 != retVal:
|
||||||
print "[ERROR] compile ios simulator fail"
|
print("[ERROR] compile ios simulator fail")
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
# compile ios device
|
# compile ios device
|
||||||
build_cmd = XCODE_CMD_FMT % (proj_path, "%s iOS" % target, "-sdk iphoneos", ios_dev_libs_dir)
|
build_cmd = XCODE_CMD_FMT % (proj_path, "%s iOS" % target, "-sdk iphoneos", ios_dev_libs_dir)
|
||||||
retVal = execute_command(build_cmd)
|
retVal = execute_command(build_cmd)
|
||||||
if 0 != retVal:
|
if 0 != retVal:
|
||||||
print "[ERROR] compile ios device fail"
|
print("[ERROR] compile ios device fail")
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
# compile mac
|
# compile mac
|
||||||
build_cmd = XCODE_CMD_FMT % (proj_path, "%s Mac" % target, "", mac_out_dir)
|
build_cmd = XCODE_CMD_FMT % (proj_path, "%s Mac" % target, "", mac_out_dir)
|
||||||
retVal = execute_command(build_cmd)
|
retVal = execute_command(build_cmd)
|
||||||
if 0 != retVal:
|
if 0 != retVal:
|
||||||
print "[ERROR] compile mac fail"
|
print("[ERROR] compile mac fail")
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
# generate fat libs for iOS
|
# generate fat libs for iOS
|
||||||
|
@ -320,7 +320,7 @@ class CocosLibsCompiler(object):
|
||||||
execute_command(mac_strip_cmd)
|
execute_command(mac_strip_cmd)
|
||||||
|
|
||||||
def compile_android(self, language):
|
def compile_android(self, language):
|
||||||
print "compile android"
|
print("compile android")
|
||||||
# build .so for android
|
# build .so for android
|
||||||
CONSOLE_PATH = "tools/cocos2d-console/bin"
|
CONSOLE_PATH = "tools/cocos2d-console/bin"
|
||||||
SCRIPT_MK_PATH = "frameworks/runtime-src/proj.android/jni/Application.mk"
|
SCRIPT_MK_PATH = "frameworks/runtime-src/proj.android/jni/Application.mk"
|
||||||
|
@ -419,7 +419,7 @@ class CocosLibsCompiler(object):
|
||||||
file_obj.close()
|
file_obj.close()
|
||||||
|
|
||||||
def clean_libs(self):
|
def clean_libs(self):
|
||||||
print "to clean libs"
|
print("to clean libs")
|
||||||
rmdir(self.lib_dir)
|
rmdir(self.lib_dir)
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,20 +446,20 @@ if __name__ == "__main__":
|
||||||
args.all = True
|
args.all = True
|
||||||
|
|
||||||
beginSecond = time.time()
|
beginSecond = time.time()
|
||||||
print ">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond))
|
print(">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond)))
|
||||||
|
|
||||||
compiler = CocosLibsCompiler(args)
|
compiler = CocosLibsCompiler(args)
|
||||||
compiler.compile()
|
compiler.compile()
|
||||||
|
|
||||||
endSecond = time.time()
|
endSecond = time.time()
|
||||||
print ">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond))
|
print(">>> Bgein Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(beginSecond)))
|
||||||
print ">>> End Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(endSecond))
|
print(">>> End Compile at %s" % time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(endSecond)))
|
||||||
interSecond = endSecond - beginSecond
|
interSecond = endSecond - beginSecond
|
||||||
interSecond = int(interSecond)
|
interSecond = int(interSecond)
|
||||||
print ">>> Use Second %d" % interSecond
|
print(">>> Use Second %d" % interSecond)
|
||||||
houre = interSecond/(60*60)
|
houre = interSecond/(60*60)
|
||||||
interSecond = interSecond%(60*60)
|
interSecond = interSecond%(60*60)
|
||||||
minute = interSecond/60
|
minute = interSecond/60
|
||||||
second = interSecond%60
|
second = interSecond%60
|
||||||
print ">>> Use Time %d:%d:%d" % (houre, minute, second)
|
print(">>> Use Time %d:%d:%d" % (houre, minute, second))
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ class TemplateModifier(object):
|
||||||
pbx_proj.add_file_if_doesnt_exist("../Resources/res", res_group, tree="<group>")
|
pbx_proj.add_file_if_doesnt_exist("../Resources/res", res_group, tree="<group>")
|
||||||
|
|
||||||
if pbx_proj.modified:
|
if pbx_proj.modified:
|
||||||
print "Save xcode project"
|
print("Save xcode project")
|
||||||
pbx_proj.save()
|
pbx_proj.save()
|
||||||
|
|
||||||
# modify the engine path
|
# modify the engine path
|
||||||
|
|
|
@ -133,7 +133,7 @@ class PBXType(PBXDict):
|
||||||
if cls and issubclass(cls, PBXType):
|
if cls and issubclass(cls, PBXType):
|
||||||
return cls(o)
|
return cls(o)
|
||||||
|
|
||||||
print 'warning: unknown PBX type: %s' % isa
|
print('warning: unknown PBX type: %s' % isa)
|
||||||
return PBXDict(o)
|
return PBXDict(o)
|
||||||
else:
|
else:
|
||||||
return o
|
return o
|
||||||
|
@ -236,8 +236,8 @@ class PBXFileReference(PBXType):
|
||||||
self.build_phase = build_phase
|
self.build_phase = build_phase
|
||||||
|
|
||||||
if f_type == '?' and not ignore_unknown_type:
|
if f_type == '?' and not ignore_unknown_type:
|
||||||
print 'unknown file extension: %s' % ext
|
print('unknown file extension: %s' % ext)
|
||||||
print 'please add extension and Xcode type to PBXFileReference.types'
|
print('please add extension and Xcode type to PBXFileReference.types')
|
||||||
|
|
||||||
return f_type
|
return f_type
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ class PBXFileReference(PBXType):
|
||||||
@classmethod
|
@classmethod
|
||||||
def Create(cls, os_path, tree='SOURCE_ROOT', ignore_unknown_type=False):
|
def Create(cls, os_path, tree='SOURCE_ROOT', ignore_unknown_type=False):
|
||||||
if tree not in cls.trees:
|
if tree not in cls.trees:
|
||||||
print 'Not a valid sourceTree type: %s' % tree
|
print('Not a valid sourceTree type: %s' % tree)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
fr = cls()
|
fr = cls()
|
||||||
|
@ -707,7 +707,7 @@ class XcodeProject(PBXDict):
|
||||||
root_group_id = self.root_object.get('mainGroup')
|
root_group_id = self.root_object.get('mainGroup')
|
||||||
self.root_group = self.objects[root_group_id]
|
self.root_group = self.objects[root_group_id]
|
||||||
else:
|
else:
|
||||||
print "error: project has no root object"
|
print("error: project has no root object")
|
||||||
self.root_object = None
|
self.root_object = None
|
||||||
self.root_group = None
|
self.root_group = None
|
||||||
|
|
||||||
|
@ -1505,10 +1505,10 @@ class XcodeProject(PBXDict):
|
||||||
|
|
||||||
def apply_patch(self, patch_path, xcode_path):
|
def apply_patch(self, patch_path, xcode_path):
|
||||||
if not os.path.isfile(patch_path) or not os.path.isdir(xcode_path):
|
if not os.path.isfile(patch_path) or not os.path.isdir(xcode_path):
|
||||||
print 'ERROR: couldn\'t apply "%s" to "%s"' % (patch_path, xcode_path)
|
print('ERROR: couldn\'t apply "%s" to "%s"' % (patch_path, xcode_path))
|
||||||
return
|
return
|
||||||
|
|
||||||
print 'applying "%s" to "%s"' % (patch_path, xcode_path)
|
print('applying "%s" to "%s"' % (patch_path, xcode_path))
|
||||||
|
|
||||||
return subprocess.call(['patch', '-p1', '--forward', '--directory=%s' % xcode_path, '--input=%s' % patch_path])
|
return subprocess.call(['patch', '-p1', '--forward', '--directory=%s' % xcode_path, '--input=%s' % patch_path])
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ class VCXProject(object):
|
||||||
else:
|
else:
|
||||||
cur_mode = "Release"
|
cur_mode = "Release"
|
||||||
|
|
||||||
print "event: %s" % event
|
print("event: %s" % event)
|
||||||
event_node = self.get_node_if(cfg_node, event)
|
event_node = self.get_node_if(cfg_node, event)
|
||||||
cmd_node = self.get_node_if(event_node, eventItem)
|
cmd_node = self.get_node_if(event_node, eventItem)
|
||||||
text_node = self.xmldoc.createTextNode(command)
|
text_node = self.xmldoc.createTextNode(command)
|
||||||
|
|
|
@ -44,7 +44,7 @@ def execute_command(cmdstring, cwd=None, timeout=None, shell=True):
|
||||||
try:
|
try:
|
||||||
sub = subprocess.Popen(cmdstring_list, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
|
sub = subprocess.Popen(cmdstring_list, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "execute command fail:%s" % cmdstring
|
print("execute command fail:%s" % cmdstring)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
# subprocess.poll()方法:检查子进程是否结束了,如果结束了,设定并返回码,放在subprocess.returncode变量中
|
# subprocess.poll()方法:检查子进程是否结束了,如果结束了,设定并返回码,放在subprocess.returncode变量中
|
||||||
|
@ -56,7 +56,7 @@ def execute_command(cmdstring, cwd=None, timeout=None, shell=True):
|
||||||
|
|
||||||
if 0 != sub.returncode :
|
if 0 != sub.returncode :
|
||||||
errStr = "[ERROR] execute command fail:%s" % cmdstring
|
errStr = "[ERROR] execute command fail:%s" % cmdstring
|
||||||
print errStr
|
print(errStr)
|
||||||
raise Exception(errStr)
|
raise Exception(errStr)
|
||||||
|
|
||||||
return sub.returncode
|
return sub.returncode
|
||||||
|
|
Loading…
Reference in New Issue