code:
/******************************************************************************/
/*DEFAULT STYLES FOR ALL SECTIONS**********************************************/
/******************************************************************************/
body						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
								color: buttontext;
								background-color: buttonface;
							    margin-top: 0px;
		  		 			    margin-left: 0px;
							    margin-right: 0px;
							    margin-bottom: 0px;
								overflow: auto; }

a:link						  { color: captiontext;
				  				text-decoration: none; }

a:visited					  { color: captiontext;
				  				text-decoration: none; }

a:active					  { color: captiontext;
				  				text-decoration: none; }

a:hover						  { color: captiontext;
				  				text-decoration: underline; }

table						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 100%; }

table.one					  { table-layout: fixed;
								height: 100%;
								width: 100%; }

/*DEFAULT STYLES FOR THE 'INTRODUCTION' TABLE**********************************/
/******************************************************************************/
table.two					  { table-layout: fixed;
								height: 79px;
								width: 100%;
								background-color: window; }

td.image					  { text-align: right; }

/*DEFAULT STYLES FOR THE 'NAVIGATION' TABLE************************************/
/******************************************************************************/
table.linkText				  { line-height: 95%;
                                width: 1.7in;
								height: 2.6em;
								position: relative;
								left: 0.1in;
						 		z-index: 2; }

span						  { position: relative;
								z-index: 3; }

span.horiLine1				  { height: 30px;
								width: 166px;
								position: absolute;
								top: -1px;
								left: -1px;
								bottom: -1px;
								z-index: 2; }

/*DEFAULT STYLES FOR THE ALL BUTTONS AND THE 'BUTTONS' TABLE*******************/
/******************************************************************************/
button						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
								height: 23px;
								cursor: hand; }

.buttons				  	  { width: 100%; }

/*DEFAULT STYLES FOR THE 'CONTENT' TABLE***************************************/
/******************************************************************************/
table.fixedSize			 	  { table-layout: fixed; }

table.content			 	  { table-layout: fixed;
								height: 100%;
								width: 100%; }

ol							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								margin-top: -1px;
								margin-bottom: 16px; }

ul							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								margin-top: 3px;
								margin-bottom: 16px; }

li							  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								position: relative;
								left: -15px;
								margin-bottom: 1px; }

span.itemTextTop			  { position: relative; }

span.itemText				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
								font-weight: normal;
								font-size: 8pt;
								line-height: 9pt;
								position: relative;
								top: -3px; }

span.itemTextIndent			  { position: relative;
								left: 17px;
								top: -3px; }

span.sideBtnHidden			  { width: 100%;
								margin-top: 3px;
								margin-bottom: 0px; }

div.itemTextRadioAa			  { position: relative;
								top: -17px;
								left: 17px;
								margin-bottom: -25px; }

div.itemTextRadioA			  { position: relative;
								top: -19px;
								left: 17px;
								margin-bottom: -25px; }

div.itemTextRadioB			  { position: relative;
								top: -19px;
								left: 25px;
								margin-bottom: -25px; }

div.itemTextRadioIndentA	  { position: relative;
								top: -17px;
								left: 30px;
								margin-bottom: -25px; }

div.itemTextRadioIndentB	  { position: relative;
								top: -17px;
								left: 42px;
								margin-bottom: -25px; }

div.itemTextCheckboxA		  { position: relative;
								top: -17px;
								left: 17px;
								margin-bottom: -23px; }

div.itemTextCheckboxB		  { position: relative;
								top: -18px;
								left: 25px;
								padding-top: 1px;
								margin-bottom: -25px; }

div.itemTextCheckboxIndentB	  { position: relative;
								top: -16px;
								left: 42px;
								margin-bottom: -25px; }

input						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

select						  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

.radio						  { position: relative;
								top: -2px;
								left: 4px; }

.radioA				  		  { position: relative;
								top: -1px;
								margin-left: -4px;
								z-index: 2; }

.radioIndent				  { margin-top: -2px;
								margin-left: 17px; }

.radioIndentA				  { margin-top: -2px;
								margin-left: 9px; }

.checkbox					  { position: relative;
								top: -1px;
								margin-left: -4px;
								z-index: 2; }

.checkboxA					  { position: relative;
								top: -2px;
								left: 4px; }

.checkboxIndent				  { position:relative;
								margin-top: -1px;
								margin-left: 21px; }

.comment					  { width: 578px;
								position: relative;
								top: 5px;
								bottom: 6px; }

.commentA					  { width: 398px;
								position: relative;
								top: 5px;
								bottom: 6px; }

.commentB					  { width: 578px;
								position: relative;
								top: 3px;
								bottom: -3px; }

/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN INPUT BOX******************/
input.sideBtn				  { width: 193px;
								position: relative;
								top: 3px; }

/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
input.sideBtnThreeColumn	  { width: 185px;
								position: relative;
								top: 3px; }

/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
input.itemTextTwoColumnLong	  { width: 283px;
								position: relative;
								top: 3px; }

/****THIS IS AN INPUT BOX INDENTED UNDER A CHECKBOX SECTION********************/
input.sideBtnIndent			  { width: 175px;
								position: relative;
								top: 3px;
								left: 18px;
								bottom: 6px; }

/****THIS INPUT BOX HAS IS INDENTED UNDER A HEADING AND RULE SECTION***********/
input.sideBtnB				  { width: 185px;
								position: relative;
								top: 3px;
								bottom: 6px; }

