Search code examples
actionscript-3apache-flexflex4flash-builder

Cross-platform Flash Builder workspace?


I develop on OSX supporting a huge Flex legacy project. Up until now we have simply used .air files but now I need to use the NativeProcess functionality and build the project with captive runtimes.

I haven't worked with adt before or with command line stuff on Windows so that is going to be my first investigation but as a fallback: is it possible to share a Flash Builder workspace between the OSX and PC versions of Flash Builder?

I use VMWare Fusion for Windows emulation and Flash Builder runs ok but I don't want to screw up my project workspace if there are platform specific stuff which gets written into the workspace.

Anyone done this before?


Solution

  • So the suggestions to use git are good (as is the exporting FB project suggestion) but I wanted to avoid as much additional code wrangling as I could.

    After much tinkering and googling I was able to write the .bat script below which packages the project as a captive runtime AIR app for Windows. I'm running Windows 7 on OSX through emulation with VMWare Fusion. VMWare allows shared folders so I was able to share my OSX Flash Builder workspace directory (not shown in snippet below) and ADT pulls the needed resources from there.

    Saving this file with a .bat extension and executing it launches ADT and it builds the project successfully.

    @echo off  
    
    set CERTIFICATE=yourCertificate.p12  
    set PW=certificatePassword  
    set SIGNING_OPTIONS=-storetype pkcs12 -keystore %CERTIFICATE% -storepass %PW%  
    set SOURCE_ROOT=bin-debug  
    set APP_XML=%SOURCE_ROOT%\Name-Of-App-app.xml  
    set DIST_PATH=bin-release  
    set DIST_NAME=Name-of-App  
    set UTILS_PATH=-C %SOURCE_ROOT%  
    set FILE_OR_DIR=-e %SOURCE_ROOT%\Name_of_App.swf Name-of-App.swf  
    set OUTPUT=%DIST_PATH%\%DIST_NAME%  
    
    set AIR_PACKAGE=adt -package -tsa none %SIGNING_OPTIONS% -target bundle %OUTPUT% %APP_XML% %FILE_OR_DIR% %UTILS_PATH% utils  
    
    echo %AIR_PACKAGE%  
     
    call adt -version  
    call %AIR_PACKAGE%  
    
    pause