1

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.

chamberlainpi
  • 4,854
  • 8
  • 32
  • 63

2 Answers2

0

No the Compiler Constants are defined per project in FlashBuilder. You could simplify the edit ing process by using ANT and having multiple build files for a project to avoid opening the project properties. Also you could reuse most of your build file(s) between projects.

seand
  • 71
  • 2
  • 4
  • hmm what about setting the -load-config+=some_config_file.xml compiler argument? I think that would be the way to go, but I'm not sure of the correct XML format to write a valid Flash Builder config file. – chamberlainpi Jun 18 '14 at 18:37
0

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

Community
  • 1
  • 1
chamberlainpi
  • 4,854
  • 8
  • 32
  • 63