mirror of https://github.com/axmolengine/axmol.git
issue #489 modified for vs2008.
This commit is contained in:
parent
56a1849e9f
commit
aba77f4cae
|
@ -89,7 +89,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy /Y "$(ProjectDir)..\Resource\*.*" "$(OutDir)""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy /Y "$(ProjectDir)..\Resource\*.*" "$(OutDir)""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="gb2312"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
WorkingDirectory="$(ProjectDir)..\Resource\"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
WorkingDirectory="$(ProjectDir)..\Resource\"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
|
@ -73,7 +73,8 @@
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y "$(ProjectDir)..\Resource\*.*" "$(OutDir)"</Command>
|
<Command>
|
||||||
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
@ -100,7 +101,8 @@
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y "$(ProjectDir)..\Resource\*.*" "$(OutDir)"</Command>
|
<Command>
|
||||||
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2,5 +2,9 @@
|
||||||
<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)'=='Debug|Win32'">$(ProjectDir)..\Resource</LocalDebuggerWorkingDirectory>
|
||||||
|
<LocalDebuggerWorkingDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\Resource</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -39,8 +39,11 @@ echo.* Check the cocos2d-win32 application "tests.exe" ...
|
||||||
echo.*/
|
echo.*/
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
set CC_TEST_PATH=".\Release.win32\tests.exe"
|
cd ".\Release.win32\"
|
||||||
if not exist %CC_TEST_PATH% (
|
set CC_TEST_BIN="tests.exe"
|
||||||
|
set CC_TEST_RES="..\tests\Res\*.*"
|
||||||
|
|
||||||
|
if not exist %CC_TEST_BIN% (
|
||||||
echo Can't find the binary "tests.exe", is there build error?
|
echo Can't find the binary "tests.exe", is there build error?
|
||||||
goto ERROR
|
goto ERROR
|
||||||
)
|
)
|
||||||
|
@ -49,7 +52,8 @@ echo./*
|
||||||
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
|
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
|
||||||
echo.*/
|
echo.*/
|
||||||
echo.
|
echo.
|
||||||
call %CC_TEST_PATH%
|
xcopy /E /Y /Q %CC_TEST_RES% .
|
||||||
|
call %CC_TEST_BIN%
|
||||||
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
|
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
|
||||||
goto EOF
|
goto EOF
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,9 @@ void _CheckPath()
|
||||||
{
|
{
|
||||||
WCHAR wszPath[MAX_PATH];
|
WCHAR wszPath[MAX_PATH];
|
||||||
int nNum = WideCharToMultiByte(CP_ACP, 0, wszPath,
|
int nNum = WideCharToMultiByte(CP_ACP, 0, wszPath,
|
||||||
GetModuleFileName(NULL, wszPath, MAX_PATH),
|
GetCurrentDirectory(sizeof(wszPath), wszPath),
|
||||||
s_pszResourcePath, MAX_PATH, NULL, NULL);
|
s_pszResourcePath, MAX_PATH, NULL, NULL);
|
||||||
|
s_pszResourcePath[nNum] = '\\';
|
||||||
for (int i = nNum; i >= 0; --i)
|
|
||||||
{
|
|
||||||
if (L'\\' == s_pszResourcePath[i])
|
|
||||||
{
|
|
||||||
s_pszResourcePath[i + 1] = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\cocos2dx\platform";"$(SolutionDir)cocos2dx\platform\third_party\win32\iconv";"$(SolutionDir)cocos2dx\platform\third_party\win32\zlib";"$(SolutionDir)cocos2dx\platform\third_party\win32\libpng";"$(SolutionDir)cocos2dx\platform\third_party\win32\libjpeg";"$(SolutionDir)cocos2dx\platform\third_party\win32\libxml2";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";..\include;.."
|
AdditionalIncludeDirectories="..\platform;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\OGLES;..\include;.."
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES"
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\cocos2dx\platform";"$(SolutionDir)cocos2dx\platform\third_party\win32\iconv";"$(SolutionDir)cocos2dx\platform\third_party\win32\zlib";"$(SolutionDir)cocos2dx\platform\third_party\win32\libpng";"$(SolutionDir)cocos2dx\platform\third_party\win32\libjpeg";"$(SolutionDir)cocos2dx\platform\third_party\win32\libxml2";"$(SolutionDir)cocos2dx\platform\third_party\win32\OGLES";..\include;.."
|
AdditionalIncludeDirectories="..\platform;..\platform\third_party\win32\iconv;..\platform\third_party\win32\zlib;..\platform\third_party\win32\libpng;..\platform\third_party\win32\libjpeg;..\platform\third_party\win32\libxml2;..\platform\third_party\win32\OGLES;..\include;.."
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
|
|
@ -99,9 +99,40 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
||||||
var file = FileSys.OpenTextFile(strUserPath, 2, true);
|
var file = FileSys.OpenTextFile(strUserPath, 2, true);
|
||||||
var strUserValue = "";
|
var strUserValue = "";
|
||||||
if(WizardVersion >= 10.0)
|
if(WizardVersion >= 10.0)
|
||||||
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n <PropertyGroup>\r\n <ShowAllFiles>true</ShowAllFiles>\r\n </PropertyGroup>\r\n</Project>";
|
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
|
||||||
|
+ "<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n"
|
||||||
|
+ " <PropertyGroup>\r\n"
|
||||||
|
+ " <ShowAllFiles>true</ShowAllFiles>\r\n"
|
||||||
|
+ " <LocalDebuggerWorkingDirectory Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(ProjectDir)Resource</LocalDebuggerWorkingDirectory>\r\n"
|
||||||
|
+ " <LocalDebuggerWorkingDirectory Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(ProjectDir)Resource</LocalDebuggerWorkingDirectory>\r\n"
|
||||||
|
+ " <DebuggerFlavor Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">WindowsLocalDebugger</DebuggerFlavor>\r\n"
|
||||||
|
+ " <DebuggerFlavor Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">WindowsLocalDebugger</DebuggerFlavor>\r\n"
|
||||||
|
+ " </PropertyGroup>\r\n"
|
||||||
|
+ "</Project>";
|
||||||
else
|
else
|
||||||
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"></VisualStudioUserFile>";
|
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n"
|
||||||
|
+ "<VisualStudioUserFile\r\n"
|
||||||
|
+ " ProjectType=\"Visual C++\"\r\n"
|
||||||
|
+ " Version=\"9.00\"\r\n"
|
||||||
|
+ " ShowAllFiles=\"true\"\r\n"
|
||||||
|
+ " >\r\n"
|
||||||
|
+ " <Configurations>\r\n"
|
||||||
|
+ " <Configuration\r\n"
|
||||||
|
+ " Name=\"Debug|Win32\"\r\n"
|
||||||
|
+ " >\r\n"
|
||||||
|
+ " <DebugSettings\r\n"
|
||||||
|
+ " WorkingDirectory=\"$(ProjectDir)Resource\\\"\r\n"
|
||||||
|
+ " />\r\n"
|
||||||
|
+ " </Configuration>\r\n"
|
||||||
|
+ " <Configuration\r\n"
|
||||||
|
+ " Name=\"Release|Win32\"\r\n"
|
||||||
|
+ " >\r\n"
|
||||||
|
+ " <DebugSettings\r\n"
|
||||||
|
+ " WorkingDirectory=\"$(ProjectDir)Resource\\\"\r\n"
|
||||||
|
+ " />\r\n"
|
||||||
|
+ " </Configuration>\r\n"
|
||||||
|
+ " </Configurations>\r\n"
|
||||||
|
+ "</VisualStudioUserFile>";
|
||||||
file.WriteLine(strUserValue);
|
file.WriteLine(strUserValue);
|
||||||
file.Close();
|
file.Close();
|
||||||
|
|
||||||
|
@ -280,9 +311,9 @@ function AddConfigurations(proj, strProjectName) {
|
||||||
MidlTool.DLLDataFileName = "";
|
MidlTool.DLLDataFileName = "";
|
||||||
|
|
||||||
// Post-build settings
|
// Post-build settings
|
||||||
var PostBuildTool = config.Tools("VCPostBuildEventTool");
|
// var PostBuildTool = config.Tools("VCPostBuildEventTool");
|
||||||
PostBuildTool.Description = "Performing copy resource from Resource to OutDir...";
|
// PostBuildTool.Description = "Performing copy resource from Resource to OutDir...";
|
||||||
PostBuildTool.CommandLine = "xcopy /E /Q /Y \"$(ProjectDir)Resource\\*.*\" \"$(OutDir)\"";
|
// PostBuildTool.CommandLine = "xcopy /E /Q /Y \"$(ProjectDir)Resource\\*.*\" \"$(OutDir)\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
echo off
|
|
||||||
xcopy /E /Y /Q ..\Res\*.* %1
|
|
|
@ -90,7 +90,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy_res.bat "$(OutDir)""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine="copy_res.bat "$(OutDir)""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="gb2312"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
WorkingDirectory="$(ProjectDir)..\Res"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
WorkingDirectory="$(ProjectDir)..\Res"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
|
@ -73,9 +73,6 @@
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>copy_res.bat "$(OutDir)"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
@ -101,9 +98,6 @@
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>copy_res.bat "$(OutDir)"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\tests\UserDefaultTest\UserDefaultTest.cpp" />
|
<ClCompile Include="..\tests\UserDefaultTest\UserDefaultTest.cpp" />
|
||||||
|
|
|
@ -2,5 +2,9 @@
|
||||||
<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)'=='Debug|Win32'">$(ProjectDir)..\Res</LocalDebuggerWorkingDirectory>
|
||||||
|
<LocalDebuggerWorkingDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\Res</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue