Skip to content

Commit 9787ec1

Browse files
author
natural-law
committed
[wophone]Test the template for wophone OK.
1 parent 97bab36 commit 9787ec1

File tree

9 files changed

+15
-8
lines changed

9 files changed

+15
-8
lines changed

HelloWorld/HelloWorldScene.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool HelloWorld::init()
6161
this->addChild(pLabel, 1);
6262

6363
// add "HelloWorld" splash screen"
64-
CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.jpg");
64+
CCSprite* pSprite = CCSprite::spriteWithFile("HelloWorld.png");
6565

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

HelloWorld/Resource/HelloWorld.jpg

-16.4 KB
Binary file not shown.

template/CCApplicationWizard.vs/CCAppWiz.wophone/HTML/1033/default.htm

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<!-- Page 2 Controls -->
3535
<SYMBOL NAME='CC_USE_BOX2D' TYPE="checkbox" VALUE="true"></SYMBOL>
3636
<SYMBOL NAME='CC_USE_CHIPMUNK' TYPE="checkbox" VALUE="false"></SYMBOL>
37-
<SYMBOL NAME='CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="false"></SYMBOL>
37+
<SYMBOL NAME='CC_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE' TYPE="checkbox" VALUE="true"></SYMBOL>
3838
<SYMBOL NAME='CC_HAS_MAIN_FORM' TYPE="checkbox" VALUE="true"></SYMBOL>
3939

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

template/CCApplicationWizard.vs/CCAppWiz.wophone/Scripts/1033/default.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function CreateCustomProject(strProjectName, strProjectPath) {
103103
if(WizardVersion >= 10.0)
104104
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>";
105105
else
106-
strUserValue = "<?xml version=\"1.0\" encoding=\"utf-8\"?><VisualStudioUserFile ProjectType=\"Visual C++\" Version=\"9.00\" ShowAllFiles=\"true\"></VisualStudioUserFile>";
106+
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>";
107107
file.WriteLine(strUserValue);
108108
file.Close();
109109

@@ -173,7 +173,7 @@ function AddConfigurations(proj, strProjectName) {
173173
// header files and libraries directories
174174
var strOutputDir = '../../PRJ_TG3/LIB/Win32Lib';
175175
var strCurIncludeDir = '..\\..\\PRJ_TG3\\Include;..\\..\\PRJ_TG3\\Include\\MTAPI;..\\..\\PRJ_TG3\\Include\\ThirdParty;..\\..\\PRJ_TG3\\Include\\TCOM;..\\..\\PRJ_TG3\\Include\\OpenGL';
176-
strCurIncludeDir += ';.;.\\Classes;.\\wophone;.\\wophone\\Res;..\\cocos2dx;..\\cocos2dx\\include';
176+
strCurIncludeDir += ';.;.\\Classes;.\\wophone;.\\wophone\\Res;..\\cocos2dx;..\\cocos2dx\\include;..\\cocos2dx\\platform';
177177

178178
var strDefinitions = 'WIN32;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL';
179179
var strDependLibs = 'WS2_32.Lib EosConfig.lib SoftSupport.lib TG3_DLL.lib libcocos2d.lib';

template/CCApplicationWizard.vs/CCAppWiz.wophone/Templates/1033/Classes/AppDelegate.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ bool AppDelegate::initInstance()
3232
// Use GetScreenWidth() and GetScreenHeight() get screen width and height.
3333
CCEGLView * pMainWnd = new CCEGLView(this);
3434
CC_BREAK_IF(! pMainWnd
35-
|| ! pMainWnd->Create(&TRectangle(0, 0, 320, 480)));
35+
|| ! pMainWnd->Create(320, 480));
36+
37+
#if !defined(_TRANZDA_VM_)
38+
// set the resource zip file
39+
// on wophone emulator, we copy resources files to Work7/TG3/APP/ folder instead of zip file
40+
CCFileUtils::setResource("[!output PROJECT_NAME].zip");
41+
#endif
3642

3743
bRet = true;
3844
} while (0);
Loading

template/CCApplicationWizard.vs/CCAppWiz.wophone/Templates/1033/Templates.inf

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Classes/HelloWorldScene.cpp
2222

2323
Resource/CloseNormal.png
2424
Resource/CloseSelected.png
25+
Resource/HelloWorld.png

template/CCApplicationWizard.vs/CCAppWiz.wophone/Templates/1033/root_Arm.TMK3

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPS标准应
2828
;PRE_DEFINE=USE_MTAPI=1 ;使用 MTAPI 库,此时生成的 Makefile 会自动连接有关的LIB
2929

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

3939
;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列
40-
INCLUDE_PATH=-I ../../PRJ_TG3/Include/OpenGL -I../cocos2dx -I../cocos2dx/include
40+
INCLUDE_PATH=-I ../../PRJ_TG3/Include/OpenGL -I../cocos2dx -I../cocos2dx/include -I../cocos2dx/platform
4141
INCLUDE_PATH=-I. -I./Classes -I./wophone -I./wophone/Res ;默认本项目的路径
4242
[! if CC_USE_BOX2D]
4343
INCLUDE_PATH=-I../ -I../Box2D

template/CCApplicationWizard.vs/CCAppWiz.wophone/Templates/1033/wophone/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
44
{
55
AppDelegate app;
66

7-
cocos2d::CCApplication::sharedApplication().run();
7+
cocos2d::CCApplication::sharedApplication().Run();
88
return 1;
99
}

0 commit comments

Comments
 (0)