Merge pull request #1277 from trentmillar/gles20

fixed #1457: Adding VC2012 sln file and VS2012 changes to build-win32.bat & install-templates.msvc.bat
This commit is contained in:
James Chen 2012-09-03 19:23:49 -07:00
commit 45f95da30d
4 changed files with 524 additions and 89 deletions

View File

@ -1,72 +1,79 @@
@echo off
echo./*
echo.* Check VC++ environment...
echo.*/
echo.
if defined VS90COMNTOOLS (
set VSVARS="%VS90COMNTOOLS%vsvars32.bat"
set VC_VER=90
) else if defined VS100COMNTOOLS (
set VSVARS="%VS100COMNTOOLS%vsvars32.bat"
set VC_VER=100
)
if not defined VSVARS (
echo Can't find VC2008 or VC2010 installed!
goto ERROR
)
echo./*
echo.* Building cocos2d-x library binary, please wait a while...
echo.*/
echo.
call %VSVARS%
if %VC_VER%==90 (
vcbuild /MP /M10 cocos2d-win32.vc2008.sln $ALL
) else if %VC_VER%==100 (
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Debug"
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Release"
) else (
echo Script error.
goto ERROR
)
echo./*
echo.* Check the cocos2d-win32 application "TestCpp.exe" ...
echo.*/
echo.
cd ".\Release.win32\"
set CC_TEST_BIN=TestCpp.exe
set CC_TEST_RES=..\samples\TestCpp\Resources\*.*
set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources\*.*
set CC_HELLOLUA_RES=..\samples\HelloLua\Resources\*.*
set CC_TESTJS_RES=..\samples\TestJavascript\Resources\*.*
if not exist "%CC_TEST_BIN%" (
echo Can't find the binary "TestCpp.exe", is there build error?
goto ERROR
)
echo./*
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
echo.*/
echo.
xcopy /E /Y /Q "%CC_TEST_RES%" .
xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" .
xcopy /E /Y /Q "%CC_HELLOLUA_RES%" .
xcopy /E /Y /Q "%CC_TESTJS_RES%" .
call "%CC_TEST_BIN%"
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
goto EOF
:ERROR
pause
:EOF
@echo off
echo./*
echo.* Check VC++ environment...
echo.*/
echo.
if defined VS110COMNTOOLS (
set VSVARS="%VS110COMNTOOLS%vsvars32.bat"
set VC_VER=110
) else if defined VS100COMNTOOLS (
set VSVARS="%VS100COMNTOOLS%vsvars32.bat"
set VC_VER=100
) else if defined VS90COMNTOOLS (
set VSVARS="%VS90COMNTOOLS%vsvars32.bat"
set VC_VER=90
)
if not defined VSVARS (
echo Can't find VC2008, VC2010 or VC2012 installed!
goto ERROR
)
echo./*
echo.* Building cocos2d-x library binary, please wait a while...
echo.*/
echo.
call %VSVARS%
if %VC_VER%==90 (
vcbuild /MP /M10 cocos2d-win32.vc2008.sln $ALL
) else if %VC_VER%==100 (
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Debug"
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Release"
) else if %VC_VER%==110 (
msbuild cocos2d-win32.vc2012.sln /t:Clean
msbuild cocos2d-win32.vc2012.sln /p:Configuration="Debug" /m
msbuild cocos2d-win32.vc2012.sln /p:Configuration="Release" /m
) else (
echo Script error.
goto ERROR
)
echo./*
echo.* Check the cocos2d-win32 application "TestCpp.exe" ...
echo.*/
echo.
cd ".\Release.win32\"
set CC_TEST_BIN=TestCpp.exe
set CC_TEST_RES=..\samples\TestCpp\Resources\*.*
set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources\*.*
set CC_HELLOLUA_RES=..\samples\HelloLua\Resources\*.*
set CC_TESTJS_RES=..\samples\TestJavascript\Resources\*.*
if not exist "%CC_TEST_BIN%" (
echo Can't find the binary "TestCpp.exe", is there build error?
goto ERROR
)
echo./*
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
echo.*/
echo.
xcopy /E /Y /Q "%CC_TEST_RES%" .
xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" .
xcopy /E /Y /Q "%CC_HELLOLUA_RES%" .
xcopy /E /Y /Q "%CC_TESTJS_RES%" .
call "%CC_TEST_BIN%"
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
goto EOF
:ERROR
pause
:EOF

188
cocos2d-win32.vc2012.sln Normal file
View File

