HelloLua runs ok on win32

This commit is contained in:
minggo 2011-06-15 11:43:00 +08:00
parent a4d9d1d4d0
commit 73c33c28dd
5 changed files with 283 additions and 0 deletions

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="HelloLua"
ProjectGUID="{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
RootNamespace="HelloLua.win32"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
IntermediateDirectory="$(ConfigurationName).win32"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/HelloLua.tlb"
HeaderFileName="HelloLua.h"
DLLDataFileName=""
InterfaceIdentifierFileName="HelloLua_i.c"
ProxyFileName="HelloLua_p.c"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Classes;.;&quot;$(SolutionDir)\lua\tolua&quot;;&quot;$(SolutionDir)\lua\src&quot;;&quot;$(SolutionDir)\cocos2dx&quot;;&quot;$(SolutionDir)\cocos2dx\include&quot;;&quot;$(SolutionDir)\cocos2dx\platform&quot;;&quot;$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES&quot;;&quot;$(SolutionDir)\CocosDenshion\Include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1;ENABLE_LUA"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
DisableSpecificWarnings="4251"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcocos2d.lib libgles_cm.lib libCocosDenshion.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName).win32"
IntermediateDirectory="$(ConfigurationName).win32"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/HelloLua.tlb"
HeaderFileName="HelloLua.h"
DLLDataFileName=""
InterfaceIdentifierFileName="HelloLua_i.c"
ProxyFileName="HelloLua_p.c"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;.\win32;.\Classes;..\cocos2dx;..\cocos2dx\include;..\cocos2dx\platform;..\cocos2dx\platform\third_party\win32\OGLES;..\CocosDenshion\Include"
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;NDEBUG"
ExceptionHandling="0"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="0"
DisableSpecificWarnings="4251"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libcocos2d.lib libgles_cm.lib libCocosDenshion.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="$(OutDir)"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Classes"
>
<File
RelativePath="..\Classes\AppDelegate.cpp"
>
</File>
<File
RelativePath="..\Classes\AppDelegate.h"
>
</File>
</Filter>
<Filter
Name="win32"
>
<File
RelativePath=".\main.cpp"
>
</File>
<File
RelativePath=".\main.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
ShowAllFiles="true"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
WorkingDirectory="$(ProjectDir)Resource\"
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
WorkingDirectory="$(ProjectDir)Resource\"
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

17
HelloLua/win32/main.cpp Normal file
View File

@ -0,0 +1,17 @@
#include "main.h"
#include "AppDelegate.h"
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
return cocos2d::CCApplication::sharedApplication().run();
}

13
HelloLua/win32/main.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef __MAIN_H__
#define __MAIN_H__
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <tchar.h>
// C RunTime Header Files
#include "CCStdC.h"
#endif // __MAIN_H__

View File

@ -26,6 +26,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests\test.win32\t
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "lua\lua.vcproj", "{A9376AC9-4D65-498F-885D-EEC3B41DD6E8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua\win32\HelloLua.win32.vcproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
ProjectSection(ProjectDependencies) = postProject
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{A9376AC9-4D65-498F-885D-EEC3B41DD6E8} = {A9376AC9-4D65-498F-885D-EEC3B41DD6E8}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -60,6 +66,10 @@ Global
{A9376AC9-4D65-498F-885D-EEC3B41DD6E8}.Debug|Win32.Build.0 = Debug|Win32
{A9376AC9-4D65-498F-885D-EEC3B41DD6E8}.Release|Win32.ActiveCfg = Release|Win32
{A9376AC9-4D65-498F-885D-EEC3B41DD6E8}.Release|Win32.Build.0 = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE