Commit Graph

28 Commits

Author SHA1 Message Date
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
Wilson E. Alvarez c0e1e91373 Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. (#16716)
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.

Other minor trivial changes were applied.

* Fixed Android compilation error

* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
mogemimi c03dd85c3f Remove redundant includes (#16285) 2016-08-01 10:22:35 +08:00
James Chen 8e19db7d26 fix AssetsManager could not work after Pull Request #13893 was merged. 2016-06-22 14:31:26 +08:00
minggo d66b686bd8 Merge pull request #15816 from yalab/valuemap_reject_none
Fixed to fail FileUtils::writeValueMapToFile on iOS.
2016-06-16 14:20:46 +08:00
mogemimi a348cbda8b Move StringUtils functions from deprecated header file to ccUTF8.h (#15835)
* Move StringUtils functions outside of deprecated header

* Replace deprecated headers with 'base/ccUTF8.h'
2016-06-15 15:01:26 +08:00
yalab 598be0840c Fixed to fail FileUtils::writeValueMapToFile on iOS. 2016-06-10 14:53:11 +09:00
Shulepov 758425cfd5 Refactor CCFileUtils-apple to remove code duplication (#15645)
* Refactor CCFileUtils-apple to remove code duplication of conversion from CCValue to NSObject and vise versa

* CCFileUtilsApple: rename helper functions
2016-05-23 18:26:19 +08:00
Naruto TAKAHASHI 79b9a191d0 declare explicitly FileUtilsApple destructor 2016-05-09 21:50:52 +09:00
minggo 095f404738 Merge pull request #14735 from linguofeng/patch-2
CCFileUtils-apple.mm Grammatical errors
2016-04-20 11:00:38 +08:00
Бесшапошников Никита a3717b6907 Add error logging of incorrect directory creating. 2016-04-19 10:17:31 +03:00
Бесшапошников Никита e555ed5b9e Implement createDirectory for apple platform. 2016-04-18 12:52:20 +03:00
xpol 3780064a82 Allow inherit form platform fileutils (#15304)
* Allow inherit form FileUtilsLinux, FileUtilsWin32 and FileUtilsWinRT.

* Removed objc from CCFileUtils-apple.h

define FILEUTILS_APPLE_ENABLE_OBJC to enable FileUtilsApple:setBundle() for compatibility.

* Smart pointers heal us all.

* Add config macro in ccConfig.h and prefix with CC_.

* enabled by default.
* use #if rather than #ifndef.

* Do not deprecate setBundle.
2016-04-14 11:59:24 +08:00
Xpol Wan cd1c26ecd1 Allow plist and other ValueMap files be (easy) decrypted.
The origin implementation of `FileUtilsApple::getValueMapFromFile()` reads the contents of file and parse it by calling one Apple API.
This make it harder to decrypt user encrypted plist files.

This commit use the `FileUtils::getDataFromFile()` to get read file data first then use `getValueMapFromData()`
to parse it into a ValueMap. Where `FileUtils::getDataFromFile()` can be overwrite by user's decoding file utils (say `DecodingFileUtils`).

I know that user's `DecodingFileUtils` can also overwrite `getValueMapFromFile`, but this pr make the author of `DecodingFileUtils` less suffering.
2016-03-29 21:39:16 +08:00
Xpol Wan 931d56bc10 Fixes includes in .m and .mm files. 2016-03-21 11:02:00 +08:00
zhangcheng 2b1511096e Fix ValueVector read type error. 2016-02-16 17:01:54 +08:00
zhangcheng 53cbc2d32b Fix value type error when read value of bool type from .plist file. 2016-02-16 16:50:54 +08:00
Xpol Wan f3aef10d33 Should be const reference for data/string args to be written. 2016-01-27 11:22:46 +08:00
linguofeng 278bbb77c5 CCFileUtils-apple.mm Grammatical errors
`termniate` -> `terminate`
2015-12-18 17:34:52 +08:00
Vincent Yang e65b01bdc0 Merge pr11866: FileUtilsWin32 correct use all unicode version winapi. 2015-07-13 17:06:01 +08:00
Vincent Yang 1711a70869 Merge v3 branch. 2015-07-10 16:39:36 +08:00
Vincent Yang 52293ad451 Fixed #9586 : FileUtils::isDirectoryExist not correct on Android when using relative path in 'assets'. 2015-07-10 14:37:42 +08:00
jianglong0156 abee4a376a add write api in FileUtils
bool writeStringToFile(std::string dataStr, const std::string& fullPath);
bool writeDataToFile(Data retData, const std::string& fullPath);
bool writeValueMapToFile(ValueMap& dict, const std::string& fullPath);
bool writeValueVectorToFile(ValueVector vecData, const std::string& fullPath);
and
formate the FileUtils code
2015-07-07 14:06:59 +08:00
Michael Sotnikov f962e14b43 replace const_cast with mutable in path getters;
more getters (is*/get*) became const;
2015-04-07 17:15:15 +03:00
kpkhxlgy0 99dea9395d enable setWritablePath on platform win32 and mac 2015-02-28 18:21:57 +08:00
Vladimir Timofeev 1e8aeb7fd2 Minizip
1. Add cmake module for finding minizip in system
2. Check that system installed minizip recent enough for us
3. As right minizip exists only for MSYS2 (mingw), use our embedded version on all other platforms
4. Correctly include minizip as <minizip/unzip.h> if it is found from system (make it compatible to current build system, so by default all should stay same)
5. Remove one unused include of unzip.h
2014-11-16 22:41:37 +03:00
Ricardo Quesada 9082ca18c3 Platform fixed 2014-09-09 16:50:02 -07:00