diff --git a/cocos2dx/platform/CCFileUtils.h b/cocos2dx/platform/CCFileUtils.h index 30f62d9885..479f1f5149 100644 --- a/cocos2dx/platform/CCFileUtils.h +++ b/cocos2dx/platform/CCFileUtils.h @@ -90,7 +90,7 @@ public: @brief Get the writeable path @return The path that can write/read file */ - static const std::string getWriteablePath(); + static std::string getWriteablePath(); /** @brief Set/Get whether pop-up a message box when the image load failed diff --git a/cocos2dx/platform/wophone/CCFileUtils_wophone.cpp b/cocos2dx/platform/wophone/CCFileUtils_wophone.cpp index 678dea598a..c87af2771d 100644 --- a/cocos2dx/platform/wophone/CCFileUtils_wophone.cpp +++ b/cocos2dx/platform/wophone/CCFileUtils_wophone.cpp @@ -26,6 +26,10 @@ THE SOFTWARE. #include #include "CCApplication.h" +#include + +using namespace std; + NS_CC_BEGIN; // record the resource path @@ -250,4 +254,9 @@ void CCFileUtils::setRelativePath(const char* pszRelativePath) CCAssert(0, "Have not implement!"); } +string CCFileUtils::getWriteablePath() +{ + return string(CCApplication::sharedApplication().getAppDataPath()); +} + NS_CC_END; diff --git a/cocos2dx/proj.wophone/Makefile.ARM b/cocos2dx/proj.wophone/Makefile.ARM index 2e56558f83..464cd997cb 100644 --- a/cocos2dx/proj.wophone/Makefile.ARM +++ b/cocos2dx/proj.wophone/Makefile.ARM @@ -120,7 +120,8 @@ OBJECTS = \ $(OBJECTS_DIR)/CCTMXTiledMap.o \ $(OBJECTS_DIR)/CCTMXXMLParser.o \ $(OBJECTS_DIR)/CCTouchDispatcher.o \ - $(OBJECTS_DIR)/CCTouchHandler.o + $(OBJECTS_DIR)/CCTouchHandler.o \ + $(OBJECTS_DIR)/CCUserDefault.o ADD_OBJECTS += @@ -405,4 +406,8 @@ $(OBJECTS_DIR)/CCTouchDispatcher.o : ../touch_dispatcher/CCTouchDispatcher.cpp $(OBJECTS_DIR)/CCTouchHandler.o : ../touch_dispatcher/CCTouchHandler.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCTouchHandler.o ../touch_dispatcher/CCTouchHandler.cpp + +$(OBJECTS_DIR)/CCUserDefaultTest.o : ../support/CCUserDefaultTest.cpp + $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CCUserDefaultTest.o ../support/CCUserDefaultTest.cpp + diff --git a/cocos2dx/proj.wophone/cocos2d-wophone.vcproj b/cocos2dx/proj.wophone/cocos2d-wophone.vcproj index 994e22c90b..a1506445af 100644 --- a/cocos2dx/proj.wophone/cocos2d-wophone.vcproj +++ b/cocos2dx/proj.wophone/cocos2d-wophone.vcproj @@ -576,6 +576,10 @@ RelativePath="..\include\ccTypes.h" > + + @@ -740,6 +744,10 @@ RelativePath="..\support\CCProfiling.h" > + + diff --git a/cocos2dx/support/CCUserDefault.cpp b/cocos2dx/support/CCUserDefault.cpp index 485747a57f..995f9e863b 100644 --- a/cocos2dx/support/CCUserDefault.cpp +++ b/cocos2dx/support/CCUserDefault.cpp @@ -298,7 +298,6 @@ void CCUserDefault::initXMLFilePath() if (! m_sbIsFilePathInitialized) { m_sFilePath += CCFileUtils::getWriteablePath() + XML_FILE_NAME; - CCLog(m_sFilePath.c_str()); m_sbIsFilePathInitialized = true; } } diff --git a/tests/test.wophone/Makefile.ARM b/tests/test.wophone/Makefile.ARM index 3dba224e46..dd3db794d3 100644 --- a/tests/test.wophone/Makefile.ARM +++ b/tests/test.wophone/Makefile.ARM @@ -104,7 +104,8 @@ OBJECTS = \ $(OBJECTS_DIR)/Paddle.o \ $(OBJECTS_DIR)/TouchesTest.o \ $(OBJECTS_DIR)/TransitionsTest.o \ - $(OBJECTS_DIR)/ZwoptexTest.o + $(OBJECTS_DIR)/ZwoptexTest.o \ + $(OBJECTS_DIR)/UserDefaultTest.o ADD_OBJECTS += @@ -329,4 +330,7 @@ $(OBJECTS_DIR)/ZwoptexTest.o : ../tests/ZwoptexTest/ZwoptexTest.cpp $(OBJECTS_DIR)/CurlTest.o : ../tests/CurlTest/CurlTest.cpp $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/CurlTest.o ../tests/CurlTest/CurlTest.cpp + +$(OBJECTS_DIR)/UserDefaultTest.o : ../tests/UserDefaultTest/UserDefaultTest.cpp + $(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/UserDefaultTest.o ../tests/UserDefaultTest/UserDefaultTest.cpp diff --git a/tests/test.wophone/test.wophone.vcproj b/tests/test.wophone/test.wophone.vcproj index 37d8a0e1a2..9a861fd1e3 100644 --- a/tests/test.wophone/test.wophone.vcproj +++ b/tests/test.wophone/test.wophone.vcproj @@ -975,6 +975,18 @@ > + + + + + +