input.sideBtnBA				  { width: 175px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S A TABBED WIZARD******/
input.sideBtn2				  { width: 169px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****"..." BUTTON IN A NON-TABBED, 3 COLUMN WIZARD*****************************/
input.sideBtn2ThreeColumn	  { width: 161px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS IS AN INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON******/
input.TwoColumnLongButton	  { width: 259px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S UNDER A CHECKBOX*****/
input.sidebtn2Indent		  { width: 151px;
								position: relative;
								top: 3px;
								left: 18px;
								bottom: 6px; }

/****"..." BUTTON IS UNDER A SECTION IN A TWO COLUMN AND TABBED WIZARD*********/
input.sidebtn21				  { width: 161px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****"..." BUTTON IS UNDER A SECTION IN A THREE COLUMN AND TABBED WIZARD*********/
input.sidebtn21A			  { width: 153px;
								position: relative;
								top: 3px;
								bottom: 6px; }

/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN SELECTION BOX**************/
select.sidebtn				  { width: 193px;
								position: relative;
								top: 4px;
								bottom: -3px; }

select.sidebtnNoWidth		  { position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS THE STANDARD TABBED WIZARD, ONE COLUMN SELECTION BOX**************/
select.sideBtnOneCLong		  { width: 398px;
								position: relative;
								top: 3px; }

/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
select.sideBtnThreeColumn	  { width: 185px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
select.itemTextTwoColumnLong	  { width: 283px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS SELECTION BOX IS INDENTED UNDER A HEADING AND RULE SECTION***********/
select.sidebtnB				  { width: 164px;
								position: relative;
								top: 4px;
								left: 8px;
								bottom: -3px; }

/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX****************/
select.sidebtn2				  { width: 164px;
								position: relative;
								top: 11px;
								left: 17px;
								bottom: -3px; }

select.sidebtnIndent		  { width: 175px;
								position: relative;
								top: 4px;
								left: 18px;
								bottom: -3px; }

/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX AND HEADING****/
select.sidebtn2AShort		  { width: 168px;
								position: relative;
								top: 4px;
								left: 25px;
								bottom: -3px; }

/****THIS SELECTION BOX IS IN A TABBED, TWO COLUM WIZARD AND FOR < << > >>*****/
select.sidebtn3				  { width: 177px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.TwoColumnLongButton	  { width: 259px;
								position: relative;
								top: 4px;
								bottom: -3px; }

/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.IndentListBoxWithButton	  { width: 283px;
									position: relative;
									top: 4px;
									bottom: -3px;
									left: 18px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 2 COLUMN AND TABBED WIZARD********/
object.itemtext				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 193px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 3 COLUMN AND NON-TABBED WIZARD****/
object.itemtextThreeColumn	  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 185px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

/****THIS IS THE DEFAULT OBJECT DROP DOWN IN NON-TABBED AND 2 COLUMN WIZARD****/
object.itemTextTwoColumnLong{ font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext;
								width: 283px;
								height: 2em;
								position: relative;
								top: 4px;
								margin-bottom: 0px; }

.dropdowncombo				  { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
							    font-weight: normal;
				 			    font-size: 8pt;
							    color: buttontext; }

/****MOVES RADIO TEXT UP A BIT WHEN INLINE*************************************/
span.upABit					  { position: relative;
								top: -2px; }

/****THIS DEFINES A STANDARD BUTTON IN THE CONTENT SECTION*********************/
.buttonClass			 	  { margin-top: 0px;
								margin-bottom: -6px; }

/****THIS DEFINES ADD/REMOVE BUTTONS IN THE CONTENT SECTION********************/
.buttonClass2			 	  { width: 75px;
							padding-top: 1px;
								margin-top: 7px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION OUT OF THE SPAN TAG****/
.buttonClass3			 	  { height: 19px;
								width: 20px;
								position: relative;
								left: 1px;
								top: 0px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION WITHIN THE SPAN TAG***/
.buttonClass3Custom		 	  { height: 19px;
								width: 20px;
								position: relative;
								left: 4px;
								top: 3px; }

/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION AND UNDER A CHECKBOX***/
.buttonClass3Indent		 	  { height: 19px;
								width: 20px;
								position: relative;
								top: 0px;
								left: 10px; }

/****THIS DEFINES A ">>" BUTTON IN THE CONTENT SECTION************************/
.buttonClass4			 	  { margin-bottom: 4px;
								width: 25px; }

/****THIS DEFINES ADD/REMOVE BUTTONS HORIZONTALLY IN THE CONTENT SECTION******/
.buttonClass5			 	  { position: relative;
								top: 4px;
								width: 75px; }

/****THIS SETS THE LEFT MARGIN FOR THE REMOVE BUTTON***************************/
#removeBtn				 	  { margin-left: 4px; }

/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent				  { margin-left: 18px; }

/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent2				  { margin-left: 25px; }

/****THIS MOVES CHECK BOX AND RADIO TEXT UP A BIT******************************/
label.upABit				  { position: relative;
								top: -2px; }

/****THIS BOLDS < << > >> BUTTONS**********************************************/
b.bigFont					  { font-size: 135%; }

/****THESE ARE CUSTOM VERTICAL SPACING ELEMENTS********************************/
p.spacer					  { margin-bottom: -28px; }

p.elementSpacer				  { margin-bottom: -12px; }

p.elementSpacer2			  { margin-bottom: -19px; }

p.elementSpacer3			  { margin-bottom: -3px; }

p.elementSpacer4			  { margin-bottom: 7px; }

p.elementSpacer5			  { margin-bottom: 5px; }

p.elementSpacer6			  { margin-bottom: -24px; }

p.elementSpacer7			  { margin-bottom: -11px; }

p.elementSpacer8			  { margin-bottom: -15px; }

p.elementSpacer9			  { margin-bottom: -7px; }

p.elementSpacer10			  { margin-bottom: 6px; }

p.elementSpacer11			  { margin-bottom: -1px; }

p.elementSpacer12			  { margin-bottom: -17px; }

p.elementSpacer13			  { margin-bottom: -23px; }

p.elementSpacer14			  { margin-bottom: -25px; }

p.elementSpacer15			  { margin-bottom: -13px; }

p.elementSpacer16			  { margin-bottom: -22px; }

p.elementSpacer17			  { margin-bottom: -32px; }

p.elementSpacer18			  { margin-bottom: -14px; }

p.elementSpacer19			  { margin-bottom: -10px; }

p.elementSpacer21			  { margin-bottom: -16px; }

p.elementSpacer22			  { margin-bottom: 3px; }

/*CUSTOM STYLES FOR THE 'CONTENT' FRAME****************************************/
/******************************************************************************/

	/*CUSTOM SPACING FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
	/**************************************************************************/
	p.elementSpacer20		  { margin-bottom: -13px; }

	/*CUSTOM STYLE FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
	/**************************************************************************/
	input.sideBtnLoc		  { width: 193px;
								position: relative;
								top: 3px; }

	/*PLACES SPACE BETWEEN ADD/REMOVE BUTTONS**********************************/
	/**************************************************************************/
	span.spacer8			  { width: 1px; }

	/*SETS TEXT BOX TO APPROPRIATE WIDTH IN MFCAppWiz**************************/
	/**************************************************************************/
	#CLASS_NAMES			  { width: 399px; }

	/*MOVES SELECT BOX UP IN CSharpIndexerWiz, Interface, Method,**************/
	/*InterfaceMethod, AND MemFunctionWiz**************************************/
	#PARAMETER_LIST			  { margin-top: -1px; }

	/*MOVES SELECT BOX UP IN CSharpMethodWiz***********************************/
	/**************************************************************************/
	#PARAMETER_LIST1		  { margin-top: -1px; }

	/*SETS SELECTION BOX WIDTH IN CSharpInterfaceMethod AND CSharpMethodWiz****/
	/**************************************************************************/
	#PARAMETER_MODIFIER		  { width: 58px; }

	/*SETS INDENT FOR ATLCustom AND MFCCustom Wizards**************************/
	/**************************************************************************/
	span.itemTextIndent1	  { position: relative;
								left: 8px;
								top: -3px; }

	/*SETS INDENT ON OBJECT FOR CSharpMethodWiz********************************/
	/**************************************************************************/
	span.customObjectIndent	  { margin-left: 8px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.sidebtn			  { position: relative;
								top: 4px;
								bottom: -3px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.itemtextspecial	  { position: relative;
								top: -20px;
								left: 9px;
								bottom: -3px; }

	/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
	/**************************************************************************/
	span.sidebtnspecial		  { position: relative;
								top: -2px;
								left: 53px;
								bottom: -3px; }

	/**************************************************************************/

	/*MODIFIED POSITIONING*****************************************************/
	/**************************************************************************/
	/*Position and border change + link to the script file (absolutely needed)!!*/
	table.three					  { table-layout: fixed;
									height: 100%;
									position: absolute;
									left: -1px;
									border-right: solid 2px Window; }

	/*Color change*/
	span.activeLink				  { color: WindowText;
								    text-decoration: none;
									word-wrap: break-word;
								    cursor: hand;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Color change*/
	span.activeLink2			  { color: WindowText;
									text-decoration: underline;
									word-wrap: break-word;
									cursor: hand;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Color change*/
	span.inactiveLink			  { color: GrayText;
									text-decoration: none;
									word-wrap: break-word;
									cursor: default;
									width: 100%;
									padding-top: 1px;
									padding-bottom: 1px; }

	/*Turned off dotted line*/
	span.vertLine1				  { height: 100%;
						 			width: 1px;
									position: absolute;
									top: 0px;
				 					left: -1px;
									bottom: 0px;
									z-index: 2; }

    /*Style for width-control of the left-side links bar */
    .LinkPane                     { width: 1.9in; }

	/*Removed bolding of text*/
	table.linkTextSelected		  { line-height: 95%;
                                    width: 1.7in;
									height: 2.6em;
									position: relative;
									left: 0.1in;
									z-index: 2; }

	/*Removed bolding of text and made width bigger*/
	table.linkTextSelectedIndent  { line-height: 95%;
                                    width: 1.7in;
									height: 2.6em;
									position: relative;
									top: -2px;
									left: 0.2in;
									z-index: 2; }

	/*Changed left margin and position of top of element and made width bigger*/
	table.linkTextIndent		  { line-height: 95%;
                                    width: 1.6in;
									height: 2.6em;
									position: relative;
									top: -2px;
									left: 0.2in;
									z-index: 2; }

	/*Removed background color, changed top, and bottom margins*/
	div.linkSelected			  { height: 2.6em;
									position: relative;
									top: -6px;
									left: 0px;
									right: 0px;
									z-index: 1;
									margin-bottom: -.7em; }

	/*Changed top and bottom margins*/
	div.link					  { height: 2em;
									position: relative;
									top: -6px;
									left: 0px;
									right: 0px;
									z-index: 1;
									margin-bottom: -.7em; }

	/*Comment out
	div.vertLine				  { background: url(Images/DottedVert.gif) repeat;
									height: 125%;
						 			width: 1px;
									position: relative;
									top: -12px;
									left: -1px; }*/

	/*Deleted dotted line*/
	span.vertLine1				  { height: 100%;
						 			width: 1px;
									position: absolute;
									top: 0px;
				 					left: -1px;
									bottom: 0px;
									z-index: 2; }

	/*Changed background color and add alpha*/
	td.three					  { background-color: Window;
									filter: Alpha(Opacity = 25);  }

	/*Removed all background image modification elements and set image to 0 opacity*/
	td.threeCustom				  { filter: Alpha(Opacity = 0); }

	/*Comment out
	td.dottedline				  { background: url(Images/DottedHori.gif) repeat; }*/

	/*Removed border color*/
	div.inlineA					  {	position: relative;
									top: 4px;
									width: 100%;
									height: 1px; }

	/*Changed border color*/
	div.inlineB					  {	position: relative;
									top: -9px;
									margin-bottom: -20px;
									width: 100%;
									height: 1px;
									border-top: solid ThreeDShadow 1px; }

	/*Changed position of element*/
	h4.head						  { font-weight: bold;
				 					font-size: 10pt;
				 					color: windowtext;
									position: absolute;
									top: 16px;
									left: 120px;
									height: 58px; }

	/*Hide element*/
	p.subhead					  { display: none;
									color: windowtext;
									position: relative;
									top: -1.5em;
									left: 1em; }

	/*Changed alignment to right*/
	td.image					  { text-align: left; }

	/*Added item to control positioning of element*/
	div.smallA					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added item to control positioning of element - 1 misspelling in html so dup of above*/
	div.smalA					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added item to control positioning of element*/
	div.small					  { position: absolute;
									top: 0px;
									left: 12px;
									height: 78px;
									width: 110px;
									vertical-align: bottom; }

	/*Added all positioning informaiton*/
	img.smallest			  	  { background-color: activecaption;
									position: relative;
									bottom: 1px; }

	/*Added item to control positioning of element*/
	img.small					  { position: relative;
									bottom: 1px; }

	/*Add height specification*/
	td.rule						  { background-color: window;
									height: 1px; }

	/*Info for new button*/
	#PreviousBtn				  { position: relative;
									right: -79px; }
	/*Info for new button*/
	#NextBtn					  { position: relative;
									right: -79px; }

	/*Reposition button*/
	#FinishBtn					  { position: relative;
									right: -79px; }

	/*Reposition button*/
	#CancelBtn					  { position: relative;
									right: -79px; }

	/*Hide button*/
	#HelpBtn					  { display: none; }

	/**************************************************************************/


code:
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="9.00"
	Name="CCAppWiz.wophone"
	ProjectGUID="{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}"
	RootNamespace="CCXAppWiz.uphone"
	Keyword="CustomAppWizProj"
	TargetFrameworkVersion="196613"
	>
	<Platforms>
		<Platform
			Name="Win32"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
			IntermediateDirectory="$(ConfigurationName)"
			ConfigurationType="10"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			ConfigurationType="10"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCMIDLTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Template Files"
			Filter="txt"
			>
			<File
				RelativePath=".\Templates\1033\Makefile.ARM"
				>
			</File>
			<File
				RelativePath=".\Templates\1033\root_Arm.TMK3"
				>
			</File>
			<Filter
				Name="Classes"
				>
				<File
					RelativePath=".\Templates\1033\Classes\AppDelegate.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\AppDelegate.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\HelloWorldScene.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\Classes\HelloWorldScene.h"
					>
				</File>
			</Filter>
			<Filter
				Name="wophone"
				>
				<File
					RelativePath=".\Templates\1033\wophone\main.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\wophone\NewDeleteOp.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\wophone\rootUnicodeScript.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\wophone\rootUnicodeScript_str.h"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\wophone\TG3AppDllEntry.cpp"
					>
				</File>
				<File
					RelativePath=".\Templates\1033\wophone\TG3AppDllEntry.h"
					>
				</File>
				<Filter
					Name="Res"
					>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_Res.ENU.tr3"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_Res.ENU.tr3.tts"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_Res.h"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_Res.TR3"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_Res.TRG"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_res_c.h"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_res_def.h"
						>
					</File>
					<File
						RelativePath=".\Templates\1033\wophone\Res\root_res_h.h"
						>
					</File>
				</Filter>
				<Filter
					Name="TCOM"
					>
					<File
						RelativePath=".\Templates\1033\wophone\TCOM\root_TcomRegist.cpp"
						>
					</File>
				</Filter>
			</Filter>
		</Filter>
		<Filter
			Name="HTML Files"
			Filter="htm"
			>
			<File
				RelativePath=".\HTML\1033\default.htm"
				DeploymentContent="true"
				>
			</File>
			<File
				RelativePath=".\HTML\1033\features.htm"
				DeploymentContent="true"
				>
			</File>
		</Filter>
		<Filter
			Name="Image Files"
			Filter="bmp"
			>
		</Filter>
		<Filter
			Name="Script Files"
			Filter="js"
			>
			<File
				RelativePath=".\Scripts\1033\default.js"
				>
			</File>
		</Filter>
		<Filter
			Name="Miscellaneous Files"
			Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
			>
			<File
				RelativePath=".\CCAppWiz.wophone.ico"
				>
			</File>
			<File
				RelativePath=".\CCAppWiz.wophone.vsdir"
				>
			</File>
			<File
				RelativePath=".\CCAppWiz.wophone.vsz"
				>
			</File>
			<File
				RelativePath=".\default.vcproj"
				>
			</File>
			<File
				RelativePath=".\1033\NewStyles.css"
				>
			</File>
			<File
				RelativePath=".\Templates\1033\Templates.inf"
				>
			</File>
		</Filter>
		<File
			RelativePath=".\Images\Background_Cocos2d-x.gif"
			>
		</File>
		<File
			RelativePath=".\Images\Cocos2d-x.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\DottedHori.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\DottedVert.gif"
			>
		</File>
		<File
			RelativePath=".\1033\Images\spacer.gif"
			>
		</File>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

license: mit


code: CCAppWiz.wophone.vsz| |Cocos2d-wophone Application|1|An application that uses Cocos2d-x library for wophone platform.| |6777|4096|#1154


code:
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine

Param="WIZARD_VERSION = "
Param="WIZARD_NAME = Cocos2d-wophone"
Param="ABSOLUTE_PATH = ."
Param="FALLBACK_LCID = 1033"


code:
		<TITLE>'Cocos2d-win32 Application Wizard'</TITLE>
		<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
		<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">

		</OBJECT>

		<SYMBOL NAME='WIZARD_DIALOG_TITLE' TYPE="text" VALUE="Cocos2d-win32 Application Wizard"></SYMBOL>

		<SYMBOL NAME='SOURCE_FILTER' TYPE="text" VALUE="cpp;c;cxx;def;idl;bat"></SYMBOL>
		<SYMBOL NAME="INCLUDE_FILTER" TYPE="text" VALUE="h;hpp;hxx;hm;inl;inc"></SYMBOL>
		<SYMBOL NAME='MAKEFILE_FILTER' TYPE=text VALUE='TMK3;ARM'></SYMBOL>
	    <SYMBOL NAME='RESOURCE_FILTER' TYPE=text VALUE='tr3;tts;TR3;TRG'></SYMBOL>

		<SYMBOL NAME="CC_CURRENT_YEAR" TYPE="text" VALUE="2003"></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>

		<SYMBOL NAME='CC_USE_TCOM_SUPPORT' TYPE="checkbox" VALUE="false"></SYMBOL>

		<SYMBOL NAME='WTL_COMBO_VIEW_TYPE' TYPE="select-one" VALUE='WTL_VIEWTYPE_GENERIC'></SYMBOL>

			<COLGROUP>
				<COL WIDTH="178">
				<COL>

							<COLGROUP>
								<COL WIDTH="12">
								<COL>
								<COL WIDTH="12">

Welcome to the Cocos2d-wophone Application Wizard

This wizard generates a cocos2d-wophone application project
   											with the properties you specify.

							<COLGROUP>
								<COL WIDTH="12">
								<COL WIDTH="166">
								<COL WIDTH="1">

														 Overview

															Features

							<COLGROUP>
								<COL WIDTH="100%">

										<COL><COL WIDTH="398"><COL WIDTH="12">

													These are the current project settings:

                                                     Cocos2d feature:

                                                     Application feature:

													Click Finish from any window to accept the current settings.

													Learn more form

                                                    Cocos2d-x Application Wizard for Visual Studio User Guide
                                                    .

                                                    Recommend to save the new project  to cocos2d-x source's root directory,
                                                    otherwise,  modify the include directory and library directory menually.

											<COLGROUP>
												<COL WIDTH="12">
												<COL>
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="12">

														<BUTTON CLASS="BUTTONS" ID="FinishBtn" ACCESSKEY="F" onClick="OnFinish(document);" type="button">
															Finish</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="CancelBtn" ACCESSKEY="C" onClick="window.external.Finish(document, 'cancel');" type="button">
															Cancel</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="HelpBtn" ACCESSKEY="H" onClick="window.external.OnHelp('vc.appwiz.custom.overview');" type="button">
															Help</BUTTON>


code:
		<TITLE>'Cocos2d-wophone Application Wizard'</TITLE>
		<META NAME="vs_targetSchema" CONTENT="http://schemas.microsoft.com/intellisense/ie5">
		<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">

			<COLGROUP>
				<COL WIDTH="178">
				<COL>

							<COLGROUP>
								<COL WIDTH="12">
								<COL>
								<COL WIDTH="12">

											Features

Specify features for the cocos2d-wophone application.

							<COLGROUP>
								<COL WIDTH="12">
								<COL WIDTH="166">
								<COL WIDTH="1">

															Overview

															Features

							<COLGROUP>
								<COL WIDTH="100%">

											<COLGROUP>
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">
												<COL WIDTH="193">
												<COL WIDTH="12">

														Select physical engine:

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_BOX2D" ACCESSKEY="B" TITLE="Application uses box2D." value="ON" NAME="CC_USE_BOX2D" onClick="OnUseBox2D();">

																	Box2D

															<INPUT CLASS="CheckBoxA" TYPE="checkbox" ID="CC_USE_CHIPMUNK" ACCESSKEY="C" TITLE="Application uses Chipmunk." value="ON" NAME="CC_USE_CHIPMUNK" onClick="OnUseChipmunk();">

																	Chipmunk

														Select 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();">

																	Simple Audio Engine in Cocos Denshion

														Select application feature:

                                                        <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();"/>

																TCOM Support

											<COLGROUP>
												<COL WIDTH="12">
												<COL>
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="4">
												<COL WIDTH="75">
												<COL WIDTH="12">

														<BUTTON CLASS="BUTTONS" ID="FinishBtn" ACCESSKEY="F" onClick="OnFinish(document);" type="button">
															Finish</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="CancelBtn" ACCESSKEY="C" onClick="window.external.Finish(document, 'cancel');" type="button">
															Cancel</BUTTON>

														<BUTTON CLASS="BUTTONS" ID="HelpBtn" ACCESSKEY="H" onClick="window.external.OnHelp('vc.appwiz.custom.overview');" type="button">
															Help</BUTTON>


code:
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');

        wizard.AddSymbol('PROJECT_NAME_LOWER', strProjectName.toLowerCase(), false);
        wizard.AddSymbol('PROJECT_NAME_UPPER', strProjectName.toUpperCase(), false);

        if (strProjectName.length >= 6) {
            wizard.AddSymbol('PRO_NAME_PREFIX', strProjectName.substr(0, 6).toUpperCase(), false);
        }
        else {
            var strRes = '_RES';
            var strNewFormId = strProjectName + strRes.substr(0, (6 - strProjectName.length));

            wizard.AddSymbol('PRO_NAME_PREFIX', strNewFormId.toUpperCase(), false);
        }

        // Set current year symbol
        var d = new Date();
        var nYear = 0;
        nYear = d.getFullYear();
        wizard.AddSymbol("CC_CURRENT_YEAR", nYear);
        wizard.AddSymbol("CC_CURRENT_DATE", d.toString());

        // Create project and configurations
        selProj = CreateCustomProject(strProjectName, strProjectPath);
        AddConfigurations(selProj, strProjectName);
        AddFilters(selProj);

        var InfFile = CreateCustomInfFile();
        AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile);
        AddPchSettings(selProj);
        InfFile.Delete();

        selProj.Object.Save();
    }
    catch (e) {
        if (e.description.length != 0)
            SetErrorInfo(e);
        return e.number;
    }
}

function CreateCustomProject(strProjectName, strProjectPath) {
    try {
        var strProjTemplatePath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH');
        var strProjTemplate = '';
        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 = "";
        if (wizard.FindSymbol("CLOSE_SOLUTION")) {
            Solution.Close();
            strSolutionName = wizard.FindSymbol("VS_SOLUTION_NAME");
            if (strSolutionName.length) {
                var strSolutionPath = strProjectPath.substr(0, strProjectPath.length - strProjectName.length);
                Solution.Create(strSolutionPath, strSolutionName);
            }
        }

        // Create vcproj.user file
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        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();
        astrParentPath[0] = strProjectPath;
        while (astrParentPath.length) {
            var strPath = astrParentPath.pop();
            var strParentPath = FileSys.GetParentFolderName(strPath);

            if (!FileSys.FolderExists(strParentPath)) {
                astrParentPath.push(strPath);
                astrParentPath.push(strParentPath);
                continue;
            }
            else {
                FileSys.CreateFolder(strPath);
            }
        }

        var file = FileSys.OpenTextFile(strUserPath, 2, true);
        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\"><Configurations><Configuration Name=\"Debug|Win32\"><DebugSettings Command=\"TG3_RunDLL.exe\" CommandArguments=\"$(TargetPath)\"/></Configuration></VisualStudioUserFile>";
        file.WriteLine(strUserValue);
        file.Close();

        // Create project file
        var strProjectNameWithExt = '';
        if(WizardVersion >= 10.0)
            strProjectNameWithExt = strProjectName + '.wophone.vcxproj';
        else
            strProjectNameWithExt = strProjectName + '.wophone.vcproj';

        var oTarget = wizard.FindSymbol("TARGET");
        var prj;
        if (wizard.FindSymbol("WIZARD_TYPE") == vsWizardAddSubProject)  // vsWizardAddSubProject
        {
            var prjItem = oTarget.AddFromTemplate(strProjTemplate, strProjectNameWithExt);
            prj = prjItem.SubProject;
        }
        else {
            prj = oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt);
        }
        var fxtarget = wizard.FindSymbol("TARGET_FRAMEWORK_VERSION");
        if (fxtarget != null && fxtarget != "") {
            fxtarget = fxtarget.split('.', 2);
            if (fxtarget.length == 2)
                prj.Object.TargetFrameworkVersion = parseInt(fxtarget[0]) * 0x10000 + parseInt(fxtarget[1])
        }
        return prj;
    }
    catch (e) {
        throw e;
    }
}

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;

        strSrcFilter = wizard.FindSymbol('INCLUDE_FILTER');
        group = proj.Object.AddFilter('include');
        group.Filter = strSrcFilter;

        strSrcFilter = wizard.FindSymbol('MAKEFILE_FILTER');
        group = proj.Object.AddFilter('makefile');
        group.Filter = strSrcFilter;
    }
    catch (e) {
        throw e;
    }
}

// Configurations data
var nNumConfigs = 2;

var astrConfigName = new Array();
astrConfigName[0] = "Debug";
astrConfigName[1] = "Release";

function AddConfigurations(proj, strProjectName) {
    try {
        proj.Object.Keyword = "uPhoneProj";
        var strPrjTG3Dir = '../../PRJ_TG3';
        wizard.AddSymbol('PROJECT_PRJ_TG3_DIR', strPrjTG3Dir, false);

        // 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;.\\wophone;.\\wophone\\Res;..\\cocos2dx;..\\cocos2dx\\include;..\\cocos2dx\\platform';

        var strDefinitions = 'WIN32;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL';
        var strDependLibs = 'WS2_32.Lib EosConfig.lib SoftSupport.lib TG3_DLL.lib libcocos2d.lib';
        var strCurLibsDir = '../../PRJ_TG3/Common/ICU/lib;../../PRJ_TG3/Mtapi/Win32/lib;../../PRJ_TG3/LIB/Win32Lib;../../PRJ_TG3/Common/SoftSupport';
        var strImportLib = '$(OutDir)/' + wizard.FindSymbol("PROJECT_NAME") + '.lib';
        var strOutputFile = '$(OutDir)/' + wizard.FindSymbol("PROJECT_NAME") + '.dll';

        if (wizard.FindSymbol('CC_USE_BOX2D')) {
            strCurIncludeDir += ';..\\';
            strDependLibs += ' libBox2d.lib';
        }
        if (wizard.FindSymbol('CC_USE_CHIPMUNK')) {
            strCurIncludeDir += ';..\\chipmunk\\include\\chipmunk';
            strDependLibs += ' chipmunk.lib';
        }
        if (wizard.FindSymbol('CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) {
            strCurIncludeDir += ';..\\CocosDenshion\\Include';
            strDependLibs += ' libCocosDenshion.lib';
        }

        if (wizard.FindSymbol("CC_USE_TCOM_SUPPORT")) {
            strDefinitions = strDefinitions + ';__TCOM_SUPPORT__';
        }

        // create configure
        var nCntr;
        for (nCntr = 0; nCntr < nNumConfigs; nCntr++) {

            // Check if it's Debug configuration
            var bDebug = false;
            if (astrConfigName[nCntr].search("Debug") != -1)
                bDebug = true;

            var config = proj.Object.Configurations(astrConfigName[nCntr]);

            if (bDebug) {
                strDefinitions = '_DEBUG;COCOS2D_DEBUG=1;' + strDefinitions;
            }
            else {
                strDefinitions = 'NDEBUG;' + strDefinitions;
            }

            config.InheritedPropertySheets = '$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops';
            config.OutputDirectory = strOutputDir;
            config.IntermediateDirectory = '$(ConfigurationName).wophone';
            config.ConfigurationType = '2';

            var CLTool = config.Tools('VCCLCompilerTool');
            if (bDebug) {
                CLTool.RuntimeLibrary = rtMultiThreadedDebug;
                CLTool.MinimalRebuild = true;
                CLTool.DebugInformationFormat = debugEditAndContinue;
                CLTool.BasicRuntimeChecks = runtimeBasicCheckAll;
                CLTool.Optimization = optimizeDisabled;
            }
            else {
                CLTool.RuntimeLibrary = rtMultiThreaded;
                CLTool.ExceptionHandling = false;
                CLTool.DebugInformationFormat = debugDisabled;
            }
            CLTool.AdditionalIncludeDirectories = strCurIncludeDir;
            CLTool.PreprocessorDefinitions = strDefinitions;
            CLTool.RuntimeLibrary = '3';
            CLTool.StructMemberAlignment = '3';
            CLTool.TreatWChar_tAsBuiltInType = 'false';
            CLTool.UsePrecompiledHeader = '0';
            CLTool.WarningLevel = '3';
            CLTool.ForcedIncludeFiles = '';

            var LinkTool = config.Tools('VCLinkerTool');
            if (bDebug) {
                LinkTool.LinkIncremental = linkIncrementalYes;
                LinkTool.GenerateDebugInformation = true;
                LinkTool.GenerateMapFile = 'true';
                LinkTool.MapExports = 'true';
            }
            else {
                LinkTool.LinkIncremental = linkIncrementalNo;
            }
            LinkTool.AdditionalDependencies = strDependLibs;
            LinkTool.OutputFile = strOutputFile;
            LinkTool.AdditionalLibraryDirectories = strCurLibsDir;
            LinkTool.SubSystem = '1';
            LinkTool.RandomizedBaseAddress = '1';
            LinkTool.DataExecutionPrevention = '0';
            LinkTool.ImportLibrary = strImportLib;
            LinkTool.TargetMachine = '1';

            var PostBuildTool = config.Tools("VCPostBuildEventTool");
            PostBuildTool.Description = "Performing registration...";
            var strResDir = "..\\..\\NEWPLUS\\TG3\\ConstData\\";
            var strPostCmd = "mkdir " + strResDir;
            strPostCmd += "\r\nxcopy /E /Y .\\Resource\\*.* " + strResDir;
            PostBuildTool.CommandLine = strPostCmd;
        }
    }
    catch (e) {
        throw e;
    }
}

function AddPchSettings(proj) {
}

function DelFile(fso, strWizTempFile) {
    try {
        if (fso.FileExists(strWizTempFile)) {
            var tmpFile = fso.GetFile(strWizTempFile);
            tmpFile.Delete();
        }
    }
    catch (e) {
        throw e;
    }
}

function CreateCustomInfFile() {
    try {
        var fso, TemplatesFolder, TemplateFiles, strTemplate;
        fso = new ActiveXObject('Scripting.FileSystemObject');

        var TemporaryFolder = 2;
        var tfolder = fso.GetSpecialFolder(TemporaryFolder);
        var strTempFolder = tfolder.Drive + '\\' + tfolder.Name;

        var strWizTempFile = strTempFolder + "\\" + fso.GetTempName();

        var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
        var strInfFile = strTemplatePath + '\\Templates.inf';
        wizard.RenderTemplate(strInfFile, strWizTempFile);

        var WizTempFile = fso.GetFile(strWizTempFile);
        return WizTempFile;
    }
    catch (e) {
        throw e;
    }
}

function GetTargetName(strName, strProjectName) {
    try {
        var strTarget = strName;

        var nIndex = strName.indexOf("root");

        if (nIndex >= 0) {
            var strMid = strProjectName;
            if (strName.indexOf("_res_") >= 0) {
                strMid = wizard.FindSymbol('PROJECT_NAME_LOWER');
            }
            strTarget = strName.substring(0, nIndex) + strMid + strName.substring(nIndex + 4, strName.length);
        }

        return strTarget;

    }
    catch (e) {
        throw e;
    }
}

function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) {
    try {
        var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');

        var strName = '';

        var strTextStream = InfFile.OpenAsTextStream(1, -2);
        while (!strTextStream.AtEndOfStream)
        {
            strName = strTextStream.ReadLine();

            if (!strName.length || strName == '') {
                continue;
            }
//             log.WriteLine(strName);
            var strTarget = GetTargetName(strName, strProjectName);
            var strTemplate = strTemplatePath + '\\' + strName;
            var strFile = strProjectPath + '\\' + strTarget;

            var bCopyOnly = false;
            var strExt = strName.substr(strName.lastIndexOf("."));
            if (strExt == ".ARM"
            || strExt == ".jpg"
            || strExt == ".png"
            || strExt == ".bmp"
            || strExt == ".ico"
            || strExt == ".gif"
            || strExt == ".rtf"
            || strExt == ".css") {
                bCopyOnly = true;
            }
            wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);

            if (strExt == ".h") {
                if (strName.indexOf("UnicodeScript.h") >= 0) {
                    unFile = proj.Object.AddFile(strFile);
                    var strPrjTG3DirWin = '..\\..\\PRJ_TG3\\';
                    var unFileCfg = unFile.FileConfigurations('Debug');
                    var strCommandLine = strPrjTG3DirWin + 'Common\\StrConv\\TzdStrConv_V1.exe $(InputPath) $(InputDir)$(InputName)_str.h';
                    var strAddDepend = strPrjTG3DirWin + 'Common\\StrConv\\TzdStrConv_V1.exe';
                    unFileCfg.Tool.CommandLine = strCommandLine;
                    unFileCfg.Tool.AdditionalDependencies = strAddDepend;
                    unFileCfg.Tool.Outputs = '$(InputDir)$(InputName)_str.h';
                    continue;
                }

            }
            proj.Object.AddFile(strFile);
        }
        strTextStream.Close();
    }
    catch (e) {
        throw e;
    }
}


code:
#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
    {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
        // Initialize OpenGLView instance, that release by CCDirector when application terminate.
        // The HelloWorld is designed as HVGA.
        CCEGLView * pMainWnd = new CCEGLView();
        CC_BREAK_IF(! pMainWnd
            || ! pMainWnd->Create(TEXT("[!output PROJECT_NAME]"), 320, 480));
#endif  // CC_PLATFORM_WIN32

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

        // OpenGLView initialized in testsAppDelegate.mm on ios platform, nothing need to do here.

#endif  // CC_PLATFORM_IOS

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)

        // Android doesn't need to do anything.

#endif  // CC_PLATFORM_ANDROID

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WOPHONE)
        // 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(320, 480));

#if !defined(_TRANZDA_VM_)
        // set the resource zip file
        // on wophone emulator, we copy resources files to Work7/TG3/APP/ folder instead of zip file
        CCFileUtils::setResource("[!output PROJECT_NAME].zip");
#endif

#endif  // CC_PLATFORM_WOPHONE

        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]
}


code:
#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__


code:
#include "HelloWorldScene.h"

using namespace cocos2d;

CCScene* HelloWorld::scene()
{
    CCScene * scene = NULL;
    do
    {
        // 'scene' is an autorelease object
        scene = CCScene::node();
        CC_BREAK_IF(! scene);

        // 'layer' is an autorelease object
        HelloWorld *layer = HelloWorld::node();
        CC_BREAK_IF(! layer);

        // add layer as a child to scene
        scene->addChild(layer);
    } while (0);

    // return the scene
    return scene;
}

// on "init" you need to initialize your instance
bool HelloWorld::init()
{
    bool bRet = false;
    do
    {
        //////////////////////////////////////////////////////////////////////////
        // super init first
        //////////////////////////////////////////////////////////////////////////

        CC_BREAK_IF(! CCLayer::init());

        //////////////////////////////////////////////////////////////////////////
        // add your codes below...
        //////////////////////////////////////////////////////////////////////////

        // 1. Add a menu item with "X" image, which is clicked to quit the program.

        // Create a "close" menu item with close icon, it's an auto release object.
        CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(
            "CloseNormal.png",
            "CloseSelected.png",
            this,
            menu_selector(HelloWorld::menuCloseCallback));
        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(CCPointZero);
        CC_BREAK_IF(! pMenu);

        // Add the menu to HelloWorld layer as a child layer.
        this->addChild(pMenu, 1);

        // 2. Add a label shows "Hello World".

        // Create a label and initialize with string "Hello World".
        CCLabelTTF* pLabel = CCLabelTTF::labelWithString("Hello World", "Thonburi", 64);
        CC_BREAK_IF(! pLabel);

        // Get window size and place the label upper.
        CCSize size = CCDirector::sharedDirector()->getWinSize();
        pLabel->setPosition(ccp(size.width / 2, size.height - 20));

        // Add the label to HelloWorld layer as a child layer.
        this->addChild(pLabel, 1);

        // 3. Add add a splash screen, show the cocos2d splash image.
        CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
        CC_BREAK_IF(! pSprite);

        // Place the sprite on the center of the screen
        pSprite->setPosition(ccp(size.width/2, size.height/2));

        // Add the sprite to HelloWorld layer as a child layer.
        this->addChild(pSprite, 0);

        bRet = true;
    } while (0);

    return bRet;
}

void HelloWorld::menuCloseCallback(CCObject* pSender)
{
    // "close" menu item clicked
    CCDirector::sharedDirector()->end();
}


code:
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
[! if CC_USE_BOX2D]

#include "Box2D/Box2D.h"
[! endif]
[! if CC_USE_CHIPMUNK]

#include "chipmunk.h"
[! endif]
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]

#include "SimpleAudioEngine.h"
[! endif]

class HelloWorld : public cocos2d::CCLayer
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();

    // there's no 'id' in cpp, so we recommand to return the exactly class pointer
    static cocos2d::CCScene* scene();

    // a selector callback
    virtual void menuCloseCallback(CCObject* pSender);

    // implement the "static node()" method manually
    LAYER_NODE_FUNC(HelloWorld);
};

