mirror of https://github.com/axmolengine/axmol.git
issue #155, it's ok on emu, but not ready for linux
This commit is contained in:
parent
45162616f2
commit
d509280bf5
|
@ -0,0 +1,81 @@
|
|||
// Application application cpp file.
|
||||
|
||||
// Original file name: cocosTemplateApp.cpp
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-09-27
|
||||
|
||||
|
||||
#include "cocos2d.h"
|
||||
|
||||
#include "AppDelegate.h"
|
||||
#include "HelloWorldScene.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
// the works are the same as NSObject<UIApplicationDelegate>::applicationDidFinishLaunching of cocos2d-iphone
|
||||
bool AppDelegate::initCocos2d()
|
||||
{
|
||||
// init director
|
||||
CCDirector *pDirector = CCDirector::getSharedDirector();
|
||||
pDirector->setOpenGLView(m_pMainWnd);
|
||||
|
||||
// sets landscape mode
|
||||
pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
|
||||
|
||||
// turn on display FPS
|
||||
pDirector->setDisplayFPS(true);
|
||||
|
||||
// create a scene. it's an autorelease object
|
||||
CCScene *pScene = HelloWorld::scene();
|
||||
|
||||
// run
|
||||
CCDirector::getSharedDirector()->runWithScene(pScene);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
AppDelegate::AppDelegate()
|
||||
:m_rcWnd(0, 0, GetScreenWidth(), GetScreenHeight())
|
||||
,m_pMainWnd(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Boolean AppDelegate::EventHandler(EventType* pEvent)
|
||||
{
|
||||
Boolean bHandled = FALSE;
|
||||
|
||||
switch(pEvent->eType)
|
||||
{
|
||||
case EVENT_AppLoad:
|
||||
{
|
||||
// it's important to use CCXEGLView, or you may inherit it to add your implement
|
||||
if (! (m_pMainWnd = new CCXEGLView(this)) || ! m_pMainWnd->Create(&m_rcWnd))
|
||||
{
|
||||
// create window failed, quit application
|
||||
SendStopEvent();
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
}
|
||||
SetActiveWindow(m_pMainWnd);
|
||||
// do not return bHandle equal TRUE, CCXApplication::EventHandler need do some thing.
|
||||
break;
|
||||
}
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case EVENT_AppStopNotify:
|
||||
{
|
||||
|
||||
}
|
||||
bHandled = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return (bHandled) ? TRUE : CCXApplication::EventHandler(pEvent);
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// Application application header file.
|
||||
|
||||
// Original file name: cocosTemplateApp.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-09-27
|
||||
|
||||
|
||||
#ifndef _APP_DELEGATE_H_
|
||||
#define _APP_DELEGATE_H_
|
||||
|
||||
#include "CCXApplication.h"
|
||||
#include "CCXEGLView.h"
|
||||
|
||||
class AppDelegate : public cocos2d::CCXApplication
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
~AppDelegate();
|
||||
|
||||
virtual bool initCocos2d();
|
||||
virtual Boolean EventHandler(EventType * pEvent);
|
||||
|
||||
protected:
|
||||
TRectangle m_rcWnd;
|
||||
cocos2d::CCXEGLView * m_pMainWnd;
|
||||
};
|
||||
|
||||
|
||||
#endif // _APP_DELEGATE_H_
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
#include "HelloWorldScene.h"
|
||||
using namespace cocos2d;
|
||||
|
||||
#define PATH_CLOSE_NORMAL "/NEWPLUS/TDA_DATA/UserData/CloseNormal.png"
|
||||
#define PATH_CLOSE_SELECTED "/NEWPLUS/TDA_DATA/UserData/CloseSelected.png"
|
||||
|
||||
CCScene* HelloWorld::scene()
|
||||
{
|
||||
bool bRet = false;
|
||||
|
||||
// 'pScene' is an autorelease object
|
||||
CCScene *pScene = CCScene::node();
|
||||
|
||||
// 'pLayer' is an autorelease object
|
||||
HelloWorld *pLayer = new HelloWorld;
|
||||
pLayer->init();
|
||||
|
||||
// add layer as a child to scene
|
||||
pScene->addChild(pLayer);
|
||||
|
||||
// release layer, it's "new" by us.
|
||||
pLayer->release();
|
||||
|
||||
// return the scene
|
||||
return pScene;
|
||||
}
|
||||
|
||||
// on "init" you need to initialize your instance
|
||||
bool HelloWorld::init()
|
||||
{
|
||||
//////////////////////////////
|
||||
// 1. super init first
|
||||
if ( !CCLayer::init() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
// 2. add a menu item with "X" image, which is clicked to quit the program
|
||||
// you may modify it.
|
||||
|
||||
// add a "close" icon to exit the progress. it's an autorelease object
|
||||
CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(
|
||||
PATH_CLOSE_NORMAL,
|
||||
PATH_CLOSE_SELECTED,
|
||||
this,
|
||||
menu_selector(HelloWorld::menuCloseCallback) );
|
||||
pCloseItem->setPosition( ccp(CCDirector::getSharedDirector()->getWinSize().width - 20, 20) );
|
||||
|
||||
// create menu, it's an autorelease object
|
||||
CCMenu* pMenu = CCMenu::menuWithItems(pCloseItem, NULL);
|
||||
pMenu->setPosition( CGPointZero );
|
||||
this->addChild(pMenu);
|
||||
|
||||
/////////////////////////////
|
||||
// 3. 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::getSharedDirector()->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::getSharedDirector()->end();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
#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);
|
||||
};
|
||||
|
||||
#endif // _HELLOWORLD_SCENE_H_
|
|
@ -0,0 +1 @@
|
|||
this file need to run .tmk3 file to rebuild.
|
|
@ -0,0 +1 @@
|
|||
this file need to run .tmk3 file to rebuild.
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
/*!
|
||||
* @file NewDeleteOp.cpp
|
||||
* @author 全智达
|
||||
* @brief
|
||||
*
|
||||
* @section Copyright
|
||||
* =======================================================================<br>
|
||||
* <br>
|
||||
* Copyright (c) 2005-2010 Tranzda Technologies Co.,Ltd. <br>
|
||||
* 深圳市全智达科技有限公司 版权所有2005-2010<br>
|
||||
* <br>
|
||||
* PROPRIETARY RIGHTS of Tranzda Technologies Co.,Ltd. are involved in <br>
|
||||
* the subject matter of this material. All manufacturing, reproduction, <br>
|
||||
* use, and sales rights pertaining to this subject matter are governed <br>
|
||||
* by the license agreement. The recipient of this software implicitly <br>
|
||||
* accepts the terms of the license. <br>
|
||||
* 本软件文档资料是深圳市全智达科技有限公司的合法资产,任何人士阅读和使<br>
|
||||
* 用本资料必须获得相应的书面授权,承担保密责任和接受相应的法律约束。<br>
|
||||
* <br>
|
||||
* 公司网址:<a href="http://www.tranzda.com"> http://www.tranzda.com </a> <br>
|
||||
* 公司邮箱:<a mailto="support@tranzda.com">support@tranzda.com</a> <br>
|
||||
* =======================================================================<br>
|
||||
*/
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
// Original file name: cocosTemplate_Res.ENU.tr3
|
||||
// Generated by TOPS Builder 1.2.3.235 Date:2010-09-29
|
||||
|
||||
|
||||
//$VERSION 60004
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE=$002E$002E$005C$0063$006F$0063$006F$0073$0054$0065$006D$0070$006C$0061$0074$0065$002E$0076$0063$0070$0072$006F$006A
|
||||
//$End
|
||||
LANGUAGE = 1033
|
||||
// ImageLists
|
||||
|
||||
// Project
|
||||
PROJECT
|
||||
BEGIN
|
||||
ScreenWidth 320
|
||||
ScreenHeight 480
|
||||
ScreenDPI 165
|
||||
END
|
||||
|
||||
|
||||
// TComObject
|
||||
|
||||
// Forms
|
||||
|
||||
FORM ID Form1002 AT(0,24,320,456)
|
||||
FRAME
|
||||
NOSAVEBEHIND
|
||||
BIClose
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
BEGIN
|
||||
TITLE $004D$0061$0069$006E
|
||||
END
|
||||
|
||||
// Menus
|
||||
|
||||
// Alerts ¾¯¸æÏûÏ¢
|
||||
|
||||
// Strings
|
||||
|
||||
// Fonts
|
||||
|
||||
// Bitmaps
|
||||
|
||||
IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
|
||||
// Îļþ¼Ð: Root(All)
|
||||
BEGIN
|
||||
END
|
||||
// raw data
|
||||
|
||||
// Application
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
// Tranzda Translation File.
|
||||
// TOPS Builder use infomation contained by this file to
|
||||
// update the controls' trnaslation status.
|
||||
|
||||
// Original file name: cocosTemplate_Res.ENU.tr3.tts
|
||||
// Generated by TOPS Builder 1.2.3.235 Date:2010-09-29
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
// Original file name: cocosTemplate_Res.TR3
|
||||
// Generated by TOPS Builder 1.2.3.235 Date:2010-09-29
|
||||
|
||||
|
||||
#include "cocosTemplate_Res.h"
|
||||
|
||||
//$VERSION 60004
|
||||
//$SETTINGS
|
||||
//$Begin
|
||||
//$VCPRJFILE=$002E$002E$005C$0063$006F$0063$006F$0073$0054$0065$006D$0070$006C$0061$0074$0065$002E$0076$0063$0070$0072$006F$006A
|
||||
//$End
|
||||
LANGUAGE = 2052
|
||||
// ImageLists
|
||||
|
||||
// Project
|
||||
PROJECT
|
||||
BEGIN
|
||||
ScreenWidth 320
|
||||
ScreenHeight 480
|
||||
ScreenDPI 165
|
||||
END
|
||||
|
||||
|
||||
// TComObject
|
||||
|
||||
// Forms
|
||||
|
||||
FORM ID Form1002 AT(0,24,320,456)
|
||||
FRAME
|
||||
NOSAVEBEHIND
|
||||
BIClose
|
||||
VISIBLED
|
||||
ENABLED
|
||||
CHARSET 0
|
||||
UseSYSDefColor
|
||||
TRANSPARENT
|
||||
BACKCOLOR $0003
|
||||
FORECOLOR $0002
|
||||
FOCUSBACKCOLOR $0006
|
||||
FOCUSFORECOLOR $0007
|
||||
SELECTEDFORECOLOR $0005
|
||||
SELECTEDBACKCOLOR $0004
|
||||
BEGIN
|
||||
TITLE $004D$0061$0069$006E
|
||||
END
|
||||
|
||||
// Menus
|
||||
|
||||
// Alerts ¾¯¸æÏûÏ¢
|
||||
|
||||
// Strings
|
||||
|
||||
// Fonts
|
||||
|
||||
// Bitmaps
|
||||
|
||||
IMAGEFOLDER ID ResFolder1001 FOLDERNAME $0052$006F$006F$0074$0028$0041$006C$006C$0029
|
||||
// Îļþ¼Ð: Root(All)
|
||||
BEGIN
|
||||
END
|
||||
// raw data
|
||||
|
||||
// Application
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// Application resource group file.
|
||||
|
||||
// Original file name: cocosTemplate_Res.TRG
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-09-29
|
||||
|
||||
|
||||
|
||||
VERSION 60001
|
||||
PROJECT
|
||||
Begin
|
||||
IsLangBase
|
||||
FileName = ".\cocosTemplate_Res.TR3"
|
||||
End
|
||||
|
||||
PROJECT
|
||||
Begin
|
||||
FileName = ".\cocosTemplate_Res.ENU.tr3"
|
||||
End
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// Original file name: cocosTemplate_Res.h
|
||||
// Generated by TOPS Builder 1.2.3.235 Date:2010-09-29
|
||||
|
||||
#define ResFolder1001 1001
|
||||
#define Form1002 1002
|
|
@ -0,0 +1,245 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// cocosTemplate_Res_c.h
|
||||
// 资源编译器转换文件数据定义文件
|
||||
//
|
||||
//
|
||||
// Copyright (C) Tranzda CORPORATION
|
||||
//
|
||||
//---┤编译器信息├---
|
||||
// 编译器名称: TR3C.exe
|
||||
// 编译器版本: TG3 资源编译器 版本V1.5 Build 91
|
||||
//
|
||||
//---┤注意├---
|
||||
// 警告:未经允许,任何人不准擅自修改此文件!!!否则后果自负!
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
#include "cocostemplate_res_h.h" //类型定义头文件
|
||||
#ifndef WIN32
|
||||
//#pragma diag_remark 1296
|
||||
#endif
|
||||
#if 11<RES_VERSION
|
||||
#error Resource file version too low!Must be compiled with higher version TR3C.
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************
|
||||
* Language:CHS
|
||||
*************************************************************/
|
||||
|
||||
|
||||
const ResProjectType COCOST_project=
|
||||
{
|
||||
320, //screenWidth
|
||||
480, //screenHeight
|
||||
165, //screenDPI
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------
|
||||
* ID为COCOST_ID_Form1002窗体的数据
|
||||
------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*"Main"*/
|
||||
const TUChar COCOST_Form1002TitleStr[]={0x004D,0x0061,0x0069,0x006E,0x0000};
|
||||
|
||||
const ResWindowType COCOST_Form1002 =
|
||||
{
|
||||
{//资源公共头部定义
|
||||
COCOST_ID_Form1002,//资源ID
|
||||
RES_CLASS_FORM,//资源类型为FORM(窗体)类型
|
||||
sizeof(ResWindowType),//资源大小
|
||||
-1,//父资源ID(窗体没有故为-1)
|
||||
0,//Tag
|
||||
0//StyleOption
|
||||
},//资源公共头部定义结束
|
||||
{//ControlAttrType属性
|
||||
0,//Enabled,(nouse here)
|
||||
0,//Visibled,(nouse here)
|
||||
0,//Ctl3D,,(nouse here)
|
||||
0,//TabStop,(nouse here)
|
||||
0,//ReadOnly,(nouse here)
|
||||
0,//ImeEnable,(nouse here)
|
||||
0,//WordWrap,(nouse here)
|
||||
0,//TopLeftIsLock,(nouse here)
|
||||
0,//Check,(nouse here)
|
||||
0,//MultiLine,(nouse here)
|
||||
0,//AutoSize,(nouse here)
|
||||
0,//Modal,
|
||||
0,//Numeric ,Field Use
|
||||
0,//AutoShift,Field Use
|
||||
0,//DynamicSize,Field Use
|
||||
0,//UnderLine,Field Use
|
||||
1,//BIClose
|
||||
0,//HasStatusBar
|
||||
0,//BIAction
|
||||
0,//BIMaximize
|
||||
0,//ForceShowTitle
|
||||
0,//Graphical,(nouse here)
|
||||
0,//sbmHasVertical,垂直滚动条
|
||||
0,//sbmHasHorizontal,水平滚动条
|
||||
0,//sbmAuto,滚动条自动出现
|
||||
0,//hasImage
|
||||
0,//hasCheckBox
|
||||
1,//UseSYSDefColor
|
||||
0,//Smooth
|
||||
0,//ShowText
|
||||
1,//TransParent
|
||||
0//OwnerDraw
|
||||
},
|
||||
{//PanelAttr
|
||||
2,//HScrollMode,0-auto,1-enable,2-disable
|
||||
0,//VScrollMode,0-auto,1-enable,2-disable
|
||||
},
|
||||
0X3, // BackColor
|
||||
0X2, // ForeColor
|
||||
{{0, 24}, {320, 456}}, // RectangleType windowBounds
|
||||
0, // 控件个数
|
||||
{//ResWindowExAttrType
|
||||
0,//closeBtnStyle
|
||||
0,//actionBtnStyle
|
||||
0,//DisableSystemStatusBar
|
||||
0,//fullScreen
|
||||
0,//rotateMode
|
||||
},
|
||||
(TUChar *)COCOST_Form1002TitleStr, //标题文本(在上!)
|
||||
NULL, // 关闭按钮文字(当前为空!)
|
||||
NULL, // action button text = null
|
||||
0, //CharSet
|
||||
stdFont,//Font
|
||||
-1, //MainMenuID(-1为没有主菜单)
|
||||
TG3_WINDOW_MOVIE_MODE_DEFAULT , // 启动动画模式
|
||||
TG3_WINDOW_MOVIE_MODE_DEFAULT , // 关闭动画模式
|
||||
NULL, // 指向控件列表(没有控件,所以为空!)
|
||||
0, // 旋转参考表子项个数
|
||||
NULL // 界面旋转参考表(空)
|
||||
};//窗体COCOST_Form1002资源数据常量结束
|
||||
const ResourceLangRegisterEntry COCOST_CHS_Resource[] =
|
||||
{
|
||||
{kProjectRscType,0,(void*)&COCOST_project,sizeof(COCOST_project)}
|
||||
,{kWindowRscType,COCOST_ID_Form1002,(void*)&COCOST_Form1002,sizeof(COCOST_Form1002)}
|
||||
};
|
||||
|
||||
const ResourceLangRegisterEntry2 COCOST_CHS_ResourceEntry =
|
||||
{
|
||||
tgresource_tag,
|
||||
11,//res version
|
||||
0,//subVersionValue
|
||||
0,//reserved1
|
||||
0,//reserved2
|
||||
COCOST_CHS_Resource
|
||||
};
|
||||
|
||||
|
||||
/************************************************************
|
||||
* Language:ENU
|
||||
*************************************************************/
|
||||
|
||||
|
||||
const ResProjectType COCOST_ENU_project=
|
||||
{
|
||||
320, //screenWidth
|
||||
480, //screenHeight
|
||||
165, //screenDPI
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------
|
||||
* ID为COCOST_ID_Form1002窗体的数据
|
||||
------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*"Main"*/
|
||||
const TUChar COCOST_ENU_Form1002TitleStr[]={0x004D,0x0061,0x0069,0x006E,0x0000};
|
||||
|
||||
const ResWindowType COCOST_ENU_Form1002 =
|
||||
{
|
||||
{//资源公共头部定义
|
||||
COCOST_ID_Form1002,//资源ID
|
||||
RES_CLASS_FORM,//资源类型为FORM(窗体)类型
|
||||
sizeof(ResWindowType),//资源大小
|
||||
-1,//父资源ID(窗体没有故为-1)
|
||||
0,//Tag
|
||||
0//StyleOption
|
||||
},//资源公共头部定义结束
|
||||
{//ControlAttrType属性
|
||||
0,//Enabled,(nouse here)
|
||||
0,//Visibled,(nouse here)
|
||||
0,//Ctl3D,,(nouse here)
|
||||
0,//TabStop,(nouse here)
|
||||
0,//ReadOnly,(nouse here)
|
||||
0,//ImeEnable,(nouse here)
|
||||
0,//WordWrap,(nouse here)
|
||||
0,//TopLeftIsLock,(nouse here)
|
||||
0,//Check,(nouse here)
|
||||
0,//MultiLine,(nouse here)
|
||||
0,//AutoSize,(nouse here)
|
||||
0,//Modal,
|
||||
0,//Numeric ,Field Use
|
||||
0,//AutoShift,Field Use
|
||||
0,//DynamicSize,Field Use
|
||||
0,//UnderLine,Field Use
|
||||
1,//BIClose
|
||||
0,//HasStatusBar
|
||||
0,//BIAction
|
||||
0,//BIMaximize
|
||||
0,//ForceShowTitle
|
||||
0,//Graphical,(nouse here)
|
||||
0,//sbmHasVertical,垂直滚动条
|
||||
0,//sbmHasHorizontal,水平滚动条
|
||||
0,//sbmAuto,滚动条自动出现
|
||||
0,//hasImage
|
||||
0,//hasCheckBox
|
||||
1,//UseSYSDefColor
|
||||
0,//Smooth
|
||||
0,//ShowText
|
||||
1,//TransParent
|
||||
0//OwnerDraw
|
||||
},
|
||||
{//PanelAttr
|
||||
2,//HScrollMode,0-auto,1-enable,2-disable
|
||||
0,//VScrollMode,0-auto,1-enable,2-disable
|
||||
},
|
||||
0X3, // BackColor
|
||||
0X2, // ForeColor
|
||||
{{0, 24}, {320, 456}}, // RectangleType windowBounds
|
||||
0, // 控件个数
|
||||
{//ResWindowExAttrType
|
||||
0,//closeBtnStyle
|
||||
0,//actionBtnStyle
|
||||
0,//DisableSystemStatusBar
|
||||
0,//fullScreen
|
||||
0,//rotateMode
|
||||
},
|
||||
(TUChar *)COCOST_ENU_Form1002TitleStr, //标题文本(在上!)
|
||||
NULL, // 关闭按钮文字(当前为空!)
|
||||
NULL, // action button text = null
|
||||
0, //CharSet
|
||||
stdFont,//Font
|
||||
-1, //MainMenuID(-1为没有主菜单)
|
||||
TG3_WINDOW_MOVIE_MODE_DEFAULT , // 启动动画模式
|
||||
TG3_WINDOW_MOVIE_MODE_DEFAULT , // 关闭动画模式
|
||||
NULL, // 指向控件列表(没有控件,所以为空!)
|
||||
0, // 旋转参考表子项个数
|
||||
NULL // 界面旋转参考表(空)
|
||||
};//窗体COCOST_ENU_Form1002资源数据常量结束
|
||||
const ResourceLangRegisterEntry COCOST_ENU_Resource[] =
|
||||
{
|
||||
{kProjectRscType,0,(void*)&COCOST_ENU_project,sizeof(COCOST_ENU_project)}
|
||||
,{kWindowRscType,COCOST_ID_Form1002,(void*)&COCOST_ENU_Form1002,sizeof(COCOST_ENU_Form1002)}
|
||||
};
|
||||
|
||||
const ResourceLangRegisterEntry2 COCOST_ENU_ResourceEntry =
|
||||
{
|
||||
tgresource_tag,
|
||||
11,//res version
|
||||
0,//subVersionValue
|
||||
0,//reserved1
|
||||
0,//reserved2
|
||||
COCOST_ENU_Resource
|
||||
};
|
||||
|
||||
//资源定义
|
||||
#define TG_RESOURCE_DEFINE \
|
||||
{SYS_LANGUAGE_CHS,sizeof( COCOST_CHS_Resource )/ sizeof(ResourceLangRegisterEntry), &COCOST_CHS_ResourceEntry}, \
|
||||
{SYS_LANGUAGE_ENU,sizeof( COCOST_ENU_Resource )/ sizeof(ResourceLangRegisterEntry), &COCOST_ENU_ResourceEntry},
|
|
@ -0,0 +1,21 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// cocosTemplate_Res_def.h
|
||||
// 资源编译器转换文件ID宏声明文件
|
||||
//
|
||||
//
|
||||
// Copyright (C) Tranzda CORPORATION
|
||||
//
|
||||
//---┤编译器信息├---
|
||||
// 编译器名称: TR3C.exe
|
||||
// 编译器版本: TG3 资源编译器 版本V1.5 Build 91
|
||||
//
|
||||
//---┤注意├---
|
||||
// 警告:未经允许,任何人不准擅自修改此文件!!!否则后果自负!
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef __COCOSTEMPLATE_RES_DEF_H__
|
||||
#define __COCOSTEMPLATE_RES_DEF_H__
|
||||
|
||||
#define COCOST_ID_Form1002 1073742826 /*"Main"*/
|
||||
|
||||
#endif
|
|
@ -0,0 +1,23 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// cocosTemplate_Res_h.h
|
||||
// 资源编译器转换文件数据结构声明文件
|
||||
//
|
||||
//
|
||||
// Copyright (C) Tranzda CORPORATION
|
||||
//
|
||||
//---┤编译器信息├---
|
||||
// 编译器名称: TR3C.exe
|
||||
// 编译器版本: TG3 资源编译器 版本V1.5 Build 91
|
||||
//
|
||||
//---┤注意├---
|
||||
// 警告:未经允许,任何人不准擅自修改此文件!!!否则后果自负!
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef __COCOSTEMPLATE_RES_H_H__
|
||||
#define __COCOSTEMPLATE_RES_H_H__
|
||||
|
||||
#include "ResTypes.h"
|
||||
|
||||
#include "cocostemplate_res_def.h"
|
||||
|
||||
#endif
|
|
@ -0,0 +1,231 @@
|
|||
|
||||
#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
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
#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__
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
;
|
||||
; TG3 Makefile Auto Create Script
|
||||
;
|
||||
; 说明:
|
||||
; 1.在等号左边不要有空格
|
||||
; 2.所有的路径请使用"/"来分隔
|
||||
; 3.所有的文件名不可以有空格
|
||||
; 4.只能对当前目录及其子目录下的.c、.cpp生成Makefile
|
||||
;
|
||||
|
||||
;本TMK3文件目录位置到项目根目录之间的转换,不支持多个串,如果有多个,以最后一个为准
|
||||
;即 ./$(TO_PROJECT_ROOT)/ 就是项目的根目录
|
||||
TO_PROJECT_ROOT=../../PRJ_TG3
|
||||
|
||||
;输出目标的名字,不支持多个串,如果有多个,以最后一个为准
|
||||
OUTPUT_FILENAME=libcocosTemplate.so
|
||||
|
||||
;包含的其他的TMK3文件,此文件和本文件一起构成MakeFile的内容
|
||||
;此项可以出现在TMK3文件内的任意地方,与已经存在的项依次组合
|
||||
;注意:此项不支持绝对路径,但是可以使用$(TO_PROJECT_ROOT)构成文件名
|
||||
INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP.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=-D_MY_MARCO_ ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可
|
||||
;DEFINES=-D__TG3_PURE_DLL__ ;生成的是纯动态库(意思是:不是TOPS应用,但可以是TCOM组件)
|
||||
;DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件)
|
||||
|
||||
;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDE_PATH= ;应用额外的包含路径。注意:ITOPS自己的所有路径都会自动包含,故此这里仅仅包含应用自己特有的路径即可
|
||||
|
||||
;连接的库文件,可以使用多个LIBS串,也可以使用LIBS1、LIBS2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
;LIBS=-lMyLib ;应用额外的连接库。注意:ITOPS自己的所需库自动包含,而且库包含路径也已经包含,故此这里仅仅包含应用自己特有的库的名字即可
|
||||
|
||||
;强制包含文件的名字,不能使用通配符,一定要使用相对或者绝对路径
|
||||
;极力要求使用相对路径,多个文件之间使用“|”分隔
|
||||
;强制包含文件指的是不在本文件夹及其子文件夹下的.c、.cpp、.o文件
|
||||
;可以使用多个INCLUDEFILE串,也可以使用INCLUDEFILE1、INCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDEFILE=
|
||||
|
||||
;强制排除文件,不能使用通配符,一定要使用相对路径
|
||||
;多个文件之间使用“|”分隔,路径必须以"./","../"开始
|
||||
;只能对.c、.cpp文件进行排除
|
||||
;如果要排除本目录的文件也要加入"./"
|
||||
;可以使用多个EXCLUDEFILE串,也可以使用EXCLUDEFILE1、EXCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
EXCLUDEFILE=
|
|
@ -0,0 +1,300 @@
|
|||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="cocosTemplate"
|
||||
ProjectGUID="{A2338E7B-155B-4A3B-AB4B-518ECDD26564}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../PRJ_TG3/LIB/Win32Lib"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\Res;..\..\PRJ_TG3\Include;..\..\PRJ_TG3\Include\MTAPI;..\..\PRJ_TG3\Include\ThirdParty;..\..\PRJ_TG3\Include\TCOM;..\..\PRJ_TG3\TG3\Include;..\..\PRJ_TG3\TG3\TG3_Implement;..\..\PRJ_TG3\EOS_SYS;..\..\PRJ_TG3\Common\SoftSupport;..\..\PRJ_TG3\Common\ICU\Include;..\cocos2dx\include;..\cocos2dx;..\..\PRJ_TG3\Include\OpenGL"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="3"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="WS2_32.Lib ..\..\PRJ_TG3\Common\SoftSupport\EosConfig.lib ..\..\PRJ_TG3\Common\SoftSupport\SoftSupport.lib ..\..\PRJ_TG3\Common\SoftSupport\TG3_DLL.lib"
|
||||
OutputFile="$(OutDir)/cocosTemplate.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../../PRJ_TG3/Common/ICU/lib;../../PRJ_TG3/Mtapi/Win32/lib;../../PRJ_TG3/LIB/Win32Lib;../../PRJ_TG3/Common/SoftSupport"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
MapExports="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary="$(OutDir)/$(TargetName).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../PRJ_TG3/LIB/Win32Lib"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".\Res;..\..\PRJ_TG3\Include;..\..\PRJ_TG3\Include\MTAPI;..\..\PRJ_TG3\Include\ThirdParty;..\..\PRJ_TG3\Include\TCOM;..\..\PRJ_TG3\TG3\Include;..\..\PRJ_TG3\TG3\TG3_Implement;..\..\PRJ_TG3\EOS_SYS;..\..\PRJ_TG3\Common\SoftSupport;..\..\PRJ_TG3\Common\ICU\Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_TRANZDA_VM_;SS_MAKEDLL"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/cocosTemplate.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="source"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\AppDelegate.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AppDelegate.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\HelloWorldScene.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\HelloWorldScene.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Res"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Res\cocosTemplate_Res.ENU.tr3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocosTemplate_Res.ENU.tr3.tts"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocosTemplate_Res.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocosTemplate_Res.TR3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocosTemplate_Res.TRG"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocostemplate_res_c.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocostemplate_res_def.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Res\cocostemplate_res_h.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Makefiles"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\cocosTemplate.TMK3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocosTemplate_Arm.TMK3"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Makefile"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Makefile.ARM"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Framework"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\NewDeleteOp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TG3AppDllEntry.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TG3AppDllEntry.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\cocosTemplateUnicodeScript.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="..\..\PRJ_TG3\Common\StrConv\TzdStrConv_V1.exe $(InputPath) $(InputDir)$(InputName)_str.h
"
|
||||
AdditionalDependencies="..\..\PRJ_TG3\Common\StrConv\TzdStrConv_V1.exe"
|
||||
Outputs="$(InputDir)$(InputName)_str.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cocosTemplateUnicodeScript_str.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,10 @@
|
|||
// Unicode string resource scrip file,DOT NOT include it.
|
||||
|
||||
// Original file name: cocosTemplateUnicodeScript.h
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-09-27
|
||||
|
||||
|
||||
|
||||
#define TZD_CONV(x, y)
|
||||
TZD_CONV(AppName_cocosTemplate, "cocosTemplate")
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef __COCOSTEMPLATEUNICODESCRIPT_STR_H__
|
||||
#define __COCOSTEMPLATEUNICODESCRIPT_STR_H__
|
||||
|
||||
|
||||
#define AppName_cocosTemplate__N \
|
||||
"c\x00o\x00\x63\x00o\x00s\x00T\x00\x65\x00m\x00p\x00l\x00\x61\x00t\x00\x65\x00"
|
||||
#define AppName_cocosTemplate__C \
|
||||
AppName_cocosTemplate__N"\x00\x00"
|
||||
#define AppName_cocosTemplate \
|
||||
((const unsigned short *)(AppName_cocosTemplate__C))
|
||||
#define AppName_cocosTemplate__N16 \
|
||||
0x0063,0x006f,0x0063,0x006f,0x0073,0x0054,0x0065,0x006d,0x0070,0x006c,0x0061,0x0074,0x0065
|
||||
#define AppName_cocosTemplate_16 \
|
||||
{AppName_cocosTemplate__N16,0x0000}
|
||||
// ÔĘź´ŽĐĹϢŁş
|
||||
// cocosTemplate
|
||||
|
||||
|
||||
#endif //__COCOSTEMPLATEUNICODESCRIPT_STR_H__
|
|
@ -0,0 +1,53 @@
|
|||
;
|
||||
; TG3 Makefile Auto Create Script
|
||||
;
|
||||
; 说明:
|
||||
; 1.在等号左边不要有空格
|
||||
; 2.所有的路径请使用"/"来分隔
|
||||
; 3.所有的文件名不可以有空格
|
||||
; 4.只能对当前目录及其子目录下的.c、.cpp生成Makefile
|
||||
;
|
||||
|
||||
;本TMK3文件目录位置到项目根目录之间的转换,不支持多个串,如果有多个,以最后一个为准
|
||||
;即 ./$(TO_PROJECT_ROOT)/ 就是项目的根目录
|
||||
TO_PROJECT_ROOT=../../PRJ_TG3
|
||||
|
||||
;输出目标的名字,不支持多个串,如果有多个,以最后一个为准
|
||||
OUTPUT_FILENAME=libcocosTemplate.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=-D_MY_MARCO_ ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可
|
||||
;DEFINES=-D__TG3_PURE_DLL__ ;生成的是纯动态库(意思是:不是TOPS应用,但可以是TCOM组件)
|
||||
;DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件)
|
||||
|
||||
;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDE_PATH= ;应用额外的包含路径。注意:ITOPS自己的所有路径都会自动包含,故此这里仅仅包含应用自己特有的路径即可
|
||||
|
||||
;连接的库文件,可以使用多个LIBS串,也可以使用LIBS1、LIBS2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
;LIBS=-lMyLib ;应用额外的连接库。注意:ITOPS自己的所需库自动包含,而且库包含路径也已经包含,故此这里仅仅包含应用自己特有的库的名字即可
|
||||
|
||||
;强制包含文件的名字,不能使用通配符,一定要使用相对或者绝对路径
|
||||
;极力要求使用相对路径,多个文件之间使用“|”分隔
|
||||
;强制包含文件指的是不在本文件夹及其子文件夹下的.c、.cpp、.o文件
|
||||
;可以使用多个INCLUDEFILE串,也可以使用INCLUDEFILE1、INCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
INCLUDEFILE=
|
||||
|
||||
;强制排除文件,不能使用通配符,一定要使用相对路径
|
||||
;多个文件之间使用“|”分隔,路径必须以"./","../"开始
|
||||
;只能对.c、.cpp文件进行排除
|
||||
;如果要排除本目录的文件也要加入"./"
|
||||
;可以使用多个EXCLUDEFILE串,也可以使用EXCLUDEFILE1、EXCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列
|
||||
EXCLUDEFILE=
|
|
@ -0,0 +1,32 @@
|
|||
// Application main file.
|
||||
|
||||
// Original file name: cocosTemplateEntry.cpp
|
||||
// Generated by TOPS Builder:Project wizard,Date:2010-09-27
|
||||
|
||||
#include "TG3.h"
|
||||
#include "AppDelegate.h"
|
||||
#include "cocostemplate_res_c.h"
|
||||
|
||||
const ResourceRegisterEntry ResRegList_cocosTemplate[] =
|
||||
{
|
||||
TG_RESOURCE_DEFINE
|
||||
};
|
||||
|
||||
const AppResourceEntry cocosTemplateResourceEntry =
|
||||
{
|
||||
(ResourceRegisterEntry*)ResRegList_cocosTemplate, // res list in this app
|
||||
sizeof(ResRegList_cocosTemplate) / sizeof(ResourceRegisterEntry), //number of item in res
|
||||
};
|
||||
|
||||
|
||||
|
||||
Int32 TG3AppMain(const TUChar * pAppID, UInt32 nCmd, void * pCmdParam)
|
||||
{
|
||||
AppDelegate app;
|
||||
// app.WM_SetResourceEntry(&cocosTemplateResourceEntry);
|
||||
app.Run();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue