Search code examples
actionscript-3flash-builderworkspacemultiple-projectscompile-time-constant

How to setup Flash Builder compiler constants ONCE for multiple projects in the same Workspace?


Is there any way to link some Flex or AS3 compiler options so that multiple projects in the same workspace can share the same Compiler Constants values?

enter image description here

Basically, I will need to frequently change the "LANG_ENG" and "LANG_FR" to true and false, for 3 or more projects. Instead of having to go in each one, I'd like a one-change-affects-all solution.


Solution

  • This question ties-in with this one: How can I use relative-paths in Flash Builder's "-load-config=..." compiler argument?

    enter image description here

    As for the format, you can write something along these lines:

    <?xml version="1.0" encoding="UTF-8"?>
    <flex-config>
    <compiler>
        <define append="true">
          <name>COMPILE::LANG_ENG</name>
          <value>false</value>
        </define>
        <define append="true">
          <name>COMPILE::LANG_FR</name>
          <value>true</value>
        </define>
    </compiler>
    </flex-config>
    

    Which in this case, would set the LANG_FR to true, LANG_ENG to false