From 258711451222c7f565df12c5e7863d7bfe41a7cc Mon Sep 17 00:00:00 2001 From: yangws Date: Tue, 16 Nov 2010 03:25:33 +0000 Subject: [PATCH] issue #186 add template/CCXAppWiz.vs to cocos2dx. --- cocos2dx-win32.sln | 2 +- template/CCXAppWiz.vs/CCXAppWiz.sln | 20 + .../CCXAppWiz/1033/Images/DottedHori.gif | Bin 0 -> 43 bytes .../CCXAppWiz/1033/Images/DottedVert.gif | Bin 0 -> 43 bytes .../CCXAppWiz/1033/Images/spacer.gif | Bin 0 -> 43 bytes .../CCXAppWiz.vs/CCXAppWiz/1033/NewStyles.css | 782 ++++++++++++++++++ template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.ico | Bin 0 -> 1078 bytes .../CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vcproj | 188 +++++ .../CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsdir | 1 + template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsz | 6 + .../CCXAppWiz/HTML/1033/default.htm | 380 +++++++++ .../CCXAppWiz/HTML/1033/features.htm | 415 ++++++++++ .../CCXAppWiz/Images/Background_Cocos2d-x.gif | Bin 0 -> 811 bytes .../CCXAppWiz/Images/Cocos2d-x.gif | Bin 0 -> 2636 bytes .../CCXAppWiz/Scripts/1033/default.js | 400 +++++++++ .../Templates/1033/Classes/AppDelegate.cpp | 67 ++ .../Templates/1033/Classes/AppDelegate.h | 25 + .../1033/Classes/HelloWorldScene.cpp | 53 ++ .../Templates/1033/Classes/HelloWorldScene.h | 23 + .../CCXAppWiz/Templates/1033/Templates.inf | 12 + .../CCXAppWiz/Templates/1033/win32/main.cpp | 21 + .../CCXAppWiz/Templates/1033/win32/main.h | 16 + .../Templates/1033/win32/res/root.ico | Bin 0 -> 1078 bytes .../CCXAppWiz/Templates/1033/win32/resource.h | 22 + .../CCXAppWiz/Templates/1033/win32/root.rc | 86 ++ .../CCXAppWiz.vs/CCXAppWiz/default.vcproj | 12 + template/CCXAppWiz.vs/setup_vs2008_en.js | 215 +++++ tests/proj.win32/test-win32.vcproj.user | 65 -- 28 files changed, 2745 insertions(+), 66 deletions(-) create mode 100644 template/CCXAppWiz.vs/CCXAppWiz.sln create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedHori.gif create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedVert.gif create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/1033/Images/spacer.gif create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/1033/NewStyles.css create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.ico create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vcproj create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsdir create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsz create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/default.htm create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/features.htm create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Images/Background_Cocos2d-x.gif create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Images/Cocos2d-x.gif create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Scripts/1033/default.js create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.cpp create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.h create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.cpp create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.h create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Templates.inf create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.cpp create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.h create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/res/root.ico create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/resource.h create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/root.rc create mode 100644 template/CCXAppWiz.vs/CCXAppWiz/default.vcproj create mode 100644 template/CCXAppWiz.vs/setup_vs2008_en.js delete mode 100644 tests/proj.win32/test-win32.vcproj.user diff --git a/cocos2dx-win32.sln b/cocos2dx-win32.sln index 9b6a008b5e..e0c1cc6140 100644 --- a/cocos2dx-win32.sln +++ b/cocos2dx-win32.sln @@ -19,7 +19,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestAudioEngine-win32", "Te {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-win32", "tests\proj.win32\test-win32.vcproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests-win32", "tests\proj.win32\test-win32.vcproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" ProjectSection(ProjectDependencies) = postProject {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} diff --git a/template/CCXAppWiz.vs/CCXAppWiz.sln b/template/CCXAppWiz.vs/CCXAppWiz.sln new file mode 100644 index 0000000000..326cc4a7e3 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CCXAppWiz", "CCXAppWiz\CCXAppWiz.vcproj", "{104F4414-0DA5-4982-A413-766DD1698469}" +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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedHori.gif b/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedHori.gif new file mode 100644 index 0000000000000000000000000000000000000000..67072b86b911943e4664cf91103194114267f0ba GIT binary patch literal 43 scmZ?wbhEHbWMW`sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=;;MgRZ+ literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedVert.gif b/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/DottedVert.gif new file mode 100644 index 0000000000000000000000000000000000000000..72e0c7dcdf20d55e14f8ebacac19be1e09f09c1f GIT binary patch literal 43 scmZ?wbhEHbWMp7sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=y)MgRZ+ literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/spacer.gif b/template/CCXAppWiz.vs/CCXAppWiz/1033/Images/spacer.gif new file mode 100644 index 0000000000000000000000000000000000000000..13acffe535d0accaae36bbbfce41477361081654 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcJCaNqy~1B2pE7Dgb&paUX6G7L;iE{qJ;0JA{`JOBUy literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/1033/NewStyles.css b/template/CCXAppWiz.vs/CCXAppWiz/1033/NewStyles.css new file mode 100644 index 0000000000..d8c46decc9 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/1033/NewStyles.css @@ -0,0 +1,782 @@ +/******************************************************************************/ +/*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; } + + + /**************************************************************************/ diff --git a/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.ico b/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.ico new file mode 100644 index 0000000000000000000000000000000000000000..087930a8b3d72cb81c82e92f7927898486f9e019 GIT binary patch literal 1078 zcma)5J&W5w5PkjtsW7qAB}K5<7{`Smb*eKaq|&c&;I1*8a1l9RB5?#ug+b&W$wJ&+ zv2cIEa7~IUjw@^z<~DC6J2}EZGV;^xn>Rb_-5min)ZsWCi2bYsefmzP;)5FSq5%vT zbBG~PLz8bHV(#-6QKS+@mE)U3WLZWpf+>G6Mn(i53CZhd&ATDq{5Ue;DQ|wH{n1;V z@NXHqUnRd;6h%)WsJ#@v^t?}_qOj_)ebU6!daQcnnQ(ilg)42<^(*pZLY_PIp#@iF zFG#gYB0ElCGyS6E@hlF4Bqdi9(bI4n1i`(J#GUA?iAr}VcVo@`_>9$*8e9yLB#CGK z;>-MMs>C>roO(swToT1RUJy4(DP*a2Nlt)O< zjnZ>UxyMcRV25Vf_X@Y1GaAC)8uP$XuJ)AbIY4YeDL=_Cl^Sus>Di5}C&uaA;O1R5 znSmiWQuBVCi>yRu!q)6ri{_LZ>E>LQyrQtv>0b47l^i$&r<=>u-;^bIHV10VdS%vF znFy;#V6_KscfjX+;O!b{WCuj_0!Tal1IOG9umo$M&3awdJz@Qj>lhO?xOCeLz}_bu z;@IaI$In~D9;Xtqzs1SJ!GHF7^A4|NslUDUVKM4e-qS4}5Sseh4*o|m1{>&e( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsdir b/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsdir new file mode 100644 index 0000000000..79ada2e86a --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsdir @@ -0,0 +1 @@ +CCXAppWiz.vsz| |Cocos2d-win32 Application |1|An application that uses Cocos2d-x library for win32 platform.| |6777| | \ No newline at end of file diff --git a/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsz b/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsz new file mode 100644 index 0000000000..010063cb6e --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/CCXAppWiz.vsz @@ -0,0 +1,6 @@ +VSWIZARD 7.0 +Wizard=VsWizard.VsWizardEngine + +Param="WIZARD_NAME = Cocos2d-win32" +Param="ABSOLUTE_PATH = ." +Param="FALLBACK_LCID = 1033" diff --git a/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/default.htm b/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/default.htm new file mode 100644 index 0000000000..d0c34adaaf --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/default.htm @@ -0,0 +1,380 @@ + + + 'Cocos2d-win32 Application Wizard' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+   + +   + +   + +
+ +
+
+   +
+   + + +

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

