Projects > cpp > Issues > Bug #3346

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

build_native.sh local.properties parsing breaks on comments

Bug #3346 [Closed]
fadookie 2013-12-04 23:44 . Updated about 2 years ago

For some reason in cocos2d-x-3.0alpha0-pre, the build_native.sh included in the sample code (in this instance, the TestCpp application) includes a parser for the local.properties file. However, this code doesn’t parse the file properly, printing errors when there are any comments in the file. For example, when dropping in the attached local.properties file, the script prints:

./build_native.sh: line 41: declare: `#Test comment
#Another test
#Test3
otherprop=1': not a valid identifier
  • I don’t see these properties used anywhere so I don’t know why this parsing code was added
  • The parsing code doesn’t look fault-tolerant to me

Our build system uses local.properties to configure ant. If we upgrade to cocos2d-x-3.0 I don’t want to have to support a second parser, especially if it’s brittle. If you want to be able to have a config file for build_native.sh I’d suggest possibly making the config live in a seperate file instead of trying to piggyback on this part of the java build system.

Alternatively, you could rewrite this script as an ant task which could read property files correctly if you are really wanting to use the data in the local.properties file for some reason.

local.properties (118 Bytes) fadookie, 2013-12-04 23:44

walzer@cocos2d-x.org 2014-10-08 02:46

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8276

Atom PDF

Status:Closed
Start date:2013-12-04
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:android
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.