#endif  // __HELLOWORLD_SCENE_H__


code: this file need to run .tmk3 file to rebuild.


code:
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
Resource/HelloWorld.png


code:
;
; TG3 Makefile Auto Create Script
;
; 说明：
;   1.在等号左边不要有空格
;   2.所有的路径请使用"/"来分隔
;   3.所有的文件名不可以有空格
;   4.只能对当前目录及其子目录下的.c、.cpp生成Makefile

;本TMK3文件目录位置到项目根目录之间的转换，不支持多个串，如果有多个，以最后一个为准
;即 ./$(TO_PROJECT_ROOT)/ 就是项目的根目录
TO_PROJECT_ROOT=[!output PROJECT_PRJ_TG3_DIR]

;输出目标的名字，不支持多个串，如果有多个，以最后一个为准
OUTPUT_FILENAME=lib[!output PROJECT_NAME].so

;包含的其他的TMK3文件，此文件和本文件一起构成MakeFile的内容
;此项可以出现在TMK3文件内的任意地方，与已经存在的项依次组合
;注意：此项不支持绝对路径，但是可以使用$(TO_PROJECT_ROOT)构成文件名
INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3    ;TOPS标准应用，包括动态库等

;预定义串，生成MakeFile的时候直接放在MakeFile的前面
;格式：PRE_DEFINE=STRING，生成MakeFile的时候，"PRE_DEFINE="后面的所有非注释非续行字符都会放在MakeFile前面
;例如：PRE_DEFINE=AAA=BBB，会放入AAA=BBB到MakeFile中
;可以使用多个PRE_DEFINE串，也可以使用PRE_DEFINE1、PRE_DEFINE2等方式，MakeFile中依据出现顺序(不是数字大小)排列
;PRE_DEFINE=USE_IMAGEKIT=1      ;使用 ImageToolKit 库，此时生成的 Makefile 会自动连接有关的LIB
;PRE_DEFINE=USE_ICU=1           ;使用 ICU 库，此时生成的 Makefile 会自动连接有关的LIB
;PRE_DEFINE=USE_MTAPI=1         ;使用 MTAPI 库，此时生成的 Makefile 会自动连接有关的LIB