+
+   +
+ + + + + +
+
+
+ + + + + + + + + + + + + + +
+   +
+   + + +
+ + + + + + + + + + + + +
+
+ +
+
+
+ + + + + +
+ Overview + + +
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+   +
+   + + These are the current project settings: +
    +
  • + + + +
  • + +
  • + + + +
  • + +
+ + Click Finish from any window to accept the current settings. + +

 

+ + + After you create the project, examine the project's files for more information about the classes and resources that are generated.
+
+ Recommend to save the new project  to cocos2d-x source's root directory, + otherwise,  modify the include directory and library directory menually.
+
+   +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+   +
+   + +   + + + +   + + + +   + + + +   +
+   +
+ +
+ +
+ + + + + + + diff --git a/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/features.htm b/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/features.htm new file mode 100644 index 0000000000..33cead9d5d --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/HTML/1033/features.htm @@ -0,0 +1,415 @@ + + + 'Cocos2d-win32 Application Wizard' + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+   + +   + +   + +
+ +
+
+   +
+   + + +

Specify features for the cocos2d-x application.

+
+   +
+ + + + + +
+
+
+ + + + + + + + + + + + + + +
+   +
+   + + + +
+ + + + + + + + + + + + +
+
+ +
+
+
+ + + + + +
+ + Features + + +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+   +
+   + + + Select physical engine: +
+
+ +
+ +
+
+ +
+ +
+
+ +

 

