Showing posts with label Command Line. Show all posts
Showing posts with label Command Line. Show all posts

Wednesday, January 19, 2011

Command line compilation.

For command line compilation we use the command mxmlc.

The steps to be followed mentioned below.

Step 1: Open command prompt window.
Step 2: Go to the Flex SDK Path. 
             (for e.g.: C:\Program Files\Adobe\Flash Builder4\Adobe Flash Builder 4\sdks\4.0.0\bin).
Step 3: Execute the command ‘mxmlc {Flex local folder path}\src\Sample.mxml’.
             (Sample {Flex local folder path} = D:\FlashBuilder_4_workspace\SampleProject).

Command line compilation - Normal Case.


If we need to include the resource bundle the execution command is as follows

    {Flex SDK Path}>mxmlc  -locale=en_US,fr_FR -include-resource-bundles
                                  resources -source-path={Flex local folder path}\locale\{locale} 
                                  {Flex local folder path}\src\Sample.mxml
  •  ‘-locale=en_US,fr_FR -include-resource-bundles resources’                            This string from varies according to the project.
  •   This string can accessed from the properties of current project.
Current project property selection.

  •            Then select the option ‘Flex Compiler’.
  •             Then copy the contents in the text box named                                                                 ‘Additional compiler  arguments’.
Additional Compiler Arguments .



Command line compilation - including Resource Bundle.




If we need to include external libraries the execution command is as follows

          {Flex SDK Path}>mxmlc -locale=en_US,fr_FR 
                                        -include-resource-bundles resources 
                                        -source-path={Flex local folder path}\locale\{locale} 
                                        library-path+={Flex local folder path}\libs\externalLibrary.swc
                                        {Flex local folder path}\src\Sample.mxml
  •       Normally we include external libraries in ‘lib’ folder.


Command line compilation - including Resource Bundle & External Libraries.




To know the current version of flex sdk , the following command to be executed.

          {Flex SDK Path}>mxmlc -version
         
          Sample result: Version 4.0.0 build 14159


Current flex sdk version detection.