;C、C++预定义宏，可以使用多个DEFINES串，也可以使用DEFINES1、DEFINES2等方式，MakeFile中依据出现顺序(不是数字大小)排列
DEFINES=-DCC_UNDER_WOPHONE      ;这里填入应用的自定义宏。注意：ITOPS自己的所需定义会自动包含，故此这里仅仅包含应用自己特有的定义即可
;DEFINES=-D__TG3_PURE_DLL__     ;生成的是纯动态库（意思是：不是TOPS应用，但可以是TCOM组件）
[!if CC_USE_TCOM_SUPPORT]
DEFINES=-D__TCOM_SUPPORT__      ;生成的是TCOM组件（注意：TOPS应用也可以同时是TCOM组件）
[!else]
;DEFINES=-D__TCOM_SUPPORT__     ;生成的是TCOM组件（注意：TOPS应用也可以同时是TCOM组件）
[!endif]

;包含路径，可以使用多个INCLUDE_PATH串，也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式，MakeFile中依据出现顺序(不是数字大小)排列
INCLUDE_PATH=-I ../../PRJ_TG3/Include/OpenGL -I../cocos2dx -I../cocos2dx/include -I../cocos2dx/platform
INCLUDE_PATH=-I. -I./Classes -I./wophone -I./wophone/Res                                ;默认本项目的路径
[! if CC_USE_BOX2D]
INCLUDE_PATH=-I../
[! endif]
[! if CC_USE_CHIPMUNK]
INCLUDE_PATH=-I../chipmunk/include/chipmunk
[! endif]
[! 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 CC_USE_BOX2D]
LIBS=-lBox2dStatic
[! endif]
[! if CC_USE_CHIPMUNK]
LIBS=-lChipmunkStatic
[! endif]
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
LIBS=-lCocosDenshionStatic -lTSoundPlayer
[! endif]

