res->Resources src->Classes for cpp template

This commit is contained in:
minggo 2014-09-13 17:50:02 +08:00
parent 2b3bdbf56d
commit a9232a14ea
12 changed files with 76 additions and 60 deletions

View File

@ -39,16 +39,16 @@ endif()
if( UNIX ) #assume linux
set(GAME_SRC
proj.linux/main.cpp
src/AppDelegate.cpp
src/HelloWorldScene.cpp
Classes/AppDelegate.cpp
Classes/HelloWorldScene.cpp
)
elseif ( WIN32 )
set(GAME_SRC
proj.win32/main.cpp
proj.win32/main.h
proj.win32/resource.h
src/AppDelegate.cpp
src/HelloWorldScene.cpp
Classes/AppDelegate.cpp
Classes/HelloWorldScene.cpp
)
endif()
@ -163,14 +163,14 @@ if ( WIN32 )
#also copying dlls to binary directory for the executable to run
pre_build(${APP_NAME}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/res ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/gles/prebuilt/glew32.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/zlib/prebuilt/zlib1.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
)
else()
pre_build(${APP_NAME}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/res ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
)
endif()

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -114,7 +114,7 @@ def copy_resources(app_android_root):
# copy resources
os.mkdir(assets_dir)
resources_dir = os.path.join(app_android_root, "../res")
resources_dir = os.path.join(app_android_root, "../Resources")
if os.path.isdir(resources_dir):
copy_files(resources_dir, assets_dir)

View File

@ -11,10 +11,10 @@ LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../src/AppDelegate.cpp \
../../src/HelloWorldScene.cpp
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../src
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
LOCAL_STATIC_LIBRARIES := cocos2dx_static

View File

