issue 300 Modify CCAppWiz to adapt 0.8. Add Install wizard scripts for VS2010 VC2010Express VC2008Express.
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -2,7 +2,7 @@
|
|||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="CCXAppWiz.win32"
|
||||
Name="CCAppWiz.win32"
|
||||
ProjectGUID="{104F4414-0DA5-4982-A413-766DD1698469}"
|
||||
RootNamespace="CCXAppWiz.win32"
|
||||
Keyword="CustomAppWizProj"
|
||||
|
@ -143,15 +143,15 @@
|
|||
Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.ico"
|
||||
RelativePath=".\CCAppWiz.win32.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.vsdir"
|
||||
RelativePath=".\CCAppWiz.win32.vsdir"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.vsz"
|
||||
RelativePath=".\CCAppWiz.win32.vsz"
|
||||
>
|
||||
</File>
|
||||
<File
|
|
@ -0,0 +1 @@
|
|||
CCAppWiz.win32.vsz| |Cocos2d-win32 Application |1|An application that uses Cocos2d-x library for win32 platform.| |6777|4096|#1154
|
|
@ -1,6 +1,7 @@
|
|||
VSWIZARD 7.0
|
||||
Wizard=VsWizard.VsWizardEngine
|
||||
|
||||
Param="WIZARD_VERSION = "
|
||||
Param="WIZARD_NAME = Cocos2d-win32"
|
||||
Param="ABSOLUTE_PATH = ."
|
||||
Param="FALLBACK_LCID = 1033"
|
|
@ -4,6 +4,10 @@
|
|||
<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
|
||||
<STYLE TYPE="text/css">@import url();
|
||||
.style1
|
||||
{
|
||||
color: Blue;
|
||||
}
|
||||
</STYLE>
|
||||
<!-- This closing tag is here only to avoid security warning -->
|
||||
</OBJECT>
|
||||
|
@ -23,12 +27,13 @@
|
|||
<SYMBOL NAME="INCLUDE_FILTER" TYPE="text" VALUE="h;hpp;hxx;hm;inl;inc"></SYMBOL>
|
||||
<SYMBOL NAME="RESOURCE_FILTER" TYPE="text" VALUE="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest"></SYMBOL>
|
||||
|
||||
<SYMBOL NAME="CCX_CURRENT_YEAR" TYPE="text" VALUE="2003"></SYMBOL>
|
||||
<SYMBOL NAME="CC_CURRENT_YEAR" TYPE="text" VALUE="2003"></SYMBOL>
|
||||
|
||||
<!-- Page 2 Controls -->
|
||||
<SYMBOL NAME='CCX_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CCX_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_CHIPMUNK' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CC_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
|
||||
<!-- Page 3 Controls -->
|
||||
<SYMBOL NAME='WTL_COMBO_VIEW_TYPE' TYPE="select-one" VALUE='WTL_VIEWTYPE_GENERIC'></SYMBOL>
|
||||
|
@ -193,14 +198,14 @@
|
|||
<SPAN CLASS="ItemTextTop" ID="PROJECT_SETTINGS">These are the current project settings:</SPAN>
|
||||
<UL>
|
||||
<LI CLASS="LIST">
|
||||
<SPAN CLASS="SideBtnHidden" ID="CCX_PHYSICAL_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CCX_PHYSICAL_ENGINE_SUMMARY"></LABEL>
|
||||
<SPAN CLASS="SideBtnHidden" ID="CC_PHYSICAL_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CC_PHYSICAL_ENGINE_SUMMARY"></LABEL>
|
||||
</SPAN>
|
||||
</LI>
|
||||
|
||||
<LI CLASS="LIST">
|
||||
<SPAN CLASS="SideBtnHidden" ID="CCX_AUDIO_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CCX_AUDIO_ENGINE_SUMMARY"></LABEL>
|
||||
<SPAN CLASS="SideBtnHidden" ID="CC_AUDIO_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CC_AUDIO_ENGINE_SUMMARY"></LABEL>
|
||||
</SPAN>
|
||||
</LI>
|
||||
|
||||
|
@ -211,7 +216,10 @@
|
|||
<P CLASS="ElementSpacer2"> </P>
|
||||
|
||||
<!-- SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">After you create the project, see the project's readme.txt file for information about the project features and files that are generated.</SPAN -->
|
||||
<SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">After you create the project, examine the project's files for more information about the classes and resources that are generated.<br />
|
||||
<SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">Learn more form
|
||||
<a href="http://www.cocos2d-x.org/wiki/cocos2d-x/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide" >
|
||||
<span class="style1" >Cocos2d-x Application Wizard for Visual Studio User Guide</span></a>
|
||||
.<br />
|
||||
<br />
|
||||
<B>Recommend</B> to save the new project to cocos2d-x source's root directory,
|
||||
otherwise, modify the include directory and library directory menually.</SPAN>
|
||||
|
@ -332,30 +340,30 @@ function OnFinish(document)
|
|||
|
||||
function OnInit()
|
||||
{
|
||||
if (window.external.FindSymbol("CCX_USE_BOX2D") && window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
if (window.external.FindSymbol("CC_USE_BOX2D") && window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D and Chipmunk";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D and Chipmunk";
|
||||
}
|
||||
else if (window.external.FindSymbol("CCX_USE_BOX2D"))
|
||||
else if (window.external.FindSymbol("CC_USE_BOX2D"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D";
|
||||
}
|
||||
else if (window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
else if (window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Chipmunk";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Chipmunk";
|
||||
}
|
||||
else // none physical engine
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "None Physical Engine";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "None Physical Engine";
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
if (window.external.FindSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
{
|
||||
CCX_AUDIO_ENGINE_SUMMARY.innerText = "Use Audio Engine: Simple Audio Engine in Cocos Denshion";
|
||||
CC_AUDIO_ENGINE_SUMMARY.innerText = "Use Audio Engine: Simple Audio Engine in Cocos Denshion";
|
||||
}
|
||||
else
|
||||
{
|
||||
CCX_AUDIO_ENGINE_SUMMARY.innerText = "None Audio Engine";
|
||||
CC_AUDIO_ENGINE_SUMMARY.innerText = "None Audio Engine";
|
||||
}
|
||||
}
|
||||
|
|
@ -184,19 +184,19 @@
|
|||
<SPAN CLASS="itemText">Select physical engine:
|
||||
<br />
|
||||
<br />
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CCX_USE_BOX2D" onClick="OnUseBox2D();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_BOX2D_DIV" TITLE="Application uses box2D.">
|
||||
<LABEL FOR="CCX_USE_BOX2D"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CC_USE_BOX2D" onClick="OnUseBox2D();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_BOX2D_DIV" TITLE="Application uses box2D.">
|
||||
<LABEL FOR="CC_USE_BOX2D"
|
||||
TITLE="Application uses box2D. Include "Box2d.h" if needs."
|
||||
ID="CCX_USE_BOX2D_LABEL">
|
||||
ID="CC_USE_BOX2D_LABEL">
|
||||
<U>B</U>ox2D</LABEL>
|
||||
</DIV>
|
||||
<BR>
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CCX_USE_CHIPMUNK" onClick="OnUseChipmunk();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_CHIPMUNK_DIV" TITLE="Application uses Chipmunk.">
|
||||
<LABEL FOR="CCX_USE_CHIPMUNK"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CC_USE_CHIPMUNK" onClick="OnUseChipmunk();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_CHIPMUNK_DIV" TITLE="Application uses Chipmunk.">
|
||||
<LABEL FOR="CC_USE_CHIPMUNK"
|
||||
TITLE="Application uses Chipmunk. Include "chipmunk.h" if needs."
|
||||
ID="CCX_USE_CHIPMUNK_LABEL">
|
||||
ID="CC_USE_CHIPMUNK_LABEL">
|
||||
<U>C</U>hipmunk</LABEL>
|
||||
</DIV>
|
||||
</SPAN>
|
||||
|
@ -216,11 +216,11 @@
|
|||
<SPAN CLASS="itemText">Select audio engine:
|
||||
<br />
|
||||
<br />
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE" ACCESSKEY="S" TITLE="Application uses CocosDenshion's SimpleAudioEngine." value="ON" NAME="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE onClick="OnUseCocosDenshionSimpleAudioEngine();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_DIV" TITLE="Application uses CocosDenshion:SimpleAudioEngine.">
|
||||
<LABEL FOR="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE" ACCESSKEY="S" TITLE="Application uses CocosDenshion's SimpleAudioEngine." value="ON" NAME="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE onClick="OnUseCocosDenshionSimpleAudioEngine();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_DIV" TITLE="Application uses CocosDenshion:SimpleAudioEngine.">
|
||||
<LABEL FOR="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"
|
||||
TITLE="Application uses CocosDenshion:SimpleAudioEngine. Include "SimpleAudioEngine.h" if needs."
|
||||
ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_LABEL">
|
||||
ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_LABEL">
|
||||
<U>S</U>imple Audio Engine in Cocos Denshion</LABEL>
|
||||
</DIV>
|
||||
</SPAN>
|
||||
|
@ -338,59 +338,59 @@ function OnFinish(document)
|
|||
|
||||
function OnInit()
|
||||
{
|
||||
CCX_USE_BOX2D.disabled = false;
|
||||
CCX_USE_CHIPMUNK.disabled = false;
|
||||
CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.disabled = false;
|
||||
CC_USE_BOX2D.disabled = false;
|
||||
CC_USE_CHIPMUNK.disabled = false;
|
||||
CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.disabled = false;
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_BOX2D"))
|
||||
if (window.external.FindSymbol("CC_USE_BOX2D"))
|
||||
{
|
||||
CCX_USE_BOX2D.checked = true;
|
||||
CC_USE_BOX2D.checked = true;
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
if (window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_USE_CHIPMUNK.checked = true;
|
||||
CC_USE_CHIPMUNK.checked = true;
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
if (window.external.FindSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
{
|
||||
CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked = true;
|
||||
CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseBox2D()
|
||||
{
|
||||
if(CCX_USE_BOX2D.checked)
|
||||
if(CC_USE_BOX2D.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_BOX2D", true);
|
||||
window.external.AddSymbol("CC_USE_BOX2D", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_BOX2D", false);
|
||||
window.external.AddSymbol("CC_USE_BOX2D", false);
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseChipmunk()
|
||||
{
|
||||
if (CCX_USE_CHIPMUNK.checked)
|
||||
if (CC_USE_CHIPMUNK.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_CHIPMUNK", true);
|
||||
window.external.AddSymbol("CC_USE_CHIPMUNK", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_CHIPMUNK", false);
|
||||
window.external.AddSymbol("CC_USE_CHIPMUNK", false);
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseCocosDenshionSimpleAudioEngine()
|
||||
{
|
||||
if (CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked)
|
||||
if (CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", true);
|
||||
window.external.AddSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", false);
|
||||
window.external.AddSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", false);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 811 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -1,5 +1,14 @@
|
|||
function LogInfo(strInfo) {
|
||||
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var strLogPath = "\\CCApplicationWizardLog.txt"
|
||||
var file = FileSys.OpenTextFile(strLogPath, 8, true);
|
||||
file.WriteLine(strInfo);
|
||||
file.Close();
|
||||
}
|
||||
|
||||
function OnFinish(selProj, selObj) {
|
||||
try {
|
||||
// Create symbols based on the project name
|
||||
var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
|
||||
var strProjectName = wizard.FindSymbol('PROJECT_NAME');
|
||||
|
||||
|
@ -18,8 +27,9 @@ function OnFinish(selProj, selObj) {
|
|||
var d = new Date();
|
||||
var nYear = 0;
|
||||
nYear = d.getFullYear();
|
||||
if (nYear >= 2003)
|
||||
wizard.AddSymbol("CCX_CURRENT_YEAR", nYear);
|
||||
wizard.AddSymbol("CC_CURRENT_YEAR", nYear);
|
||||
wizard.AddSymbol("CC_CURRENT_DATE", d.toString());
|
||||
|
||||
// Create project and configurations
|
||||
selProj = CreateCustomProject(strProjectName, strProjectPath);
|
||||
AddConfigurations(selProj, strProjectName);
|
||||
|
@ -31,7 +41,6 @@ function OnFinish(selProj, selObj) {
|
|||
InfFile.Delete();
|
||||
|
||||
selProj.Object.Save();
|
||||
|
||||
}
|
||||
catch (e) {
|
||||
if (e.description.length != 0)
|
||||
|
@ -44,7 +53,11 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
try {
|
||||
var strProjTemplatePath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH');
|
||||
var strProjTemplate = '';
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcproj';
|
||||
var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
|
||||
if(WizardVersion >= 10.0)
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcxproj';
|
||||
else
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcproj';
|
||||
|
||||
var Solution = dte.Solution;
|
||||
var strSolutionName = "";
|
||||
|
@ -59,9 +72,14 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
|
||||
// Create vcproj.user file
|
||||
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var strUserTarget = strProjectName + ".win32.vcproj.user";
|
||||
var strUserTarget = "";
|
||||
if(WizardVersion >= 10.0)
|
||||
strUserTarget = strProjectName + ".win32.vcxproj.user";
|
||||
else
|
||||
strUserTarget = strProjectName + ".win32.vcproj.user";
|
||||
|
||||
var strUserPath = FileSys.BuildPath(strProjectPath, strUserTarget);
|
||||
|
||||
|
||||
var astrParentPath = new Array();
|
||||
astrParentPath[0] = strProjectPath;
|
||||
while (astrParentPath.length) {
|
||||
|
@ -79,12 +97,20 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
}
|
||||
|
||||
var file = FileSys.OpenTextFile(strUserPath, 2, true);
|
||||
var strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"></VisualStudioUserFile>";
|
||||
var strUserValue = "";
|
||||
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>";
|
||||
else
|
||||
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"></VisualStudioUserFile>";
|
||||
file.WriteLine(strUserValue);
|
||||
file.Close();
|
||||
file.Close();
|
||||
|
||||
// Create project file
|
||||
var strProjectNameWithExt = '';
|
||||
strProjectNameWithExt = strProjectName + '.win32.vcproj';
|
||||
if(WizardVersion >= 10.0)
|
||||
strProjectNameWithExt = strProjectName + '.win32.vcxproj';
|
||||
else
|
||||
strProjectNameWithExt = strProjectName + '.win32.vcproj';
|
||||
|
||||
var oTarget = wizard.FindSymbol("TARGET");
|
||||
var prj;
|
||||
|
@ -123,7 +149,6 @@ function AddFilters(proj) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Configurations data
|
||||
var nNumConfigs = 2;
|
||||
|
||||
|
@ -143,7 +168,7 @@ function AddConfigurations(proj, strProjectName) {
|
|||
// General settings
|
||||
var config = proj.Object.Configurations(astrConfigName[nCntr]);
|
||||
|
||||
// if(wizard.FindSymbol("CCX_USE_UNICODE"))
|
||||
// if(wizard.FindSymbol("CC_USE_UNICODE"))
|
||||
config.CharacterSet = charSetUnicode;
|
||||
// else
|
||||
// config.CharacterSet = charSetMBCS;
|
||||
|
@ -156,16 +181,17 @@ function AddConfigurations(proj, strProjectName) {
|
|||
|
||||
// Additional Inlcude Directories
|
||||
var strAddIncludeDir = '.;.\\win32;.\\Classes';
|
||||
strAddIncludeDir += ';..\\cocos2dx;..\\cocos2dx\\include';
|
||||
strAddIncludeDir += ';..\\platform_support\\include;..\\platform_support\\third_party\\win32\\OGLES';
|
||||
strAddIncludeDir += ';..\\cocos2dx\\include';
|
||||
strAddIncludeDir += ';..\\cocos2dx\\platform';
|
||||
strAddIncludeDir += ';..\\cocos2dx\\platform\\third_party\\win32\\OGLES';
|
||||
|
||||
if (wizard.FindSymbol('CCX_USE_BOX2D')) {
|
||||
if (wizard.FindSymbol('CC_USE_BOX2D')) {
|
||||
strAddIncludeDir += ';..\\;..\\Box2D';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) {
|
||||
if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
|
||||
strAddIncludeDir += ';..\\chipmunk\\include\\chipmunk';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
strAddIncludeDir += ';..\\CocosDenshion\\Include';
|
||||
}
|
||||
CLTool.AdditionalIncludeDirectories = strAddIncludeDir;
|
||||
|
@ -210,13 +236,13 @@ function AddConfigurations(proj, strProjectName) {
|
|||
|
||||
// Additional Library Directories
|
||||
var strAddDepends = 'libcocos2d.lib libgles_cm.lib';
|
||||
if (wizard.FindSymbol('CCX_USE_BOX2D')) {
|
||||
if (wizard.FindSymbol('CC_USE_BOX2D')) {
|
||||
strAddDepends += ' libBox2d.lib';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) {
|
||||
if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
|
||||
strAddDepends += ' libchipmunk.lib';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
strAddDepends += ' libCocosDenshion.lib';
|
||||
}
|
||||
LinkTool.AdditionalLibraryDirectories = '$(OutDir)';
|
|
@ -1,7 +1,7 @@
|
|||
#include "AppDelegate.h"
|
||||
|
||||
#include "cocos2d.h"
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
#include "SimpleAudioEngine.h"
|
||||
using namespace CocosDenshion;
|
||||
|
||||
|
@ -17,7 +17,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
SimpleAudioEngine::end();
|
||||
[! endif]
|
||||
}
|
||||
|
@ -29,8 +29,8 @@ bool AppDelegate::initInstance()
|
|||
{
|
||||
// Initialize OpenGLView instance, that release by CCDirector when application terminate.
|
||||
// The HelloWorld is designed as HVGA.
|
||||
CCXEGLView * pMainWnd = new CCXEGLView();
|
||||
CCX_BREAK_IF(! pMainWnd
|
||||
CCEGLView * pMainWnd = new CCEGLView();
|
||||
CC_BREAK_IF(! pMainWnd
|
||||
|| ! pMainWnd->Create(TEXT("[!output PROJECT_NAME]"), 320, 480));
|
||||
|
||||
bRet = true;
|
||||
|
@ -42,7 +42,7 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
{
|
||||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(&CCXEGLView::sharedOpenGLView());
|
||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||
|
||||
// sets landscape mode
|
||||
pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
|
||||
|
@ -66,7 +66,7 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
CCDirector::sharedDirector()->pause();
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
[! endif]
|
||||
|
@ -76,7 +76,7 @@ void AppDelegate::applicationDidEnterBackground()
|
|||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
CCDirector::sharedDirector()->resume();
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
[! endif]
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef _APP_DELEGATE_H_
|
||||
#define _APP_DELEGATE_H_
|
||||
#ifndef __APP_DELEGATE_H__
|
||||
#define __APP_DELEGATE_H__
|
||||
|
||||
#include "ccxApplication.h"
|
||||
#include "CCApplication.h"
|
||||
|
||||
/**
|
||||
@brief The cocos2d Application.
|
||||
|
||||
The reason for implement as private inheritance is to hide some interface call by CCDirector.
|
||||
*/
|
||||
class AppDelegate : private cocos2d::ccxApplication
|
||||
class AppDelegate : private cocos2d::CCApplication
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
|
@ -39,4 +39,5 @@ public:
|
|||
virtual void applicationWillEnterForeground();
|
||||
};
|
||||
|
||||
#endif // _APP_DELEGATE_H_
|
||||
#endif // __APP_DELEGATE_H__
|
||||
|
|
@ -9,11 +9,11 @@ CCScene* HelloWorld::scene()
|
|||
{
|
||||
// 'scene' is an autorelease object
|
||||
scene = CCScene::node();
|
||||
CCX_BREAK_IF(! scene);
|
||||
CC_BREAK_IF(! scene);
|
||||
|
||||
// 'layer' is an autorelease object
|
||||
HelloWorld *layer = HelloWorld::node();
|
||||
CCX_BREAK_IF(! layer);
|
||||
CC_BREAK_IF(! layer);
|
||||
|
||||
// add layer as a child to scene
|
||||
scene->addChild(layer);
|
||||
|
@ -33,7 +33,7 @@ bool HelloWorld::init()
|
|||
// super init first
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCX_BREAK_IF(! CCLayer::init());
|
||||
CC_BREAK_IF(! CCLayer::init());
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// add your codes below...
|
||||
|
@ -47,15 +47,15 @@ bool HelloWorld::init()
|
|||
"CloseSelected.png",
|
||||
this,
|
||||
menu_selector(HelloWorld::menuCloseCallback));
|
||||
CCX_BREAK_IF(! pCloseItem);
|
||||
CC_BREAK_IF(! pCloseItem);
|
||||
|
||||
// Place the menu item bottom-right conner.
|
||||
pCloseItem->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20));
|
||||
|
||||
// Create a menu with the "close" menu item, it's an auto release object.
|
||||
CCMenu* pMenu = CCMenu::menuWithItems(pCloseItem, NULL);
|
||||
pMenu->setPosition(CGPointZero);
|
||||
CCX_BREAK_IF(! pMenu);
|
||||
pMenu->setPosition(CCPointZero);
|
||||
CC_BREAK_IF(! pMenu);
|
||||
|
||||
// Add the menu to HelloWorld layer as a child layer.
|
||||
this->addChild(pMenu, 1);
|
||||
|
@ -64,10 +64,10 @@ bool HelloWorld::init()
|
|||
|
||||
// Create a label and initialize with string "Hello World".
|
||||
CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", "Thonburi", 64);
|
||||
CCX_BREAK_IF(! pLabel);
|
||||
CC_BREAK_IF(! pLabel);
|
||||
|
||||
// Get window size and place the label upper.
|
||||
CGSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
pLabel->setPosition(ccp(size.width / 2, size.height - 20));
|
||||
|
||||
// Add the label to HelloWorld layer as a child layer.
|
||||
|
@ -75,7 +75,7 @@ bool HelloWorld::init()
|
|||
|
||||
// 3. Add add a splash screen, show the cocos2d splash image.
|
||||
CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
|
||||
CCX_BREAK_IF(! pSprite);
|
||||
CC_BREAK_IF(! pSprite);
|
||||
|
||||
// Place the sprite on the center of the screen
|
||||
pSprite->setPosition(ccp(size.width/2, size.height/2));
|
||||
|
@ -89,7 +89,7 @@ bool HelloWorld::init()
|
|||
return bRet;
|
||||
}
|
||||
|
||||
void HelloWorld::menuCloseCallback(NSObject* pSender)
|
||||
void HelloWorld::menuCloseCallback(CCObject* pSender)
|
||||
{
|
||||
// "close" menu item clicked
|
||||
CCDirector::sharedDirector()->end();
|
|
@ -2,15 +2,15 @@
|
|||
#define __HELLOWORLD_SCENE_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
[! if CCX_USE_BOX2D]
|
||||
[! if CC_USE_BOX2D]
|
||||
|
||||
#include "Box2D.h"
|
||||
[! endif]
|
||||
[! if CCX_USE_CHIPMUNK]
|
||||
[! if CC_USE_CHIPMUNK]
|
||||
|
||||
#include "chipmunk.h"
|
||||
[! endif]
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
[! endif]
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
static cocos2d::CCScene* scene();
|
||||
|
||||
// a selector callback
|
||||
virtual void menuCloseCallback(NSObject* pSender);
|
||||
virtual void menuCloseCallback(CCObject* pSender);
|
||||
|
||||
// implement the "static node()" method manually
|
||||
LAYER_NODE_FUNC(HelloWorld);
|
|
@ -13,5 +13,5 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
|||
// create the application instance
|
||||
AppDelegate app;
|
||||
|
||||
return cocos2d::ccxApplication::sharedApplication().run();
|
||||
return cocos2d::CCApplication::sharedApplication().run();
|
||||
}
|
|
@ -8,6 +8,6 @@
|
|||
#include <tchar.h>
|
||||
|
||||
// C RunTime Header Files
|
||||
#include "ccxStdC.h"
|
||||
#include "CCStdC.h"
|
||||
|
||||
#endif // __WINMAIN_H__
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -2,7 +2,7 @@
|
|||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="CCXAppWiz.uphone"
|
||||
Name="CCAppWiz.wophone"
|
||||
ProjectGUID="{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}"
|
||||
RootNamespace="CCXAppWiz.uphone"
|
||||
Keyword="CustomAppWizProj"
|
||||
|
@ -89,65 +89,65 @@
|
|||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="uphone"
|
||||
Name="wophone"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\main.cpp"
|
||||
RelativePath=".\Templates\1033\wophone\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\NewDeleteOp.cpp"
|
||||
RelativePath=".\Templates\1033\wophone\NewDeleteOp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\rootUnicodeScript.h"
|
||||
RelativePath=".\Templates\1033\wophone\rootUnicodeScript.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\rootUnicodeScript_str.h"
|
||||
RelativePath=".\Templates\1033\wophone\rootUnicodeScript_str.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\TG3AppDllEntry.cpp"
|
||||
RelativePath=".\Templates\1033\wophone\TG3AppDllEntry.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\TG3AppDllEntry.h"
|
||||
RelativePath=".\Templates\1033\wophone\TG3AppDllEntry.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Res"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_Res.ENU.tr3"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_Res.ENU.tr3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_Res.ENU.tr3.tts"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_Res.ENU.tr3.tts"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_Res.h"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_Res.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_Res.TR3"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_Res.TR3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_Res.TRG"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_Res.TRG"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_res_c.h"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_res_c.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_res_def.h"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_res_def.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\Res\root_res_h.h"
|
||||
RelativePath=".\Templates\1033\wophone\Res\root_res_h.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
@ -155,7 +155,7 @@
|
|||
Name="TCOM"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Templates\1033\uphone\TCOM\root_TcomRegist.cpp"
|
||||
RelativePath=".\Templates\1033\wophone\TCOM\root_TcomRegist.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
@ -195,15 +195,15 @@
|
|||
Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.uphone.ico"
|
||||
RelativePath=".\CCAppWiz.wophone.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.uphone.vsdir"
|
||||
RelativePath=".\CCAppWiz.wophone.vsdir"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CCXAppWiz.uphone.vsz"
|
||||
RelativePath=".\CCAppWiz.wophone.vsz"
|
||||
>
|
||||
</File>
|
||||
<File
|
|
@ -0,0 +1 @@
|
|||
CCAppWiz.wophone.vsz| |Cocos2d-wophone Application|1|An application that uses Cocos2d-x library for wophone platform.| |6777|4096|#1154
|
|
@ -1,6 +1,7 @@
|
|||
VSWIZARD 7.0
|
||||
Wizard=VsWizard.VsWizardEngine
|
||||
|
||||
Param="WIZARD_NAME = Cocos2d-uphone"
|
||||
Param="WIZARD_VERSION = "
|
||||
Param="WIZARD_NAME = Cocos2d-wophone"
|
||||
Param="ABSOLUTE_PATH = ."
|
||||
Param="FALLBACK_LCID = 1033"
|
|
@ -4,6 +4,10 @@
|
|||
<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
|
||||
<STYLE TYPE="text/css">@import url();
|
||||
.style1
|
||||
{
|
||||
color: Blue;
|
||||
}
|
||||
</STYLE>
|
||||
<!-- This closing tag is here only to avoid security warning -->
|
||||
</OBJECT>
|
||||
|
@ -24,15 +28,16 @@
|
|||
<SYMBOL NAME='MAKEFILE_FILTER' TYPE=text VALUE='TMK3;ARM'></SYMBOL>
|
||||
<SYMBOL NAME='RESOURCE_FILTER' TYPE=text VALUE='tr3;tts;TR3;TRG'></SYMBOL>
|
||||
|
||||
<SYMBOL NAME="CCX_CURRENT_YEAR" TYPE="text" VALUE="2003"></SYMBOL>
|
||||
<SYMBOL NAME="CC_CURRENT_YEAR" TYPE="text" VALUE="2003"></SYMBOL>
|
||||
|
||||
|
||||
<!-- Page 2 Controls -->
|
||||
<SYMBOL NAME='CCX_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
<SYMBOL NAME='CCX_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_CHIPMUNK' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
<SYMBOL NAME='CC_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>
|
||||
|
||||
<SYMBOL NAME='CCX_USE_TCOM_SUPPORT' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
<SYMBOL NAME='CC_USE_TCOM_SUPPORT' TYPE="checkbox" VALUE="false"></SYMBOL>
|
||||
|
||||
<!-- Page 3 Controls -->
|
||||
<SYMBOL NAME='WTL_COMBO_VIEW_TYPE' TYPE="select-one" VALUE='WTL_VIEWTYPE_GENERIC'></SYMBOL>
|
||||
|
@ -75,8 +80,8 @@
|
|||
|
||||
</TD>
|
||||
<TD VALIGN="top" HEIGHT="65">
|
||||
<H4 CLASS="HEAD" ID="HEAD">Welcome to the Cocos2d-uphone Application Wizard</H4>
|
||||
<P CLASS="SUBHEAD" ID="SUBHEAD">This wizard generates a cocos2d-uphone application project
|
||||
<H4 CLASS="HEAD" ID="HEAD">Welcome to the Cocos2d-wophone Application Wizard</H4>
|
||||
<P CLASS="SUBHEAD" ID="SUBHEAD">This wizard generates a cocos2d-wophone application project
|
||||
with the properties you specify.</P>
|
||||
</TD>
|
||||
<TD VALIGN="top" HEIGHT="65" WIDTH="12">
|
||||
|
@ -198,14 +203,14 @@
|
|||
<br />
|
||||
</SPAN> Cocos2d feature:<UL>
|
||||
<LI CLASS="LIST">
|
||||
<SPAN CLASS="SideBtnHidden" ID="CCX_PHYSICAL_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CCX_PHYSICAL_ENGINE_SUMMARY"></LABEL>
|
||||
<SPAN CLASS="SideBtnHidden" ID="CC_PHYSICAL_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CC_PHYSICAL_ENGINE_SUMMARY"></LABEL>
|
||||
</SPAN>
|
||||
</LI>
|
||||
|
||||
<LI CLASS="LIST">
|
||||
<SPAN CLASS="SideBtnHidden" ID="CCX_AUDIO_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CCX_AUDIO_ENGINE_SUMMARY"></LABEL>
|
||||
<SPAN CLASS="SideBtnHidden" ID="CC_AUDIO_ENGINE_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CC_AUDIO_ENGINE_SUMMARY"></LABEL>
|
||||
</SPAN>
|
||||
</LI>
|
||||
|
||||
|
@ -213,8 +218,8 @@
|
|||
</SPAN> Application feature:<UL>
|
||||
|
||||
<LI CLASS="LIST">
|
||||
<SPAN CLASS="SideBtnHidden" ID="CCX_TCOM_SUPPORT_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CCX_TCOM_SUPPORT_SUMMARY"></LABEL>
|
||||
<SPAN CLASS="SideBtnHidden" ID="CC_TCOM_SUPPORT_SUMMARY" TITLE="">
|
||||
<LABEL FOR="CC_TCOM_SUPPORT_SUMMARY"></LABEL>
|
||||
</SPAN>
|
||||
</LI>
|
||||
|
||||
|
@ -226,7 +231,10 @@
|
|||
<br />
|
||||
|
||||
<!-- SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">After you create the project, see the project's readme.txt file for information about the project features and files that are generated.</SPAN -->
|
||||
<SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">After you create the project, examine the project's files for more information about the classes and resources that are generated.<br />
|
||||
<SPAN CLASS="ItemText" ID="README_REMINDER" TITLE="">Learn more form
|
||||
<a href="http://www.cocos2d-x.org/wiki/cocos2d-x/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide">
|
||||
<span class="style1">Cocos2d-x Application Wizard for Visual Studio User Guide</span></a>
|
||||
.<br />
|
||||
<br />
|
||||
<B>Recommend</B> to save the new project to cocos2d-x source's root directory,
|
||||
otherwise, modify the include directory and library directory menually.</SPAN>
|
||||
|
@ -347,39 +355,39 @@ function OnFinish(document)
|
|||
|
||||
function OnInit()
|
||||
{
|
||||
if (window.external.FindSymbol("CCX_USE_BOX2D") && window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
if (window.external.FindSymbol("CC_USE_BOX2D") && window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D and Chipmunk";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D and Chipmunk";
|
||||
}
|
||||
else if (window.external.FindSymbol("CCX_USE_BOX2D"))
|
||||
else if (window.external.FindSymbol("CC_USE_BOX2D"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Box2D";
|
||||
}
|
||||
else if (window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
else if (window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Chipmunk";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "Use Physical Engine: Chipmunk";
|
||||
}
|
||||
else // none physical engine
|
||||
{
|
||||
CCX_PHYSICAL_ENGINE_SUMMARY.innerText = "None Physical Engine";
|
||||
CC_PHYSICAL_ENGINE_SUMMARY.innerText = "None Physical Engine";
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
if (window.external.FindSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
{
|
||||
CCX_AUDIO_ENGINE_SUMMARY.innerText = "Use Audio Engine: Simple Audio Engine in Cocos Denshion";
|
||||
CC_AUDIO_ENGINE_SUMMARY.innerText = "Use Audio Engine: Simple Audio Engine in Cocos Denshion";
|
||||
}
|
||||
else
|
||||
{
|
||||
CCX_AUDIO_ENGINE_SUMMARY.innerText = "None Audio Engine";
|
||||
CC_AUDIO_ENGINE_SUMMARY.innerText = "None Audio Engine";
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_TCOM_SUPPORT"))
|
||||
if (window.external.FindSymbol("CC_USE_TCOM_SUPPORT"))
|
||||
{
|
||||
CCX_TCOM_SUPPORT_SUMMARY.innerText = "Has TCOM Support";
|
||||
CC_TCOM_SUPPORT_SUMMARY.innerText = "Has TCOM Support";
|
||||
}
|
||||
else
|
||||
{
|
||||
CCX_TCOM_SUPPORT_SUMMARY.innerText = "None TCOM Support";
|
||||
CC_TCOM_SUPPORT_SUMMARY.innerText = "None TCOM Support";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<HTML DIR="ltr">
|
||||
<HEAD>
|
||||
<TITLE>'Cocos2d-uphone Application Wizard'</TITLE>
|
||||
<TITLE>'Cocos2d-wophone Application Wizard'</TITLE>
|
||||
<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
|
||||
<STYLE TYPE="text/css">@import url();
|
||||
|
@ -56,7 +56,7 @@
|
|||
<TD VALIGN="top" HEIGHT="65">
|
||||
<H4 CLASS="HEAD" ID="HEAD">
|
||||
Features</H4>
|
||||
<P CLASS="SUBHEAD" ID="SUBHEAD">Specify features for the cocos2d-uphone application.</P>
|
||||
<P CLASS="SUBHEAD" ID="SUBHEAD">Specify features for the cocos2d-wophone application.</P>
|
||||
</TD>
|
||||
<TD VALIGN="top" HEIGHT="65" WIDTH="12">
|
||||
|
||||
|
@ -184,19 +184,19 @@
|
|||
<SPAN CLASS="itemText">Select physical engine:
|
||||
<br />
|
||||
<br />
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CCX_USE_BOX2D" onClick="OnUseBox2D();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_BOX2D_DIV" TITLE="Application uses box2D.">
|
||||
<LABEL FOR="CCX_USE_BOX2D"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CC_USE_BOX2D" onClick="OnUseBox2D();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_BOX2D_DIV" TITLE="Application uses box2D.">
|
||||
<LABEL FOR="CC_USE_BOX2D"
|
||||
TITLE="Application uses box2D. Include "Box2d.h" if needs."
|
||||
ID="CCX_USE_BOX2D_LABEL">
|
||||
ID="CC_USE_BOX2D_LABEL">
|
||||
<U>B</U>ox2D</LABEL>
|
||||
</DIV>
|
||||
<BR>
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CCX_USE_CHIPMUNK" onClick="OnUseChipmunk();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_CHIPMUNK_DIV" TITLE="Application uses Chipmunk.">
|
||||
<LABEL FOR="CCX_USE_CHIPMUNK"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CC_USE_CHIPMUNK" onClick="OnUseChipmunk();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_CHIPMUNK_DIV" TITLE="Application uses Chipmunk.">
|
||||
<LABEL FOR="CC_USE_CHIPMUNK"
|
||||
TITLE="Application uses Chipmunk. Include "chipmunk.h" if needs."
|
||||
ID="CCX_USE_CHIPMUNK_LABEL">
|
||||
ID="CC_USE_CHIPMUNK_LABEL">
|
||||
<U>C</U>hipmunk</LABEL>
|
||||
</DIV>
|
||||
<br />
|
||||
|
@ -215,11 +215,11 @@
|
|||
<SPAN CLASS="itemText">Select audio engine:
|
||||
<br />
|
||||
<br />
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE" ACCESSKEY="S" TITLE="Application uses CocosDenshion's SimpleAudioEngine." value="ON" NAME="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE onClick="OnUseCocosDenshionSimpleAudioEngine();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_DIV" TITLE="Application uses CocosDenshion:SimpleAudioEngine.">
|
||||
<LABEL FOR="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"
|
||||
<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE" ACCESSKEY="S" TITLE="Application uses CocosDenshion's SimpleAudioEngine." value="ON" NAME="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE onClick="OnUseCocosDenshionSimpleAudioEngine();">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_DIV" TITLE="Application uses CocosDenshion:SimpleAudioEngine.">
|
||||
<LABEL FOR="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"
|
||||
TITLE="Application uses CocosDenshion:SimpleAudioEngine. Include "SimpleAudioEngine.h" if needs."
|
||||
ID="CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_LABEL">
|
||||
ID="CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE_LABEL">
|
||||
<U>S</U>imple Audio Engine in Cocos Denshion</LABEL>
|
||||
</DIV>
|
||||
<br />
|
||||
|
@ -233,11 +233,11 @@
|
|||
<TD VALIGN="top" COLSPAN="7">
|
||||
Select application feature:<br />
|
||||
<br />
|
||||
<input id="CCX_USE_TCOM_SUPPORT" accesskey="T" class="CheckBoxA"
|
||||
name="CCX_USE_TCOM_SUPPORT" title="Application has TCOM support."
|
||||
<input id="CC_USE_TCOM_SUPPORT" accesskey="T" class="CheckBoxA"
|
||||
name="CC_USE_TCOM_SUPPORT" title="Application has TCOM support."
|
||||
type="checkbox" value="ON" onClick="OnUseTCOMSupport();"/>
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CCX_USE_TCOM_SUPPORT_DIV">
|
||||
<LABEL ID="CCX_USE_TCOM_SUPPORT_LABLE" TITLE="Add TCOM support files to project.">
|
||||
<DIV CLASS="itemTextCheckboxB" ID="CC_USE_TCOM_SUPPORT_DIV">
|
||||
<LABEL ID="CC_USE_TCOM_SUPPORT_LABLE" TITLE="Add TCOM support files to project.">
|
||||
<U>T</U>COM Support</LABEL>
|
||||
</DIV>
|
||||
</TD>
|
||||
|
@ -350,78 +350,78 @@ function OnFinish(document)
|
|||
|
||||
function OnInit()
|
||||
{
|
||||
CCX_USE_BOX2D.disabled = false;
|
||||
CCX_USE_CHIPMUNK.disabled = false;
|
||||
CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.disabled = false;
|
||||
CC_USE_BOX2D.disabled = false;
|
||||
CC_USE_CHIPMUNK.disabled = false;
|
||||
CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.disabled = false;
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_BOX2D"))
|
||||
if (window.external.FindSymbol("CC_USE_BOX2D"))
|
||||
{
|
||||
CCX_USE_BOX2D.checked = true;
|
||||
CC_USE_BOX2D.checked = true;
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_CHIPMUNK"))
|
||||
if (window.external.FindSymbol("CC_USE_CHIPMUNK"))
|
||||
{
|
||||
CCX_USE_CHIPMUNK.checked = true;
|
||||
CC_USE_CHIPMUNK.checked = true;
|
||||
}
|
||||
|
||||
if (window.external.FindSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
if (window.external.FindSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE"))
|
||||
{
|
||||
CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked = true;
|
||||
CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked = true;
|
||||
}
|
||||
|
||||
CCX_USE_TCOM_SUPPORT.disabled = false;
|
||||
if (window.external.FindSymbol("CCX_USE_TCOM_SUPPORT"))
|
||||
CC_USE_TCOM_SUPPORT.disabled = false;
|
||||
if (window.external.FindSymbol("CC_USE_TCOM_SUPPORT"))
|
||||
{
|
||||
CCX_USE_TCOM_SUPPORT.checked = true;
|
||||
CC_USE_TCOM_SUPPORT.checked = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function OnUseBox2D()
|
||||
{
|
||||
if(CCX_USE_BOX2D.checked)
|
||||
if(CC_USE_BOX2D.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_BOX2D", true);
|
||||
window.external.AddSymbol("CC_USE_BOX2D", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_BOX2D", false);
|
||||
window.external.AddSymbol("CC_USE_BOX2D", false);
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseChipmunk()
|
||||
{
|
||||
if (CCX_USE_CHIPMUNK.checked)
|
||||
if (CC_USE_CHIPMUNK.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_CHIPMUNK", true);
|
||||
window.external.AddSymbol("CC_USE_CHIPMUNK", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_CHIPMUNK", false);
|
||||
window.external.AddSymbol("CC_USE_CHIPMUNK", false);
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseTCOMSupport()
|
||||
{
|
||||
if (CCX_USE_TCOM_SUPPORT.checked)
|
||||
if (CC_USE_TCOM_SUPPORT.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_TCOM_SUPPORT", true);
|
||||
window.external.AddSymbol("CC_USE_TCOM_SUPPORT", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_TCOM_SUPPORT", false);
|
||||
window.external.AddSymbol("CC_USE_TCOM_SUPPORT", false);
|
||||
}
|
||||
}
|
||||
|
||||
function OnUseCocosDenshionSimpleAudioEngine()
|
||||
{
|
||||
if (CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked)
|
||||
if (CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE.checked)
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", true);
|
||||
window.external.AddSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.external.AddSymbol("CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", false);
|
||||
window.external.AddSymbol("CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE", false);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 811 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -1,8 +1,13 @@
|
|||
function LogInfo(strInfo) {
|
||||
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var strLogPath = "\\CCApplicationWizardLog.txt"
|
||||
var file = FileSys.OpenTextFile(strLogPath, 8, true);
|
||||
file.WriteLine(strInfo);
|
||||
file.Close();
|
||||
}
|
||||
|
||||
function OnFinish(selProj, selObj) {
|
||||
try {
|
||||
// var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
|
||||
|
||||
// Create symbols based on the project name
|
||||
var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
|
||||
var strProjectName = wizard.FindSymbol('PROJECT_NAME');
|
||||
|
@ -24,16 +29,17 @@ function OnFinish(selProj, selObj) {
|
|||
var d = new Date();
|
||||
var nYear = 0;
|
||||
nYear = d.getFullYear();
|
||||
wizard.AddSymbol("CCX_CURRENT_YEAR", nYear);
|
||||
wizard.AddSymbol("CCX_CURRENT_DATE", d.toString());
|
||||
wizard.AddSymbol("CC_CURRENT_YEAR", nYear);
|
||||
wizard.AddSymbol("CC_CURRENT_DATE", d.toString());
|
||||
|
||||
// Create project and configurations
|
||||
selProj = CreateCustomProject(strProjectName, strProjectPath);
|
||||
AddConfig(selProj, strProjectName);
|
||||
AddConfigurations(selProj, strProjectName);
|
||||
AddFilters(selProj);
|
||||
|
||||
var InfFile = CreateCustomInfFile();
|
||||
AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile);
|
||||
PchSettings(selProj);
|
||||
AddPchSettings(selProj);
|
||||
InfFile.Delete();
|
||||
|
||||
selProj.Object.Save();
|
||||
|
@ -41,7 +47,7 @@ function OnFinish(selProj, selObj) {
|
|||
catch (e) {
|
||||
if (e.description.length != 0)
|
||||
SetErrorInfo(e);
|
||||
return e.number
|
||||
return e.number;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +55,11 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
try {
|
||||
var strProjTemplatePath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH');
|
||||
var strProjTemplate = '';
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcproj';
|
||||
var WizardVersion = wizard.FindSymbol('WIZARD_VERSION');
|
||||
if(WizardVersion >= 10.0)
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcxproj';
|
||||
else
|
||||
strProjTemplate = strProjTemplatePath + '\\default.vcproj';
|
||||
|
||||
var Solution = dte.Solution;
|
||||
var strSolutionName = "";
|
||||
|
@ -64,7 +74,12 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
|
||||
// Create vcproj.user file
|
||||
var FileSys = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var strUserTarget = strProjectName + ".uphone.vcproj.user";
|
||||
var strUserTarget = "";
|
||||
if(WizardVersion >= 10.0)
|
||||
strUserTarget = strProjectName + ".wophone.vcxproj.user";
|
||||
else
|
||||
strUserTarget = strProjectName + ".wophone.vcproj.user";
|
||||
|
||||
var strUserPath = FileSys.BuildPath(strProjectPath, strUserTarget);
|
||||
|
||||
var astrParentPath = new Array();
|
||||
|
@ -84,15 +99,20 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
}
|
||||
|
||||
var file = FileSys.OpenTextFile(strUserPath, 2, true);
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
var strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"><Configurations><Configuration Name=\"Debug|Win32\"><DebugSettings Command=\"TG3_RunDLL.exe\" CommandArguments=\"$(TargetPath)\"/></Configuration></VisualStudioUserFile>";
|
||||
var strUserValue = "";
|
||||
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>";
|
||||
else
|
||||
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"></VisualStudioUserFile>";
|
||||
file.WriteLine(strUserValue);
|
||||
file.Close();
|
||||
file.Close();
|
||||
|
||||
// Create project file
|
||||
var strProjectNameWithExt = '';
|
||||
strProjectNameWithExt = strProjectName + '.uphone.vcproj';
|
||||
if(WizardVersion >= 10.0)
|
||||
strProjectNameWithExt = strProjectName + '.wophone.vcxproj';
|
||||
else
|
||||
strProjectNameWithExt = strProjectName + '.wophone.vcproj';
|
||||
|
||||
var oTarget = wizard.FindSymbol("TARGET");
|
||||
var prj;
|
||||
|
@ -119,6 +139,7 @@ function CreateCustomProject(strProjectName, strProjectPath) {
|
|||
|
||||
function AddFilters(proj) {
|
||||
try {
|
||||
// Add the folders to your project
|
||||
var strSrcFilter = wizard.FindSymbol('SOURCE_FILTER');
|
||||
var group = proj.Object.AddFilter('source');
|
||||
group.Filter = strSrcFilter;
|
||||
|
@ -130,7 +151,6 @@ function AddFilters(proj) {
|
|||
strSrcFilter = wizard.FindSymbol('MAKEFILE_FILTER');
|
||||
group = proj.Object.AddFilter('makefile');
|
||||
group.Filter = strSrcFilter;
|
||||
|
||||
}
|
||||
catch (e) {
|
||||
throw e;
|
||||
|
@ -144,7 +164,7 @@ var astrConfigName = new Array();
|
|||
astrConfigName[0] = "Debug";
|
||||
astrConfigName[1] = "Release";
|
||||
|
||||
function AddConfig(proj, strProjectName) {
|
||||
function AddConfigurations(proj, strProjectName) {
|
||||
try {
|
||||
proj.Object.Keyword = "uPhoneProj";
|
||||
var strPrjTG3Dir = '../../PRJ_TG3';
|
||||
|
@ -153,7 +173,7 @@ function AddConfig(proj, strProjectName) {
|
|||
// header files and libraries directories
|
||||
var strOutputDir = '../../PRJ_TG3/LIB/Win32Lib';
|
||||
var strCurIncludeDir = '..\\..\\PRJ_TG3\\Include;..\\..\\PRJ_TG3\\Include\\MTAPI;..\\..\\PRJ_TG3\\Include\\ThirdParty;..\\..\\PRJ_TG3\\Include\\TCOM;..\\..\\PRJ_TG3\\Include\\OpenGL';
|
||||
strCurIncludeDir += ';.;.\\Classes;.\\uphone;.\\uphone\\Res;..\\cocos2dx;..\\cocos2dx\\include';
|
||||
strCurIncludeDir += ';.;.\\Classes;.\\wophone;.\\wophone\\Res;..\\cocos2dx;..\\cocos2dx\\include';
|
||||
|
||||
var strDefinitions = 'WIN32;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL';
|
||||
var strDependLibs = 'WS2_32.Lib EosConfig.lib SoftSupport.lib TG3_DLL.lib libcocos2d.lib';
|
||||
|
@ -161,20 +181,20 @@ function AddConfig(proj, strProjectName) {
|
|||
var strImportLib = '$(OutDir)/' + wizard.FindSymbol("PROJECT_NAME") + '.lib';
|
||||
var strOutputFile = '$(OutDir)/' + wizard.FindSymbol("PROJECT_NAME") + '.dll';
|
||||
|
||||
if (wizard.FindSymbol('CCX_USE_BOX2D')) {
|
||||
if (wizard.FindSymbol('CC_USE_BOX2D')) {
|
||||
strCurIncludeDir += ';..\\;..\\Box2D';
|
||||
strDependLibs += ' libBox2d.lib';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) {
|
||||
if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
|
||||
strCurIncludeDir += ';..\\chipmunk\\include\\chipmunk';
|
||||
strDependLibs += ' chipmunk.lib';
|
||||
}
|
||||
if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
|
||||
strCurIncludeDir += ';..\\CocosDenshion\\Include';
|
||||
strDependLibs += ' libCocosDenshion.lib';
|
||||
}
|
||||
|
||||
if (wizard.FindSymbol("CCX_USE_TCOM_SUPPORT")) {
|
||||
if (wizard.FindSymbol("CC_USE_TCOM_SUPPORT")) {
|
||||
strDefinitions = strDefinitions + ';__TCOM_SUPPORT__';
|
||||
}
|
||||
|
||||
|
@ -198,7 +218,7 @@ function AddConfig(proj, strProjectName) {
|
|||
|
||||
config.InheritedPropertySheets = '$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops';
|
||||
config.OutputDirectory = strOutputDir;
|
||||
config.IntermediateDirectory = '$(ConfigurationName).uphone';
|
||||
config.IntermediateDirectory = '$(ConfigurationName).wophone';
|
||||
config.ConfigurationType = '2';
|
||||
|
||||
var CLTool = config.Tools('VCCLCompilerTool');
|
||||
|
@ -255,7 +275,7 @@ function AddConfig(proj, strProjectName) {
|
|||
}
|
||||
}
|
||||
|
||||
function PchSettings(proj) {
|
||||
function AddPchSettings(proj) {
|
||||
}
|
||||
|
||||
function DelFile(fso, strWizTempFile) {
|
||||
|
@ -316,9 +336,6 @@ function GetTargetName(strName, strProjectName) {
|
|||
}
|
||||
|
||||
function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) {
|
||||
// var FileSys = new ActiveXObject('Scripting.FileSystemObject');
|
||||
// var log = FileSys.OpenTextFile("log.txt", 2, true);
|
||||
|
||||
try {
|
||||
var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
|
||||
|
||||
|
@ -372,5 +389,4 @@ function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) {
|
|||
catch (e) {
|
||||
throw e;
|
||||
}
|
||||
// log.Close();
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
#include "AppDelegate.h"
|
||||
|
||||
#include "cocos2d.h"
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
#include "SimpleAudioEngine.h"
|
||||
using namespace CocosDenshion;
|
||||
|
||||
[! endif]
|
||||
#include "HelloWorldScene.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
AppDelegate::AppDelegate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
SimpleAudioEngine::end();
|
||||
[! endif]
|
||||
}
|
||||
|
||||
bool AppDelegate::initInstance()
|
||||
{
|
||||
bool bRet = false;
|
||||
do
|
||||
{
|
||||
// Initialize OpenGLView instance, that release by CCDirector when application terminate.
|
||||
// The HelloWorld is designed as HVGA.
|
||||
// Use GetScreenWidth() and GetScreenHeight() get screen width and height.
|
||||
CCEGLView * pMainWnd = new CCEGLView(this);
|
||||
CC_BREAK_IF(! pMainWnd
|
||||
|| ! pMainWnd->Create(&TRectangle(0, 0, 320, 480)));
|
||||
|
||||
bRet = true;
|
||||
} while (0);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
{
|
||||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||
|
||||
// sets landscape mode
|
||||
pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
|
||||
|
||||
// turn on display FPS
|
||||
pDirector->setDisplayFPS(true);
|
||||
|
||||
// set FPS. the default value is 1.0/60 if you don't call this
|
||||
pDirector->setAnimationInterval(1.0 / 60);
|
||||
|
||||
// create a scene. it's an autorelease object
|
||||
CCScene *pScene = HelloWorld::scene();
|
||||
|
||||
// run
|
||||
pDirector->runWithScene(pScene);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
|
||||
void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
CCDirector::sharedDirector()->pause();
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
[! endif]
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
CCDirector::sharedDirector()->resume();
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
[! endif]
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef __APP_DELEGATE_H__
|
||||
#define __APP_DELEGATE_H__
|
||||
|
||||
#include "CCApplication.h"
|
||||
|
||||
/**
|
||||
@brief The cocos2d Application.
|
||||
|
||||
The reason for implement as private inheritance is to hide some interface call by CCDirector.
|
||||
*/
|
||||
class AppDelegate : private cocos2d::CCApplication
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
virtual ~AppDelegate();
|
||||
|
||||
/**
|
||||
@brief Implement for initialize OpenGL instance, set source path, etc...
|
||||
*/
|
||||
virtual bool initInstance();
|
||||
|
||||
/**
|
||||
@brief Implement CCDirector and CCScene init code here.
|
||||
@return true Initialize success, app continue.
|
||||
@return false Initialize failed, app terminate.
|
||||
*/
|
||||
virtual bool applicationDidFinishLaunching();
|
||||
|
||||
/**
|
||||
@brief The function be called when the application enter background
|
||||
@param the pointer of the application
|
||||
*/
|
||||
virtual void applicationDidEnterBackground();
|
||||
|
||||
/**
|
||||
@brief The function be called when the application enter foreground
|
||||
@param the pointer of the application
|
||||
*/
|
||||
virtual void applicationWillEnterForeground();
|
||||
};
|
||||
|
||||
#endif // __APP_DELEGATE_H__
|
||||
|
|
@ -9,11 +9,11 @@ CCScene* HelloWorld::scene()
|
|||
{
|
||||
// 'scene' is an autorelease object
|
||||
scene = CCScene::node();
|
||||
CCX_BREAK_IF(! scene);
|
||||
CC_BREAK_IF(! scene);
|
||||
|
||||
// 'layer' is an autorelease object
|
||||
HelloWorld *layer = HelloWorld::node();
|
||||
CCX_BREAK_IF(! layer);
|
||||
CC_BREAK_IF(! layer);
|
||||
|
||||
// add layer as a child to scene
|
||||
scene->addChild(layer);
|
||||
|
@ -33,7 +33,7 @@ bool HelloWorld::init()
|
|||
// super init first
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCX_BREAK_IF(! CCLayer::init());
|
||||
CC_BREAK_IF(! CCLayer::init());
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// add your codes below...
|
||||
|
@ -47,15 +47,15 @@ bool HelloWorld::init()
|
|||
"CloseSelected.png",
|
||||
this,
|
||||
menu_selector(HelloWorld::menuCloseCallback));
|
||||
CCX_BREAK_IF(! pCloseItem);
|
||||
CC_BREAK_IF(! pCloseItem);
|
||||
|
||||
// Place the menu item bottom-right conner.
|
||||
pCloseItem->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20));
|
||||
|
||||
// Create a menu with the "close" menu item, it's an auto release object.
|
||||
CCMenu* pMenu = CCMenu::menuWithItems(pCloseItem, NULL);
|
||||
pMenu->setPosition(CGPointZero);
|
||||
CCX_BREAK_IF(! pMenu);
|
||||
pMenu->setPosition(CCPointZero);
|
||||
CC_BREAK_IF(! pMenu);
|
||||
|
||||
// Add the menu to HelloWorld layer as a child layer.
|
||||
this->addChild(pMenu, 1);
|
||||
|
@ -64,10 +64,10 @@ bool HelloWorld::init()
|
|||
|
||||
// Create a label and initialize with string "Hello World".
|
||||
CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", "Thonburi", 64);
|
||||
CCX_BREAK_IF(! pLabel);
|
||||
CC_BREAK_IF(! pLabel);
|
||||
|
||||
// Get window size and place the label upper.
|
||||
CGSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
CCSize size = CCDirector::sharedDirector()->getWinSize();
|
||||
pLabel->setPosition(ccp(size.width / 2, size.height - 20));
|
||||
|
||||
// Add the label to HelloWorld layer as a child layer.
|
||||
|
@ -75,7 +75,7 @@ bool HelloWorld::init()
|
|||
|
||||
// 3. Add add a splash screen, show the cocos2d splash image.
|
||||
CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
|
||||
CCX_BREAK_IF(! pSprite);
|
||||
CC_BREAK_IF(! pSprite);
|
||||
|
||||
// Place the sprite on the center of the screen
|
||||
pSprite->setPosition(ccp(size.width/2, size.height/2));
|
||||
|
@ -89,7 +89,7 @@ bool HelloWorld::init()
|
|||
return bRet;
|
||||
}
|
||||
|
||||
void HelloWorld::menuCloseCallback(NSObject* pSender)
|
||||
void HelloWorld::menuCloseCallback(CCObject* pSender)
|
||||
{
|
||||
// "close" menu item clicked
|
||||
CCDirector::sharedDirector()->end();
|
|
@ -2,14 +2,16 @@
|
|||
#define __HELLOWORLD_SCENE_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
[! if CC_USE_BOX2D]
|
||||
|
||||
[! if CCX_USE_BOX2D]
|
||||
#include "Box2D.h"
|
||||
[! endif]
|
||||
[! if CCX_USE_CHIPMUNK]
|
||||
[! if CC_USE_CHIPMUNK]
|
||||
|
||||
#include "chipmunk.h"
|
||||
[! endif]
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
#include "SimpleAudioEngine.h"
|
||||
[! endif]
|
||||
|
||||
|
@ -23,7 +25,7 @@ public:
|
|||
static cocos2d::CCScene* scene();
|
||||
|
||||
// a selector callback
|
||||
virtual void menuCloseCallback(NSObject* pSender);
|
||||
virtual void menuCloseCallback(CCObject* pSender);
|
||||
|
||||
// implement the "static node()" method manually
|
||||
LAYER_NODE_FUNC(HelloWorld);
|
|
@ -0,0 +1,24 @@
|
|||
root_Arm.TMK3
|
||||
Makefile.ARM
|
||||
|
||||
wophone/NewDeleteOp.cpp
|
||||
wophone/TG3AppDllEntry.cpp
|
||||
wophone/TG3AppDllEntry.h
|
||||
|
||||
wophone/main.cpp
|
||||
|
||||
wophone/rootUnicodeScript.h
|
||||
wophone/rootUnicodeScript_str.h
|
||||
|
||||
[! if CC_USE_TCOM_SUPPORT]
|
||||
wophone/TCOM/root_TcomRegist.cpp
|
||||
[! endif]
|
||||
|
||||
Classes/AppDelegate.h
|
||||
Classes/AppDelegate.cpp
|
||||
|
||||
Classes/HelloWorldScene.h
|
||||
Classes/HelloWorldScene.cpp
|
||||
|
||||
Resource/CloseNormal.png
|
||||
Resource/CloseSelected.png
|
|
@ -28,9 +28,9 @@ INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPS标准应
|
|||
;PRE_DEFINE=USE_MTAPI=1 ;使用 MTAPI 库,此时生成的 Makefile 会自动连接有关的LIB
|
||||
|
||||
;C、C++预定义宏,可以使用多个DEFINES串,也可以使用DEFINES1、DEFINES2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
DEFINES=-DCCX_UNDER_UPHONE ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可
|
||||
DEFINES=-DCC_UNDER_UPHONE ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可
|
||||
;DEFINES=-D__TG3_PURE_DLL__ ;生成的是纯动态库(意思是:不是TOPS应用,但可以是TCOM组件)
|
||||
[!if CCX_USE_TCOM_SUPPORT]
|
||||
[!if CC_USE_TCOM_SUPPORT]
|
||||
DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件)
|
||||
[!else]
|
||||
;DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件)
|
||||
|
@ -38,26 +38,26 @@ DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也
|
|||
|
||||
;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDE_PATH=-I ../../PRJ_TG3/Include/OpenGL -I../cocos2dx -I../cocos2dx/include
|
||||
INCLUDE_PATH=-I. -I./Classes -I./uphone -I./uphone/Res ;默认本项目的路径
|
||||
[! if CCX_USE_BOX2D]
|
||||
INCLUDE_PATH=-I. -I./Classes -I./wophone -I./wophone/Res ;默认本项目的路径
|
||||
[! if CC_USE_BOX2D]
|
||||
INCLUDE_PATH=-I../ -I../Box2D
|
||||
[! endif]
|
||||
[! if CCX_USE_CHIPMUNK]
|
||||
[! if CC_USE_CHIPMUNK]
|
||||
INCLUDE_PATH=-I../chipmunk/include/chipmunk
|
||||
[! endif]
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
INCLUDE_PATH=-I../CocosDenshion/include
|
||||
[! endif]
|
||||
|
||||
;连接的库文件,可以使用多个LIBS串,也可以使用LIBS1、LIBS2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
LIBS=-lCocos2dStatic -lTG3_EGL -lTG3_GLESv1_CM -lTG3_GLESv2 -lz -lxml2 -lpng14 -lImageToolKit -ljpeg ;应用额外的连接库。注意:ITOPS自己的所需库自动包含,而且库包含路径也已经包含,故此这里仅仅包含应用自己特有的库的名字即可
|
||||
[! if CCX_USE_BOX2D]
|
||||
[! if CC_USE_BOX2D]
|
||||
LIBS=-lBox2dStatic
|
||||
[! endif]
|
||||
[! if CCX_USE_CHIPMUNK]
|
||||
[! if CC_USE_CHIPMUNK]
|
||||
LIBS=-lChipmunkStatic
|
||||
[! endif]
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
LIBS=-lCocosDenshionStatic -lTSoundPlayer
|
||||
[! endif]
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
// Original file name: [!output PROJECT_NAME]_Res.ENU.tr3
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
|
||||
//$VERSION 60006
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE="..\..\[!output PROJECT_NAME].uphone.vcproj"
|
||||
//$VCPRJFILE="..\..\[!output PROJECT_NAME].wophone.vcproj"
|
||||
//$End
|
||||
LANGUAGE = 1033
|
||||
// ImageLists
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
// Original file name: [!output PROJECT_NAME]_Res.ENU.tr3.tts
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
// Original file name: [!output PROJECT_NAME]_Res.TR3
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
|
||||
#include "[!output PROJECT_NAME]_Res.h"
|
||||
|
@ -8,7 +8,7 @@
|
|||
//$VERSION 60006
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE="..\..\[!output PROJECT_NAME].uphone.vcproj"
|
||||
//$VCPRJFILE="..\..\[!output PROJECT_NAME].wophone.vcproj"
|
||||
//$End
|
||||
|
||||
LANGUAGE = 2052
|
|
@ -1,7 +1,7 @@
|
|||
// Application resource group file.
|
||||
|
||||
// Original file name: [!output PROJECT_NAME]_Res.TRG
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
#ifndef __[!output PROJECT_NAME_UPPER]_RES_DEF_H__
|
||||
#define __[!output PROJECT_NAME_UPPER]_RES_DEF_H__
|
|
@ -1,5 +1,5 @@
|
|||
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
#include "[!output PROJECT_NAME_LOWER]_res_h.h"
|
||||
#ifndef WIN32
|
|
@ -1,5 +1,5 @@
|
|||
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
#ifndef __[!output PROJECT_NAME_UPPER]_RES_DEF_H__
|
||||
#define __[!output PROJECT_NAME_UPPER]_RES_DEF_H__
|
|
@ -1,7 +1,7 @@
|
|||
// Application application res_h file.
|
||||
|
||||
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
|
||||
// Generated by Cocos2d-uphone Wizard Date: [!output CCX_CURRENT_DATE]
|
||||
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]
|
||||
|
||||
|
||||
#ifndef __[!output PROJECT_NAME_UPPER]_RES_H_H__
|
|
@ -4,7 +4,7 @@
|
|||
#include "TG3AppDllEntry.h"
|
||||
|
||||
// 提供IID的具体定义,在整个项目中只能包含一次
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
[! else]
|
||||
#include "TCOM_Generic_DataType_IIDs.h"
|
||||
#include "TCOM_Generic_Method_IIDs.h"
|
|
@ -3,7 +3,7 @@
|
|||
Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
||||
{
|
||||
AppDelegate app;
|
||||
app.Run();
|
||||
|
||||
cocos2d::CCApplication::sharedApplication().run();
|
||||
return 1;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCXAppWiz.win32", "CCXAppWiz\CCXAppWiz.vcproj", "{104F4414-0DA5-4982-A413-766DD1698469}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCAppWiz.win32", "CCAppWiz.win32\CCAppWiz.win32.vcproj", "{104F4414-0DA5-4982-A413-766DD1698469}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCXAppWiz.uphone", "CCXAppWiz.uphone\CCXAppWiz.uphone.vcproj", "{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCAppWiz.wophone", "CCAppWiz.wophone\CCAppWiz.wophone.vcproj", "{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -0,0 +1,232 @@
|
|||
// Setup program for the Cocos2d-win32 App Wizard for VC++ 9.0 (Orcas)
|
||||
|
||||
main();
|
||||
|
||||
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 strVC9Key = "HKLM\\Software\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVC9Key);
|
||||
}
|
||||
catch (e) {
|
||||
try {
|
||||
var strVC9Key_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVC9Key_x64);
|
||||
}
|
||||
catch (e) {
|
||||
EchoError(bQuiet, "Cannot find where Visual C++ 2008 Express is installed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var strDestFolder = FileSys.BuildPath(strValue, "Express\\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 = 2;
|
||||
|
||||
var astrWizardName = new Array();
|
||||
astrWizardName[0] = "CCAppWiz.win32";
|
||||
astrWizardName[1] = "CCAppWiz.wophone";
|
||||
|
||||
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 += ".9.0";
|
||||
else if (strLine.indexOf("WIZARD_VERSION") != -1)
|
||||
strLine = "Param=\"WIZARD_VERSION = 9.0\"";
|
||||
else if (strLine.indexOf("ABSOLUTE_PATH") != -1)
|
||||
strLine = "Param=\"ABSOLUTE_PATH = " + strSourceFolder + "\"";
|
||||
fileDest.WriteLine(strLine);
|
||||
}
|
||||
|
||||
|
||||
fileDest.WriteLine("Param=\"VC_EXPRESS = 1\"");
|
||||
|
||||
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 and CCAppWiz.uphone.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;
|
||||
}
|
||||
|
||||
if (! bQuiet) {
|
||||
WScript.Echo("App Wizard successfully installed!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,232 @@
|
|||
// Setup program for the Cocos2d-win32 App Wizard for VC++ 10.0 (VC2010)
|
||||
|
||||
main();
|
||||
|
||||
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\\VCExpress\\10.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVCKey);
|
||||
}
|
||||
catch (e) {
|
||||
try {
|
||||
var strVCKey_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VCExpress\\10.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVCKey_x64);
|
||||
}
|
||||
catch (e) {
|
||||
EchoError(bQuiet, "Cannot find where Visual C++ 2010 Express is installed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var strDestFolder = FileSys.BuildPath(strValue, "Express\\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 = 2;
|
||||
|
||||
var astrWizardName = new Array();
|
||||
astrWizardName[0] = "CCAppWiz.win32";
|
||||
astrWizardName[1] = "CCAppWiz.wophone";
|
||||
|
||||
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 += ".10.0";
|
||||
else if (strLine.indexOf("WIZARD_VERSION") != -1)
|
||||
strLine = "Param=\"WIZARD_VERSION = 10.0\"";
|
||||
else if (strLine.indexOf("ABSOLUTE_PATH") != -1)
|
||||
strLine = "Param=\"ABSOLUTE_PATH = " + strSourceFolder + "\"";
|
||||
fileDest.WriteLine(strLine);
|
||||
}
|
||||
|
||||
|
||||
fileDest.WriteLine("Param=\"VC_EXPRESS = 1\"");
|
||||
|
||||
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 and CCAppWiz.uphone.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;
|
||||
}
|
||||
|
||||
if (! bQuiet) {
|
||||
WScript.Echo("App Wizard successfully installed!");
|
||||
}
|
||||
}
|
|
@ -2,9 +2,24 @@
|
|||
|
||||
main();
|
||||
|
||||
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++) {
|
||||
|
@ -12,6 +27,8 @@ function main() {
|
|||
bDebug = true;
|
||||
else if (Args(i) == "/elevated")
|
||||
bElevated = true;
|
||||
else if (Args(i) == "/quiet")
|
||||
bQuiet = true;
|
||||
}
|
||||
|
||||
// See if UAC is enabled
|
||||
|
@ -19,7 +36,7 @@ function main() {
|
|||
if (!bElevated && Shell.IsRestricted("System", "EnableLUA")) {
|
||||
// Check that the script is being run interactively.
|
||||
if (!WScript.Interactive) {
|
||||
WScript.Echo("ERROR: Elevation required.");
|
||||
EchoError(bQuiet, "(Windows LUA) Elevation required.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +71,7 @@ function main() {
|
|||
strValue = WSShell.RegRead(strVC9Key_x64);
|
||||
}
|
||||
catch (e) {
|
||||
WScript.Echo("ERROR: Cannot find where Visual Studio 9.0 is installed.");
|
||||
EchoError(bQuiet, "Cannot find where Visual Studio 2008 is installed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -62,8 +79,9 @@ function main() {
|
|||
var strDestFolder = FileSys.BuildPath(strValue, "vcprojects");
|
||||
if (bDebug)
|
||||
WScript.Echo("Destination: " + strDestFolder);
|
||||
|
||||
if (!FileSys.FolderExists(strDestFolder)) {
|
||||
WScript.Echo("ERROR: Cannot find destination folder (should be: " + strDestFolder + ")");
|
||||
EchoError(bQuiet, "Cannot find destination folder (should be: " + strDestFolder + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -71,8 +89,8 @@ function main() {
|
|||
var nNumWizards = 2;
|
||||
|
||||
var astrWizardName = new Array();
|
||||
astrWizardName[0] = "CCXAppWiz";
|
||||
astrWizardName[1] = "CCXAppWiz.uphone";
|
||||
astrWizardName[0] = "CCAppWiz.win32";
|
||||
astrWizardName[1] = "CCAppWiz.wophone";
|
||||
|
||||
var nCntr;
|
||||
for (nCntr = 0; nCntr < nNumWizards; nCntr++) {
|
||||
|
@ -82,7 +100,7 @@ function main() {
|
|||
WScript.Echo("Source: " + strSourceFolder);
|
||||
|
||||
if (!FileSys.FolderExists(strSourceFolder)) {
|
||||
WScript.Echo("ERROR: Cannot find Wizard folder (should be: " + strSourceFolder + ")");
|
||||
EchoError(bQuiet, "Cannot find Wizard folder (should be: " + strSourceFolder + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -100,11 +118,11 @@ function main() {
|
|||
var strError = "no info";
|
||||
if (e.description.length != 0)
|
||||
strError = e.description;
|
||||
WScript.Echo("ERROR: Cannot copy file (" + strError + ")");
|
||||
EchoError(bQuiet, "Cannot copy file (" + strError + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
// Read and write CCXAppWiz.vsz, add engine version and replace path when found
|
||||
// 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");
|
||||
|
@ -112,14 +130,14 @@ function main() {
|
|||
var ForReading = 1;
|
||||
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
|
||||
if (fileSrc == null) {
|
||||
WScript.Echo("ERROR: Cannot open source file " + strSrc);
|
||||
EchoError(bQuiet, "Cannot open source file: " + strSrc);
|
||||
return;
|
||||
}
|
||||
|
||||
var ForWriting = 2;
|
||||
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
|
||||
if (fileDest == null) {
|
||||
WScript.Echo("ERROR: Cannot open destination file" + strDest);
|
||||
EchoError(bQuiet, " Cannot open destination file: " + strDest);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -141,37 +159,37 @@ function main() {
|
|||
var strError = "no info";
|
||||
if (e.description.length != 0)
|
||||
strError = e.description;
|
||||
WScript.Echo("ERROR: Cannot read and write CCXAppWiz.vsz (" + strError + ")");
|
||||
EchoError(bQuiet, "Cannot read and write CCAppWiz.vsz (" + strError + ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Create Cocos2d-x folder
|
||||
var strDestCCXFolder = "";
|
||||
var strDestCCFolder = "";
|
||||
try {
|
||||
strDestCCXFolder = FileSys.BuildPath(strDestFolder, "Cocos2d-x");
|
||||
if (!FileSys.FolderExists(strDestCCXFolder))
|
||||
FileSys.CreateFolder(strDestCCXFolder);
|
||||
strDestCCFolder = FileSys.BuildPath(strDestFolder, "Cocos2d-x");
|
||||
if (!FileSys.FolderExists(strDestCCFolder))
|
||||
FileSys.CreateFolder(strDestCCFolder);
|
||||
if (bDebug)
|
||||
WScript.Echo("CCX Folder: " + strDestCCXFolder);
|
||||
WScript.Echo("Cocos2d-x Folder: " + strDestCCFolder);
|
||||
}
|
||||
catch (e) {
|
||||
var strError = "no info";
|
||||
if (e.description.length != 0)
|
||||
strError = e.description;
|
||||
WScript.Echo("ERROR: Cannot create CCX folder (" + strError + ")");
|
||||
EchoError(bQuiet, "Cannot create Cocos2d-x folder (" + strError + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
// Read and write additional CCXAppWiz.vsdir and CCXAppWiz.uphone.vsdir, add path to the wizard location
|
||||
// Read and write additional CCAppWiz.vsdir and CCAppWiz.uphone.vsdir, add path to the wizard location
|
||||
try {
|
||||
var strDest = FileSys.BuildPath(strDestCCXFolder, "Cocos2d-x.vsdir");
|
||||
var strDest = FileSys.BuildPath(strDestCCFolder, "Cocos2d-x.vsdir");
|
||||
|
||||
var ForWriting = 2;
|
||||
|
||||
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
|
||||
if (fileDest == null) {
|
||||
WScript.Echo("ERROR: Cannot open destination file" + strDest);
|
||||
EchoError(bQuiet, "Cannot open destination file: " + strDest);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -182,7 +200,7 @@ function main() {
|
|||
var ForReading = 1;
|
||||
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
|
||||
if (fileSrc == null) {
|
||||
WScript.Echo("ERROR: Cannot open source file " + strSrc);
|
||||
EchoError(bQuiet, "Cannot open source file: " + strSrc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -201,9 +219,11 @@ function main() {
|
|||
var strError = "no info";
|
||||
if (e.description.length != 0)
|
||||
strError = e.description;
|
||||
WScript.Echo("ERROR: Cannot read and write CCX\\CCXAppWiz.vsdir (" + strError + ")");
|
||||
EchoError(bQuiet, "Cannot read and write Cocos2d-x\\CCAppWiz.vsdir (" + strError + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
WScript.Echo("App Wizard successfully installed!");
|
||||
if (! bQuiet) {
|
||||
WScript.Echo("App Wizard successfully installed!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,229 @@
|
|||
// Setup program for the Cocos2d-win32 App Wizard for VC++ 10.0 (VC2010)
|
||||
|
||||
main();
|
||||
|
||||
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\\10.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVCKey);
|
||||
}
|
||||
catch (e) {
|
||||
try {
|
||||
var strVCKey_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir";
|
||||
strValue = WSShell.RegRead(strVCKey_x64);
|
||||
}
|
||||
catch (e) {
|
||||
EchoError(bQuiet, "Cannot find where Visual Studio 2010 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 = 2;
|
||||
|
||||
var astrWizardName = new Array();
|
||||
astrWizardName[0] = "CCAppWiz.win32";
|
||||
astrWizardName[1] = "CCAppWiz.wophone";
|
||||
|
||||
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 += ".10.0";
|
||||
else if (strLine.indexOf("WIZARD_VERSION") != -1)
|
||||
strLine = "Param=\"WIZARD_VERSION = 10.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 and CCAppWiz.uphone.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;
|
||||
}
|
||||
|
||||
if (! bQuiet) {
|
||||
WScript.Echo("App Wizard successfully installed!");
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
CCXAppWiz.uphone.vsz| |Cocos2d-uphone Application|1|An application that uses Cocos2d-x library for uphone platform.| |6777| |<EnterName>
|
|
@ -1,68 +0,0 @@
|
|||
#include "AppDelegate.h"
|
||||
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
#include "SimpleAudioEngine.h"
|
||||
using namespace CocosDenshion;
|
||||
|
||||
[! endif]
|
||||
#include "HelloWorldScene.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
AppDelegate::AppDelegate()
|
||||
:m_pMainWnd(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
SimpleAudioEngine::end();
|
||||
[! endif]
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
{
|
||||
// init the window
|
||||
if (!(m_pMainWnd = new CCXEGLView(this)) ||
|
||||
! m_pMainWnd->Create(&TRectangle(0,0,GetScreenWidth(),GetScreenHeight())))
|
||||
{
|
||||
CCX_SAFE_DELETE(m_pMainWnd);
|
||||
return false;
|
||||
}
|
||||
|
||||
// init director
|
||||
CCDirector * pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(m_pMainWnd);
|
||||
pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
|
||||
// pDirector->setDeviceOrientation(kCCDeviceOrientationPortrait);
|
||||
pDirector->setDisplayFPS(true);
|
||||
|
||||
CCScene * pScene = HelloWorld::scene();
|
||||
|
||||
pDirector->runWithScene(pScene);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
|
||||
void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
CCDirector::sharedDirector()->pause();
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
[! endif]
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
CCDirector::sharedDirector()->resume();
|
||||
[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
[! endif]
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef __APP_DELEGATE_H__
|
||||
#define __APP_DELEGATE_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
|
||||
class AppDelegate : public cocos2d::CCXApplication
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
~AppDelegate();
|
||||
|
||||
virtual bool applicationDidFinishLaunching();
|
||||
virtual void applicationDidEnterBackground();
|
||||
virtual void applicationWillEnterForeground();
|
||||
|
||||
protected:
|
||||
cocos2d::CCXEGLView *m_pMainWnd;
|
||||
};
|
||||
|
||||
#endif // __APP_DELEGATE_H__
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
root_Arm.TMK3
|
||||
Makefile.ARM
|
||||
|
||||
uphone/NewDeleteOp.cpp
|
||||
uphone/TG3AppDllEntry.cpp
|
||||
uphone/TG3AppDllEntry.h
|
||||
|
||||
uphone/main.cpp
|
||||
|
||||
uphone/rootUnicodeScript.h
|
||||
uphone/rootUnicodeScript_str.h
|
||||
|
||||
[! if CCX_USE_TCOM_SUPPORT]
|
||||
uphone/TCOM/root_TcomRegist.cpp
|
||||
[! endif]
|
||||
|
||||
Classes/AppDelegate.h
|
||||
Classes/AppDelegate.cpp
|
||||
|
||||
Classes/HelloWorldScene.h
|
||||
Classes/HelloWorldScene.cpp
|
||||
|
||||
Resource/CloseNormal.png
|
||||
Resource/CloseSelected.png
|
|
@ -1 +0,0 @@
|
|||
CCXAppWiz.vsz| |Cocos2d-win32 Application |1|An application that uses Cocos2d-x library for win32 platform.| |6777| |<EnterName>
|