;强制包含文件的名字，不能使用通配符，一定要使用相对或者绝对路径
;极力要求使用相对路径，多个文件之间使用“|”分隔
;强制包含文件指的是不在本文件夹及其子文件夹下的.c、.cpp、.o文件
;可以使用多个INCLUDEFILE串，也可以使用INCLUDEFILE1、INCLUDEFILE2等方式，MakeFile中依据出现顺序(不是数字大小)排列
INCLUDEFILE=

;强制排除文件，不能使用通配符，一定要使用相对路径
;多个文件之间使用“|”分隔，路径必须以"./"，"../"开始
;只能对.c、.cpp文件进行排除
;如果要排除本目录的文件也要加入"./"
;可以使用多个EXCLUDEFILE串，也可以使用EXCLUDEFILE1、EXCLUDEFILE2等方式，MakeFile中依据出现顺序(不是数字大小)排列
EXCLUDEFILE=


code:
/*!
*  @file		NewDeleteOp.cpp
*  @author 全智达
*  @brief
*
*  @section Copyright
* =======================================================================

*

* Copyright (c) 2005-2010 Tranzda Technologies Co.,Ltd.

*      深圳市全智达科技有限公司 版权所有2005-2010

*

* PROPRIETARY RIGHTS of Tranzda Technologies Co.,Ltd. are involved in

* the subject matter of this material. All manufacturing, reproduction,

* use, and sales rights pertaining to this subject matter are governed

* by the license agreement.  The recipient of this software implicitly

* accepts the terms of the license.

* 本软件文档资料是深圳市全智达科技有限公司的合法资产，任何人士阅读和使

* 用本资料必须获得相应的书面授权,承担保密责任和接受相应的法律约束。

*

* 公司网址： http://www.tranzda.com

*  公司邮箱：support@tranzda.com

* =======================================================================

*/