@ -7,21 +7,23 @@
objects = {
/* Begin PBXBuildFile section */
15A6DA93199CFB1100B56DBF /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */; };
15A6DA94199CFB1100B56DBF /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */; };
15A6DA95199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */; };
15A6DA96199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */; };
15A6DA9B199CFB9800B56DBF /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA98199CFB9800B56DBF /* CloseNormal.png */; };
15A6DA9C199CFB9800B56DBF /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA98199CFB9800B56DBF /* CloseNormal.png */; };
15A6DA9D199CFB9800B56DBF /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA99199CFB9800B56DBF /* CloseSelected.png */; };
15A6DA9E199CFB9800B56DBF /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA99199CFB9800B56DBF /* CloseSelected.png */; };
15A6DA9F199CFB9800B56DBF /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA9A199CFB9800B56DBF /* HelloWorld.png */; };
15A6DAA0199CFB9800B56DBF /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A6DA9A199CFB9800B56DBF /* HelloWorld.png */; };
1AC6FB21180E996B004C840B /* libcocos2d Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FAF9180E9839004C840B /* libcocos2d Mac.a */; };
1AC6FB30180E99EB004C840B /* libcocos2d iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB07180E9839004C840B /* libcocos2d iOS.a */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; };
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; };
46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
46880B8119C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8419C43A87006E1F66 /* AppDelegate.cpp */; };
46880B8919C43A87006E1F66 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8419C43A87006E1F66 /* AppDelegate.cpp */; };
46880B8A19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */; };
46880B8B19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */; };
503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 503AE0F617EB97AB00D1A890 /* Icon.icns */; };
503AE10017EB989F00D1A890 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FB17EB989F00D1A890 /* AppController.mm */; };
503AE10117EB989F00D1A890 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 503AE0FC17EB989F00D1A890 /* main.m */; };
@ -95,19 +97,20 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../src/AppDelegate.cpp; sourceTree = "<group>"; };
15A6DA90199CFB1100B56DBF /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../src/AppDelegate.h; sourceTree = "<group>"; };
15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HelloWorldScene.cpp; path = ../src/HelloWorldScene.cpp; sourceTree = "<group>"; };
15A6DA92199CFB1100B56DBF /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelloWorldScene.h; path = ../src/HelloWorldScene.h; sourceTree = "<group>"; };
15A6DA98199CFB9800B56DBF /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CloseNormal.png; path = ../res/CloseNormal.png; sourceTree = "<group>"; };
15A6DA99199CFB9800B56DBF /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = CloseSelected.png; path = ../res/CloseSelected.png; sourceTree = "<group>"; };
15A6DA9A199CFB9800B56DBF /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HelloWorld.png; path = ../res/HelloWorld.png; sourceTree = "<group>"; };
1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = "<group>"; };
1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* HelloCpp iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloCpp iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
46880B7619C43A67006E1F66 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = "<group>"; };
46880B7719C43A67006E1F66 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = "<group>"; };
46880B7919C43A67006E1F66 /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = "<group>"; };
46880B7A19C43A67006E1F66 /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HelloWorld.png; sourceTree = "<group>"; };
46880B8419C43A87006E1F66 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
46880B8519C43A87006E1F66 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HelloWorldScene.cpp; sourceTree = "<group>"; };
46880B8719C43A87006E1F66 /* HelloWorldScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelloWorldScene.h; sourceTree = "<group>"; };
503AE0F617EB97AB00D1A890 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = "<group>"; };
503AE0F717EB97AB00D1A890 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
503AE0FA17EB989F00D1A890 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = SOURCE_ROOT; };
@ -205,27 +208,6 @@
path = Classes;
sourceTree = "<group>";
};
15A6DA8E199CFB0100B56DBF /* src */ = {
isa = PBXGroup;
children = (
15A6DA8F199CFB1100B56DBF /* AppDelegate.cpp */,
15A6DA90199CFB1100B56DBF /* AppDelegate.h */,
15A6DA91199CFB1100B56DBF /* HelloWorldScene.cpp */,
15A6DA92199CFB1100B56DBF /* HelloWorldScene.h */,
);
name = src;
sourceTree = "<group>";
};
15A6DA97199CFB8700B56DBF /* res */ = {
isa = PBXGroup;
children = (
15A6DA98199CFB9800B56DBF /* CloseNormal.png */,
15A6DA99199CFB9800B56DBF /* CloseSelected.png */,
15A6DA9A199CFB9800B56DBF /* HelloWorld.png */,
);
name = res;
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
@ -247,13 +229,13 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
46880B8319C43A87006E1F66 /* Classes */,
46880B7519C43A67006E1F66 /* Resources */,
1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */,
15A6DA8E199CFB0100B56DBF /* src */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
080E96DDFE201D6D7F000001 /* ios */,
503AE10617EB990700D1A890 /* mac */,
19C28FACFE9D520D11CA2CBB /* Products */,
15A6DA97199CFB8700B56DBF /* res */,
);
name = CustomTemplate;
sourceTree = "<group>";
@ -280,6 +262,38 @@
name = Frameworks;
sourceTree = "<group>";
};
46880B7519C43A67006E1F66 /* Resources */ = {
isa = PBXGroup;
children = (
46880B7619C43A67006E1F66 /* CloseNormal.png */,
46880B7719C43A67006E1F66 /* CloseSelected.png */,
46880B7819C43A67006E1F66 /* fonts */,
46880B7A19C43A67006E1F66 /* HelloWorld.png */,
);
name = Resources;
path = ../Resources;
sourceTree = "<group>";
};
46880B7819C43A67006E1F66 /* fonts */ = {
isa = PBXGroup;
children = (
46880B7919C43A67006E1F66 /* Marker Felt.ttf */,
);
path = fonts;
sourceTree = "<group>";
};
46880B8319C43A87006E1F66 /* Classes */ = {
isa = PBXGroup;
children = (
46880B8419C43A87006E1F66 /* AppDelegate.cpp */,
46880B8519C43A87006E1F66 /* AppDelegate.h */,
46880B8619C43A87006E1F66 /* HelloWorldScene.cpp */,
46880B8719C43A87006E1F66 /* HelloWorldScene.h */,
);
name = Classes;
path = ../Classes;
sourceTree = "<group>";
};
503AE0F517EB97AB00D1A890 /* Icons */ = {
isa = PBXGroup;
children = (
@ -426,23 +440,24 @@
buildActionMask = 2147483647;
files = (
5087E78117EB970100C73F5D /* Icon-120.png in Resources */,
15A6DA9F199CFB9800B56DBF /* HelloWorld.png in Resources */,
5087E78617EB970100C73F5D /* Icon-76.png in Resources */,
5087E77F17EB970100C73F5D /* Default@2x.png in Resources */,
50EF629917ECD46A001EB2F8 /* Icon-100.png in Resources */,
5087E78317EB970100C73F5D /* Icon-152.png in Resources */,
15A6DA9D199CFB9800B56DBF /* CloseSelected.png in Resources */,
46880B8119C43A67006E1F66 /* HelloWorld.png in Resources */,
46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */,
5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */,
5087E78517EB970100C73F5D /* Icon-72.png in Resources */,
50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */,
5087E78017EB970100C73F5D /* Icon-114.png in Resources */,
46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */,
50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */,
50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */,
5087E78217EB970100C73F5D /* Icon-144.png in Resources */,
50EF629817ECD46A001EB2F8 /* Icon-80.png in Resources */,
5087E78417EB970100C73F5D /* Icon-57.png in Resources */,
5087E77E17EB970100C73F5D /* Default.png in Resources */,
15A6DA9B199CFB9800B56DBF /* CloseNormal.png in Resources */,
46880B7B19C43A67006E1F66 /* CloseNormal.png in Resources */,
50EF629717ECD46A001EB2F8 /* Icon-58.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -451,10 +466,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */,
46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */,
503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */,
15A6DAA0199CFB9800B56DBF /* HelloWorld.png in Resources */,
15A6DA9C199CFB9800B56DBF /* CloseNormal.png in Resources */,
15A6DA9E199CFB9800B56DBF /* CloseSelected.png in Resources */,
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */,
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -465,8 +481,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15A6DA93199CFB1100B56DBF /* AppDelegate.cpp in Sources */,
15A6DA95199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */,
46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */,
46880B8A19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */,
503AE10017EB989F00D1A890 /* AppController.mm in Sources */,
503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */,
503AE10117EB989F00D1A890 /* main.m in Sources */,
@ -477,9 +493,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15A6DA94199CFB1100B56DBF /* AppDelegate.cpp in Sources */,
46880B8919C43A87006E1F66 /* AppDelegate.cpp in Sources */,
503AE10517EB98FF00D1A890 /* main.cpp in Sources */,
15A6DA96199CFB1100B56DBF /* HelloWorldScene.cpp in Sources */,
46880B8B19C43A87006E1F66 /* HelloWorldScene.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};