From 6cfc5b72dcc2f39fa6e89bda0afb9ceb0e40e035 Mon Sep 17 00:00:00 2001 From: zhangcheng Date: Mon, 21 Jul 2014 17:45:56 +0800 Subject: [PATCH 1/2] 1. CocosStudio adapt to cocos2d-x v3.2. --- build/cocos2d-win32.vc2012.sln | 15 ++--- build/cocos2d_libs.xcodeproj/project.pbxproj | 36 ++++------- .../xcschemes/cocos2dx Mac.xcscheme | 2 +- cocos/2d/CCComponentContainer.cpp | 23 ++++++- cocos/2d/CCComponentContainer.h | 1 + cocos/2d/CCNode.cpp | 5 ++ cocos/2d/CCNode.h | 4 ++ cocos/2d/cocos2d.vcxproj | 8 +-- cocos/audio/include/Export.h | 4 +- cocos/audio/proj.win32/CocosDenshion.vcxproj | 12 ++-- cocos/base/ccConfig.h | 2 +- cocos/base/ccTypes.h | 38 ++++++------ .../proj.win32/libCocosBuilder.vcxproj | 4 +- .../ActionTimeline/CCActionTimeline.cpp | 14 +++-- .../ActionTimeline/CCActionTimeline.h | 5 +- .../ActionTimeline/CCActionTimelineCache.h | 3 +- .../cocostudio/ActionTimeline/CCFrame.h | 27 +++++---- .../cocostudio/ActionTimeline/CCNodeReader.h | 3 +- .../cocostudio/ActionTimeline/CCTimeLine.h | 3 +- .../editor-support/cocostudio/CCActionFrame.h | 7 ++- .../cocostudio/CCActionFrameEasing.h | 3 +- .../cocostudio/CCActionManagerEx.h | 3 +- .../editor-support/cocostudio/CCActionNode.h | 3 +- .../cocostudio/CCActionObject.h | 3 +- cocos/editor-support/cocostudio/CCArmature.h | 3 +- .../cocostudio/CCArmatureAnimation.h | 3 +- .../cocostudio/CCArmatureDataManager.h | 4 +- cocos/editor-support/cocostudio/CCBatchNode.h | 3 +- cocos/editor-support/cocostudio/CCBone.h | 3 +- .../cocostudio/CCColliderDetector.h | 7 ++- .../cocostudio/CCComAttribute.h | 5 +- cocos/editor-support/cocostudio/CCComAudio.h | 6 +- cocos/editor-support/cocostudio/CCComBase.h | 3 +- .../cocostudio/CCComController.h | 3 +- cocos/editor-support/cocostudio/CCComRender.h | 3 +- .../cocostudio/CCDataReaderHelper.h | 3 +- cocos/editor-support/cocostudio/CCDatas.h | 27 +++++---- .../cocostudio/CCDecorativeDisplay.h | 3 +- .../cocostudio/CCDisplayFactory.h | 4 +- .../cocostudio/CCDisplayManager.h | 3 +- .../cocostudio/CCInputDelegate.h | 3 +- .../editor-support/cocostudio/CCProcessBase.h | 3 +- .../editor-support/cocostudio/CCSGUIReader.h | 9 +-- .../cocostudio/CCSSceneReader.h | 4 +- cocos/editor-support/cocostudio/CCSkin.h | 3 +- .../cocostudio/CCSpriteFrameCacheHelper.h | 3 +- .../cocostudio/CCTransformHelp.h | 3 +- cocos/editor-support/cocostudio/CCTween.h | 3 +- cocos/editor-support/cocostudio/CCUtilMath.h | 11 ++-- cocos/editor-support/cocostudio/CocoLoader.h | 11 ++-- cocos/editor-support/cocostudio/CocoStudio.h | 1 + .../cocostudio/CocosStudioExport.h | 28 +++++++++ .../cocostudio/DictionaryHelper.h | 3 +- cocos/editor-support/cocostudio/TriggerBase.h | 3 +- cocos/editor-support/cocostudio/TriggerMng.h | 4 +- cocos/editor-support/cocostudio/TriggerObj.h | 6 +- .../WidgetReader/ButtonReader/ButtonReader.h | 3 +- .../CheckBoxReader/CheckBoxReader.h | 3 +- .../ImageViewReader/ImageViewReader.h | 3 +- .../WidgetReader/LayoutReader/LayoutReader.h | 3 +- .../ListViewReader/ListViewReader.h | 3 +- .../LoadingBarReader/LoadingBarReader.h | 3 +- .../PageViewReader/PageViewReader.h | 3 +- .../ScrollViewReader/ScrollViewReader.h | 3 +- .../WidgetReader/SliderReader/SliderReader.h | 3 +- .../TextAtlasReader/TextAtlasReader.h | 3 +- .../TextBMFontReader/TextBMFontReader.h | 3 +- .../TextFieldReader/TextFieldReader.h | 3 +- .../WidgetReader/TextReader/TextReader.h | 3 +- .../cocostudio/WidgetReader/WidgetReader.h | 4 +- .../WidgetReader/WidgetReaderProtocol.h | 5 +- .../proj.win32/libCocosStudio.vcxproj | 13 ++-- .../proj.win32/libCocosStudio.vcxproj.filters | 1 + .../spine/proj.win32/libSpine.vcxproj | 4 +- cocos/platform/CCImage.cpp | 2 +- cocos/platform/mac/CCDevice.mm | 2 +- cocos/ui/CCProtectedNode.h | 5 +- cocos/ui/CocosGUI.h | 1 + cocos/ui/GUIExport.h | 28 +++++++++ cocos/ui/UIButton.h | 3 +- cocos/ui/UICheckBox.h | 3 +- cocos/ui/UIHBox.h | 3 +- cocos/ui/UIHelper.h | 3 +- cocos/ui/UIImageView.h | 3 +- cocos/ui/UILayout.cpp | 6 ++ cocos/ui/UILayout.h | 12 +++- cocos/ui/UILayoutManager.h | 9 +-- cocos/ui/UILayoutParameter.h | 10 ++-- cocos/ui/UIListView.h | 3 +- cocos/ui/UILoadingBar.h | 3 +- cocos/ui/UIPageView.h | 3 +- cocos/ui/UIRelativeBox.h | 3 +- cocos/ui/UIRichText.h | 11 ++-- cocos/ui/UIScrollView.h | 3 +- cocos/ui/UISlider.h | 3 +- cocos/ui/UIText.h | 3 +- cocos/ui/UITextAtlas.h | 3 +- cocos/ui/UITextBMFont.h | 3 +- cocos/ui/UITextField.h | 5 +- cocos/ui/UIVBox.h | 3 +- cocos/ui/UIWidget.h | 3 +- cocos/ui/proj.win32/libGUI.vcxproj | 13 ++-- cocos/ui/proj.win32/libGUI.vcxproj.filters | 3 + extensions/ExtensionExport.h | 28 +++++++++ extensions/GUI/CCControlExtension/CCControl.h | 7 ++- .../GUI/CCControlExtension/CCControlButton.h | 3 +- .../CCControlColourPicker.h | 3 +- .../CCControlExtension/CCControlHuePicker.h | 3 +- .../CCControlPotentiometer.h | 3 +- .../CCControlSaturationBrightnessPicker.h | 3 +- .../GUI/CCControlExtension/CCControlSlider.h | 3 +- .../GUI/CCControlExtension/CCControlStepper.h | 3 +- .../GUI/CCControlExtension/CCControlSwitch.h | 4 +- .../GUI/CCControlExtension/CCControlUtils.h | 5 +- .../GUI/CCControlExtension/CCInvocation.h | 3 +- .../GUI/CCControlExtension/CCScale9Sprite.h | 4 +- extensions/GUI/CCEditBox/CCEditBox.h | 5 +- extensions/GUI/CCEditBox/CCEditBoxImpl.h | 5 +- extensions/GUI/CCEditBox/CCEditBoxImplMac.h | 2 + extensions/GUI/CCEditBox/CCEditBoxImplWin.h | 3 +- extensions/GUI/CCScrollView/CCScrollView.h | 3 +- extensions/GUI/CCScrollView/CCTableView.h | 7 ++- extensions/GUI/CCScrollView/CCTableViewCell.h | 3 +- extensions/physics-nodes/CCPhysicsDebugNode.h | 3 +- extensions/physics-nodes/CCPhysicsSprite.h | 3 +- extensions/proj.win32/libExtensions.vcxproj | 21 +++++-- .../proj.win32/libExtensions.vcxproj.filters | 1 + .../proj.win32/cpp-empty-test.vcxproj | 10 ++-- .../CustomWidget/CustomImageView.cpp | 2 +- .../CustomWidget/CustomParticleWidget.cpp | 2 +- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 8 +-- .../proj.win32/cpp-tests.vcxproj.filters | 60 +++++++++---------- 132 files changed, 540 insertions(+), 300 deletions(-) create mode 100644 cocos/editor-support/cocostudio/CocosStudioExport.h create mode 100644 cocos/ui/GUIExport.h create mode 100644 extensions/ExtensionExport.h diff --git a/build/cocos2d-win32.vc2012.sln b/build/cocos2d-win32.vc2012.sln index 8c661cfacc..5bc79f08d7 100644 --- a/build/cocos2d-win32.vc2012.sln +++ b/build/cocos2d-win32.vc2012.sln @@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" - ProjectSection(ProjectDependencies) = postProject - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" EndProject @@ -14,8 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}" @@ -37,6 +32,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -63,10 +60,6 @@ Global {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32 {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32 {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 - {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32 @@ -103,6 +96,10 @@ Global {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32 {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32 {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32 + {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32 + {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 + {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 + {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index c70b86024e..05cf2b5dc2 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -631,8 +631,6 @@ 460E47B31808090B000CDD6D /* CCEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */; }; 460E47B41808090B000CDD6D /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; }; 460E47B51808090B000CDD6D /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; }; - 460E47B61808090B000CDD6D /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */; }; - 460E47B71808090B000CDD6D /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */; }; 460E47B81808090B000CDD6D /* CCEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */; }; 460E47BB1808090B000CDD6D /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */; }; 460E47BC1808090B000CDD6D /* CCEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */; }; @@ -643,8 +641,6 @@ 460E47C11808090D000CDD6D /* CCEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */; }; 460E47C21808090D000CDD6D /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; }; 460E47C31808090D000CDD6D /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; }; - 460E47C41808090D000CDD6D /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */; }; - 460E47C51808090D000CDD6D /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */; }; 460E47C61808090D000CDD6D /* CCEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */; }; 460E47C91808090D000CDD6D /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */; }; 460E47CA1808090D000CDD6D /* CCEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */; }; @@ -1957,7 +1953,7 @@ 06CAAABF186AD63B0012A414 /* TriggerMng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerMng.h; sourceTree = ""; }; 06CAAAC0186AD63B0012A414 /* TriggerObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TriggerObj.cpp; sourceTree = ""; }; 06CAAAC1186AD63B0012A414 /* TriggerObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriggerObj.h; sourceTree = ""; }; - 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2dx Mac.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcocos2dx Mac.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1551A342158F2AB200E66CFE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1A01C67618F57BE800EFE3A6 /* CCArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCArray.cpp; sourceTree = ""; }; 1A01C67718F57BE800EFE3A6 /* CCArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCArray.h; sourceTree = ""; }; @@ -2434,8 +2430,6 @@ 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplAndroid.h; sourceTree = ""; }; 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = ""; }; 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = ""; }; - 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplMac.h; sourceTree = ""; }; - 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = CCEditBoxImplMac.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplNone.cpp; sourceTree = ""; }; 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplWin.cpp; sourceTree = ""; }; 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplWin.h; sourceTree = ""; }; @@ -3160,7 +3154,7 @@ 1551A340158F2AB200E66CFE /* Products */ = { isa = PBXGroup; children = ( - 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */, + 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */, A03F2CB81780BD04006731B9 /* libchipmunk Mac.a */, A03F2D9B1780BDF7006731B9 /* libbox2d Mac.a */, A03F2ED617814268006731B9 /* libCocosDenshion Mac.a */, @@ -4383,8 +4377,6 @@ 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */, 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */, 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */, - 46A168561807AF4E005B8026 /* CCEditBoxImplMac.h */, - 46A168571807AF4E005B8026 /* CCEditBoxImplMac.mm */, 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */, 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */, 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */, @@ -5445,7 +5437,6 @@ 460E477E18080902000CDD6D /* CCControl.h in Headers */, 460E47B11808090B000CDD6D /* CCEditBoxImpl.h in Headers */, 460E47B31808090B000CDD6D /* CCEditBoxImplAndroid.h in Headers */, - 460E47B61808090B000CDD6D /* CCEditBoxImplMac.h in Headers */, 460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */, 460E479118080902000CDD6D /* CCControlUtils.h in Headers */, 460E468118080832000CDD6D /* cocos-ext.h in Headers */, @@ -5718,7 +5709,6 @@ 460E47A418080904000CDD6D /* CCControlSlider.h in Headers */, 460E479E18080904000CDD6D /* CCControlHuePicker.h in Headers */, 460E468218080836000CDD6D /* cocos-ext.h in Headers */, - 460E47C41808090D000CDD6D /* CCEditBoxImplMac.h in Headers */, 460E47BF1808090D000CDD6D /* CCEditBoxImpl.h in Headers */, 460E47AE18080904000CDD6D /* CCScale9Sprite.h in Headers */, 460E477C180808F7000CDD6D /* ExtensionMacros.h in Headers */, @@ -6212,7 +6202,7 @@ ); name = "cocos2dx Mac"; productName = cocos2dx; - productReference = 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.dylib */; + productReference = 1551A33F158F2AB200E66CFE /* libcocos2dx Mac.a */; productType = "com.apple.product-type.library.static"; }; A03F2B781780BD04006731B9 /* chipmunk Mac */ = { @@ -6898,7 +6888,6 @@ 460E478E18080902000CDD6D /* CCControlSwitch.cpp in Sources */, 460E479218080902000CDD6D /* CCInvocation.cpp in Sources */, 460E477F18080902000CDD6D /* CCControlButton.cpp in Sources */, - 460E47B71808090B000CDD6D /* CCEditBoxImplMac.mm in Sources */, 460E47AF1808090B000CDD6D /* CCEditBox.cpp in Sources */, 460E479418080902000CDD6D /* CCScale9Sprite.cpp in Sources */, 460E478118080902000CDD6D /* CCControlColourPicker.cpp in Sources */, @@ -7121,7 +7110,6 @@ 460E47D718080914000CDD6D /* CCTableView.cpp in Sources */, 460E479F18080904000CDD6D /* CCControlPotentiometer.cpp in Sources */, 460E479818080904000CDD6D /* CCControlButton.cpp in Sources */, - 460E47C51808090D000CDD6D /* CCEditBoxImplMac.mm in Sources */, 460E479D18080904000CDD6D /* CCControlHuePicker.cpp in Sources */, 460E47A318080904000CDD6D /* CCControlSlider.cpp in Sources */, 460E47AB18080904000CDD6D /* CCInvocation.cpp in Sources */, @@ -7635,7 +7623,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = YES; @@ -7673,7 +7661,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = YES; @@ -7708,8 +7696,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - EXECUTABLE_EXTENSION = dylib; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + EXECUTABLE_EXTENSION = a; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -7731,7 +7719,7 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac"; }; name = Debug; @@ -7740,8 +7728,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - EXECUTABLE_EXTENSION = dylib; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + EXECUTABLE_EXTENSION = a; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch"; @@ -7764,7 +7752,7 @@ "\"$(SRCROOT)/../external/freetype2/prebuilt/mac\"", "\"$(SRCROOT)/../external/websockets/prebuilt/mac\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../external/png/include/mac $(SRCROOT)/../external/tiff/include/mac $(SRCROOT)/../external/webp/include/mac $(SRCROOT)/../external/jpeg/include/mac $(SRCROOT)/../external/freetype2/include/mac $(SRCROOT)/../external/glfw3/include/mac"; }; name = Release; @@ -7870,6 +7858,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = ""; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", CC_TARGET_OS_MAC, @@ -7886,6 +7875,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", diff --git a/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/cocos2dx Mac.xcscheme b/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/cocos2dx Mac.xcscheme index 2e571bd188..4c1792021c 100644 --- a/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/cocos2dx Mac.xcscheme +++ b/build/cocos2d_libs.xcodeproj/xcshareddata/xcschemes/cocos2dx Mac.xcscheme @@ -15,7 +15,7 @@ diff --git a/cocos/2d/CCComponentContainer.cpp b/cocos/2d/CCComponentContainer.cpp index 64b76aa915..a309329011 100644 --- a/cocos/2d/CCComponentContainer.cpp +++ b/cocos/2d/CCComponentContainer.cpp @@ -89,12 +89,33 @@ bool ComponentContainer::remove(const std::string& name) com->setOwner(nullptr); _components->erase(iter); - ret = true; } while(0); return ret; } +bool ComponentContainer::remove(Component *com) +{ + bool ret = false; + do + { + CC_BREAK_IF(!_components); + + for (auto iter = _components->begin(); iter != _components->end(); ++iter) + { + if (iter->second == com) + { + com->onExit(); + com->setOwner(nullptr); + _components->erase(iter); + break; + } + } + ret = true; + } while(0); + return ret; +} + void ComponentContainer::removeAll() { if (_components != nullptr) diff --git a/cocos/2d/CCComponentContainer.h b/cocos/2d/CCComponentContainer.h index e924c35f25..94677c73f0 100644 --- a/cocos/2d/CCComponentContainer.h +++ b/cocos/2d/CCComponentContainer.h @@ -50,6 +50,7 @@ public: virtual Component* get(const std::string& name) const; virtual bool add(Component *com); virtual bool remove(const std::string& name); + virtual bool remove(Component *com); virtual void removeAll(); virtual void visit(float delta); public: diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 2a52bd1a2d..f90c87b8e5 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1850,6 +1850,11 @@ bool Node::removeComponent(const std::string& name) return false; } +bool Node::removeComponent(Component *component) +{ + return _componentContainer->remove(component); +} + void Node::removeAllComponents() { if( _componentContainer ) diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index d4d9982308..8b3354d65f 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1433,6 +1433,10 @@ public: */ virtual bool removeComponent(const std::string& name); + /** + * removes a component by its pointer + */ + virtual bool removeComponent(Component *component); /** * removes all components */ diff --git a/cocos/2d/cocos2d.vcxproj b/cocos/2d/cocos2d.vcxproj index 4725ca3ef4..0ff4dd0daf 100644 --- a/cocos/2d/cocos2d.vcxproj +++ b/cocos/2d/cocos2d.vcxproj @@ -78,7 +78,7 @@ Disabled $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_USRDLL;_DEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -112,7 +112,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou ;%(IgnoreSpecificDefaultLibraries) true Windows - $(TargetDir)$(TargetName).lib + $(OutDir)$(TargetName).lib MachineX86 cocos2d.def libchipmunk.lib;sqlite3.lib;%(AdditionalDependencies) @@ -129,7 +129,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_USRDLL;NDEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) MultiThreadedDLL @@ -165,7 +165,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou Windows true true - $(TargetDir)$(TargetName).lib + $(OutDir)$(TargetName).lib MachineX86 cocos2d.def diff --git a/cocos/audio/include/Export.h b/cocos/audio/include/Export.h index 86ca3b7845..bf6972ec1b 100644 --- a/cocos/audio/include/Export.h +++ b/cocos/audio/include/Export.h @@ -30,11 +30,11 @@ THE SOFTWARE. #define EXPORT_DLL _EXPORT_ #elif defined(_WIN32) #if defined(_EXPORT_DLL_) - #define EXPORT_DLL// __declspec(dllexport) + #define EXPORT_DLL __declspec(dllexport) #elif defined(IGNORE_EXPORT) #define EXPORT_DLL #else /* use a DLL library */ - #define EXPORT_DLL// __declspec(dllimport) + #define EXPORT_DLL __declspec(dllimport) #endif #else #if defined(_SHARED_) diff --git a/cocos/audio/proj.win32/CocosDenshion.vcxproj b/cocos/audio/proj.win32/CocosDenshion.vcxproj index 836fc86ec5..90589fba1b 100644 --- a/cocos/audio/proj.win32/CocosDenshion.vcxproj +++ b/cocos/audio/proj.win32/CocosDenshion.vcxproj @@ -18,7 +18,7 @@ - StaticLibrary + DynamicLibrary NotSet v100 v110 @@ -27,7 +27,7 @@ v120_xp - StaticLibrary + DynamicLibrary NotSet v100 v110 @@ -74,7 +74,7 @@ Disabled $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_EXPORT_DLL_;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -90,7 +90,7 @@ $(OutDir)$(ProjectName).dll true Windows - $(TargetDir)$(TargetName).lib + $(OutDir)$(TargetName).lib MachineX86 $(OutDir) @@ -98,7 +98,7 @@ $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_EXPORT_DLL_;%(PreprocessorDefinitions) MultiThreadedDLL @@ -116,7 +116,7 @@ Windows true true - $(TargetDir)$(TargetName).lib + $(OutDir)$(TargetName).lib MachineX86 $(OutDir) diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index 3e36c6c702..2225998746 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -283,5 +283,5 @@ To enable set it to a value different than 0. Disabled by default. #ifndef CC_CONSTRUCTOR_ACCESS #define CC_CONSTRUCTOR_ACCESS protected #endif - + #endif // __CCCONFIG_H__ diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index f9bf620f47..3a8e990b4e 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -184,7 +184,7 @@ struct CC_DLL Color4F /** A texcoord composed of 2 floats: u, y @since v3.0 */ -struct Tex2F { +struct CC_DLL Tex2F { Tex2F(float _u, float _v): u(_u), v(_v) {} Tex2F(): u(0.f), v(0.f) {} @@ -195,7 +195,7 @@ struct Tex2F { //! Vec2 Sprite component -struct PointSprite +struct CC_DLL PointSprite { Vec2 pos; // 8 bytes Color4B color; // 4 bytes @@ -203,7 +203,7 @@ struct PointSprite }; //! A 2D Quad. 4 * 2 floats -struct Quad2 +struct CC_DLL Quad2 { Vec2 tl; Vec2 tr; @@ -213,7 +213,7 @@ struct Quad2 //! A 3D Quad. 4 * 3 floats -struct Quad3 { +struct CC_DLL Quad3 { Vec3 bl; Vec3 br; Vec3 tl; @@ -232,7 +232,7 @@ struct V2F_C4B_T2F }; //! a Vec2 with a vertex point, a tex coord point and a color 4F -struct V2F_C4F_T2F +struct CC_DLL V2F_C4F_T2F { //! vertices (2F) Vec2 vertices; @@ -243,7 +243,7 @@ struct V2F_C4F_T2F }; //! a Vec2 with a vertex point, a tex coord point and a color 4B -struct V3F_C4B_T2F +struct CC_DLL V3F_C4B_T2F { //! vertices (3F) Vec3 vertices; // 12 bytes @@ -256,7 +256,7 @@ struct V3F_C4B_T2F }; //! a Vec2 with a vertex point, a tex coord point -struct V3F_T2F +struct CC_DLL V3F_T2F { //! vertices (2F) Vec3 vertices; @@ -265,7 +265,7 @@ struct V3F_T2F }; //! A Triangle of V2F_C4B_T2F -struct V2F_C4B_T2F_Triangle +struct CC_DLL V2F_C4B_T2F_Triangle { //! Vec2 A V2F_C4B_T2F a; @@ -276,7 +276,7 @@ struct V2F_C4B_T2F_Triangle }; //! A Quad of V2F_C4B_T2F -struct V2F_C4B_T2F_Quad +struct CC_DLL V2F_C4B_T2F_Quad { //! bottom left V2F_C4B_T2F bl; @@ -289,7 +289,7 @@ struct V2F_C4B_T2F_Quad }; //! 4 Vertex3FTex2FColor4B -struct V3F_C4B_T2F_Quad +struct CC_DLL V3F_C4B_T2F_Quad { //! top left V3F_C4B_T2F tl; @@ -302,7 +302,7 @@ struct V3F_C4B_T2F_Quad }; //! 4 Vertex2FTex2FColor4F Quad -struct V2F_C4F_T2F_Quad +struct CC_DLL V2F_C4F_T2F_Quad { //! bottom left V2F_C4F_T2F bl; @@ -314,7 +314,7 @@ struct V2F_C4F_T2F_Quad V2F_C4F_T2F tr; }; -struct V3F_T2F_Quad +struct CC_DLL V3F_T2F_Quad { //! bottom left V3F_T2F bl; @@ -359,7 +359,7 @@ struct CC_DLL BlendFunc // XXX: If any of these enums are edited and/or reordered, update Texture2D.m //! Vertical text alignment type -enum class TextVAlignment +enum class CC_DLL TextVAlignment { TOP, CENTER, @@ -368,7 +368,7 @@ enum class TextVAlignment // XXX: If any of these enums are edited and/or reordered, update Texture2D.m //! Horizontal text alignment type -enum class TextHAlignment +enum class CC_DLL TextHAlignment { LEFT, CENTER, @@ -378,7 +378,7 @@ enum class TextHAlignment // types for animation in particle systems // texture coordinates for a quad -struct T2F_Quad +struct CC_DLL T2F_Quad { //! bottom left Tex2F bl; @@ -391,7 +391,7 @@ struct T2F_Quad }; // struct that holds the size in pixels, texture coordinates and delays for animated ParticleSystemQuad -struct AnimationFrameData +struct CC_DLL AnimationFrameData { T2F_Quad texCoords; float delay; @@ -404,7 +404,7 @@ struct AnimationFrameData // shadow attributes -struct FontShadow +struct CC_DLL FontShadow { public: @@ -426,7 +426,7 @@ public: }; // stroke attributes -struct FontStroke +struct CC_DLL FontStroke { public: @@ -447,7 +447,7 @@ public: }; // font attributes -struct FontDefinition +struct CC_DLL FontDefinition { public: /** diff --git a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj b/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj index 1c4ac42ad3..ba6db8f16c 100644 --- a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj +++ b/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj @@ -63,7 +63,7 @@ $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) true 4267;4251;4244;%(DisableSpecificWarnings) false @@ -82,7 +82,7 @@ $(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) None false diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp index 4c123c2f30..0eca4088a7 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp @@ -215,13 +215,17 @@ void ActionTimeline::startWithTarget(Node *target) [this, target](Node* child) { ActionTimelineData* data = dynamic_cast(child->getUserObject()); - int actionTag = data->getActionTag(); - if(_timelineMap.find(actionTag) != _timelineMap.end()) + + if(data) { - auto timelines = this->_timelineMap[actionTag]; - for (auto timeline : timelines) + int actionTag = data->getActionTag(); + if(_timelineMap.find(actionTag) != _timelineMap.end()) { - timeline->setNode(child); + auto timelines = this->_timelineMap[actionTag]; + for (auto timeline : timelines) + { + timeline->setNode(child); + } } } }); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h index 211f1d290a..ae8427002b 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h @@ -27,10 +27,11 @@ THE SOFTWARE. #include "CCTimeLine.h" #include "renderer/CCRenderer.h" +#include "cocostudio/CocosStudioExport.h" NS_TIMELINE_BEGIN -class ActionTimelineData : public cocos2d::Ref +class CC_STUDIO_DLL ActionTimelineData : public cocos2d::Ref { public: static ActionTimelineData* create(int actionTag); @@ -45,7 +46,7 @@ protected: }; -class ActionTimeline : public cocos2d::Action +class CC_STUDIO_DLL ActionTimeline : public cocos2d::Action { public: friend class Frame; diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h index 3f9547e822..c2b2ec4fe0 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocos2d.h" #include "cocostudio/DictionaryHelper.h" #include "CCTimelineMacro.h" +#include "cocostudio/CocosStudioExport.h" NS_TIMELINE_BEGIN @@ -35,7 +36,7 @@ class ActionTimeline; class Timeline; class Frame; -class ActionTimelineCache +class CC_STUDIO_DLL ActionTimelineCache { public: /** Gets the singleton */ diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h index c049eebd66..c0e28ec1a7 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h @@ -27,12 +27,13 @@ THE SOFTWARE. #include "cocos2d.h" #include "CCTimelineMacro.h" +#include "cocostudio/CocosStudioExport.h" NS_TIMELINE_BEGIN class Timeline; -class Frame : public cocos2d::Ref +class CC_STUDIO_DLL Frame : public cocos2d::Ref { public: @@ -68,7 +69,7 @@ protected: }; -class VisibleFrame : public Frame +class CC_STUDIO_DLL VisibleFrame : public Frame { public: static VisibleFrame* create(); @@ -86,7 +87,7 @@ protected: }; -class TextureFrame : public Frame +class CC_STUDIO_DLL TextureFrame : public Frame { public: static TextureFrame* create(); @@ -106,7 +107,7 @@ protected: std::string _textureName; }; -class RotationFrame : public Frame +class CC_STUDIO_DLL RotationFrame : public Frame { public: static RotationFrame* create(); @@ -125,7 +126,7 @@ protected: float _betwennRotation; }; -class SkewFrame : public Frame +class CC_STUDIO_DLL SkewFrame : public Frame { public: static SkewFrame* create(); @@ -150,7 +151,7 @@ protected: }; -class RotationSkewFrame : public SkewFrame +class CC_STUDIO_DLL RotationSkewFrame : public SkewFrame { public: static RotationSkewFrame* create(); @@ -163,7 +164,7 @@ public: }; -class PositionFrame : public Frame +class CC_STUDIO_DLL PositionFrame : public Frame { public: static PositionFrame* create(); @@ -189,7 +190,7 @@ protected: }; -class ScaleFrame : public Frame +class CC_STUDIO_DLL ScaleFrame : public Frame { public: static ScaleFrame* create(); @@ -216,7 +217,7 @@ protected: }; -class AnchorPointFrame : public Frame +class CC_STUDIO_DLL AnchorPointFrame : public Frame { public: static AnchorPointFrame* create(); @@ -242,7 +243,7 @@ enum InnerActionType SingleFrame }; -class InnerActionFrame : public Frame +class CC_STUDIO_DLL InnerActionFrame : public Frame { public: static InnerActionFrame* create(); @@ -263,7 +264,7 @@ protected: }; -class ColorFrame : public Frame +class CC_STUDIO_DLL ColorFrame : public Frame { public: static ColorFrame* create(); @@ -290,7 +291,7 @@ protected: }; -class EventFrame : public Frame +class CC_STUDIO_DLL EventFrame : public Frame { public: static EventFrame* create(); @@ -307,7 +308,7 @@ protected: std::string _event; }; -class ZOrderFrame : public Frame +class CC_STUDIO_DLL ZOrderFrame : public Frame { public: static ZOrderFrame* create(); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h b/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h index 669a3123ed..c45b99638c 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __CC_NODE_CACHE_H__ #include "cocostudio/DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" #include "cocos2d.h" namespace cocostudio { @@ -33,7 +34,7 @@ namespace cocostudio { namespace timeline{ -class NodeReader +class CC_STUDIO_DLL NodeReader { public: static NodeReader* getInstance(); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.h b/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.h index d81f44488f..8228baed89 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCTimeLine.h @@ -27,12 +27,13 @@ THE SOFTWARE. #include "CCFrame.h" #include "CCTimelineMacro.h" +#include "cocostudio/CocosStudioExport.h" NS_TIMELINE_BEGIN class ActionTimeline; -class Timeline : public cocos2d::Ref +class CC_STUDIO_DLL Timeline : public cocos2d::Ref { public: static Timeline* create(); diff --git a/cocos/editor-support/cocostudio/CCActionFrame.h b/cocos/editor-support/cocostudio/CCActionFrame.h index 367aeb59ba..f8954b7839 100644 --- a/cocos/editor-support/cocostudio/CCActionFrame.h +++ b/cocos/editor-support/cocostudio/CCActionFrame.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "math/CCGeometry.h" #include "2d/CCActionInterval.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -92,7 +93,7 @@ enum class FrameEaseType * @js NA * @lua NA */ -class ActionFrame: public cocos2d::Ref +class CC_STUDIO_DLL ActionFrame: public cocos2d::Ref { public: @@ -210,7 +211,7 @@ protected: * @js NA * @lua NA */ -class ActionMoveFrame:public ActionFrame +class CC_STUDIO_DLL ActionMoveFrame:public ActionFrame { public: @@ -254,7 +255,7 @@ protected: * @js NA * @lua NA */ -class ActionScaleFrame:public ActionFrame +class CC_STUDIO_DLL ActionScaleFrame:public ActionFrame { public: diff --git a/cocos/editor-support/cocostudio/CCActionFrameEasing.h b/cocos/editor-support/cocostudio/CCActionFrameEasing.h index 122f2dd219..ea67bf0500 100644 --- a/cocos/editor-support/cocostudio/CCActionFrameEasing.h +++ b/cocos/editor-support/cocostudio/CCActionFrameEasing.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __ActionFrameEasing_H__ #include "base/CCRef.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -56,7 +57,7 @@ enum FrameEasingType * @js NA * @lua NA */ -class ActionFrameEasing:public cocos2d::Ref +class CC_STUDIO_DLL ActionFrameEasing:public cocos2d::Ref { protected: FrameEasingType _type; diff --git a/cocos/editor-support/cocostudio/CCActionManagerEx.h b/cocos/editor-support/cocostudio/CCActionManagerEx.h index ebea434825..5b4622c6cd 100644 --- a/cocos/editor-support/cocostudio/CCActionManagerEx.h +++ b/cocos/editor-support/cocostudio/CCActionManagerEx.h @@ -27,13 +27,14 @@ THE SOFTWARE. #include "cocostudio/CCActionObject.h" #include "cocostudio/DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { class CocoLoader; struct stExpCocoNode; -class ActionManagerEx:public cocos2d::Ref +class CC_STUDIO_DLL ActionManagerEx:public cocos2d::Ref { public: diff --git a/cocos/editor-support/cocostudio/CCActionNode.h b/cocos/editor-support/cocostudio/CCActionNode.h index 5b6da79620..f862bed64e 100644 --- a/cocos/editor-support/cocostudio/CCActionNode.h +++ b/cocos/editor-support/cocostudio/CCActionNode.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "cocostudio/CCActionFrame.h" #include "cocostudio/DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -36,7 +37,7 @@ struct stExpCocoNode; * @js NA * @lua NA */ -class ActionNode : public cocos2d::Ref +class CC_STUDIO_DLL ActionNode : public cocos2d::Ref { public: diff --git a/cocos/editor-support/cocostudio/CCActionObject.h b/cocos/editor-support/cocostudio/CCActionObject.h index 401a18431d..045c5a403d 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.h +++ b/cocos/editor-support/cocostudio/CCActionObject.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocostudio/CCActionNode.h" #include "2d/CCActionInstant.h" #include "cocostudio/DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -38,7 +39,7 @@ struct stExpCocoNode; * @js NA * @lua NA */ -class ActionObject : public cocos2d::Ref +class CC_STUDIO_DLL ActionObject : public cocos2d::Ref { public: diff --git a/cocos/editor-support/cocostudio/CCArmature.h b/cocos/editor-support/cocostudio/CCArmature.h index 09cd53da8e..3ce0a58ac7 100644 --- a/cocos/editor-support/cocostudio/CCArmature.h +++ b/cocos/editor-support/cocostudio/CCArmature.h @@ -31,6 +31,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureAnimation.h" #include "cocostudio/CCSpriteFrameCacheHelper.h" #include "cocostudio/CCArmatureDataManager.h" +#include "cocostudio/CocosStudioExport.h" #include "math/CCMath.h" class b2Body; @@ -67,7 +68,7 @@ CC_DEPRECATED_ATTRIBUTE typedef Armature CCArmature; CC_DEPRECATED_ATTRIBUTE typedef ArmatureDataManager CCArmatureDataManager; CC_DEPRECATED_ATTRIBUTE typedef cocos2d::tweenfunc::TweenType CCTweenType; -class Armature : public cocos2d::Node, public cocos2d::BlendProtocol +class CC_STUDIO_DLL Armature : public cocos2d::Node, public cocos2d::BlendProtocol { public: diff --git a/cocos/editor-support/cocostudio/CCArmatureAnimation.h b/cocos/editor-support/cocostudio/CCArmatureAnimation.h index 6514694419..04ab3af4f1 100644 --- a/cocos/editor-support/cocostudio/CCArmatureAnimation.h +++ b/cocos/editor-support/cocostudio/CCArmatureAnimation.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocostudio/CCProcessBase.h" #include "cocostudio/CCTween.h" +#include "cocostudio/CocosStudioExport.h" #include namespace cocostudio { @@ -65,7 +66,7 @@ struct MovementEvent std::string movementID; }; -class ArmatureAnimation : public ProcessBase +class CC_STUDIO_DLL ArmatureAnimation : public ProcessBase { public: /** diff --git a/cocos/editor-support/cocostudio/CCArmatureDataManager.h b/cocos/editor-support/cocostudio/CCArmatureDataManager.h index 0375890180..a42072528f 100644 --- a/cocos/editor-support/cocostudio/CCArmatureDataManager.h +++ b/cocos/editor-support/cocostudio/CCArmatureDataManager.h @@ -27,7 +27,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDatas.h" - +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -42,7 +42,7 @@ struct RelativeData /** * @brief format and manage armature configuration and armature animation */ -class ArmatureDataManager : public cocos2d::Ref +class CC_STUDIO_DLL ArmatureDataManager : public cocos2d::Ref { public: /** @deprecated Use getInstance() instead */ diff --git a/cocos/editor-support/cocostudio/CCBatchNode.h b/cocos/editor-support/cocostudio/CCBatchNode.h index 031a939f00..bb52eba815 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.h +++ b/cocos/editor-support/cocostudio/CCBatchNode.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "cocostudio/CCArmatureDefine.h" +#include "cocostudio/CocosStudioExport.h" namespace cocos2d { class GroupCommand; @@ -34,7 +35,7 @@ namespace cocos2d { namespace cocostudio { -class BatchNode : public cocos2d::Node +class CC_STUDIO_DLL BatchNode : public cocos2d::Node { public: static BatchNode *create(); diff --git a/cocos/editor-support/cocostudio/CCBone.h b/cocos/editor-support/cocostudio/CCBone.h index bda4366fce..ec7661b380 100644 --- a/cocos/editor-support/cocostudio/CCBone.h +++ b/cocos/editor-support/cocostudio/CCBone.h @@ -30,6 +30,7 @@ THE SOFTWARE. #include "cocostudio/CCTween.h" #include "cocostudio/CCDecorativeDisplay.h" #include "cocostudio/CCDisplayManager.h" +#include "cocostudio/CocosStudioExport.h" #include "2d/CCNode.h" #include "math/CCMath.h" @@ -37,7 +38,7 @@ namespace cocostudio { class Armature; -class Bone : public cocos2d::Node +class CC_STUDIO_DLL Bone : public cocos2d::Node { public: /** diff --git a/cocos/editor-support/cocostudio/CCColliderDetector.h b/cocos/editor-support/cocostudio/CCColliderDetector.h index 91ed2dc26a..3ddc289a6e 100644 --- a/cocos/editor-support/cocostudio/CCColliderDetector.h +++ b/cocos/editor-support/cocostudio/CCColliderDetector.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" #ifndef PT_RATIO #define PT_RATIO 32 @@ -48,7 +49,7 @@ class Bone; * @js NA * @lua NA */ -class ColliderFilter +class CC_STUDIO_DLL ColliderFilter { public: virtual ~ColliderFilter() { } @@ -85,7 +86,7 @@ protected: #endif }; -class ColliderBody : public cocos2d::Ref +class CC_STUDIO_DLL ColliderBody : public cocos2d::Ref { public: ColliderBody(ContourData *contourData); @@ -130,7 +131,7 @@ private: * @js NA * @lua NA */ -class ColliderDetector : public cocos2d::Ref +class CC_STUDIO_DLL ColliderDetector : public cocos2d::Ref { public: static ColliderDetector *create(); diff --git a/cocos/editor-support/cocostudio/CCComAttribute.h b/cocos/editor-support/cocostudio/CCComAttribute.h index 5feecf2595..b97a000f73 100644 --- a/cocos/editor-support/cocostudio/CCComAttribute.h +++ b/cocos/editor-support/cocostudio/CCComAttribute.h @@ -28,13 +28,14 @@ THE SOFTWARE. #include "CCComBase.h" #include "2d/CCComponent.h" #include "base/CCValue.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { -class ComAttribute : public cocos2d::Component +class CC_STUDIO_DLL ComAttribute : public cocos2d::Component { DECLARE_CLASS_COMPONENT_INFO -protected: +public: /** * @js ctor */ diff --git a/cocos/editor-support/cocostudio/CCComAudio.h b/cocos/editor-support/cocostudio/CCComAudio.h index 1643082307..d91dbe7bee 100644 --- a/cocos/editor-support/cocostudio/CCComAudio.h +++ b/cocos/editor-support/cocostudio/CCComAudio.h @@ -27,14 +27,16 @@ THE SOFTWARE. #include "CCComBase.h" #include "2d/CCComponent.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { -class ComAudio : public cocos2d::Component +class CC_STUDIO_DLL ComAudio : public cocos2d::Component { DECLARE_CLASS_COMPONENT_INFO -protected: + +public: /** * @js ctor */ diff --git a/cocos/editor-support/cocostudio/CCComBase.h b/cocos/editor-support/cocostudio/CCComBase.h index 6d526b60ce..21750ab22b 100644 --- a/cocos/editor-support/cocostudio/CCComBase.h +++ b/cocos/editor-support/cocostudio/CCComBase.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include #include "DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" #include "base/ObjectFactory.h" #include "CocoLoader.h" @@ -46,7 +47,7 @@ THE SOFTWARE. #define CREATE_CLASS_COMPONENT_INFO(className) \ cocos2d::ObjectFactory::TInfo(#className, &className::createInstance) -struct SerData +struct CC_STUDIO_DLL SerData { const rapidjson::Value *_rData; cocostudio::stExpCocoNode *_cocoNode; diff --git a/cocos/editor-support/cocostudio/CCComController.h b/cocos/editor-support/cocostudio/CCComController.h index 4428d93f89..8a3ad4f32a 100644 --- a/cocos/editor-support/cocostudio/CCComController.h +++ b/cocos/editor-support/cocostudio/CCComController.h @@ -27,11 +27,12 @@ THE SOFTWARE. #include "CCComBase.h" #include "cocostudio/CCInputDelegate.h" +#include "cocostudio/CocosStudioExport.h" #include "2d/CCComponent.h" namespace cocostudio { -class ComController : public cocos2d::Component, public InputDelegate +class CC_STUDIO_DLL ComController : public cocos2d::Component, public InputDelegate { DECLARE_CLASS_COMPONENT_INFO diff --git a/cocos/editor-support/cocostudio/CCComRender.h b/cocos/editor-support/cocostudio/CCComRender.h index 9598ec57ab..0ff90d979c 100644 --- a/cocos/editor-support/cocostudio/CCComRender.h +++ b/cocos/editor-support/cocostudio/CCComRender.h @@ -27,10 +27,11 @@ THE SOFTWARE. #include "CCComBase.h" #include "2d/CCComponent.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { -class ComRender : public cocos2d::Component +class CC_STUDIO_DLL ComRender : public cocos2d::Component { DECLARE_CLASS_COMPONENT_INFO protected: diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.h b/cocos/editor-support/cocostudio/CCDataReaderHelper.h index 2401d710d0..4e8b941f5a 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.h +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.h @@ -29,6 +29,7 @@ THE SOFTWARE. #include "cocostudio/CCDatas.h" #include "cocostudio/CCArmature.h" #include "cocostudio/DictionaryHelper.h" +#include "cocostudio/CocosStudioExport.h" #include "json/document.h" #include "DictionaryHelper.h" @@ -52,7 +53,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class DataReaderHelper : cocos2d::Ref +class CC_STUDIO_DLL DataReaderHelper : cocos2d::Ref { protected: diff --git a/cocos/editor-support/cocostudio/CCDatas.h b/cocos/editor-support/cocostudio/CCDatas.h index 84eb57679d..2eac5f9511 100644 --- a/cocos/editor-support/cocostudio/CCDatas.h +++ b/cocos/editor-support/cocostudio/CCDatas.h @@ -33,6 +33,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "2d/CCTweenFunction.h" +#include "cocostudio/CocosStudioExport.h" #define CC_CREATE_NO_PARAM_NO_INIT(varType)\ @@ -68,7 +69,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class BaseData : public cocos2d::Ref +class CC_STUDIO_DLL BaseData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM_NO_INIT(BaseData) @@ -137,7 +138,7 @@ enum DisplayType * @js NA * @lua NA */ -class DisplayData : public cocos2d::Ref +class CC_STUDIO_DLL DisplayData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM_NO_INIT(DisplayData) @@ -165,7 +166,7 @@ public: * @js NA * @lua NA */ -class SpriteDisplayData : public DisplayData +class CC_STUDIO_DLL SpriteDisplayData : public DisplayData { public: CC_CREATE_NO_PARAM_NO_INIT(SpriteDisplayData) @@ -189,7 +190,7 @@ public: * @js NA * @lua NA */ -class ArmatureDisplayData : public DisplayData +class CC_STUDIO_DLL ArmatureDisplayData : public DisplayData { public: CC_CREATE_NO_PARAM_NO_INIT(ArmatureDisplayData) @@ -209,7 +210,7 @@ public: * @js NA * @lua NA */ -class ParticleDisplayData : public DisplayData +class CC_STUDIO_DLL ParticleDisplayData : public DisplayData { public: CC_CREATE_NO_PARAM_NO_INIT(ParticleDisplayData) @@ -234,7 +235,7 @@ public: * @js NA * @lua NA */ -class BoneData : public BaseData +class CC_STUDIO_DLL BoneData : public BaseData { public: CC_CREATE_NO_PARAM(BoneData) @@ -268,7 +269,7 @@ public: * @js NA * @lua NA */ -class ArmatureData : public cocos2d::Ref +class CC_STUDIO_DLL ArmatureData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM(ArmatureData) @@ -314,7 +315,7 @@ enum BlendType * @js NA * @lua NA */ -class FrameData : public BaseData +class CC_STUDIO_DLL FrameData : public BaseData { public: CC_CREATE_NO_PARAM_NO_INIT(FrameData) @@ -361,7 +362,7 @@ public: * @js NA * @lua NA */ -class MovementBoneData : public cocos2d::Ref +class CC_STUDIO_DLL MovementBoneData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM(MovementBoneData) @@ -393,7 +394,7 @@ public: * @js NA * @lua NA */ -class MovementData : public cocos2d::Ref +class CC_STUDIO_DLL MovementData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM_NO_INIT(MovementData) @@ -455,7 +456,7 @@ public: * @js NA * @lua NA */ -class AnimationData : public cocos2d::Ref +class CC_STUDIO_DLL AnimationData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM_NO_INIT(AnimationData) @@ -486,7 +487,7 @@ public: * @js NA * @lua NA */ -class ContourData : public cocos2d::Ref +class CC_STUDIO_DLL ContourData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM(ContourData) @@ -515,7 +516,7 @@ public: * @js NA * @lua NA */ -class TextureData : public cocos2d::Ref +class CC_STUDIO_DLL TextureData : public cocos2d::Ref { public: CC_CREATE_NO_PARAM(TextureData) diff --git a/cocos/editor-support/cocostudio/CCDecorativeDisplay.h b/cocos/editor-support/cocostudio/CCDecorativeDisplay.h index 1902565550..9a880b385f 100644 --- a/cocos/editor-support/cocostudio/CCDecorativeDisplay.h +++ b/cocos/editor-support/cocostudio/CCDecorativeDisplay.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDisplayFactory.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" #if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT || ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX @@ -43,7 +44,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class DecorativeDisplay: public cocos2d::Ref +class CC_STUDIO_DLL DecorativeDisplay: public cocos2d::Ref { public: static DecorativeDisplay *create(); diff --git a/cocos/editor-support/cocostudio/CCDisplayFactory.h b/cocos/editor-support/cocostudio/CCDisplayFactory.h index 3c94dc8d3b..037395bc31 100644 --- a/cocos/editor-support/cocostudio/CCDisplayFactory.h +++ b/cocos/editor-support/cocostudio/CCDisplayFactory.h @@ -27,6 +27,8 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -38,7 +40,7 @@ class DisplayData; * @js NA * @lua NA */ -class DisplayFactory +class CC_STUDIO_DLL DisplayFactory { public: static void addDisplay(Bone *bone, DecorativeDisplay *decoDisplay, DisplayData *displayData); diff --git a/cocos/editor-support/cocostudio/CCDisplayManager.h b/cocos/editor-support/cocostudio/CCDisplayManager.h index b4010c4eac..2f7b5e0f60 100644 --- a/cocos/editor-support/cocostudio/CCDisplayManager.h +++ b/cocos/editor-support/cocostudio/CCDisplayManager.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDecorativeDisplay.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -37,7 +38,7 @@ class Bone; * @js NA * @lua NA */ -class DisplayManager : public cocos2d::Ref +class CC_STUDIO_DLL DisplayManager : public cocos2d::Ref { public: static DisplayManager *create(Bone *bone); diff --git a/cocos/editor-support/cocostudio/CCInputDelegate.h b/cocos/editor-support/cocostudio/CCInputDelegate.h index 89ef95b6c2..fb41d543d0 100644 --- a/cocos/editor-support/cocostudio/CCInputDelegate.h +++ b/cocos/editor-support/cocostudio/CCInputDelegate.h @@ -31,6 +31,7 @@ THE SOFTWARE. #include "base/ccTypes.h" #include "base/CCEventKeyboard.h" #include "base/CCEventListener.h" +#include "cocostudio/CocosStudioExport.h" namespace cocos2d { class __Set; @@ -41,7 +42,7 @@ namespace cocostudio { /** * @lua NA */ -class InputDelegate +class CC_STUDIO_DLL InputDelegate { protected: /** diff --git a/cocos/editor-support/cocostudio/CCProcessBase.h b/cocos/editor-support/cocostudio/CCProcessBase.h index 59f0824f6b..b2acabee6b 100644 --- a/cocos/editor-support/cocostudio/CCProcessBase.h +++ b/cocos/editor-support/cocostudio/CCProcessBase.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -50,7 +51,7 @@ enum AnimationType * @js NA * @lua NA */ -class ProcessBase : public cocos2d::Ref +class CC_STUDIO_DLL ProcessBase : public cocos2d::Ref { public: ProcessBase(void); diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.h b/cocos/editor-support/cocostudio/CCSGUIReader.h index c5a798a878..18e24c5c1f 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.h +++ b/cocos/editor-support/cocostudio/CCSGUIReader.h @@ -29,6 +29,7 @@ THE SOFTWARE. #include "cocostudio/DictionaryHelper.h" #include "WidgetReader/WidgetReaderProtocol.h" #include "base/ObjectFactory.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -41,7 +42,7 @@ namespace cocostudio { typedef void (cocos2d::Ref::*SEL_ParseEvent)(const std::string&, cocos2d::Ref*, const rapidjson::Value&); #define parseselector(_SELECTOR) (SEL_ParseEvent)(&_SELECTOR) -class GUIReader : public cocos2d::Ref +class CC_STUDIO_DLL GUIReader : public cocos2d::Ref { public: CC_DEPRECATED_ATTRIBUTE static GUIReader* shareReader() { return GUIReader::getInstance(); }; @@ -89,7 +90,7 @@ public: }; -class WidgetPropertiesReader : public cocos2d::Ref +class CC_STUDIO_DLL WidgetPropertiesReader : public cocos2d::Ref { public: virtual cocos2d::ui::Widget* createWidget(const rapidjson::Value& dic, const char* fullPath, const char* fileName)=0; @@ -124,7 +125,7 @@ protected: }; -class WidgetPropertiesReader0250 : public WidgetPropertiesReader +class CC_STUDIO_DLL WidgetPropertiesReader0250 : public WidgetPropertiesReader { @@ -171,7 +172,7 @@ public: const rapidjson::Value& customOptions); }; -class WidgetPropertiesReader0300 : public WidgetPropertiesReader +class CC_STUDIO_DLL WidgetPropertiesReader0300 : public WidgetPropertiesReader { diff --git a/cocos/editor-support/cocostudio/CCSSceneReader.h b/cocos/editor-support/cocostudio/CCSSceneReader.h index 7d982858b2..e4fa36087d 100644 --- a/cocos/editor-support/cocostudio/CCSSceneReader.h +++ b/cocos/editor-support/cocostudio/CCSSceneReader.h @@ -26,12 +26,12 @@ THE SOFTWARE. #define __CCSSCENEREADER_H__ #include "cocostudio/DictionaryHelper.h" - +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { -class SceneReader +class CC_STUDIO_DLL SceneReader { public: diff --git a/cocos/editor-support/cocostudio/CCSkin.h b/cocos/editor-support/cocostudio/CCSkin.h index 67f409274c..1987eb968a 100644 --- a/cocos/editor-support/cocostudio/CCSkin.h +++ b/cocos/editor-support/cocostudio/CCSkin.h @@ -30,10 +30,11 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCBone.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { -class Skin : public cocos2d::Sprite +class CC_STUDIO_DLL Skin : public cocos2d::Sprite { public: static Skin *create(); diff --git a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h index 3c50ae7e4b..6a98a8ead5 100644 --- a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h +++ b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h @@ -26,6 +26,7 @@ THE SOFTWARE. #include "base/CCPlatformMacros.h" #include "cocostudio/CCArmatureDefine.h" +#include "cocostudio/CocosStudioExport.h" #include #include @@ -35,7 +36,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class SpriteFrameCacheHelper +class CC_STUDIO_DLL SpriteFrameCacheHelper { public: /** @deprecated Use getInstance() instead */ diff --git a/cocos/editor-support/cocostudio/CCTransformHelp.h b/cocos/editor-support/cocostudio/CCTransformHelp.h index ec93a2ac55..452257fb3e 100644 --- a/cocos/editor-support/cocostudio/CCTransformHelp.h +++ b/cocos/editor-support/cocostudio/CCTransformHelp.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCDatas.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -35,7 +36,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class TransformHelp +class CC_STUDIO_DLL TransformHelp { public: TransformHelp(); diff --git a/cocos/editor-support/cocostudio/CCTween.h b/cocos/editor-support/cocostudio/CCTween.h index c12f9c7b46..1eeda5da47 100644 --- a/cocos/editor-support/cocostudio/CCTween.h +++ b/cocos/editor-support/cocostudio/CCTween.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "cocostudio/CCProcessBase.h" #include "2d/CCTweenFunction.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { @@ -39,7 +40,7 @@ using cocos2d::tweenfunc::TweenType; * @js NA * @lua NA */ -class Tween : public ProcessBase +class CC_STUDIO_DLL Tween : public ProcessBase { public: /** diff --git a/cocos/editor-support/cocostudio/CCUtilMath.h b/cocos/editor-support/cocostudio/CCUtilMath.h index 5a4827bf44..46868313b5 100644 --- a/cocos/editor-support/cocostudio/CCUtilMath.h +++ b/cocos/editor-support/cocostudio/CCUtilMath.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "cocostudio/CCArmatureDefine.h" +#include "cocostudio/CocosStudioExport.h" #include namespace cocostudio { @@ -37,18 +38,18 @@ namespace cocostudio { //! hit test function -bool isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point); -bool isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point, cocos2d::Vec2 &outPoint); +bool CC_STUDIO_DLL isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point); +bool CC_STUDIO_DLL isSpriteContainPoint(cocos2d::Sprite *sprite, cocos2d::Vec2 point, cocos2d::Vec2 &outPoint); #define CC_SPRITE_CONTAIN_POINT(sprite, point) isSpriteContainPoint((sprite), (point)) #define CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint) isSpriteContainPoint((sprite), (point), outPoint) //! motion curve function -cocos2d::Vec2 bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3); -cocos2d::Vec2 bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3, cocos2d::Vec2 &point4); +cocos2d::Vec2 CC_STUDIO_DLL bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3); +cocos2d::Vec2 CC_STUDIO_DLL bezierTo(float t, cocos2d::Vec2 &point1, cocos2d::Vec2 &point2, cocos2d::Vec2 &point3, cocos2d::Vec2 &point4); -cocos2d::Vec2 circleTo(float t, cocos2d::Vec2 ¢er, float radius, float fromRadian, float radianDif); +cocos2d::Vec2 CC_STUDIO_DLL circleTo(float t, cocos2d::Vec2 ¢er, float radius, float fromRadian, float radianDif); } diff --git a/cocos/editor-support/cocostudio/CocoLoader.h b/cocos/editor-support/cocostudio/CocoLoader.h index b54681aaa6..29d0983e4d 100644 --- a/cocos/editor-support/cocostudio/CocoLoader.h +++ b/cocos/editor-support/cocostudio/CocoLoader.h @@ -31,6 +31,7 @@ #include #include "json/rapidjson.h" #include "json/document.h" +#include "cocostudio/CocosStudioExport.h" #pragma pack (4) @@ -38,7 +39,7 @@ namespace cocostudio{ class CocoLoader; -struct stExpCocoAttribDesc +struct CC_STUDIO_DLL stExpCocoAttribDesc { char m_cTypeName; uint32_t m_szName; @@ -46,7 +47,7 @@ public: char* GetName(CocoLoader* pCoco); }; -struct stExpCocoObjectDesc +struct CC_STUDIO_DLL stExpCocoObjectDesc { unsigned char m_cAttribNum; uint32_t m_szName; @@ -57,7 +58,7 @@ public: stExpCocoAttribDesc* GetAttribDescArray(CocoLoader* pCoco); }; -struct stExpCocoNode +struct CC_STUDIO_DLL stExpCocoNode { public: int16_t m_ObjIndex; @@ -75,7 +76,7 @@ public: void WriteJson(CocoLoader* pCoco,void* pFileName = nullptr, int vLayer = 0, bool bEndNode = false, bool bParentNodeIsArray = false); }; -struct stCocoFileHeader +struct CC_STUDIO_DLL stCocoFileHeader { char m_FileDesc[32]; char m_Version[32]; @@ -88,7 +89,7 @@ struct stCocoFileHeader }; -class CocoLoader +class CC_STUDIO_DLL CocoLoader { stCocoFileHeader* m_pFileHeader; stExpCocoNode* m_pRootNode; diff --git a/cocos/editor-support/cocostudio/CocoStudio.h b/cocos/editor-support/cocostudio/CocoStudio.h index 29d8319a38..ea49115db8 100644 --- a/cocos/editor-support/cocostudio/CocoStudio.h +++ b/cocos/editor-support/cocostudio/CocoStudio.h @@ -63,5 +63,6 @@ THE SOFTWARE. #include "cocostudio/ActionTimeline/CCFrame.h" #include "cocostudio/ActionTimeline/CCTimeLine.h" #include "cocostudio/ActionTimeline/CCActionTimeline.h" +#include "cocostudio/CocosStudioExport.h" #endif diff --git a/cocos/editor-support/cocostudio/CocosStudioExport.h b/cocos/editor-support/cocostudio/CocosStudioExport.h new file mode 100644 index 0000000000..552aad7519 --- /dev/null +++ b/cocos/editor-support/cocostudio/CocosStudioExport.h @@ -0,0 +1,28 @@ +#ifndef __CCCOCOSSTUDIO_H__ +#define __CCCOCOSSTUDIO_H__ + +#if defined(WIN32) && defined(_WINDOWS) + #ifdef __MINGW32__ + #include + #endif + + #if defined(_USRSTUDIODLL) + #define CC_STUDIO_DLL __declspec(dllexport) + #else /* use a DLL library */ + #define CC_STUDIO_DLL __declspec(dllimport) + #endif + + + /* Define NULL pointer value */ + #ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif + #endif +#else + #define CC_STUDIO_DLL +#endif + +#endif /* __CCEXTENSIONEXPORT_H__*/ \ No newline at end of file diff --git a/cocos/editor-support/cocostudio/DictionaryHelper.h b/cocos/editor-support/cocostudio/DictionaryHelper.h index cefb9610ff..2107008818 100644 --- a/cocos/editor-support/cocostudio/DictionaryHelper.h +++ b/cocos/editor-support/cocostudio/DictionaryHelper.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __DICTIONARYHELPER_H__ #include "json/document.h" +#include "cocostudio/CocosStudioExport.h" #define DICTOOL DictionaryHelper::getInstance() @@ -34,7 +35,7 @@ namespace cocostudio { * @js NA * @lua NA */ -class DictionaryHelper +class CC_STUDIO_DLL DictionaryHelper { public: DictionaryHelper(); diff --git a/cocos/editor-support/cocostudio/TriggerBase.h b/cocos/editor-support/cocostudio/TriggerBase.h index c5c6fe5c6f..31dc0c0308 100755 --- a/cocos/editor-support/cocostudio/TriggerBase.h +++ b/cocos/editor-support/cocostudio/TriggerBase.h @@ -30,6 +30,7 @@ THE SOFTWARE. #include "base/ObjectFactory.h" #include "TriggerObj.h" #include "TriggerMng.h" +#include "cocostudio/CocosStudioExport.h" #define DECLARE_CLASS_INFO \ @@ -47,7 +48,7 @@ THE SOFTWARE. cocos2d::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ -void sendEvent(unsigned int event); +void CC_STUDIO_DLL sendEvent(unsigned int event); #endif diff --git a/cocos/editor-support/cocostudio/TriggerMng.h b/cocos/editor-support/cocostudio/TriggerMng.h index afae1d2eb5..7d43eb5e74 100755 --- a/cocos/editor-support/cocostudio/TriggerMng.h +++ b/cocos/editor-support/cocostudio/TriggerMng.h @@ -36,7 +36,7 @@ namespace cocostudio { class TriggerObj; -class ArmatureMovementDispatcher : public cocos2d::Ref +class CC_STUDIO_DLL ArmatureMovementDispatcher : public cocos2d::Ref { public: ArmatureMovementDispatcher(void); @@ -51,7 +51,7 @@ private: }; -class TriggerMng +class CC_STUDIO_DLL TriggerMng { public: TriggerMng(void); diff --git a/cocos/editor-support/cocostudio/TriggerObj.h b/cocos/editor-support/cocostudio/TriggerObj.h index e026cc738a..464c0d98f7 100755 --- a/cocos/editor-support/cocostudio/TriggerObj.h +++ b/cocos/editor-support/cocostudio/TriggerObj.h @@ -35,7 +35,7 @@ class EventListenerCustom; namespace cocostudio { -class BaseTriggerCondition : public cocos2d::Ref +class CC_STUDIO_DLL BaseTriggerCondition : public cocos2d::Ref { protected: BaseTriggerCondition(void); @@ -48,7 +48,7 @@ public: virtual void removeAll(); }; -class BaseTriggerAction : public cocos2d::Ref +class CC_STUDIO_DLL BaseTriggerAction : public cocos2d::Ref { protected: BaseTriggerAction(void); @@ -62,7 +62,7 @@ public: }; -class TriggerObj : public cocos2d::Ref +class CC_STUDIO_DLL TriggerObj : public cocos2d::Ref { public: TriggerObj(void); diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h index d2ba76cbde..4b9bb4f91d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.h @@ -26,10 +26,11 @@ #define __TestCpp__ButtonReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class ButtonReader : public WidgetReader + class CC_STUDIO_DLL ButtonReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h index 1c934dfb99..f512b08b2d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h @@ -26,10 +26,11 @@ #define __TestCpp__CheckBoxReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class CheckBoxReader : public WidgetReader + class CC_STUDIO_DLL CheckBoxReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h index 27dd31eab5..2d890eaf14 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.h @@ -26,10 +26,11 @@ #define __TestCpp__ImageViewReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class ImageViewReader : public WidgetReader + class CC_STUDIO_DLL ImageViewReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h index 77518df738..3b39a6a106 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h @@ -26,10 +26,11 @@ #define __TestCpp__LayoutReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class LayoutReader : public WidgetReader + class CC_STUDIO_DLL LayoutReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h index 226ac4fac8..97564e614a 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.h @@ -26,10 +26,11 @@ #define __TestCpp__ListViewReader__ #include "../ScrollViewReader/ScrollViewReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class ListViewReader : public ScrollViewReader + class CC_STUDIO_DLL ListViewReader : public ScrollViewReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h index 7a08aa7e04..e77beb22ab 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.h @@ -26,10 +26,11 @@ #define __TestCpp__LoadingBarReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class LoadingBarReader : public WidgetReader + class CC_STUDIO_DLL LoadingBarReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h index 63f6f446ab..975049bd1a 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.h @@ -26,10 +26,11 @@ #define __TestCpp__PageViewReader__ #include "../LayoutReader/LayoutReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class PageViewReader : public LayoutReader + class CC_STUDIO_DLL PageViewReader : public LayoutReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h index ce95c3b5f7..a50d45d8b2 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.h @@ -26,10 +26,11 @@ #define __TestCpp__ScrollViewReader__ #include "../LayoutReader/LayoutReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class ScrollViewReader : public LayoutReader + class CC_STUDIO_DLL ScrollViewReader : public LayoutReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h index 2ea5f002ff..ab025eb87d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.h @@ -26,10 +26,11 @@ #define __TestCpp__SliderReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class SliderReader : public WidgetReader + class CC_STUDIO_DLL SliderReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h index 99a00444c1..b104fb8af1 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.h @@ -26,10 +26,11 @@ #define __TestCpp__TextAtlasReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class TextAtlasReader : public WidgetReader + class CC_STUDIO_DLL TextAtlasReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h index 4fdc193a40..a08f39876d 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.h @@ -26,10 +26,11 @@ #define __TestCpp__TextBMFontReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class TextBMFontReader : public WidgetReader + class CC_STUDIO_DLL TextBMFontReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h index bcd01d0021..d8b96f5a8e 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.h @@ -26,10 +26,11 @@ #define __TestCpp__TextFieldReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class TextFieldReader : public WidgetReader + class CC_STUDIO_DLL TextFieldReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h index 9482ecbe60..0f7337360a 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.h @@ -26,10 +26,11 @@ #define __TestCpp__TextReader__ #include "../WidgetReader.h" +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { - class TextReader : public WidgetReader + class CC_STUDIO_DLL TextReader : public WidgetReader { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h index ca62aab066..31dc939da2 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h @@ -29,14 +29,14 @@ #include "cocostudio/CCSGUIReader.h" #include "ui/GUIDefine.h" #include "ui/UIWidget.h" - +#include "cocostudio/CocosStudioExport.h" namespace cocostudio { class CocoLoader; struct stExpCocoNode; - class WidgetReader : public cocos2d::Ref, public WidgetReaderProtocol + class CC_STUDIO_DLL WidgetReader : public cocos2d::Ref, public WidgetReaderProtocol { public: DECLARE_CLASS_WIDGET_READER_INFO diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h b/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h index 0461ca5cec..c663ae3535 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h @@ -27,8 +27,7 @@ #include "cocos2d.h" #include "cocostudio/DictionaryHelper.h" - - +#include "cocostudio/CocosStudioExport.h" namespace cocos2d { @@ -43,7 +42,7 @@ namespace cocostudio class CocoLoader; struct stExpCocoNode; - class WidgetReaderProtocol + class CC_STUDIO_DLL WidgetReaderProtocol { public: virtual ~WidgetReaderProtocol() {}; diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj index 684f848d8d..44f343ed68 100644 --- a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj +++ b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj @@ -117,6 +117,7 @@ + @@ -142,7 +143,7 @@ - StaticLibrary + DynamicLibrary true v100 v110 @@ -152,7 +153,7 @@ Unicode - StaticLibrary + DynamicLibrary false v100 v110 @@ -189,7 +190,7 @@ $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\win32-specific\zlib\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRSTUDIODLL;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;COCOS2DXWIN32_EXPORTS;%(PreprocessorDefinitions) true 4267;4251;4244;%(DisableSpecificWarnings) false @@ -197,6 +198,8 @@ true + $(OutDir);%(AdditionalLibraryDirectories) + libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies) @@ -207,7 +210,7 @@ true - WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USRSTUDIODLL;%(PreprocessorDefinitions) $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot)external\win32-specific\zlib\include;%(AdditionalIncludeDirectories) None false @@ -216,6 +219,8 @@ true true true + libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies) + $(OutDir);%(AdditionalLibraryDirectories) diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters index 8e91fb082e..3102335bfe 100644 --- a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters +++ b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters @@ -455,5 +455,6 @@ TimelineAction + \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj index 2f033657b8..df94855ceb 100644 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj +++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj @@ -118,7 +118,7 @@ $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) true 4267;4251;4244;%(DisableSpecificWarnings) false @@ -135,7 +135,7 @@ true - WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) $(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) None false diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index f4c8604b3a..6f90cdb9b4 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -58,7 +58,7 @@ extern "C" return strerror(errnum); } #endif -#endif +//#endif #include "png.h" #include "tiffio.h" #include "base/etc1.h" diff --git a/cocos/platform/mac/CCDevice.mm b/cocos/platform/mac/CCDevice.mm index 34c6f8b9ca..e1f3ec3e5c 100644 --- a/cocos/platform/mac/CCDevice.mm +++ b/cocos/platform/mac/CCDevice.mm @@ -128,7 +128,7 @@ static bool _initWithString(const char * text, Device::TextAlign align, const ch if ([@"!?.,-= " rangeOfString:character].location != NSNotFound) { lastBreakLocation = i + insertCount; } - textSize = [lineBreak sizeWithAttributes:tokenAttributesDict]; + //textSize = [lineBreak sizeWithAttributes:tokenAttributesDict]; if(textSize.height > info->height) break; if (textSize.width > info->width) { diff --git a/cocos/ui/CCProtectedNode.h b/cocos/ui/CCProtectedNode.h index bd54dce028..f8ad28f42c 100644 --- a/cocos/ui/CCProtectedNode.h +++ b/cocos/ui/CCProtectedNode.h @@ -31,10 +31,11 @@ #include "2d/CCNode.h" +#include "ui/GUIExport.h" NS_CC_BEGIN - -class ProtectedNode : public Node + +class CC_GUI_DLL ProtectedNode : public Node { public: static ProtectedNode * create(void); diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 5a6c1810bb..dd1fa46bbb 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -49,6 +49,7 @@ THE SOFTWARE. #include "ui/UIVideoPlayer.h" #endif #include "ui/UIDeprecated.h" +#include "ui/GUIExport.h" NS_CC_BEGIN diff --git a/cocos/ui/GUIExport.h b/cocos/ui/GUIExport.h new file mode 100644 index 0000000000..aec8809e0f --- /dev/null +++ b/cocos/ui/GUIExport.h @@ -0,0 +1,28 @@ +#ifndef __CCLIBGUI_H__ +#define __CCLIBGUI_H__ + +#if defined(WIN32) && defined(_WINDOWS) + #ifdef __MINGW32__ + #include + #endif + + #if defined(_USEGUIDLL) + #define CC_GUI_DLL __declspec(dllexport) + #else /* use a DLL library */ + #define CC_GUI_DLL __declspec(dllimport) + #endif + + + /* Define NULL pointer value */ + #ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif + #endif +#else + #define CC_GUI_DLL +#endif + +#endif /* __CCEXTENSIONEXPORT_H__*/ \ No newline at end of file diff --git a/cocos/ui/UIButton.h b/cocos/ui/UIButton.h index 0510717c56..07a8e0de4b 100644 --- a/cocos/ui/UIButton.h +++ b/cocos/ui/UIButton.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UIBUTTON_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -37,7 +38,7 @@ namespace ui{ * @js NA * @lua NA */ -class Button : public Widget +class CC_GUI_DLL Button : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UICheckBox.h b/cocos/ui/UICheckBox.h index db7900fcbf..c90ab7b235 100644 --- a/cocos/ui/UICheckBox.h +++ b/cocos/ui/UICheckBox.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UICHECKBOX_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -46,7 +47,7 @@ typedef void (Ref::*SEL_SelectedStateEvent)(Ref*,CheckBoxEventType); * @js NA * @lua NA */ -class CheckBox : public Widget +class CC_GUI_DLL CheckBox : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UIHBox.h b/cocos/ui/UIHBox.h index 1b6cf95ae9..872fe90664 100644 --- a/cocos/ui/UIHBox.h +++ b/cocos/ui/UIHBox.h @@ -26,12 +26,13 @@ #define __UIHBox_H__ #include "ui/UILayout.h" +#include "ui/GUIExport.h" NS_CC_BEGIN namespace ui { -class HBox : public Layout{ +class CC_GUI_DLL HBox : public Layout{ public: diff --git a/cocos/ui/UIHelper.h b/cocos/ui/UIHelper.h index 68fa8dbfb9..edef683da6 100644 --- a/cocos/ui/UIHelper.h +++ b/cocos/ui/UIHelper.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include #include "base/CCPlatformMacros.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -38,7 +39,7 @@ namespace ui { * @js NA * @lua NA */ -class Helper +class CC_GUI_DLL Helper { public: /** diff --git a/cocos/ui/UIImageView.h b/cocos/ui/UIImageView.h index ada869b34a..d0c4f06560 100644 --- a/cocos/ui/UIImageView.h +++ b/cocos/ui/UIImageView.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UIIMAGEVIEW_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -35,7 +36,7 @@ namespace ui { * @js NA * @lua NA */ -class ImageView : public Widget +class CC_GUI_DLL ImageView : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 620a310bbb..30900fe515 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -948,6 +948,12 @@ Layout::Type Layout::getLayoutType() const { return _layoutType; } + +void Layout::forceDoLayout() +{ + this->requestDoLayout(); + this->doLayout(); +} void Layout::requestDoLayout() { diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index e43df22522..96cf7ba137 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __LAYOUT_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCGroupCommand.h" @@ -40,7 +41,7 @@ namespace ui { class LayoutManager; -class LayoutProtocol +class CC_GUI_DLL LayoutProtocol { public: LayoutProtocol(){} @@ -62,7 +63,7 @@ public: #endif #endif -class Layout : public Widget, public LayoutProtocol +class CC_GUI_DLL Layout : public Widget, public LayoutProtocol { DECLARE_CLASS_GUI_INFO @@ -265,7 +266,14 @@ public: */ virtual void removeAllChildrenWithCleanup(bool cleanup) override; + /** + * force refresh widget layout + */ + void forceDoLayout(); + /** + * request to refresh widget layout + */ void requestDoLayout(); virtual void onEnter() override; diff --git a/cocos/ui/UILayoutManager.h b/cocos/ui/UILayoutManager.h index 5f82b3c39b..cbeefa5589 100644 --- a/cocos/ui/UILayoutManager.h +++ b/cocos/ui/UILayoutManager.h @@ -27,6 +27,7 @@ #include "base/CCRef.h" #include "base/CCVector.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -36,7 +37,7 @@ class LayoutProtocol; class Widget; class RelativeLayoutParameter; -class LayoutManager : public Ref +class CC_GUI_DLL LayoutManager : public Ref { public: virtual ~LayoutManager(){}; @@ -47,7 +48,7 @@ public: friend class Layout; }; -class LinearVerticalLayoutManager : public LayoutManager +class CC_GUI_DLL LinearVerticalLayoutManager : public LayoutManager { private: LinearVerticalLayoutManager(){}; @@ -58,7 +59,7 @@ private: friend class Layout; }; -class LinearHorizontalLayoutManager : public LayoutManager +class CC_GUI_DLL LinearHorizontalLayoutManager : public LayoutManager { private: LinearHorizontalLayoutManager(){}; @@ -69,7 +70,7 @@ private: friend class Layout; }; -class RelativeLayoutManager : public LayoutManager +class CC_GUI_DLL RelativeLayoutManager : public LayoutManager { private: RelativeLayoutManager() diff --git a/cocos/ui/UILayoutParameter.h b/cocos/ui/UILayoutParameter.h index 4681c82d3b..4862e91e68 100644 --- a/cocos/ui/UILayoutParameter.h +++ b/cocos/ui/UILayoutParameter.h @@ -27,7 +27,7 @@ #include #include "base/CCRef.h" - +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -37,7 +37,7 @@ namespace ui { * @js NA * @lua NA */ -class Margin +class CC_GUI_DLL Margin { public: float left; @@ -69,7 +69,7 @@ public: #endif #endif -class LayoutParameter : public Ref +class CC_GUI_DLL LayoutParameter : public Ref { public: enum class Type @@ -146,7 +146,7 @@ public: * @js NA * @lua NA */ -class LinearLayoutParameter : public LayoutParameter +class CC_GUI_DLL LinearLayoutParameter : public LayoutParameter { public: enum class LinearGravity @@ -209,7 +209,7 @@ protected: */ -class RelativeLayoutParameter : public LayoutParameter +class CC_GUI_DLL RelativeLayoutParameter : public LayoutParameter { public: enum class RelativeAlign diff --git a/cocos/ui/UIListView.h b/cocos/ui/UIListView.h index 53737812a6..65856ff1f7 100644 --- a/cocos/ui/UIListView.h +++ b/cocos/ui/UIListView.h @@ -27,6 +27,7 @@ THE SOFTWARE. #define __UILISTVIEW_H__ #include "ui/UIScrollView.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -41,7 +42,7 @@ typedef enum typedef void (Ref::*SEL_ListViewEvent)(Ref*,ListViewEventType); #define listvieweventselector(_SELECTOR) (SEL_ListViewEvent)(&_SELECTOR) -class ListView : public ScrollView +class CC_GUI_DLL ListView : public ScrollView { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UILoadingBar.h b/cocos/ui/UILoadingBar.h index 6fe4910130..bfc4137eaa 100644 --- a/cocos/ui/UILoadingBar.h +++ b/cocos/ui/UILoadingBar.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UILOADINGBAR_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -35,7 +36,7 @@ namespace ui { * @js NA * @lua NA */ -class LoadingBar : public Widget +class CC_GUI_DLL LoadingBar : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UIPageView.h b/cocos/ui/UIPageView.h index 52df2509ef..96d01c98df 100644 --- a/cocos/ui/UIPageView.h +++ b/cocos/ui/UIPageView.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UIPAGEVIEW_H__ #include "ui/UILayout.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -39,7 +40,7 @@ typedef enum typedef void (Ref::*SEL_PageViewEvent)(Ref*, PageViewEventType); #define pagevieweventselector(_SELECTOR)(SEL_PageViewEvent)(&_SELECTOR) -class PageView : public Layout +class CC_GUI_DLL PageView : public Layout { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UIRelativeBox.h b/cocos/ui/UIRelativeBox.h index b4e7082b6d..ffef51b215 100644 --- a/cocos/ui/UIRelativeBox.h +++ b/cocos/ui/UIRelativeBox.h @@ -26,12 +26,13 @@ #define __UIRelativeBox_H__ #include "ui/UILayout.h" +#include "ui/GUIExport.h" NS_CC_BEGIN namespace ui { -class RelativeBox : public Layout{ +class CC_GUI_DLL RelativeBox : public Layout{ public: diff --git a/cocos/ui/UIRichText.h b/cocos/ui/UIRichText.h index cab8927b5c..aa0ad7c410 100644 --- a/cocos/ui/UIRichText.h +++ b/cocos/ui/UIRichText.h @@ -26,12 +26,13 @@ #define __UIRICHTEXT_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN namespace ui { -class RichElement : public Ref +class CC_GUI_DLL RichElement : public Ref { public: enum class Type @@ -51,7 +52,7 @@ protected: friend class RichText; }; -class RichElementText : public RichElement +class CC_GUI_DLL RichElementText : public RichElement { public: RichElementText(){_type = Type::TEXT;}; @@ -66,7 +67,7 @@ protected: }; -class RichElementImage : public RichElement +class CC_GUI_DLL RichElementImage : public RichElement { public: RichElementImage(){_type = Type::IMAGE;}; @@ -80,7 +81,7 @@ protected: friend class RichText; }; -class RichElementCustomNode : public RichElement +class CC_GUI_DLL RichElementCustomNode : public RichElement { public: RichElementCustomNode(){_type = Type::CUSTOM;}; @@ -92,7 +93,7 @@ protected: friend class RichText; }; -class RichText : public Widget +class CC_GUI_DLL RichText : public Widget { public: RichText(); diff --git a/cocos/ui/UIScrollView.h b/cocos/ui/UIScrollView.h index ae2bd6ab43..cc0dd25d45 100644 --- a/cocos/ui/UIScrollView.h +++ b/cocos/ui/UIScrollView.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UISCROLLVIEW_H__ #include "ui/UILayout.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -50,7 +51,7 @@ typedef void (Ref::*SEL_ScrollViewEvent)(Ref*, ScrollviewEventType); #define scrollvieweventselector(_SELECTOR) (SEL_ScrollViewEvent)(&_SELECTOR) -class ScrollView : public Layout +class CC_GUI_DLL ScrollView : public Layout { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UISlider.h b/cocos/ui/UISlider.h index de8ed765b2..8212dd9026 100644 --- a/cocos/ui/UISlider.h +++ b/cocos/ui/UISlider.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UISLIDER_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -45,7 +46,7 @@ typedef void (Ref::*SEL_SlidPercentChangedEvent)(Ref*,SliderEventType); * @js NA * @lua NA */ -class Slider : public Widget +class CC_GUI_DLL Slider : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UIText.h b/cocos/ui/UIText.h index 3c38101abd..7012694260 100644 --- a/cocos/ui/UIText.h +++ b/cocos/ui/UIText.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UILABEL_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -38,7 +39,7 @@ namespace ui { *@js *@lua NA */ -class Text : public Widget +class CC_GUI_DLL Text : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UITextAtlas.h b/cocos/ui/UITextAtlas.h index 8058aa4d7d..cf00db4cfe 100644 --- a/cocos/ui/UITextAtlas.h +++ b/cocos/ui/UITextAtlas.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UILABELATLAS_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -37,7 +38,7 @@ namespace ui { * @js NA * @lua NA */ -class TextAtlas : public Widget +class CC_GUI_DLL TextAtlas : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UITextBMFont.h b/cocos/ui/UITextBMFont.h index 707f42382c..5d3c7955fb 100644 --- a/cocos/ui/UITextBMFont.h +++ b/cocos/ui/UITextBMFont.h @@ -26,6 +26,7 @@ THE SOFTWARE. #define __UILABELBMFONT_H__ #include "ui/UIWidget.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -37,7 +38,7 @@ namespace ui { * @js NA * @lua NA */ -class TextBMFont : public Widget +class CC_GUI_DLL TextBMFont : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UITextField.h b/cocos/ui/UITextField.h index b26456fd33..eaea50d952 100644 --- a/cocos/ui/UITextField.h +++ b/cocos/ui/UITextField.h @@ -27,6 +27,7 @@ THE SOFTWARE. #include "ui/UIWidget.h" #include "2d/CCTextFieldTTF.h" +#include "ui/GUIExport.h" NS_CC_BEGIN @@ -36,7 +37,7 @@ namespace ui { * @js NA * @lua NA */ -class UICCTextField: public TextFieldTTF, public TextFieldDelegate +class CC_GUI_DLL UICCTextField: public TextFieldTTF, public TextFieldDelegate { public: UICCTextField(); @@ -106,7 +107,7 @@ typedef void (Ref::*SEL_TextFieldEvent)(Ref*, TextFiledEventType); * @js NA * @lua NA */ -class TextField : public Widget +class CC_GUI_DLL TextField : public Widget { DECLARE_CLASS_GUI_INFO diff --git a/cocos/ui/UIVBox.h b/cocos/ui/UIVBox.h index 216234f47f..dae3bf149b 100644 --- a/cocos/ui/UIVBox.h +++ b/cocos/ui/UIVBox.h @@ -26,12 +26,13 @@ #define __UIVBox_H__ #include "ui/UILayout.h" +#include "ui/GUIExport.h" NS_CC_BEGIN namespace ui { -class VBox : public Layout{ +class CC_GUI_DLL VBox : public Layout{ public: diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index 8ea40cc9d5..a06aaad5b8 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -28,6 +28,7 @@ THE SOFTWARE. #include "ui/CCProtectedNode.h" #include "ui/UILayoutParameter.h" #include "ui/GUIDefine.h" +#include "ui/GUIExport.h" #include "base/CCMap.h" NS_CC_BEGIN @@ -61,7 +62,7 @@ typedef void (Ref::*SEL_TouchEvent)(Ref*,TouchEventType); #endif -class Widget : public ProtectedNode, public LayoutParameterProtocol +class CC_GUI_DLL Widget : public ProtectedNode, public LayoutParameterProtocol { public: enum class FocusDirection diff --git a/cocos/ui/proj.win32/libGUI.vcxproj b/cocos/ui/proj.win32/libGUI.vcxproj index 2483ce7005..1701d425e3 100644 --- a/cocos/ui/proj.win32/libGUI.vcxproj +++ b/cocos/ui/proj.win32/libGUI.vcxproj @@ -13,6 +13,7 @@ + @@ -68,7 +69,7 @@ - StaticLibrary + DynamicLibrary true v100 v110 @@ -78,7 +79,7 @@ Unicode - StaticLibrary + DynamicLibrary false v100 v110 @@ -115,7 +116,7 @@ $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USEGUIDLL;%(PreprocessorDefinitions) true 4267;4251;4244;%(DisableSpecificWarnings) false @@ -123,6 +124,8 @@ true + $(OutDir);%(AdditionalLibraryDirectories) + libcocos2d.lib;opengl32.lib;glew32.lib;libExtensions.lib;%(AdditionalDependencies) @@ -133,7 +136,7 @@ true - WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USEGUIDLL;%(PreprocessorDefinitions) $(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) None false @@ -142,6 +145,8 @@ true true true + $(OutDir);%(AdditionalLibraryDirectories) + libcocos2d.lib;opengl32.lib;glew32.lib;libExtensions.lib;%(AdditionalDependencies) diff --git a/cocos/ui/proj.win32/libGUI.vcxproj.filters b/cocos/ui/proj.win32/libGUI.vcxproj.filters index 66f11c6cdd..52a45d5fe0 100644 --- a/cocos/ui/proj.win32/libGUI.vcxproj.filters +++ b/cocos/ui/proj.win32/libGUI.vcxproj.filters @@ -90,6 +90,9 @@ System + + System + diff --git a/extensions/ExtensionExport.h b/extensions/ExtensionExport.h new file mode 100644 index 0000000000..da01ffc98e --- /dev/null +++ b/extensions/ExtensionExport.h @@ -0,0 +1,28 @@ +#ifndef __CCEXTENSIONEXPORT_H__ +#define __CCEXTENSIONEXPORT_H__ + +#if defined(WIN32) && defined(_WINDOWS) + #ifdef __MINGW32__ + #include + #endif + + #if defined(_USREXDLL) + #define CC_EX_DLL __declspec(dllexport) + #else /* use a DLL library */ + #define CC_EX_DLL __declspec(dllimport) + #endif + + + /* Define NULL pointer value */ + #ifndef NULL + #ifdef __cplusplus + #define NULL 0 + #else + #define NULL ((void *)0) + #endif + #endif +#else + #define CC_EX_DLL +#endif + +#endif /* __CCEXTENSIONEXPORT_H__*/ \ No newline at end of file diff --git a/extensions/GUI/CCControlExtension/CCControl.h b/extensions/GUI/CCControlExtension/CCControl.h index cf6efa865d..1f7192a170 100644 --- a/extensions/GUI/CCControlExtension/CCControl.h +++ b/extensions/GUI/CCControlExtension/CCControl.h @@ -32,6 +32,7 @@ #include "CCControlUtils.h" #include "2d/CCLayer.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -61,11 +62,11 @@ class Invocation; * * To use the Control you have to subclass it. */ -class Control : public Layer +class CC_EX_DLL Control : public Layer { public: /** Kinds of possible events for the control objects. */ - enum class EventType + enum class CC_EX_DLL EventType { TOUCH_DOWN = 1 << 0, // A touch-down event in the control. DRAG_INSIDE = 1 << 1, // An event where a finger is dragged inside the bounds of the control. @@ -266,7 +267,7 @@ private: CC_DISALLOW_COPY_AND_ASSIGN(Control); }; -Control::EventType operator|(Control::EventType a, Control::EventType b); +CC_EX_DLL Control::EventType operator|(Control::EventType a, Control::EventType b); // end of GUI group /// @} diff --git a/extensions/GUI/CCControlExtension/CCControlButton.h b/extensions/GUI/CCControlExtension/CCControlButton.h index cd73e63c5a..f7484e2172 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.h +++ b/extensions/GUI/CCControlExtension/CCControlButton.h @@ -34,6 +34,7 @@ #include "CCInvocation.h" #include "CCScale9Sprite.h" #include "base/CCMap.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -51,7 +52,7 @@ NS_CC_EXT_BEGIN */ /** @class ControlButton Button control for Cocos2D. */ -class ControlButton : public Control +class CC_EX_DLL ControlButton : public Control { public: static ControlButton* create(); diff --git a/extensions/GUI/CCControlExtension/CCControlColourPicker.h b/extensions/GUI/CCControlExtension/CCControlColourPicker.h index 2cb09328c7..df282adda8 100644 --- a/extensions/GUI/CCControlExtension/CCControlColourPicker.h +++ b/extensions/GUI/CCControlExtension/CCControlColourPicker.h @@ -37,6 +37,7 @@ #include "CCControlUtils.h" #include "CCControlHuePicker.h" #include "CCControlSaturationBrightnessPicker.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -47,7 +48,7 @@ NS_CC_EXT_BEGIN * @{ */ -class ControlColourPicker: public Control +class CC_EX_DLL ControlColourPicker: public Control { public: static ControlColourPicker* create(); diff --git a/extensions/GUI/CCControlExtension/CCControlHuePicker.h b/extensions/GUI/CCControlExtension/CCControlHuePicker.h index 9f007a2092..06e6371efd 100644 --- a/extensions/GUI/CCControlExtension/CCControlHuePicker.h +++ b/extensions/GUI/CCControlExtension/CCControlHuePicker.h @@ -35,6 +35,7 @@ #include "CCControl.h" #include "CCInvocation.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -45,7 +46,7 @@ NS_CC_EXT_BEGIN * @{ */ -class ControlHuePicker : public Control +class CC_EX_DLL ControlHuePicker : public Control { public: static ControlHuePicker* create(Node* target, Vec2 pos); diff --git a/extensions/GUI/CCControlExtension/CCControlPotentiometer.h b/extensions/GUI/CCControlExtension/CCControlPotentiometer.h index fc8156a8b8..c70ec15e06 100644 --- a/extensions/GUI/CCControlExtension/CCControlPotentiometer.h +++ b/extensions/GUI/CCControlExtension/CCControlPotentiometer.h @@ -29,6 +29,7 @@ #include "CCControl.h" #include "2d/CCProgressTimer.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -40,7 +41,7 @@ NS_CC_EXT_BEGIN */ /** @class ControlPotentiometer Potentiometer control for Cocos2D. */ -class ControlPotentiometer : public Control +class CC_EX_DLL ControlPotentiometer : public Control { public: /** diff --git a/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h b/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h index 0ae9cbeaa1..cff046281d 100644 --- a/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h +++ b/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h @@ -35,6 +35,7 @@ #include "CCControl.h" #include "CCInvocation.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -45,7 +46,7 @@ NS_CC_EXT_BEGIN * @{ */ -class ControlSaturationBrightnessPicker : public Control +class CC_EX_DLL ControlSaturationBrightnessPicker : public Control { /** Contains the receiver's current saturation value. */ CC_SYNTHESIZE_READONLY(float, _saturation, Saturation); diff --git a/extensions/GUI/CCControlExtension/CCControlSlider.h b/extensions/GUI/CCControlExtension/CCControlSlider.h index eeca322c25..03bb5d9543 100644 --- a/extensions/GUI/CCControlExtension/CCControlSlider.h +++ b/extensions/GUI/CCControlExtension/CCControlSlider.h @@ -32,6 +32,7 @@ #include "CCControl.h" #include "CCInvocation.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -42,7 +43,7 @@ NS_CC_EXT_BEGIN * @{ */ -class ControlSlider: public Control +class CC_EX_DLL ControlSlider: public Control { public: /** diff --git a/extensions/GUI/CCControlExtension/CCControlStepper.h b/extensions/GUI/CCControlExtension/CCControlStepper.h index 1b45a497f6..ae9bdaa22d 100644 --- a/extensions/GUI/CCControlExtension/CCControlStepper.h +++ b/extensions/GUI/CCControlExtension/CCControlStepper.h @@ -30,6 +30,7 @@ #include "CCControl.h" #include "2d/CCLabel.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -40,7 +41,7 @@ NS_CC_EXT_BEGIN * @{ */ -class ControlStepper : public Control +class CC_EX_DLL ControlStepper : public Control { public: enum class Part diff --git a/extensions/GUI/CCControlExtension/CCControlSwitch.h b/extensions/GUI/CCControlExtension/CCControlSwitch.h index 6575937e13..98e67d77e2 100644 --- a/extensions/GUI/CCControlExtension/CCControlSwitch.h +++ b/extensions/GUI/CCControlExtension/CCControlSwitch.h @@ -29,7 +29,7 @@ #define __CCCONTROLSWITCH_H__ #include "CCControl.h" - +#include "extensions/ExtensionExport.h" namespace cocos2d { class Sprite; } namespace cocos2d { class Label; } @@ -46,7 +46,7 @@ class ControlSwitchSprite; */ /** @class ControlSwitch Switch control for Cocos2D. */ -class ControlSwitch : public Control +class CC_EX_DLL ControlSwitch : public Control { public: /** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels. */ diff --git a/extensions/GUI/CCControlExtension/CCControlUtils.h b/extensions/GUI/CCControlExtension/CCControlUtils.h index 4df2a0f125..abc6abd894 100644 --- a/extensions/GUI/CCControlExtension/CCControlUtils.h +++ b/extensions/GUI/CCControlExtension/CCControlUtils.h @@ -36,6 +36,7 @@ #include "2d/CCSprite.h" #include "../../ExtensionMacros.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -62,7 +63,7 @@ typedef struct */ //helper class to store Color3B's in mutable arrays -class Color3bObject : public Ref +class CC_EX_DLL Color3bObject : public Ref { public: Color3B value; @@ -73,7 +74,7 @@ public: Color3bObject(Color3B s_value):value(s_value){} }; -class ControlUtils +class CC_EX_DLL ControlUtils { public: /** diff --git a/extensions/GUI/CCControlExtension/CCInvocation.h b/extensions/GUI/CCControlExtension/CCInvocation.h index e8a2a12b8d..015f582a23 100644 --- a/extensions/GUI/CCControlExtension/CCInvocation.h +++ b/extensions/GUI/CCControlExtension/CCInvocation.h @@ -32,6 +32,7 @@ #include "base/CCRef.h" #include "../../ExtensionMacros.h" +#include "extensions/ExtensionExport.h" #include "CCControl.h" NS_CC_EXT_BEGIN @@ -45,7 +46,7 @@ NS_CC_EXT_BEGIN #define cccontrol_selector(_SELECTOR) static_cast(&_SELECTOR) -class Invocation : public Ref +class CC_EX_DLL Invocation : public Ref { public: /** diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/extensions/GUI/CCControlExtension/CCScale9Sprite.h index dc3c6b8696..fc1dea95ba 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.h @@ -31,7 +31,7 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteBatchNode.h" - +#include "extensions/ExtensionExport.h" #include "../../ExtensionMacros.h" NS_CC_EXT_BEGIN @@ -53,7 +53,7 @@ NS_CC_EXT_BEGIN * * @see http://yannickloriot.com/library/ios/cccontrolextension/Classes/CCScale9Sprite.html */ -class Scale9Sprite : public Node +class CC_EX_DLL Scale9Sprite : public Node { public: /** diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h index f6a12dbf46..9203cbfaac 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ b/extensions/GUI/CCEditBox/CCEditBox.h @@ -29,6 +29,7 @@ #include "base/CCIMEDelegate.h" #include "extensions/ExtensionMacros.h" #include "../CCControlExtension/CCControlExtensions.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -36,7 +37,7 @@ class EditBox; class EditBoxImpl; -class EditBoxDelegate +class CC_EX_DLL EditBoxDelegate { public: /** @@ -88,7 +89,7 @@ public: * */ -class EditBox +class CC_EX_DLL EditBox : public ControlButton , public IMEDelegate { diff --git a/extensions/GUI/CCEditBox/CCEditBoxImpl.h b/extensions/GUI/CCEditBox/CCEditBoxImpl.h index 44118c1c0b..79d3d8f3fa 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImpl.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImpl.h @@ -28,11 +28,12 @@ #include "extensions/ExtensionMacros.h" #include "CCEditBox.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN -class EditBoxImpl +class CC_EX_DLL EditBoxImpl { public: /** @@ -62,7 +63,7 @@ public: virtual void setPlaceHolder(const char* pText) = 0; virtual void doAnimationWhenKeyboardMove(float duration, float distance) = 0; - virtual void openKeyboard() = 0; + virtual void openKeyboard() = 0; virtual void closeKeyboard() = 0; virtual void setPosition(const Vec2& pos) = 0; diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h b/extensions/GUI/CCEditBox/CCEditBoxImplMac.h index a5b93c4f58..34085e8278 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.h @@ -39,6 +39,8 @@ @interface CCEditBoxImplMac : NSObject { + NSTextField* textField_; + NSSecureTextField* secureTextField_; void* editBox_; BOOL editState_; NSMutableDictionary* placeholderAttributes_; diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplWin.h b/extensions/GUI/CCEditBox/CCEditBoxImplWin.h index 7b29251644..4d04fb6cce 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplWin.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImplWin.h @@ -32,12 +32,13 @@ #include "extensions/ExtensionMacros.h" #include "CCEditBoxImpl.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN class EditBox; -class EditBoxImplWin : public EditBoxImpl +class CC_EX_DLL EditBoxImplWin : public EditBoxImpl { public: /** diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index 2f4c224418..b8df096ef1 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -30,6 +30,7 @@ #include "base/CCEventListenerTouch.h" #include "2d/CCActionTween.h" #include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN @@ -65,7 +66,7 @@ public: * ScrollView support for cocos2d-x. * It provides scroll view functionalities to cocos2d projects natively. */ -class ScrollView : public Layer, public ActionTweenDelegate +class CC_EX_DLL ScrollView : public Layer, public ActionTweenDelegate { public: enum class Direction diff --git a/extensions/GUI/CCScrollView/CCTableView.h b/extensions/GUI/CCScrollView/CCTableView.h index c4d89b33a9..018c653110 100644 --- a/extensions/GUI/CCScrollView/CCTableView.h +++ b/extensions/GUI/CCScrollView/CCTableView.h @@ -28,6 +28,7 @@ #include "CCScrollView.h" #include "CCTableViewCell.h" +#include "extensions/ExtensionExport.h" #include #include @@ -39,7 +40,7 @@ class TableView; /** * Sole purpose of this delegate is to single touch event in this version. */ -class TableViewDelegate : public ScrollViewDelegate +class CC_EX_DLL TableViewDelegate : public ScrollViewDelegate { public: /** @@ -90,7 +91,7 @@ public: /** * Data source that governs table backend data. */ -class TableViewDataSource +class CC_EX_DLL TableViewDataSource { public: /** @@ -139,7 +140,7 @@ public: * * This is a very basic, minimal implementation to bring UITableView-like component into cocos2d world. */ -class TableView : public ScrollView, public ScrollViewDelegate +class CC_EX_DLL TableView : public ScrollView, public ScrollViewDelegate { public: diff --git a/extensions/GUI/CCScrollView/CCTableViewCell.h b/extensions/GUI/CCScrollView/CCTableViewCell.h index 9d45d665d8..4bc594db66 100644 --- a/extensions/GUI/CCScrollView/CCTableViewCell.h +++ b/extensions/GUI/CCScrollView/CCTableViewCell.h @@ -28,13 +28,14 @@ #include "extensions/ExtensionMacros.h" #include "2d/CCNode.h" +#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN /** * Abstract class for SWTableView cell node */ -class TableViewCell: public Node +class CC_EX_DLL TableViewCell: public Node { public: CREATE_FUNC(TableViewCell); diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.h b/extensions/physics-nodes/CCPhysicsDebugNode.h index 390f24bfaa..16c0f56400 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.h +++ b/extensions/physics-nodes/CCPhysicsDebugNode.h @@ -25,6 +25,7 @@ #include "extensions/ExtensionMacros.h" #include "2d/CCDrawNode.h" +#include "extensions/ExtensionExport.h" struct cpSpace; @@ -40,7 +41,7 @@ NS_CC_EXT_BEGIN @since v2.1 */ -class PhysicsDebugNode : public DrawNode +class CC_EX_DLL PhysicsDebugNode : public DrawNode { public: diff --git a/extensions/physics-nodes/CCPhysicsSprite.h b/extensions/physics-nodes/CCPhysicsSprite.h index fa1f0489d0..33f48a20b0 100644 --- a/extensions/physics-nodes/CCPhysicsSprite.h +++ b/extensions/physics-nodes/CCPhysicsSprite.h @@ -25,6 +25,7 @@ #include "2d/CCSprite.h" #include "extensions/ExtensionMacros.h" +#include "extensions/ExtensionExport.h" struct cpBody; class b2Body; @@ -43,7 +44,7 @@ NS_CC_EXT_BEGIN - If you update the rotation or position manually, the physics body will be updated - You can't enble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time */ -class PhysicsSprite : public Sprite +class CC_EX_DLL PhysicsSprite : public Sprite { public: diff --git a/extensions/proj.win32/libExtensions.vcxproj b/extensions/proj.win32/libExtensions.vcxproj index b3a911b84e..0e4d44ebe1 100644 --- a/extensions/proj.win32/libExtensions.vcxproj +++ b/extensions/proj.win32/libExtensions.vcxproj @@ -17,7 +17,7 @@ - StaticLibrary + DynamicLibrary Unicode v100 v110 @@ -26,7 +26,7 @@ v120_xp - StaticLibrary + DynamicLibrary Unicode v100 v110 @@ -69,7 +69,7 @@ Disabled $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;_LIB;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_DEBUG;COCOS2D_DEBUG=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USREXDLL;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -80,13 +80,21 @@ 4267;4251;4244;%(DisableSpecificWarnings) true + + libcocos2d.lib + $(OutDir);%(AdditionalLibraryDirectories) + + + $(OutDir);%(AdditionalLibraryDirectories) + libcocos2d.lib;opengl32.lib;glew32.lib;libcurl_imp.lib;libchipmunk.lib;libBox2D.lib;glfw3.lib;%(AdditionalDependencies) + MinSpace true $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\unzip;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\libwebsockets\win32\include;$(EngineRoot)external\win32-specific\zlib\include;..\;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;_LIB;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_WINDOWS;NDEBUG;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;_USREXDLL;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -97,6 +105,10 @@ true false + + $(OutDir);%(AdditionalLibraryDirectories) + libcocos2d.lib;opengl32.lib;glew32.lib;libcurl_imp.lib;libchipmunk.lib;libBox2D.lib;glfw3.lib;%(AdditionalDependencies) + @@ -123,6 +135,7 @@ + diff --git a/extensions/proj.win32/libExtensions.vcxproj.filters b/extensions/proj.win32/libExtensions.vcxproj.filters index fe37d0def2..fcad0bd423 100644 --- a/extensions/proj.win32/libExtensions.vcxproj.filters +++ b/extensions/proj.win32/libExtensions.vcxproj.filters @@ -157,5 +157,6 @@ physics_nodes + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index 0bd4855f12..a4ebe80659 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -23,8 +23,8 @@ v100 v110 v110_xp - v120 - v120_xp + v120 + v120_xp Application @@ -32,8 +32,8 @@ v100 v110 v110_xp - v120 - v120_xp + v120 + v120_xp @@ -73,7 +73,7 @@ Disabled ..\Classes;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;CC_CONSTRUCTOR_ACCESS=public;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp index 6c392cc8a6..fdef802b13 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp @@ -49,7 +49,7 @@ void CustomImageView::initRenderer() ImageView::initRenderer(); _label = Label::create(); - ProtectedNode::addChild(_label, getLocalZOrder() + 1, -1); + addChild(_label, getLocalZOrder() + 1, -1); } void CustomImageView::setText(const std::string &text) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp index 43ec7bcc2d..af2f041c81 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp @@ -75,7 +75,7 @@ void CustomParticleWidget::setParticlePlist(const char *plist) _emitter = ParticleSystemQuad::create(plist); } //Warning!!! don't forget to set the position - addProtectedChild(_emitter , getLocalZOrder() + 1, -1); + addChild(_emitter , getLocalZOrder() + 1, -1); this->setParticlePosition(Vec2::ZERO); _emitterPlist = plist; diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 97dd1dc4de..14952e3914 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -74,7 +74,7 @@ Disabled ..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;COCOS2DXWIN32_EXPORTS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -90,7 +90,7 @@ true Windows MachineX86 - libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;libcocos2d.lib;libExtensions.lib;libAudio.lib;libGUI.lib;libCocosStudio.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;%(AdditionalDependencies) @@ -106,7 +106,7 @@ MaxSpeed true ..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\network;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\win32\include;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;CC_CONSTRUCTOR_ACCESS=public;%(PreprocessorDefinitions) MultiThreadedDLL true @@ -118,7 +118,7 @@ false - libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;websockets.lib;libcocos2d.lib;libExtensions.lib;libAudio.lib;libGUI.lib;libCocosStudio.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;%(AdditionalDependencies) $(OutDir)$(ProjectName).exe $(OutDir);%(AdditionalLibraryDirectories) false diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 3404238b21..2133d49f72 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -738,21 +738,6 @@ Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - Classes\UITest\CocostudioGUISceneTest\UIButtonTest @@ -855,6 +840,21 @@ Classes\UITest\CocostudioGUISceneTest + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + @@ -1463,21 +1463,6 @@ Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - - - Classes\UITest\CocostudioGUISceneTest\CustomWidget - Classes\UITest\CocostudioGUISceneTest\UIButtonTest @@ -1580,5 +1565,20 @@ Classes\UITest\CocostudioGUISceneTest + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + \ No newline at end of file From 76c12e90293852a1f93ac3580441bd7a1a0897b7 Mon Sep 17 00:00:00 2001 From: zhangcheng Date: Tue, 22 Jul 2014 10:02:00 +0800 Subject: [PATCH 2/2] 1. add export to function CocosGUIVersion() --- cocos/ui/CocosGUI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index dd1fa46bbb..9f72d0eb32 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -55,7 +55,7 @@ THE SOFTWARE. NS_CC_BEGIN namespace ui { -const char* CocosGUIVersion(); +CC_GUI_DLL const char* CocosGUIVersion(); } NS_CC_END