#include "ssTypes.h"
#include "TG3_Type.h"
#include "TG3_Memory.h"

#ifdef new
#undef new
#endif

#ifdef delete
#undef delete
#endif

#ifndef _WIN32
    #define __cdecl
#endif

void * __cdecl operator new(unsigned int size)
{
    return TMalloc(size);
}

void * __cdecl operator new[](unsigned int size)
{
    return TMalloc(size);
}

void * __cdecl operator new(unsigned int size, const unsigned short * fileName, int lineNo)
{
    return TMallocEx(size, fileName, lineNo);
}

void * __cdecl operator new[](unsigned int size, const unsigned short * fileName, int lineNo)
{
    return TMallocEx(size, fileName, lineNo);
}

void __cdecl operator delete(void *p)
{
    TFree(p);
}

void __cdecl operator delete[](void *p)
{
    TFree(p);
}

void __cdecl operator delete(void *p, const unsigned short * fileName, int lineNo)
{
    TFreeEx(p, fileName, lineNo);
}

void __cdecl operator delete[](void *p, const unsigned short * fileName, int lineNo)
{
    TFreeEx(p, fileName, lineNo);
}


code:
// Original file name: [!output PROJECT_NAME]_Res.ENU.tr3
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]

//$VERSION 60006
//$SETTINGS
//$Begin
//$VCPRJFILE="..\..\[!output PROJECT_NAME].wophone.vcproj"
//$End
LANGUAGE = 1033
// ImageLists

// Project
PROJECT
BEGIN
  ScreenWidth 320
  ScreenHeight 480
  ScreenDPI 165
END

// TComObject

// Forms

// Menus

// Alerts  ������Ϣ

// Strings

// Fonts

// Bitmaps

IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
// �ļ���: Root(All)
BEGIN
  BITMAP ID CloseNormal NOCOMPRESS HasAlphaData TRANSPARENTCOLOR $FFFFFFFF
   FileName $002E$002E$005C$002E$002E$005C$0052$0065$0073$006F$0075$0072$0063$0065$005C$0043$006C$006F$0073$0065$004E$006F$0072$006D$0061$006C$002E$0070$006E$0067
  //..\..\Resource\CloseNormal.png

  BITMAP ID CloseSelected NOCOMPRESS HasAlphaData TRANSPARENTCOLOR $FFFFFFFF
   FileName $002E$002E$005C$002E$002E$005C$0052$0065$0073$006F$0075$0072$0063$0065$005C$0043$006C$006F$0073$0065$0053$0065$006C$0065$0063$0074$0065$0064$002E$0070$006E$0067
  //..\..\Resource\CloseSelected.png

END
// raw data

// Application


code:
// Original file name: [!output PROJECT_NAME]_Res.ENU.tr3.tts
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]


code:
// Original file name: [!output PROJECT_NAME]_Res.TR3
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]

#include "[!output PROJECT_NAME]_Res.h"

//$VERSION 60006
//$SETTINGS
//$Begin
//$VCPRJFILE="..\..\[!output PROJECT_NAME].wophone.vcproj"
//$End

LANGUAGE = 2052
// ImageLists

// Project
PROJECT
BEGIN
  ScreenWidth 320
  ScreenHeight 480
  ScreenDPI 165
END

// TComObject

// Forms

// Menus

// Alerts  ������Ϣ

// Strings

// Fonts

// Bitmaps

IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
// �ļ���: Root(All)
BEGIN
  BITMAP ID CloseNormal NOCOMPRESS HasAlphaData TRANSPARENTCOLOR $FFFFFFFF
   FileName $002E$002E$005C$002E$002E$005C$0052$0065$0073$006F$0075$0072$0063$0065$005C$0043$006C$006F$0073$0065$004E$006F$0072$006D$0061$006C$002E$0070$006E$0067
  //..\..\Resource\CloseNormal.png

  BITMAP ID CloseSelected NOCOMPRESS HasAlphaData TRANSPARENTCOLOR $FFFFFFFF
   FileName $002E$002E$005C$002E$002E$005C$0052$0065$0073$006F$0075$0072$0063$0065$005C$0043$006C$006F$0073$0065$0053$0065$006C$0065$0063$0074$0065$0064$002E$0070$006E$0067
  //..\..\Resource\CloseSelected.png

END
// raw data

// Application


code:
// Application resource group file.

// Original file name: [!output PROJECT_NAME]_Res.TRG
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]

VERSION 60001
PROJECT
Begin
  IsLangBase
  FileName  = ".\[!output PROJECT_NAME]_Res.TR3"
End

PROJECT
Begin
  FileName  = ".\[!output PROJECT_NAME]_Res.ENU.tr3"
End


code:
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
// 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__

#define ResFolder1001 1001
#define CloseNormal 1002
#define CloseSelected 1003

#endif


code:
// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
// 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__

#define [!output PRO_NAME_PREFIX]_ID_BITMAP_CloseNormal  1073742826
#define [!output PRO_NAME_PREFIX]_ID_BITMAP_CloseSelected  1073742827
#endif


code:
// Application application res_h file.

// Original file name: [!output PROJECT_NAME_LOWER]_Res.h
// Generated by Cocos2d-wophone Wizard Date: [!output CC_CURRENT_DATE]

#ifndef __[!output PROJECT_NAME_UPPER]_RES_H_H__
#define __[!output PROJECT_NAME_UPPER]_RES_H_H__

#include "ResTypes.h"

#include "[!output PROJECT_NAME]_res_def.h"

extern const BitmapType  [!output PRO_NAME_PREFIX]_Bitmap_CloseNormal;
extern const BitmapType  [!output PRO_NAME_PREFIX]_Bitmap_CloseSelected;

#endif


code:
#include "TG3.h"
#include "[!output PROJECT_NAME]UnicodeScript_str.h"
#include "TCOM.h"
#include "TG3AppDllEntry.h"

// 提供IID的具体定义，在整个项目中只能包含一次
[! if CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE]
[! else]
#include "TCOM_Generic_DataType_IIDs.h"
#include "TCOM_Generic_Method_IIDs.h"
[! endif]
#include "TCOM_IIDs.h"

