Having a flex project, how to compile it with mxmlc (not using flashBuilder gui)?
Asked Answered
C

1

2

So I hava a usual flex project folder with .actionScriptProperties .flexProperties .project files in it and src, libs, html-template dirs. All my libs are in libs folder and my project is generally theme independent (I use costume theam). Jenerally it is simple live TCP stream video player - only default mx components. I want to have some kind of bat/sh script file for compiling my project from command terminal/cmd in realise mode into specific directory. How to do such thing?

Is there anything like

mxmlc compileDefaultApplication fromProject=pathToProject toRealiseDir=pathToRealiseDir

?

Commanding answered 29/3, 2011 at 16:41 Comment(2)
Along with the answer below you may want to look into HFCD (hellfire compiler daemon, which lives outside the IDE process and will run the compilations for you)Dicho
Another alternative is "mavenizing" the project that is setting up the directory structure and a pom.xml file so that maven can run the build, you can use the flexmojos:flexbuilder plugin to create project properties for import into eclipse among other plugins for other IDEs and can choose to compile from the command line with a simple "mvn clean install". This is more of a change in process though and would require some consideration for it's advantages/drawbacks.Dicho
D
5

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_13.html

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_09.html#138195

mxmlc MyApp.mxml load-config my-app-config.xml output /pathToRelease

In order to get the config in Flex/Flash builder you can go to the project properties and add this to the compiler arguments:

 -dump-config C:\Users\shusain\Desktop\slotConfig.xml

with an appropriate path

Dicho answered 29/3, 2011 at 17:17 Comment(4)
grate!) Now My Next question - how to create variables in it? (I need such thing because it generates absolute paths while I want to make it more flexable=)Commanding
And is it possible to put it into specific location not into bin with swf but into the same folder where .project is?Commanding
Hi Blender (BTW love the program if that's what you're name refers to, lots of awesome for free). Sorry got myself into a project for the moment, and I don't know off hand, as we use maven here for the most part, but I'll try to come back to this today after hours and let you know if I find a way to make these other things happen.Dicho
I can answer this right quick -- this trick works great for multi-environment conditional compiler blocks if you're pushing out to different environments etc.: -define+=NAMESPACE_NAME::var_name,value. Darron Shall did some of this stuff in a json parser -- do a google search for "JSON_TOKEN::COMMA,0" for specific examples.Ardeliaardelis

© 2022 - 2024 — McMap. All rights reserved.