@ -0,0 +1,188 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosDenshion", "CocosDenshion\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj.win32\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "scripting\lua\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "samples\HelloLua\proj.win32\HelloLua.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "samples\HelloCpp\proj.win32\HelloCpp.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "samples\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
ProjectSection(ProjectDependencies) = postProject
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject
Global
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.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
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{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
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosDenshion", "CocosDenshion\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj.win32\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "scripting\lua\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "samples\HelloLua\proj.win32\HelloLua.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "samples\HelloCpp\proj.win32\HelloCpp.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "samples\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
ProjectSection(ProjectDependencies) = postProject
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject
Global
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.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
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{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
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,17 +1,18 @@
echo./*
echo.* Install Cocos2d-win32 application wizard...
echo.*/
echo.
set SCRIPT_LOG=InstallWizardLog.txt
set SCRIPT_DIR=.\template\msvc\
if exist %SCRIPT_LOG% del /Q %SCRIPT_LOG%
cscript "%SCRIPT_DIR%InstallWizardForVC2008Express.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVC2010Express.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVS2008.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVS2010.js" /quiet
if exist %SCRIPT_LOG% more %SCRIPT_LOG%
if exist %SCRIPT_LOG% del /Q %SCRIPT_LOG%
echo./*
echo.* Install Cocos2d-win32 application wizard...
echo.*/
echo.
set SCRIPT_LOG=InstallWizardLog.txt
set SCRIPT_DIR=.\template\msvc\
if exist %SCRIPT_LOG% del /Q %SCRIPT_LOG%
cscript "%SCRIPT_DIR%InstallWizardForVC2008Express.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVC2010Express.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVS2008.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVS2010.js" /quiet
cscript "%SCRIPT_DIR%InstallWizardForVS2012.js" /quiet
if exist %SCRIPT_LOG% more %SCRIPT_LOG%
if exist %SCRIPT_LOG% del /Q %SCRIPT_LOG%

View File

@ -0,0 +1,239 @@
// Setup program for the Cocos2d-win32 App Wizard for VC++ 11.0 (VC2012)
main();
function EchoInfo(bQuiet, strMsg) {
if (! bQuiet) {
WScript.Echo(strMsg);
}
else {
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
var strLogPath = "InstallWizardLog.txt"
var file = FileSys.OpenTextFile(strLogPath, 8, true);
file.WriteLine(strMsg);
file.Close();
}
}
function EchoError(bQuiet, strMsg) {
strMsg = "Error: " + strMsg;
if (! bQuiet) {
WScript.Echo(strMsg);
}
else {
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
var strLogPath = "InstallWizardLog.txt"
var file = FileSys.OpenTextFile(strLogPath, 8, true);
file.WriteLine(strMsg);
file.Close();
}
}
function main() {
// Decode command line arguments
var bDebug = false;
var bQuiet = false;
var bElevated = false;
var Args = WScript.Arguments;
for (var i = 0; i < Args.length; i++) {
if (Args(i) == "/debug")
bDebug = true;
else if (Args(i) == "/elevated")
bElevated = true;
else if (Args(i) == "/quiet")
bQuiet = true;
}
// See if UAC is enabled
var Shell = WScript.CreateObject("Shell.Application");
if (!bElevated && Shell.IsRestricted("System", "EnableLUA")) {
// Check that the script is being run interactively.
if (!WScript.Interactive) {
EchoError(bQuiet, "(Windows LUA) Elevation required.");
return;
}
// Now relaunch the script, using the "RunAs" verb to elevate
var strParams = "\"" + WScript.ScriptFullName + "\"";
if (bDebug)
strParams += " /debug";
strParams += " /elevated";
Shell.ShellExecute(WScript.FullName, strParams, null, "RunAs");
return;
}
// Create shell object
var WSShell = WScript.CreateObject("WScript.Shell");
// Create file system object
var FileSys = WScript.CreateObject("Scripting.FileSystemObject");
// Get the folder containing the script file
var strScriptPath = FileSys.GetParentFolderName(WScript.ScriptFullName);
if (strScriptPath == null || strScriptPath == "")
strScriptPath = ".";
// Get the folder script files copy to
var strValue = "";
try {
var strVCKey = "HKLM\\Software\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir";
strValue = WSShell.RegRead(strVCKey);
}
catch (e) {
try {
var strVCKey_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir";
strValue = WSShell.RegRead(strVCKey_x64);
}
catch (e) {
EchoError(bQuiet, "Cannot find where Visual Studio 2012 is installed.");
return;
}
}
var strDestFolder = FileSys.BuildPath(strValue, "vcprojects");
if (bDebug)
WScript.Echo("Destination: " + strDestFolder);
if (!FileSys.FolderExists(strDestFolder)) {
EchoError(bQuiet, "Cannot find destination folder (should be: " + strDestFolder + ")");
return;
}
// Wizard Info
var nNumWizards = 1;
var astrWizardName = new Array();
astrWizardName[0] = "CCAppWiz.win32";
var nCntr;
for (nCntr = 0; nCntr < nNumWizards; nCntr++) {
var strSourceFolder = FileSys.BuildPath(strScriptPath, astrWizardName[nCntr]);
if (bDebug)
WScript.Echo("Source: " + strSourceFolder);
if (!FileSys.FolderExists(strSourceFolder)) {
EchoError(bQuiet, "Cannot find Wizard folder (should be: " + strSourceFolder + ")");
return;
}
// Copy files
try {
var strSrc = FileSys.BuildPath(strSourceFolder, astrWizardName[nCntr] + ".ico");
var strDest = FileSys.BuildPath(strDestFolder, astrWizardName[nCntr] + ".ico");
FileSys.CopyFile(strSrc, strDest);
strSrc = FileSys.BuildPath(strSourceFolder, astrWizardName[nCntr] + ".vsdir");
strDest = FileSys.BuildPath(strDestFolder, astrWizardName[nCntr] + ".vsdir");
FileSys.CopyFile(strSrc, strDest);
}
catch (e) {
var strError = "no info";
if (e.description.length != 0)
strError = e.description;
EchoError(bQuiet, "Cannot copy file (" + strError + ")");
return;
}
// Read and write CCAppWiz.vsz, add engine version and replace path when found
try {
var strSrc = FileSys.BuildPath(strSourceFolder, astrWizardName[nCntr] + ".vsz");
var strDest = FileSys.BuildPath(strDestFolder, astrWizardName[nCntr] + ".vsz");
var ForReading = 1;
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
if (fileSrc == null) {
EchoError(bQuiet, "Cannot open source file: " + strSrc);
return;
}
var ForWriting = 2;
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
if (fileDest == null) {
EchoError(bQuiet, " Cannot open destination file: " + strDest);
return;
}
while (!fileSrc.AtEndOfStream) {
var strLine = fileSrc.ReadLine();
if (strLine.indexOf("Wizard=VsWizard.VsWizardEngine") != -1)
strLine += ".11.0";
else if (strLine.indexOf("WIZARD_VERSION") != -1)
strLine = "Param=\"WIZARD_VERSION = 11.0\"";
else if (strLine.indexOf("ABSOLUTE_PATH") != -1)
strLine = "Param=\"ABSOLUTE_PATH = " + strSourceFolder + "\"";
fileDest.WriteLine(strLine);
}
fileSrc.Close();
fileDest.Close();
}
catch (e) {
var strError = "no info";
if (e.description.length != 0)
strError = e.description;
EchoError(bQuiet, "Cannot read and write CCAppWiz.vsz (" + strError + ")");
return;
}
}
// Create Cocos2d-x folder
var strDestCCFolder = "";
try {
strDestCCFolder = FileSys.BuildPath(strDestFolder, "Cocos2d-x");
if (!FileSys.FolderExists(strDestCCFolder))
FileSys.CreateFolder(strDestCCFolder);
if (bDebug)
WScript.Echo("Cocos2d-x Folder: " + strDestCCFolder);
}
catch (e) {
var strError = "no info";
if (e.description.length != 0)
strError = e.description;
EchoError(bQuiet, "Cannot create Cocos2d-x folder (" + strError + ")");
return;
}
// Read and write additional CCAppWiz.vsdir, add path to the wizard location
try {
var strDest = FileSys.BuildPath(strDestCCFolder, "Cocos2d-x.vsdir");
var ForWriting = 2;
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
if (fileDest == null) {
EchoError(bQuiet, "Cannot open destination file: " + strDest);
return;
}
var nCntr;
for (nCntr = 0; nCntr < nNumWizards; nCntr++) {
var strSourceFolder = FileSys.BuildPath(strScriptPath, astrWizardName[nCntr]);
var strSrc = FileSys.BuildPath(strSourceFolder, astrWizardName[nCntr] + ".vsdir");
var ForReading = 1;
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
if (fileSrc == null) {
EchoError(bQuiet, "Cannot open source file: " + strSrc);
return;
}
while (!fileSrc.AtEndOfStream) {
var strLine = fileSrc.ReadLine();
if (strLine.indexOf(astrWizardName[nCntr] + ".vsz|") != -1)
strLine = "..\\" + strLine;
fileDest.WriteLine(strLine);
}
fileSrc.Close();
}
fileDest.Close();
}
catch (e) {
var strError = "no info";
if (e.description.length != 0)
strError = e.description;
EchoError(bQuiet, "Cannot read and write Cocos2d-x\\CCAppWiz.vsdir (" + strError + ")");
return;
}
EchoInfo(bQuiet, "App Wizard successfully installed for VS2012!");
}