How do I generate release build of my Flex Application
through IntelliJ Idea, like I do in Flex Builder?
Exporting release build - Flex through Intellij Idea
Asked Answered
- Right click on any project and select module setting.
- Select tab "Flex compiler setting"
- Last field on this tab is "Additional compiler options:" add "-debug=false" without double quotes to it.
- Do this for all the subprojects. (From this form only you can choose different projects).
- 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.
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.
- Create a java module, for example "FlexHelloWorld". Do not add a flex facet yet.
- In the project view, right click on the project and select module setting
- Under the Modules option, select the "FlexHelloWorld" module
- Click the "+" symbol, add Flex Facet
- Rename facet to "Debug"
- Enter your main class name
- Enter "debug.swf" as the output file name
- Click apply
- Click the "+" symbol, add Flex Facet
- Rename facet to "Release"
- Enter your main class name
- Enter "release.swf" as the output file name
- Under additional compiler options, add "-debug=false -optimize=true"
- Click ok
- 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.
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
© 2022 - 2024 — McMap. All rights reserved.