flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Taylor <...@davetaylor.name>
Subject Newb making mxmlc unhappy: -define's not going through
Date Mon, 21 Nov 2016 22:27:06 GMT
Hi, my name’s Dave.  This will likely sound backwards, but I’m migrating an Air game with
a node/js back-end from a heavier Jenkins/hudson/ant/svn build process to a lighter-weight
bash/git process in order to streamline devops for a small team managing multiple game forks.
 I’m a Jenkins, ant, hudson, ActionScript, and java newb, but I’m learning as fast as
I can. Thanks in advance for your patience!

I’m hitting some really hard to understand behaviour from the mxmlc compiler that makes
me think I am passing it arguments in a violently bad way.  It seems that my -define arguments
on the command line are not surviving the transition to source. It’s spitting out a ton
of errors about how CONFIG::THIS or CONFIG::THAT is not defined when it gets to their use
in various parts of the source code, but I’m starting to think that might be a side-effect
of a deeper issue I’m not understanding, because I’m also getting this error:

Syntax error: ':' is not allowed here

There is no config.as file in that directory.  There is a CONFIG.as file in a completely different
directory, but there is no colon anywhere in it.  The only thing in it is “package { public
namespace CONFIG ; }” spaced over about 4 lines.  I can remove that other CONFIG.as file
with no effect on the behaviour.  I’ve also tried watching that build directory to see whether
mxmlc generates a config.as file.  If it does, its lifespan is less than one second, because
I don’t see it appear.

I am also getting a couple of Internal Errors that look like this:

Internal error: Unable to generate code for '?'
                   case "dev":

It’s the first case of a pretty mundane switch statement.  It doesn’t complain about other
case statements in that switch, and it hasn’t changed from the one that the Jenkins/ant-driven
mxmlc compiles successfully.  The fact that it’s an “internal error” along with that
previous error about the file that doesn’t exist is what makes me think I’ve done something
particularly awful to put mxmlc in something of a state.

I’ve tried to very meticulously copy the ant-based mxmlc parameters to the bash mxmlc command
line, which currently looks like this:

../../servers/jenkins/flex_sdk_4.6/bin/mxmlc -target-player=28 -swf-version=29 -compiler.debug=false
-compiler.actionscript-file-encoding=UTF-8 -compiler.show-actionscript-warnings=true -compiler.strict=true
-incremental=true -keep-generated-actionscript=false -output ../android/redacted-73ef2/redacted.swf
-use-network=true -compiler.as3=true -compiler.optimize=true -static-link-runtime-shared-libraries=true
-compiler.library-path+=../../src/client-flash/lib -load-config+=../../servers/jenkins/flex_sdk_4.6/frameworks/air-config.xml
-compiler.source-path+=../../src/client-flash/as -compiler.source-path+=../android/generated
-default-size 1024 768 -define=CONFIG::BUILD_ENV,env -define=CONFIG::GAME,redacted '-define=CONFIG::GAME_NAME,A
Name With Spaces In It' -define=CONFIG::LOADBALANCER_IP, -define=CONFIG::LOADBALANCER_PORT,5222
-define=CONFIG::CHATSERVER_PORT,5223 -define=CONFIG::PAYMENTSERVER_PORT,8081 -define=CONFIG::PAYMENTSERVER_URL,https://payment.redacted.com:8081
-define=CONFIG::BUILD_PLATFORM,phone -define=CONFIG::AIR,true -define=CONFIG::LOCAL_MODE,false
-define=CONFIG::ENABLE_CRASH_APP_ON_CHEAT,true ../../src/client-flash/as/MainClass.as

I’ve attached the full error log below.

I’m using flex 4.6, btw.  I’ve tried running this on both OSX and Windows w/ cygwin, and
the errors are identical.

Any clues as to what might be amiss?  I’ve been banging my head on this for over half a
day, and I’m running out of ideas.

Thanks so much for your help!  It’s for a fun game featuring what I think might be one of
the first Rubenesque female heroes in a game I’ve ever seen, so noble cause n stuff!  :)


View raw message