// 定义类工厂例子代码:
// class Texample_MethodClassFactory;    //仅仅为了代码编辑辅助工具正确显示
// TCOM_DECLARE_CLASS_FACTORY(Texample_MethodClassFactory);
// TCOM_IMPLEMENT_CLASS_FACTORY(Texample_MethodClassFactory,TexampleDataType);
// 应用根据给出的CLSID和ClassFactory接口IID返回ClassFactory的接口
// 返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_GetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv)
{
    HRESULT result = TCOM_S_E_ERROR;
    // 构造出TCOM对象例子
    //if (rclsid == TCLSID_example_Method)
    //{
    //  Texample_MethodClassFactory *pFactory = new Texample_MethodClassFactory();
    //  if(pFactory)
    //  {
    //      result = pFactory->QueryInterface(riid, ppv);
    //      if(TCOM_S_FAIL(result))
    //      {
    //          delete pFactory;
    //          TCOM_DecClsidInstanceRefCount();
    //      }
    //  }
    //}

    return result;
}

// 应用提供的把TCOM信息加入到注册表
// 返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_RegisterServer(void)
{
    TCOM_ApplicationRegister * pAppRegister = NULL;
    pAppRegister = new TCOM_ApplicationRegister( AppName_[!output PROJECT_NAME] );
    if(pAppRegister == NULL)
    {
        return TCOM_S_E_ERROR;
    }

    // 注册例子：
    // pAppRegister->RegisterCLSID(TCLSID_example_Method, TCOM_CLSCTX_INPROC_SERVER);
    // pAppRegister->RegisterDataType( TTID_TCOM_PlugIn_DataType);
    // pAppRegister->RegisterMethod( TTID_TCOM_PlugIn_DataType, TIID_SYS_Method_Open,
    // TCLSID_example_Method, TCOM_METHOD_MASK_NORMAL, AppName_example );
    if(pAppRegister)
    {
        delete pAppRegister;
        pAppRegister = NULL;
    }
    return TCOM_S_OK;
}

// 应用提供的把TCOM信息从注册表中删除
// 返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_UnregisterServer(void)
{
    TCOM_ApplicationRegister * pAppRegister = NULL;
    pAppRegister = new TCOM_ApplicationRegister( AppName_[!output PROJECT_NAME] );
    if(pAppRegister == NULL)
    {
        return TCOM_S_E_ERROR;
    }

    // 注销例子
    // pAppRegister->UnregisterMethod(TTID_TCOM_PlugIn_DataType, TIID_SYS_Method_Open, TCLSID_example_Method);
    // pAppRegister->UnregisterDataType( TTID_TCOM_PlugIn_DataType );
    // pAppRegister->UnregisterCLSID(TCLSID_example_Method);
    if(pAppRegister)
    {
        delete pAppRegister;
        pAppRegister = NULL;
    }

    return TCOM_S_OK;
}


code:
#include "ssGlobal.h"
#include "ssTsd.h"
#include "TG3_Type.h"
#include <stdio.h>
#include "TCOM.h"
#include "ssAppMgr.h"
#include "TG3AppDllEntry.h"

#ifdef __TCOM_SUPPORT__

#ifdef __cplusplus
extern "C" {
#endif

    //实现TCOM所需要的DLL函数

    //DLL提供的获取指定CLSID的指定接口
    SS_EXPORT HRESULT TDllGetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv);

    //DLL提供的查询DLL能否被Unload
    SS_EXPORT HRESULT TDllCanUnloadNow(void);

    //DLL提供的把DLL的TCOM信息加入到注册表
    SS_EXPORT HRESULT TDllRegisterServer(void);

    //DLL提供的把DLL的TCOM信息从注册表中删除
    SS_EXPORT HRESULT TDllUnregisterServer(void);

#ifdef __cplusplus
}
#endif

#ifdef __TCOM_OUTPUT_DEBUG_INFO__
#include <stdio.h>
#endif

//TCOM实现中需要用到的函数和数据

//实例对象被引用的次数
static Int32 __TCOM_ClsidInstanceRefCount;

//ClassFactory被Locked的次数
static Int32 __TCOM_CalssFactoryLockedCount;

//做必要的初始化
static Int32 __TCOM_Init()
{
    __TCOM_ClsidInstanceRefCount = 0;
    __TCOM_CalssFactoryLockedCount = 0;
    return 0;
}

//做必要的清除工作
static Int32 __TCOM_DeInit()
{
    return 0;
}

//DLL全局使用：增加对象实例被引用次数
Int32 TCOM_AddClsidInstanceRefCount()
{
    __TCOM_ClsidInstanceRefCount++;
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
    SS_printf("[TCOM_SYSTEM] TCOM_AddClsidInstanceRefCount: address: %p, value: %d.\n",
		&__TCOM_ClsidInstanceRefCount, __TCOM_ClsidInstanceRefCount);
#endif
    if(__TCOM_ClsidInstanceRefCount <= 0)
	{
        return 0;
	}
    return __TCOM_ClsidInstanceRefCount;
}

//DLL全局使用：减少对象实例被引用次数
Int32 TCOM_DecClsidInstanceRefCount()
{
    __TCOM_ClsidInstanceRefCount--;
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
    SS_printf("[TCOM_SYSTEM] TCOM_DecClsidInstanceRefCount: address: %p, value: %d.\n",
		&__TCOM_ClsidInstanceRefCount, __TCOM_ClsidInstanceRefCount);
#endif
    if(__TCOM_ClsidInstanceRefCount <= 0)
	{
        return 0;
	}
    return __TCOM_ClsidInstanceRefCount;
}

//DLL全局使用：增加ClassFactory被Locked的次数
Int32 TCOM_AddCalssFactoryLockedCount()
{
    __TCOM_CalssFactoryLockedCount++;
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
    SS_printf("[TCOM_SYSTEM] TCOM_AddCalssFactoryLockedCount: address: %p, value: %d.\n",
		&__TCOM_CalssFactoryLockedCount, __TCOM_CalssFactoryLockedCount);
#endif
    if(__TCOM_CalssFactoryLockedCount <= 0)
	{
        return 0;
	}
    return __TCOM_CalssFactoryLockedCount;
}

//DLL全局使用：减少ClassFactory被Locked的次数
Int32 TCOM_DecCalssFactoryLockedCount()
{
    __TCOM_CalssFactoryLockedCount--;
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
    SS_printf("[TCOM_SYSTEM] TCOM_DecCalssFactoryLockedCount: address: %p, value: %d.\n",
		&__TCOM_CalssFactoryLockedCount, __TCOM_CalssFactoryLockedCount);
#endif
    if(__TCOM_CalssFactoryLockedCount <= 0)
	{
        return 0;
	}
    return __TCOM_CalssFactoryLockedCount;
}

//实现TCOM所需要的DLL函数

//DLL提供的获取指定CLSID的指定接口
SS_EXPORT HRESULT TDllGetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv)
{
    return TCOM_Srv_GetClassObject(rclsid, riid, ppv);
}

//DLL提供的查询DLL能否被Unload
SS_EXPORT HRESULT TDllCanUnloadNow(void)
{
#ifdef __TCOM_OUTPUT_DEBUG_INFO__
    SS_printf("[TCOM_SYSTEM] TDllCanUnloadNow: address1: %p, address2: %p, value1: %d, value2: %d.\n",
		&__TCOM_ClsidInstanceRefCount, &__TCOM_CalssFactoryLockedCount, __TCOM_ClsidInstanceRefCount,
		__TCOM_CalssFactoryLockedCount);
#endif
    if((__TCOM_ClsidInstanceRefCount <= 0) && (__TCOM_CalssFactoryLockedCount <= 0))
        return TCOM_S_TRUE;
    return TCOM_S_FALSE;
}

//DLL提供的把DLL的TCOM信息加入到注册表
SS_EXPORT HRESULT TDllRegisterServer(void)
{
    return TCOM_Srv_RegisterServer();
}

//DLL提供的把DLL的TCOM信息从注册表中删除
SS_EXPORT HRESULT TDllUnregisterServer(void)
{
    return  TCOM_Srv_UnregisterServer();
}

#endif  //__TCOM_SUPPORT__

#ifdef _WIN32

#ifndef SS_MAKEDLL
    #error Error!!! SS_MAKEDLL Must defined!
#endif

BOOL APIENTRY DllMain(HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		//进程加载动态库进行的操作
#ifdef __TCOM_SUPPORT__
        __TCOM_Init();
#endif
		break;
	case DLL_THREAD_ATTACH:
		//线程加载动态库进行的操作
		break;
	case DLL_THREAD_DETACH:
		//线程卸载动态库进行的操作
		break;
	case DLL_PROCESS_DETACH:
		//进程卸载动态库进行的操作
#ifdef __TCOM_SUPPORT__
        __TCOM_DeInit();
#endif
		break;
	}
	return TRUE;
}
#else   //linux

#ifndef SS_SHARED
    #error Error!!! SS_SHARED Must defined!
#endif

void __attribute((constructor)) TG3_Dll_Attach()
{
    //进程加载动态库进行的操作
#ifdef __TCOM_SUPPORT__
    __TCOM_Init();
#endif
}

void __attribute((destructor)) TG3_Dll_Detach()
{
    //进程卸载动态库进行的操作
#ifdef __TCOM_SUPPORT__
    __TCOM_DeInit();
#endif
}

#endif

//如果不是作为TG3的动态库应用，请在VC项目中和TMK3文件中定义  __TG3_PURE_DLL__ 宏
#ifndef __TG3_PURE_DLL__

//动态库应用使用的统一导出名字的入口函数
SS_EXPORT Int32 TDllTG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
{
	Int32 retValue;

	//初始化TCOM
	TCoInitialize(NULL);

	retValue = TG3AppMain(pAppID, nCmd, pCmdParam);

	//释放TCOM
	TCoUninitialize();

	return retValue;
}

#endif


