I'm currently using Terminal to compile with MXMLC. Each time I want to compile I need to introduce the file name, and the first time I open Terminal I also need to specify the path of the file.

I'm sure there is a faster way to do this. I'm completely new to programming, and I haven't explored the possibilities of command line and executable files in Mac OS X.

I was wondering if there is a way to automate this task, like a executable file that automatically opens terminal and inputs the lines necessary for the compilation. I double click it and the compiled file is deployed. Is it possible?

Thanks for your time.

有帮助吗?

解决方案

There are lots of ways to compile a Flex application, but basically it should boil down to the following options:

  • let your IDE do it for you; there is no way to automate this process of course
  • use the command line interface (CLI) (that's what you're doing); I suppose you could write a batch file or a shell script or whatever Mac equivalent may exist to automate the process a little more
  • use ANT and the Flex ANT tasks that come with the SDK: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html; this is basically just a wrapper around the CLI, but it allows you to do other tasks like copying files, packaging, etc.
  • use a build and dependency management tool like Maven or Gradle to automate everything. Both of these tools are primarily targeted at Java building, but they both have a plugin for building Flex applications:

The choice is up to you of course, but I personally prefer GradleFx for its simplicity and comprehensiveness. (Disclaimer: I actually liked it so much that I became a contributor to the project, so I may no longer be impartial ;) )

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top