Exporting release build - Flex through Intellij Idea
Asked Answered
S

3

6

How do I generate release build of my Flex Application
through IntelliJ Idea, like I do in Flex Builder?

Stuyvesant answered 5/8, 2010 at 15:42 Comment(0)
R
10
  1. Right click on any project and select module setting.
  2. Select tab "Flex compiler setting"
  3. Last field on this tab is "Additional compiler options:" add "-debug=false" without double quotes to it.
  4. Do this for all the subprojects. (From this form only you can choose different projects).
  5. do a project Rebuild and you will get a smaller swf.

Only problem is you need to keep separate project files for debug and release build, but thats ok, as you release builds are done rarely.

Rhythm answered 25/8, 2010 at 15:20 Comment(0)
L
2

Alternate answer:

Instead of creating a Flex Module, create a Java Module, and add 2 Flex Facet's to it. One facet will be configured as the debug facet, the other as the release facet. This process will create 2 swf files, debug and release versions.

  1. Create a java module, for example "FlexHelloWorld". Do not add a flex facet yet.
  2. In the project view, right click on the project and select module setting
  3. Under the Modules option, select the "FlexHelloWorld" module
  4. Click the "+" symbol, add Flex Facet
  5. Rename facet to "Debug"
  6. Enter your main class name
  7. Enter "debug.swf" as the output file name
  8. Click apply
  9. Click the "+" symbol, add Flex Facet
  10. Rename facet to "Release"
  11. Enter your main class name
  12. Enter "release.swf" as the output file name
  13. Under additional compiler options, add "-debug=false -optimize=true"
  14. Click ok
  15. Build the module. In the output directory, you will have "debug.swf" and "release.swf" files.

Note: In your HTML wrapper, you will have to call either debug.swf or release.swf. Or you could create 2 wrappers.

Loganloganberry answered 30/1, 2011 at 7:37 Comment(0)
J
1

Does IntelliJ support Ant? Maybe not the answer you're looking for, but you could use the Flex Ant Tasks to build outside of FB.

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

Joan answered 7/8, 2010 at 3:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.