code:
#ifndef __TG3_APP_DLL_ENTRY_H__
#define __TG3_APP_DLL_ENTRY_H__

#ifndef __cplusplus
    #error This file need C++ support
#endif

#if TG3_APP_ENTRY_MINIMUM_VERSION > 200
#error Please replace TG3AppDllEntry.h and TG3AppDllEntry.cpp to newest version!
#endif

#ifdef __TCOM_SUPPORT__

#include "TCOM.h"

//提供给DLL实现者调用的函数，用于在全局记录实例和ClassFactory被引用的次数，
//这两个计数影响DLL是否可能被从内存中卸载，请大家在实例中内部实现计数的同时更新全局计数，
//否则DLL很有可能会在实例还存在的时候被系统自动强制卸载

//DLL全局使用：增加对象实例被引用次数
Int32 TCOM_AddClsidInstanceRefCount();

//DLL全局使用：减少对象实例被引用次数
Int32 TCOM_DecClsidInstanceRefCount();

//DLL全局使用：增加ClassFactory被Locked的次数
Int32 TCOM_AddCalssFactoryLockedCount();

//DLL全局使用：减少ClassFactory被Locked的次数
Int32 TCOM_DecCalssFactoryLockedCount();

//应用DLL在支持TCOM的时候提供给导出函数使用的函数

//应用根据给出的CLSID和ClassFactory接口IID返回ClassFactory的接口
//返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_GetClassObject(TREFCLSID rclsid, TREFIID riid, LPVOID * ppv);

//应用提供的把TCOM信息加入到注册表
//返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_RegisterServer(void);

//应用提供的把TCOM信息从注册表中删除
//返回值：参考TCOM_S_系列宏定义
HRESULT TCOM_Srv_UnregisterServer(void);

#endif  //__TCOM_SUPPORT__

#endif  //__TG3_APP_DLL_ENTRY_H__


code:
#include  "AppDelegate.h"

Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
{
    AppDelegate app;

    cocos2d::CCApplication::sharedApplication().Run();
    return 1;
}


code:
// Unicode string resource scrip file,DOT NOT include it.

#define TZD_CONV(x, y)
TZD_CONV(AppName_[!output PROJECT_NAME], "[!output PROJECT_NAME]")


code:
#ifndef __[!output PROJECT_NAME]UNICODESCRIPT_STR_H__
#define __[!output PROJECT_NAME]UNICODESCRIPT_STR_H__

#define AppName_[!output PROJECT_NAME]__N \
    "c\x00o\x00\x63\x00o\x00s\x00T\x00\x65\x00m\x00p\x00l\x00\x61\x00t\x00\x65\x00"
#define AppName_[!output PROJECT_NAME]__C \
    AppName_[!output PROJECT_NAME]__N"\x00\x00"
#define AppName_[!output PROJECT_NAME] \
    ((const unsigned short *)(AppName_[!output PROJECT_NAME]__C))
#define AppName_[!output PROJECT_NAME]__N16 \
    0x0063,0x006f,0x0063,0x006f,0x0073,0x0054,0x0065,0x006d,0x0070,0x006c,0x0061,0x0074,0x0065
#define AppName_[!output PROJECT_NAME]_16 \
    {AppName_[!output PROJECT_NAME]__N16,0x0000}
// ԭʼ����Ϣ��
// [!output PROJECT_NAME]

#endif  //__[!output PROJECT_NAME]UNICODESCRIPT_STR_H__


code:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject ProjectType="Visual C++" Version="9.00">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration Name="Debug|Win32"></Configuration>
		<Configuration Name="Release|Win32"></Configuration>
	</Configurations>
</VisualStudioProject>


code:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
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}") = "CCAppWiz.wophone", "CCAppWiz.wophone\CCAppWiz.wophone.vcproj", "{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{104F4414-0DA5-4982-A413-766DD1698469}.Debug|Win32.ActiveCfg = Debug|Win32
		{104F4414-0DA5-4982-A413-766DD1698469}.Debug|Win32.Build.0 = Debug|Win32
		{104F4414-0DA5-4982-A413-766DD1698469}.Release|Win32.ActiveCfg = Release|Win32
		{104F4414-0DA5-4982-A413-766DD1698469}.Release|Win32.Build.0 = Release|Win32
		{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}.Debug|Win32.ActiveCfg = Debug|Win32
		{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}.Debug|Win32.Build.0 = Debug|Win32
		{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}.Release|Win32.ActiveCfg = Release|Win32
		{64CF0B7A-FC68-41D7-B3DC-2908D74BDAE9}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


code:
// Setup program for the Cocos2d-win32 App Wizard for VC++ 9.0 (Orcas)

main();

function EchoInfo(bQuiet, strMsg) {
    if (! bQuiet) {
        WScript.Echo(strMsg);
    }
    else {
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        var strLogPath = "InstallWizardLog.txt"
        var file = FileSys.OpenTextFile(strLogPath, 8, true);
        file.WriteLine(strMsg);
        file.Close();
    }
}

function EchoError(bQuiet, strMsg) {
    strMsg = "Error: " + strMsg;
    if (! bQuiet) {
        WScript.Echo(strMsg);
    }
    else {
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        var strLogPath = "InstallWizardLog.txt"
        var file = FileSys.OpenTextFile(strLogPath, 8, true);
        file.WriteLine(strMsg);
        file.Close();
    }
}

function main() {
    // Decode command line arguments
    var bDebug = false;
    var bQuiet = false;
    var bElevated = false;
    var Args = WScript.Arguments;
    for (var i = 0; i < Args.length; i++) {
        if (Args(i) == "/debug")
            bDebug = true;
        else if (Args(i) == "/elevated")
            bElevated = true;
        else if (Args(i) == "/quiet")
            bQuiet = true;
    }

    // See if UAC is enabled
    var Shell = WScript.CreateObject("Shell.Application");
    if (!bElevated && Shell.IsRestricted("System", "EnableLUA")) {
        // Check that the script is being run interactively.
        if (!WScript.Interactive) {
            EchoError(bQuiet, "(Windows LUA) Elevation required.");
            return;
        }

        // Now relaunch the script, using the "RunAs" verb to elevate
        var strParams = "\"" + WScript.ScriptFullName + "\"";
        if (bDebug)
            strParams += " /debug";
        strParams += " /elevated";
        Shell.ShellExecute(WScript.FullName, strParams, null, "RunAs");
        return;
    }

    // Create shell object
    var WSShell = WScript.CreateObject("WScript.Shell");
    // Create file system object
    var FileSys = WScript.CreateObject("Scripting.FileSystemObject");

    // Get the folder containing the script file
    var strScriptPath = FileSys.GetParentFolderName(WScript.ScriptFullName);
    if (strScriptPath == null || strScriptPath == "")
        strScriptPath = ".";

    // Get the folder script files copy to
    var strValue = "";
    try {
        var 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;
    }

    EchoInfo(bQuiet, "App Wizard successfully installed for VC2008 Express!");
}


code:
// Setup program for the Cocos2d-win32 App Wizard for VC++ 10.0 (VC2010)

main();

function EchoInfo(bQuiet, strMsg) {
    if (! bQuiet) {
        WScript.Echo(strMsg);
    }
    else {
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        var strLogPath = "InstallWizardLog.txt"
        var file = FileSys.OpenTextFile(strLogPath, 8, true);
        file.WriteLine(strMsg);
        file.Close();
    }
}

function EchoError(bQuiet, strMsg) {
    strMsg = "Error: " + strMsg;
    if (! bQuiet) {
        WScript.Echo(strMsg);
    }
    else {
        var FileSys = new ActiveXObject("Scripting.FileSystemObject");
        var strLogPath = "InstallWizardLog.txt"
        var file = FileSys.OpenTextFile(strLogPath, 8, true);
        file.WriteLine(strMsg);
        file.Close();
    }
}

function main() {
    // Decode command line arguments
    var bDebug = false;
    var bQuiet = false;
    var bElevated = false;
    var Args = WScript.Arguments;
    for (var i = 0; i < Args.length; i++) {
        if (Args(i) == "/debug")
            bDebug = true;
        else if (Args(i) == "/elevated")
            bElevated = true;
        else if (Args(i) == "/quiet")
            bQuiet = true;
    }

    // See if UAC is enabled
    var Shell = WScript.CreateObject("Shell.Application");
    if (!bElevated && Shell.IsRestricted("System", "EnableLUA")) {
        // Check that the script is being run interactively.
        if (!WScript.Interactive) {
            EchoError(bQuiet, "(Windows LUA) Elevation required.");
            return;
        }

        // Now relaunch the script, using the "RunAs" verb to elevate
        var strParams = "\"" + WScript.ScriptFullName + "\"";
        if (bDebug)
            strParams += " /debug";
        strParams += " /elevated";
        Shell.ShellExecute(WScript.FullName, strParams, null, "RunAs");
        return;
    }

    // Create shell object
    var WSShell = WScript.CreateObject("WScript.Shell");
    // Create file system object
    var FileSys = WScript.CreateObject("Scripting.FileSystemObject");

    // Get the folder containing the script file
    var strScriptPath = FileSys.GetParentFolderName(WScript.ScriptFullName);
    if (strScriptPath == null || strScriptPath == "")
        strScriptPath = ".";

    // Get the folder script files copy to
    var strValue = "";
    try {
        var strVCKey = "HKLM\\Software\\Microsoft\\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;
    }

    EchoInfo(bQuiet, "App Wizard successfully installed for VC2010 Express!");
}