diff --git a/Box2D/proj.uphone/Makefile.ARM b/Box2D/proj.uphone/Makefile.ARM index 15252fa995..30756f5a1a 100644 --- a/Box2D/proj.uphone/Makefile.ARM +++ b/Box2D/proj.uphone/Makefile.ARM @@ -7,7 +7,7 @@ ############################################################################# TO_PROJECT_ROOT = ../../../PRJ_TG3 -OUTPUT_FILENAME = libbox2d.a +OUTPUT_FILENAME = libBox2DStatic.a include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_StaticLib.ARM include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM diff --git a/CocosDenshion/proj.uphone/Makefile.ARM b/CocosDenshion/proj.uphone/Makefile.ARM index a8bf73e975..aa7d7bf660 100644 --- a/CocosDenshion/proj.uphone/Makefile.ARM +++ b/CocosDenshion/proj.uphone/Makefile.ARM @@ -7,7 +7,7 @@ ############################################################################# TO_PROJECT_ROOT = ../../../PRJ_TG3 -OUTPUT_FILENAME = libCocosDenshion.a +OUTPUT_FILENAME = libCocosDenshionStatic.a include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_StaticLib.ARM include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM diff --git a/HelloWorld.uphone/Makefile.ARM b/HelloWorld.uphone/Makefile.ARM index 0d1042a1b4..53b9d94850 100644 --- a/HelloWorld.uphone/Makefile.ARM +++ b/HelloWorld.uphone/Makefile.ARM @@ -16,7 +16,7 @@ DEFINES += -DCCX_UNDER_UPHONE INCLUDE_PATH += -I. -I./Res \ -I../cocos2dx \ -I../cocos2dx/include -LIBS += -lcocos2d +LIBS += -lCocos2dStatic OBJECTS_DIR = ./Debug-ARM DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR) diff --git a/TestAudioEngine.uphone/Makefile.ARM b/TestAudioEngine.uphone/Makefile.ARM index 8d916e3fca..9edc246778 100644 --- a/TestAudioEngine.uphone/Makefile.ARM +++ b/TestAudioEngine.uphone/Makefile.ARM @@ -15,7 +15,7 @@ include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM DEFINES += -DUNDER_UPHONE INCLUDE_PATH += -I. -I./Res \ -I../CocosDenshion/include -LIBS += -lCocosDenshion -lTSoundPlayer +LIBS += -lCocosDenshionStatic -lTSoundPlayer OBJECTS_DIR = ./Debug-ARM DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR) diff --git a/chipmunk/proj.uphone/Makefile.ARM b/chipmunk/proj.uphone/Makefile.ARM index 6bcf70e23b..45ac9a3c7f 100644 --- a/chipmunk/proj.uphone/Makefile.ARM +++ b/chipmunk/proj.uphone/Makefile.ARM @@ -7,7 +7,7 @@ ############################################################################# TO_PROJECT_ROOT = ../../../PRJ_TG3 -OUTPUT_FILENAME = libchipmunk.a +OUTPUT_FILENAME = libChipmunkStatic.a include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_StaticLib.ARM include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM diff --git a/cocos2d-win32.sln b/cocos2d-win32.sln index 061c75de45..81fa2d4644 100644 --- a/cocos2d-win32.sln +++ b/cocos2d-win32.sln @@ -26,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld.wi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj.win32\cocos2d-win32.vcproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWin32Wizard.win32", "TestWin32Wizard\TestWin32Wizard.win32.vcproj", "{2CADAE24-E793-480C-883F-6D90244B1ABD}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -62,10 +60,6 @@ Global {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 - {2CADAE24-E793-480C-883F-6D90244B1ABD}.Debug|Win32.ActiveCfg = Debug|Win32 - {2CADAE24-E793-480C-883F-6D90244B1ABD}.Debug|Win32.Build.0 = Debug|Win32 - {2CADAE24-E793-480C-883F-6D90244B1ABD}.Release|Win32.ActiveCfg = Release|Win32 - {2CADAE24-E793-480C-883F-6D90244B1ABD}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/cocos2dx/include/ccMacros.h b/cocos2dx/include/ccMacros.h index d95b5f12db..3fa1322530 100644 --- a/cocos2dx/include/ccMacros.h +++ b/cocos2dx/include/ccMacros.h @@ -58,15 +58,15 @@ THE SOFTWARE. #elif COCOS2D_DEBUG == 1 #include "ccxCommon.h" -#define CCLOG(format, ...) cocos2d::CCXLog(format, __VA_ARGS__) -#define CCLOGERROR(format,...) cocos2d::CCXLog(format, __VA_ARGS__) +#define CCLOG(format, ...) cocos2d::CCXLog(format, ##__VA_ARGS__) +#define CCLOGERROR(format,...) cocos2d::CCXLog(format, ##__VA_ARGS__) #define CCLOGINFO(format,...) do {} while (0) #elif COCOS2D_DEBUG > 1 #include "ccxCommon.h" -#define CCLOG(format, ...) cocos2d::CCXLog(format, __VA_ARGS__) -#define CCLOGERROR(format,...) cocos2d::CCXLog(format, __VA_ARGS__) -#define CCLOGINFO(format,...) cocos2d::CCXLog(format, __VA_ARGS__) +#define CCLOG(format, ...) cocos2d::CCXLog(format, ##__VA_ARGS__) +#define CCLOGERROR(format,...) cocos2d::CCXLog(format, ##__VA_ARGS__) +#define CCLOGINFO(format,...) cocos2d::CCXLog(format, ##__VA_ARGS__) #endif // COCOS2D_DEBUG /** @def CC_SWAP diff --git a/cocos2dx/platform/config_platform.h b/cocos2dx/platform/config_platform.h index fdb2d67e13..fe2e2498bf 100644 --- a/cocos2dx/platform/config_platform.h +++ b/cocos2dx/platform/config_platform.h @@ -37,8 +37,10 @@ THE SOFTWARE. // use these macros to set compiling environment if needed -// #define CCX_PLATFORM_UPHONE -// #define CCX_PLATFORM_WIN32 +// #define CCX_UNDER_UPHONE +// #define CCX_UNDER_WIN32 +// #define CCX_UNDER_ANDROID +// #define CCX_UNDER_IPHONE // post configure diff --git a/cocos2dx/platform/uphone/CCXCommon_uphone.cpp b/cocos2dx/platform/uphone/CCXCommon_uphone.cpp new file mode 100644 index 0000000000..6ec52ea9fa --- /dev/null +++ b/cocos2dx/platform/uphone/CCXCommon_uphone.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +Copyright (c) 2010 cocos2d-x.org + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#include "ccxCommon_uphone.h" + +#include "TG3.h" + +#define MAX_LEN 256 +#define LOG_FILE_PATH "/NEWPLUS/TDA_DATA/UserData/Cocos2dLog.txt" + +namespace cocos2d { + +void CCXLog(const char * pszFormat, ...) +{ + SS_printf("Cocos2d: "); + char szBuf[MAX_LEN]; + + va_list ap; + va_start(ap, pszFormat); +#ifdef _TRANZDA_VM_ + vsprintf_s(szBuf, MAX_LEN, pszFormat, ap); +#else + vsnprintf(szBuf, MAX_LEN, pszFormat, ap); +#endif + va_end(ap); + + SS_printf("%s", szBuf); +#ifdef _TRANZDA_VM_ + SS_printf("\n"); +#else + SS_printf("\r\n"); + FILE * pf = fopen(LOG_FILE_PATH, "a+"); + if (! pf) + { + return; + } + + fwrite(szBuf, 1, strlen(szBuf), pf); + fwrite("\r\n", 1, strlen("\r\n"), pf); + fflush(pf); + fclose(pf); +#endif +} + +}//namespace cocos2d diff --git a/cocos2dx/platform/uphone/ccxCommon_uphone.h b/cocos2dx/platform/uphone/ccxCommon_uphone.h index 31b9d3034b..f3cc0eaf22 100644 --- a/cocos2dx/platform/uphone/ccxCommon_uphone.h +++ b/cocos2dx/platform/uphone/ccxCommon_uphone.h @@ -43,4 +43,13 @@ THE SOFTWARE. #endif #endif +namespace cocos2d{ + + /** + @brief Output Debug message to Application console. + */ + void CCX_DLL CCXLog(const char * pszFormat, ...); + +}//namespace cocos2d + #endif // end of __CCX_COMMON_UPHONE__ diff --git a/cocos2dx/platform/win32/CCXCommon_win32.cpp b/cocos2dx/platform/win32/CCXCommon_win32.cpp index 5bec01b83b..f586a9cd3d 100644 --- a/cocos2dx/platform/win32/CCXCommon_win32.cpp +++ b/cocos2dx/platform/win32/CCXCommon_win32.cpp @@ -41,6 +41,7 @@ void CCXLog(const char * pszFormat, ...) vsprintf_s(szBuf, MAX_LEN, pszFormat, ap); va_end(ap); OutputDebugStringA(szBuf); + OutputDebugStringA("\n"); } }//namespace cocos2d diff --git a/cocos2dx/proj.uphone/Makefile-dynamic.ARM b/cocos2dx/proj.uphone/Makefile-dynamic.ARM index 86218263a6..e749c1dc1a 100644 --- a/cocos2dx/proj.uphone/Makefile-dynamic.ARM +++ b/cocos2dx/proj.uphone/Makefile-dynamic.ARM @@ -80,6 +80,7 @@ OBJECTS = \ $(OBJECTS_DIR)/CCTime.o \ $(OBJECTS_DIR)/CCXApplication_uphone.o \ $(OBJECTS_DIR)/CCXBitmapDC.o \ + $(OBJECTS_DIR)/CCXCommon_uphone.o \ $(OBJECTS_DIR)/CCXEGLView_uphone.o \ $(OBJECTS_DIR)/CCXFileUtils_uphone.o \ $(OBJECTS_DIR)/CCXUIAccelerometer_uphone.o \ @@ -272,6 +273,9 @@ $(OBJECTS_DIR)/CCXApplication_uphone.o : ../platform/uphone/CCXApplication_uphon $(OBJECTS_DIR)/CCXBitmapDC.o : ../platform/uphone/CCXBitmapDC.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXBitmapDC.o ../platform/uphone/CCXBitmapDC.cpp +$(OBJECTS_DIR)/CCXCommon_uphone.o : ../platform/uphone/CCXCommon_uphone.cpp + $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXCommon_uphone.o ../platform/uphone/CCXCommon_uphone.cpp + $(OBJECTS_DIR)/CCXEGLView_uphone.o : ../platform/uphone/CCXEGLView_uphone.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXEGLView_uphone.o ../platform/uphone/CCXEGLView_uphone.cpp diff --git a/cocos2dx/proj.uphone/Makefile.ARM b/cocos2dx/proj.uphone/Makefile.ARM index 180da05e36..e989cdbdaa 100644 --- a/cocos2dx/proj.uphone/Makefile.ARM +++ b/cocos2dx/proj.uphone/Makefile.ARM @@ -7,7 +7,7 @@ ############################################################################# TO_PROJECT_ROOT = ../../../PRJ_TG3 -OUTPUT_FILENAME = libcocos2d.a +OUTPUT_FILENAME = libCocos2dStatic.a include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_Base_StaticLib.ARM include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM @@ -79,6 +79,7 @@ OBJECTS = \ $(OBJECTS_DIR)/CCTime.o \ $(OBJECTS_DIR)/CCXApplication_uphone.o \ $(OBJECTS_DIR)/CCXBitmapDC.o \ + $(OBJECTS_DIR)/CCXCommon_uphone.o \ $(OBJECTS_DIR)/CCXEGLView_uphone.o \ $(OBJECTS_DIR)/CCXFileUtils_uphone.o \ $(OBJECTS_DIR)/CCXUIAccelerometer_uphone.o \ @@ -271,6 +272,9 @@ $(OBJECTS_DIR)/CCXApplication_uphone.o : ../platform/uphone/CCXApplication_uphon $(OBJECTS_DIR)/CCXBitmapDC.o : ../platform/uphone/CCXBitmapDC.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXBitmapDC.o ../platform/uphone/CCXBitmapDC.cpp +$(OBJECTS_DIR)/CCXCommon_uphone.o : ../platform/uphone/CCXCommon_uphone.cpp + $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXCommon_uphone.o ../platform/uphone/CCXCommon_uphone.cpp + $(OBJECTS_DIR)/CCXEGLView_uphone.o : ../platform/uphone/CCXEGLView_uphone.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCXEGLView_uphone.o ../platform/uphone/CCXEGLView_uphone.cpp diff --git a/cocos2dx/proj.uphone/cocos2d-uphone.vcproj b/cocos2dx/proj.uphone/cocos2d-uphone.vcproj index 59ab1305b7..b99f70c3f0 100644 --- a/cocos2dx/proj.uphone/cocos2d-uphone.vcproj +++ b/cocos2dx/proj.uphone/cocos2d-uphone.vcproj @@ -907,6 +907,10 @@ RelativePath="..\platform\uphone\CCXBitmapDC.h" > + + diff --git a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Scripts/1033/default.js b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Scripts/1033/default.js index 0e4a388ccb..f3d8ae21c2 100644 --- a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Scripts/1033/default.js +++ b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Scripts/1033/default.js @@ -139,10 +139,10 @@ astrConfigName[1] = "Release"; function AddConfig(proj, strProjectName) { try { proj.Object.Keyword = "uPhoneProj"; + var strPrjTG3Dir = '../../PRJ_TG3'; wizard.AddSymbol('PROJECT_PRJ_TG3_DIR', strPrjTG3Dir, false); // header files and libraries directories - var strPrjTG3Dir = '../../PRJ_TG3'; var strOutputDir = '../../PRJ_TG3/LIB/Win32Lib'; var strCurIncludeDir = '..\\..\\PRJ_TG3\\Include;..\\..\\PRJ_TG3\\Include\\MTAPI;..\\..\\PRJ_TG3\\Include\\ThirdParty;..\\..\\PRJ_TG3\\Include\\TCOM;..\\..\\PRJ_TG3\\Include\\OpenGL'; strCurIncludeDir += ';.;.\\Classes;.\\uphone;.\\uphone\\Res;..\\cocos2dx;..\\cocos2dx\\include'; @@ -159,7 +159,7 @@ function AddConfig(proj, strProjectName) { } if (wizard.FindSymbol('CCX_USE_CHIPMUNK')) { strCurIncludeDir += ';..\\chipmunk\\include\\chipmunk'; - strDependLibs += ' libchipmunk.lib'; + strDependLibs += ' chipmunk.lib'; } if (wizard.FindSymbol('CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE')) { strCurIncludeDir += ';..\\CocosDenshion\\Include'; @@ -331,7 +331,14 @@ function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) { var bCopyOnly = false; var strExt = strName.substr(strName.lastIndexOf(".")); - if (strExt == ".jpg" || strExt == ".png" || strExt == ".bmp" || strExt == ".ico" || strExt == ".gif" || strExt == ".rtf" || strExt == ".css") { + if (strExt == ".ARM" + || strExt == ".jpg" + || strExt == ".png" + || strExt == ".bmp" + || strExt == ".ico" + || strExt == ".gif" + || strExt == ".rtf" + || strExt == ".css") { bCopyOnly = true; } wizard.RenderTemplate(strTemplate, strFile, bCopyOnly); diff --git a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/root_Arm.TMK3 b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/root_Arm.TMK3 index efed391970..3d8bb364e6 100644 --- a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/root_Arm.TMK3 +++ b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/root_Arm.TMK3 @@ -1,64 +1,75 @@ -; +; ; TG3 Makefile Auto Create Script ; -; ˵ -; 1.ڵȺ߲Ҫпո -; 2.е·ʹ"/"ָ -; 3.еļпո -; 4.ֻܶԵǰĿ¼Ŀ¼µ.c.cppMakefile +; 说明: +; 1.在等号左边不要有空格 +; 2.所有的路径请使用"/"来分隔 +; 3.所有的文件名不可以有空格 +; 4.只能对当前目录及其子目录下的.c、.cpp生成Makefile -;TMK3ļĿ¼λõĿĿ¼֮תֶ֧жһΪ׼ -; ./$(TO_PROJECT_ROOT)/ ĿĸĿ¼ +;本TMK3文件目录位置到项目根目录之间的转换,不支持多个串,如果有多个,以最后一个为准 +;即 ./$(TO_PROJECT_ROOT)/ 就是项目的根目录 TO_PROJECT_ROOT=[!output PROJECT_PRJ_TG3_DIR] -;Ŀֶ֣֧жһΪ׼ +;输出目标的名字,不支持多个串,如果有多个,以最后一个为准 OUTPUT_FILENAME=lib[!output PROJECT_NAME].so -;TMK3ļļͱļһ𹹳MakeFile -;ԳTMK3ļڵطѾڵ -;ע⣺֧־·ǿʹ$(TO_PROJECT_ROOT)ļ -INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPS׼Ӧã̬ +;包含的其他的TMK3文件,此文件和本文件一起构成MakeFile的内容 +;此项可以出现在TMK3文件内的任意地方,与已经存在的项依次组合 +;注意:此项不支持绝对路径,但是可以使用$(TO_PROJECT_ROOT)构成文件名 +INCLUDE_TMK3=$(TO_PROJECT_ROOT)/MakeInclude/TG3_APP_Arm.TMK3 ;TOPS标准应用,包括动态库等 -;Ԥ崮MakeFileʱֱӷMakeFileǰ -;ʽPRE_DEFINE=STRINGMakeFileʱ"PRE_DEFINE="зעͷַMakeFileǰ -;磺PRE_DEFINE=AAA=BBBAAA=BBBMakeFile -;ʹöPRE_DEFINEҲʹPRE_DEFINE1PRE_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 +;预定义串,生成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 -;CC++Ԥ꣬ʹöDEFINESҲʹDEFINES1DEFINES2ȷʽMakeFileݳ˳(ִС) -DEFINES=-DCCX_UNDER_UPHONE ;ӦõԶꡣע⣺ITOPSԼ趨ԶʴӦԼеĶ弴 -;DEFINES=-D__TG3_PURE_DLL__ ;ɵǴ̬⣨˼ǣTOPSӦãTCOM -;DEFINES=-D__TCOM_SUPPORT__ ;ɵTCOMע⣺TOPSӦҲͬʱTCOM - -[!if APP_TYPE_RADIO_NORMAL] -DEFINES2= +;C、C++预定义宏,可以使用多个DEFINES串,也可以使用DEFINES1、DEFINES2等方式,MakeFile中依据出现顺序(不是数字大小)排列 +DEFINES=-DCCX_UNDER_UPHONE ;这里填入应用的自定义宏。注意:ITOPS自己的所需定义会自动包含,故此这里仅仅包含应用自己特有的定义即可 +;DEFINES=-D__TG3_PURE_DLL__ ;生成的是纯动态库(意思是:不是TOPS应用,但可以是TCOM组件) +[!if CCX_USE_TCOM_SUPPORT] +DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件) [!else] -DEFINES2= -D__TG3_PURE_DLL__ +;DEFINES=-D__TCOM_SUPPORT__ ;生成的是TCOM组件(注意:TOPS应用也可以同时是TCOM组件) [!endif] -[!if CHECKBOX_TCOM] -DEFINES3= -D__TCOM_SUPPORT__ -[!else] -DEFINES3= -[!endif] +;包含路径,可以使用多个INCLUDE_PATH串,也可以使用INCLUDE_PATH1、INCLUDE_PATH2等方式,MakeFile中依据出现顺序(不是数字大小)排列 +INCLUDE_PATH=-I ../../PRJ_TG3/Include/OpenGL -I../cocos2dx -I../cocos2dx/include +INCLUDE_PATH=-I. -I./Classes -I./uphone -I./uphone/Res ;默认本项目的路径 +[! if CCX_USE_BOX2D] +INCLUDE_PATH=-I../ -I../Box2D +[! endif] +[! if CCX_USE_CHIPMUNK] +INCLUDE_PATH=-I../chipmunk/include/chipmunk +[! endif] +[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE] +INCLUDE_PATH=-I../CocosDenshion/include +[! endif] -;·ʹöINCLUDE_PATHҲʹINCLUDE_PATH1INCLUDE_PATH2ȷʽMakeFileݳ˳(ִС) -INCLUDE_PATH=-I../cocos2dx -I../cocos2dx/include ;Ӧöİ·ע⣺ITOPSԼ·ԶʴӦԼе· +;连接的库文件,可以使用多个LIBS串,也可以使用LIBS1、LIBS2等方式,MakeFile中依据出现顺序(不是数字大小)排列 +LIBS=-lCocos2dStatic -lTG3_EGL -lTG3_GLESv1_CM -lTG3_GLESv2 -lz -lxml2 -lpng14 -lImageToolKit -ljpeg ;应用额外的连接库。注意:ITOPS自己的所需库自动包含,而且库包含路径也已经包含,故此这里仅仅包含应用自己特有的库的名字即可 +[! if CCX_USE_BOX2D] +LIBS=-lBox2dStatic +[! endif] +[! if CCX_USE_CHIPMUNK] +LIBS=-lChipmunkStatic +[! endif] +[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE] +LIBS=-lCocosDenshionStatic -lTSoundPlayer +[! endif] -;ӵĿļʹöLIBSҲʹLIBS1LIBS2ȷʽMakeFileݳ˳(ִС) -LIBS=-lcocos2d ;Ӧöӿ⡣ע⣺ITOPSԼԶҿ·ҲѾʴӦԼеĿּ - -;ǿưļ֣ʹͨһҪʹԻ߾· -;Ҫʹ·ļ֮ʹá|ָ -;ǿưļָDzڱļмļµ.c.cpp.oļ -;ʹöINCLUDEFILEҲʹINCLUDEFILE1INCLUDEFILE2ȷʽMakeFileݳ˳(ִС) +;强制包含文件的名字,不能使用通配符,一定要使用相对或者绝对路径 +;极力要求使用相对路径,多个文件之间使用“|”分隔 +;强制包含文件指的是不在本文件夹及其子文件夹下的.c、.cpp、.o文件 +;可以使用多个INCLUDEFILE串,也可以使用INCLUDEFILE1、INCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列 INCLUDEFILE= -;ǿųļʹͨһҪʹ· -;ļ֮ʹá|ָ·"./""../"ʼ -;ֻܶ.c.cppļų -;ҪųĿ¼ļҲҪ"./" -;ʹöEXCLUDEFILEҲʹEXCLUDEFILE1EXCLUDEFILE2ȷʽMakeFileݳ˳(ִС) +;强制排除文件,不能使用通配符,一定要使用相对路径 +;多个文件之间使用“|”分隔,路径必须以"./","../"开始 +;只能对.c、.cpp文件进行排除 +;如果要排除本目录的文件也要加入"./" +;可以使用多个EXCLUDEFILE串,也可以使用EXCLUDEFILE1、EXCLUDEFILE2等方式,MakeFile中依据出现顺序(不是数字大小)排列 EXCLUDEFILE= diff --git a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/uphone/TCOM/root_TcomRegist.cpp b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/uphone/TCOM/root_TcomRegist.cpp index 6fced02c4d..6831e4dfbb 100644 --- a/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/uphone/TCOM/root_TcomRegist.cpp +++ b/template/CCXAppWiz.vs/CCXAppWiz.uphone/Templates/1033/uphone/TCOM/root_TcomRegist.cpp @@ -4,8 +4,11 @@ #include "TG3AppDllEntry.h" // 提供IID的具体定义,在整个项目中只能包含一次 +[! if CCX_USE_COCOS_DENSHION_SIMPLE_AUDIO_ENGINE] +[! else] #include "TCOM_Generic_DataType_IIDs.h" #include "TCOM_Generic_Method_IIDs.h" +[! endif] #include "TCOM_IIDs.h" // 定义类工厂例子代码: diff --git a/template/Makefile.ARM b/template/Makefile.ARM index f3e63416b1..26373c9290 100644 --- a/template/Makefile.ARM +++ b/template/Makefile.ARM @@ -15,7 +15,7 @@ include $(TO_PROJECT_ROOT)/MakeInclude/Makefile_TOPS_Def.ARM DEFINES += -DCCX_UNDER_UPHONE INCLUDE_PATH += -I. -I./Res \ -I../cocos2dx -I../cocos2dx/include -LIBS += -lcocos2d +LIBS += -lCocos2dStatic OBJECTS_DIR = ./Debug-ARM DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR) diff --git a/tests/proj.uphone/Makefile.ARM b/tests/proj.uphone/Makefile.ARM index cbfbed98d2..345804c213 100644 --- a/tests/proj.uphone/Makefile.ARM +++ b/tests/proj.uphone/Makefile.ARM @@ -20,7 +20,7 @@ INCLUDE_PATH += -I../ -I../Res \ -I../../ \ -I../tests -LIBS += -lcocos2d -lchipmunk -lbox2d -lTG3_GLESv1_CM -lTG3_EGL -lz -lxml2 -lpng14 -lImageToolKit -ljpeg +LIBS += -lCocos2dStatic -lChipmunkStatic -lBox2dStatic -lTG3_GLESv1_CM -lTG3_EGL -lz -lxml2 -lpng14 -lImageToolKit -ljpeg OBJECTS_DIR = ./Debug-ARM DESTDIR = $(TO_PROJECT_ROOT)/$(BIN_OUTPUT_DIR) diff --git a/tests/proj.uphone/test_uphone.vcproj.user b/tests/proj.uphone/test.uphone.vcproj.user similarity index 100% rename from tests/proj.uphone/test_uphone.vcproj.user rename to tests/proj.uphone/test.uphone.vcproj.user