+ +
+   + +
+   + + Select audio engine: +
+
+ +
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+   +
+   + +   + + + +   + + + +   + + + +   +
+   +
+ +
+ +
+ + + + + + + diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Images/Background_Cocos2d-x.gif b/template/CCXAppWiz.vs/CCXAppWiz/Images/Background_Cocos2d-x.gif new file mode 100644 index 0000000000000000000000000000000000000000..7615277ef0100ca715b82d80de876468bc3ebeb6 GIT binary patch literal 811 zcmV+`1JwLSNk%w1VX*)~0f7Giz`(!&001HR1OWg5001li0002706_sj0{?`MsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K-YS={|^`_I7nD%c!-#&xX9S( z_y`#(IZ0V*d5M{+xyjk-`3V{-I!an`U)E>J4;(@dyAW^yUW|_`wJW_ zJWO0{e2ko|yv*F}{0to}JxyJ0eT|*1z0KY2{S6*2K2Bb4evY25zRuq6{th26KTlsD z699m(pU=PV-w*Jgz<>k?8Z3zLpu&U<7dmXn;Gsl_6Dv}@XfY#3i2n;TdffOiB*>8> z|8*pZvSiAYDq8|P=`tqEnKEleq>0m}&YUY@^4tmZr_h0?9v0hO3JB^ zk2f_+pc+AH53CBfKJe;5D-W;-$W|SB73x-$XDz0+npN#swm#j)g$qIK4zoS)qV;<) z2w%Qk>E@NY*Kh*Dixr1OtYfg_28v<+7RUA{5+tv*yl)7alde6!lZpQ6Yc2 z{MxlAy+Laay=~L8?cKP0+ilD{xbNY#i5nM=oZxAO%LAuo{@nR$=+mXQW<3h_Y}uW( zcjwN@dwB4h#FrB;h>J18 zc!-QO(rAc{IpSD|jy>{7h>t-6If#%&5-Et0Ng^4Dl1(xRh?7x5`G=HMQt5}4Sz_6T zmR)kmhnHc3xrdl#lBtK8X`-2jnr*U)hnsQ2d54^J(rJgCdE!}zo_+F3ho6B0I)|Wz z5-NwGi6R<@qKz^Nhog}~`i7*HQtF1KnPS?8rk!%iMsdlFdYo~(l}c)=Je{g)tElz` p+^eq63ae$Z-b$-Wtm4XRt{3gil006VxWpcViC literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Images/Cocos2d-x.gif b/template/CCXAppWiz.vs/CCXAppWiz/Images/Cocos2d-x.gif new file mode 100644 index 0000000000000000000000000000000000000000..4d61d8f614883de1a7379036430f3e2504306d7b GIT binary patch literal 2636 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 literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Scripts/1033/default.js b/template/CCXAppWiz.vs/CCXAppWiz/Scripts/1033/default.js new file mode 100644 index 0000000000..f6ff7b351e --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Scripts/1033/default.js @@ -0,0 +1,400 @@ +function OnFinish(selProj, selObj) +{ + try + { + var strProjectPath = wizard.FindSymbol('PROJECT_PATH'); + var strProjectName = wizard.FindSymbol('PROJECT_NAME'); + +// var WizardVersion = wizard.FindSymbol('WIZARD_VERSION'); +// if(WizardVersion >= 8.0) +// { +// } + + // Create symbols based on the project name + var strSafeProjectName = CreateSafeName(strProjectName); + wizard.AddSymbol("SAFE_PROJECT_NAME", strSafeProjectName); + wizard.AddSymbol("NICE_SAFE_PROJECT_NAME", strSafeProjectName.substr(0, 1).toUpperCase() + strSafeProjectName.substr(1)) + wizard.AddSymbol("UPPERCASE_SAFE_PROJECT_NAME", strSafeProjectName.toUpperCase()); + + // Set current year symbol + var d = new Date(); + var nYear = 0; + nYear = d.getFullYear(); + if(nYear >= 2003) + wizard.AddSymbol("CCX_CURRENT_YEAR", nYear); + var FileSys = new ActiveXObject("Scripting.FileSystemObject"); + var strUserTarget = strProjectName + ".win32.vcproj.user"; + var strUserPath = FileSys.BuildPath(strProjectPath, strUserTarget); + + if (!FileSys.FolderExists(strProjectPath)) + FileSys.CreateFolder(strProjectPath); + + var file = FileSys.OpenTextFile(strUserPath, 2, true); + if (file == null) + { + return; + } + var strUserValue = ""; + file.WriteLine(strUserValue); + file.Close(); + + // 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 = ''; + 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); + } + } + + var strProjectNameWithExt = ''; + strProjectNameWithExt = strProjectName + '.win32.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); + } + 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('RESOURCE_FILTER'); + group = proj.Object.AddFilter('resource'); + 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 + { + 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; + + // General settings + var config = proj.Object.Configurations(astrConfigName[nCntr]); + +// if(wizard.FindSymbol("CCX_USE_UNICODE")) + config.CharacterSet = charSetUnicode; +// else +// config.CharacterSet = charSetMBCS; + + config.OutputDirectory = '$(SolutionDir)$(ConfigurationName)' + config.IntermediateDirectory = '$(ConfigurationName).win32'; + + // Compiler settings + var CLTool = config.Tools('VCCLCompilerTool'); + + // Additional Inlcude Directories + var strAddIncludeDir = '.;.\\win32;..\\cocos2dx;..\\cocos2dx\\include;..\\cocos2dx\\platform\\win32\\third_party\\OGLES'; + if (wizard.FindSymbol('CCX_USE_BOX2D')) + { + strAddIncludeDir += ';..\\;..\\Box2D'; + } + if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) + { + strAddIncludeDir += ';..\\chipmunk\\include\\chipmunk'; + } + if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) + { + strAddIncludeDir += ';..\\CocosDenshion\\Include'; + } + CLTool.AdditionalIncludeDirectories = strAddIncludeDir; + + CLTool.UsePrecompiledHeader = pchNone; // pchUseUsingSpecific; + CLTool.WarningLevel = warningLevel_3; + 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; + } + + var strDefines = GetPlatformDefine(config); + strDefines += "_WINDOWS;STRICT;"; + if(bDebug) + strDefines += "_DEBUG"; + else + strDefines += "NDEBUG"; + CLTool.PreprocessorDefinitions = strDefines; + + // Disable special warning + CLTool.DisableSpecificWarnings = "4251"; + + // Linker settings + var LinkTool = config.Tools('VCLinkerTool'); + LinkTool.SubSystem = subSystemWindows; + LinkTool.TargetMachine = machineX86; + if(bDebug) + { + LinkTool.LinkIncremental = linkIncrementalYes; + LinkTool.GenerateDebugInformation = true; + } + else + { + LinkTool.LinkIncremental = linkIncrementalNo; + } + + // Additional Library Directories + var strAddDepends = 'libcocos2d.lib libgles_cm.lib'; + if (wizard.FindSymbol('CCX_USE_BOX2D')) + { + strAddDepends += ' libBox2d.lib'; + } + if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) + { + strAddDepends +=' libchipmunk.lib'; + } + if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) + { + strAddDepends += ' libCocosDenshion.lib'; + } + LinkTool.AdditionalLibraryDirectories = '$(OutDir)'; + LinkTool.AdditionalDependencies = strAddDepends; + + // Resource settings + var RCTool = config.Tools("VCResourceCompilerTool"); + RCTool.Culture = rcEnglishUS; + RCTool.AdditionalIncludeDirectories = "$(IntDir)"; + if(bDebug) + RCTool.PreprocessorDefinitions = "_DEBUG"; + else + RCTool.PreprocessorDefinitions = "NDEBUG"; + + // MIDL settings + var MidlTool = config.Tools("VCMidlTool"); + MidlTool.MkTypLibCompatible = false; + if(IsPlatformWin32(config)) + MidlTool.TargetEnvironment = midlTargetWin32; + if(bDebug) + MidlTool.PreprocessorDefinitions = "_DEBUG"; + else + MidlTool.PreprocessorDefinitions = "NDEBUG"; + MidlTool.HeaderFileName = strProjectName + ".h"; + MidlTool.InterfaceIdentifierFileName = strProjectName + "_i.c"; + MidlTool.ProxyFileName = strProjectName + "_p.c"; + MidlTool.GenerateStublessProxies = true; + MidlTool.TypeLibraryName = "$(IntDir)/" + strProjectName + ".tlb"; + MidlTool.DLLDataFileName = ""; + + // Post-build settings +// var PostBuildTool = config.Tools("VCPostBuildEventTool"); +// PostBuildTool.Description = "Performing registration..."; +// PostBuildTool.CommandLine = "\"$(TargetPath)\" /RegServer"; + } + } + catch(e) + { + throw e; + } +} + +function AddPchSettings(proj) +{ + try + { +// var files = proj.Object.Files; +// var fStdafx = files("StdAfx.cpp"); +// +// var nCntr; +// for(nCntr = 0; nCntr < nNumConfigs; nCntr++) +// { +// var config = fStdafx.FileConfigurations(astrConfigName[nCntr]); +// config.Tool.UsePrecompiledHeader = pchCreateUsingSpecific; +// } + } + catch(e) + { + throw e; + } +} + +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 strWizTempFile = tfolder.Path + "\\" + 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) + { + strTarget = strName.substring(0, nIndex) + strProjectName + strName.substring(nIndex + 4, strName.length); + } + + return strTarget; + } + catch(e) + { + throw e; + } +} + +function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) +{ + try + { + var projItems = proj.ProjectItems + + var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH'); + + var strTpl = ''; + var strName = ''; + + var strTextStream = InfFile.OpenAsTextStream(1, -2); + while (!strTextStream.AtEndOfStream) + { + strTpl = strTextStream.ReadLine(); + if (strTpl != '') + { + strName = strTpl; + var strTarget = GetTargetName(strName, strProjectName); + var strTemplate = strTemplatePath + '\\' + strTpl; + var strFile = strProjectPath + '\\' + strTarget; + + var bCopyOnly = false; //"true" will only copy the file from strTemplate to strTarget without rendering/adding to the project + var strExt = strName.substr(strName.lastIndexOf(".")); + if (strExt == ".bmp" || strExt == ".ico" || strExt == ".gif" || strExt == ".rtf" || strExt == ".css") + bCopyOnly = true; + wizard.RenderTemplate(strTemplate, strFile, bCopyOnly); + + // don't add these files to the project + if(strTarget == strProjectName + ".h" || + strTarget == strProjectName + "ps.mk" || + strTarget == strProjectName + "ps.def") + continue; + + proj.Object.AddFile(strFile); + } + } + strTextStream.Close(); + } + catch(e) + { + throw e; + } +} diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.cpp b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.cpp new file mode 100644 index 0000000000..eacf2fb81f --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.cpp @@ -0,0 +1,67 @@ +#include "AppDelegate.h" +#include "cocos2d.h" + +#include "HelloWorldScene.h" + +using namespace cocos2d; + +AppDelegate::AppDelegate() +:m_pMainWnd(NULL) +{ + +} + +AppDelegate::~AppDelegate() +{ + +} + +bool AppDelegate::applicationDidFinishLaunching() +{ + // init the window +#if defined(CCX_PLATFORM_UPHONE) + if (!(m_pMainWnd = new CCXEGLView(this)) || + ! m_pMainWnd->Create(&TRectangle(0,0,GetScreenWidth(),GetScreenHeight()))) +#elif defined(CCX_PLATFORM_WIN32) + if (!(m_pMainWnd = new CCXEGLView()) || + ! m_pMainWnd->Create(L"cocos2d-win32", 320, 480) ) +#else + #error +#endif + { + CCX_SAFE_DELETE(m_pMainWnd); + return false; + } + + // init director + CCDirector * pDirector = CCDirector::sharedDirector(); + pDirector->setOpenGLView(m_pMainWnd); + pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft); + // pDirector->setDeviceOrientation(kCCDeviceOrientationPortrait); + pDirector->setDisplayFPS(true); + +#if defined(CCX_PLATFORM_UPHONE) + // set the resource path + CCFileUtils::setResourcePath("/NEWPLUS/TDA_DATA/Data/cocos2d_tests/"); +#endif + + + CCScene * pScene = HelloWorld::scene(); + CCLayer * pLayer = CCLayer::node(); + pLayer->autorelease(); + + pScene->addChild(pLayer); + pDirector->runWithScene(pScene); + + return true; +} + +void AppDelegate::applicationDidEnterBackground() +{ + CCDirector::sharedDirector()->stopAnimation(); +} + +void AppDelegate::applicationWillEnterForeground() +{ + CCDirector::sharedDirector()->startAnimation(); +} diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.h b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.h new file mode 100644 index 0000000000..96182a9d1b --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/AppDelegate.h @@ -0,0 +1,25 @@ +#ifndef __APP_DELEGATE_H__ +#define __APP_DELEGATE_H__ + +#include "cocos2d.h" + +class AppDelegate : public cocos2d::CCXApplication +{ +public: + AppDelegate(); + ~AppDelegate(); + + virtual bool applicationDidFinishLaunching(); + virtual void applicationDidEnterBackground(); + virtual void applicationWillEnterForeground(); + +protected: + cocos2d::CCXEGLView *m_pMainWnd; + +// private: +// Int32 m_nTimer; +}; + + +#endif // __APP_DELEGATE_H__ + diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.cpp b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.cpp new file mode 100644 index 0000000000..5003982487 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.cpp @@ -0,0 +1,53 @@ + +#include "HelloWorldScene.h" + +using namespace cocos2d; + +CCScene* HelloWorld::scene() +{ + // 'scene' is an autorelease object + CCScene *scene = CCScene::node(); + + // 'layer' is an autorelease object + HelloWorld *layer = HelloWorld::node(); + + // add layer as a child to scene + scene->addChild(layer); + + // return the scene + return scene; +} + +// on "init" you need to initialize your instance +bool HelloWorld::init() +{ + ////////////////////////////// + // 1. super init first + if ( !CCLayer::init() ) + { + return false; + } + + ///////////////////////////// + // 2. add your codes below... + + // add a label shows "Hello World" + // create and initialize a label + CCLabel* pLabel = CCLabel::labelWithString("HelloWorld", "Thonburi", 64); + + // ask director the window size + CGSize size = CCDirector::sharedDirector()->getWinSize(); + + // position the label on the center of the screen + pLabel->setPosition( ccp(size.width / 2, size.height / 2) ); + + // add the label as a child to this layer + this->addChild(pLabel); + + return true; +} + +void HelloWorld::menuCloseCallback(NSObject* pSender) +{ + CCDirector::sharedDirector()->end(); +} \ No newline at end of file diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.h b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.h new file mode 100644 index 0000000000..83d3a7112a --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Classes/HelloWorldScene.h @@ -0,0 +1,23 @@ + +#ifndef _HELLOWORLD_LAYER_H_ +#define _HELLOWORLD_LAYER_H_ + +#include "cocos2d.h" + +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(NSObject* pSender); + + // implement the "static node()" method manually + LAYER_NODE_FUNC(HelloWorld); +}; + +#endif // _HELLOWORLD_SCENE_H_ \ No newline at end of file diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Templates.inf b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Templates.inf new file mode 100644 index 0000000000..e8aaaeb05c --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/Templates.inf @@ -0,0 +1,12 @@ +win32/res/root.ico +win32/root.rc +win32/resource.h + +win32/main.h +win32/main.cpp + +Classes/AppDelegate.h +Classes/AppDelegate.cpp + +Classes/HelloWorldScene.h +Classes/HelloWorldScene.cpp diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.cpp b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.cpp new file mode 100644 index 0000000000..d7385588cb --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.cpp @@ -0,0 +1,21 @@ +#include "main.h" +#include "../AppDelegate.h" + +HINSTANCE g_hInstance; + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + + g_hInstance = hInstance; + + int nRet = 0; + AppDelegate app; + nRet = app.Run(); + + return nRet; +} diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.h b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.h new file mode 100644 index 0000000000..f5ad256d5c --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/main.h @@ -0,0 +1,16 @@ +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + +// C RunTime Header Files +#include +#include +#include +#include + +extern HINSTANCE g_hInstance; + +#endif // __WINMAIN_H__ diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/res/root.ico b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/res/root.ico new file mode 100644 index 0000000000000000000000000000000000000000..3b11c7a4c8792cac1d3a0a013bc59fc838f51a5e GIT binary patch literal 1078 zcmc(dJ#GRq5QWDi(t<2S>(bp;5y!}pwlk$uu@VKi^ex;`xZyZC0v&m8%mM{cBBjWH zJ@dU8|LpFF7+J_L^g{buh`hu1edDzed3zCALmMzYFpRun7Kx~RZV^djVr&jGLOGpI z@Jw9vFP94=4E!jOf3&kKTTPTbf^(53ObGUuvxTEDRR()emgQ6{5Y||1jfyjC^+Wzz zeXD<94e#7GzHzNv?hKwb^mQ8ogep@A5Qr4Yl71tKAxw%8vI@H*EuS-m$TJ{pfDm@2 z@VI5eoNZM$Ij59;_SH7_$@`RDnmPHDyvwdyUQf&|uh$jhoc9hBl6-fDE?NH!zg2%dy@6BD% X29B$8a*nI`CHihO^scAlQGc;-Lc0CO literal 0 HcmV?d00001 diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/resource.h b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/resource.h new file mode 100644 index 0000000000..4132eda4e2 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/resource.h @@ -0,0 +1,22 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by [!output PROJECT_NAME].RC +// + +[!if WTL_COM_SERVER] +#define IDS_PROJNAME 100 +#define IDR_[!output UPPERCASE_SAFE_PROJECT_NAME] 100 +[!endif] + +#define ID_FILE_NEW_WINDOW 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 32775 +#endif +#endif diff --git a/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/root.rc b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/root.rc new file mode 100644 index 0000000000..6dec4d4bd4 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/Templates/1033/win32/root.rc @@ -0,0 +1,86 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\[!output PROJECT_NAME].ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "[!output PROJECT_NAME] Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "[!output PROJECT_NAME]\0" + VALUE "LegalCopyright", "Copyright [!output WTL_CURRENT_YEAR]\0" + VALUE "OriginalFilename", "[!output PROJECT_NAME].exe\0" + VALUE "ProductName", "[!output PROJECT_NAME] Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END +END + +///////////////////////////////////////////////////////////////////////////// +#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) diff --git a/template/CCXAppWiz.vs/CCXAppWiz/default.vcproj b/template/CCXAppWiz.vs/CCXAppWiz/default.vcproj new file mode 100644 index 0000000000..0ff60b8d27 --- /dev/null +++ b/template/CCXAppWiz.vs/CCXAppWiz/default.vcproj @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/template/CCXAppWiz.vs/setup_vs2008_en.js b/template/CCXAppWiz.vs/setup_vs2008_en.js new file mode 100644 index 0000000000..b986e0f11c --- /dev/null +++ b/template/CCXAppWiz.vs/setup_vs2008_en.js @@ -0,0 +1,215 @@ +// Setup program for the Cocos2d-win32 App Wizard for VC++ 9.0 (Orcas) + +main(); + +function main() +{ + // Decode command line arguments + var bDebug = 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; + } + + // 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) + { + WScript.Echo("ERROR: 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 strValue = FileSys.GetParentFolderName(WScript.ScriptFullName); + if(strValue == null || strValue == "") + strValue = "."; + + var strSourceFolder = FileSys.BuildPath(strValue, "CCXAppWiz"); + if(bDebug) + WScript.Echo("Source: " + strSourceFolder); + + if(!FileSys.FolderExists(strSourceFolder)) + { + WScript.Echo("ERROR: Cannot find Wizard folder (should be: " + strSourceFolder + ")"); + return; + } + + try + { + var strVC9Key = "HKLM\\Software\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"; + strValue = WSShell.RegRead(strVC9Key); + } + catch(e) + { + try + { + var strVC9Key_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"; + strValue = WSShell.RegRead(strVC9Key_x64); + } + catch(e) + { + WScript.Echo("ERROR: Cannot find where Visual Studio 9.0 is installed."); + return; + } + } + + var strDestFolder = FileSys.BuildPath(strValue, "vcprojects"); + if(bDebug) + WScript.Echo("Destination: " + strDestFolder); + if(!FileSys.FolderExists(strDestFolder)) + { + WScript.Echo("ERROR: Cannot find destination folder (should be: " + strDestFolder + ")"); + return; + } + + // Copy files + try + { + var strSrc = FileSys.BuildPath(strSourceFolder, "CCXAppWiz.ico"); + var strDest = FileSys.BuildPath(strDestFolder, "CCXAppWiz.ico"); + FileSys.CopyFile(strSrc, strDest); + + strSrc = FileSys.BuildPath(strSourceFolder, "CCXAppWiz.vsdir"); + strDest = FileSys.BuildPath(strDestFolder, "CCXAppWiz.vsdir"); + FileSys.CopyFile(strSrc, strDest); + } + catch(e) + { + var strError = "no info"; + if(e.description.length != 0) + strError = e.description; + WScript.Echo("ERROR: Cannot copy file (" + strError + ")"); + return; + } + + // Read and write CCXAppWiz.vsz, add engine version and replace path when found + try + { + var strSrc = FileSys.BuildPath(strSourceFolder, "CCXAppWiz.vsz"); + var strDest = FileSys.BuildPath(strDestFolder, "CCXAppWiz.vsz"); + + var ForReading = 1; + var fileSrc = FileSys.OpenTextFile(strSrc, ForReading); + if(fileSrc == null) + { + WScript.Echo("ERROR: Cannot open source file " + strSrc); + return; + } + + var ForWriting = 2; + var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true); + if(fileDest == null) + { + WScript.Echo("ERROR: Cannot open destination file" + strDest); + 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); + } + + fileSrc.Close(); + fileDest.Close(); + } + catch(e) + { + var strError = "no info"; + if(e.description.length != 0) + strError = e.description; + WScript.Echo("ERROR: Cannot read and write CCXAppWiz.vsz (" + strError + ")"); + return; + } + + // Create Cocos2d-x folder + var strDestCCXFolder = ""; + try + { + strDestCCXFolder = FileSys.BuildPath(strDestFolder, "Cocos2d-x"); + if(!FileSys.FolderExists(strDestCCXFolder)) + FileSys.CreateFolder(strDestCCXFolder); + if(bDebug) + WScript.Echo("CCX Folder: " + strDestCCXFolder); + } + catch(e) + { + var strError = "no info"; + if(e.description.length != 0) + strError = e.description; + WScript.Echo("ERROR: Cannot create CCX folder (" + strError + ")"); + return; + } + + // Read and write additional CCXAppWiz.vsdir, add path to the wizard location + try + { + var strSrc = FileSys.BuildPath(strSourceFolder, "CCXAppWiz.vsdir"); + var strDest = FileSys.BuildPath(strDestCCXFolder, "CCXAppWiz.vsdir"); + + var ForReading = 1; + var fileSrc = FileSys.OpenTextFile(strSrc, ForReading); + if(fileSrc == null) + { + WScript.Echo("ERROR: Cannot open source file " + strSrc); + return; + } + + var ForWriting = 2; + var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true); + if(fileDest == null) + { + WScript.Echo("ERROR: Cannot open destination file" + strDest); + return; + } + + while(!fileSrc.AtEndOfStream) + { + var strLine = fileSrc.ReadLine(); + if(strLine.indexOf("CCXAppWiz.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; + WScript.Echo("ERROR: Cannot read and write CCX\\CCXAppWiz.vsdir (" + strError + ")"); + return; + } + + WScript.Echo("App Wizard successfully installed!"); +} diff --git a/tests/proj.win32/test-win32.vcproj.user b/tests/proj.win32/test-win32.vcproj.user deleted file mode 100644 index 323c5f2eec..0000000000 --- a/tests/proj.win32/test-win32.vcproj.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - -