0
votes

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?

3

3 Answers

2
votes

You can export and import projects between Flash Builder on Mac and Windows without any OS specific settings.

2
votes

Flash Builder has built in support for GIT. Simply set your project(s) with GIT and all your code will be shared between your 2 platforms.

My setup is often to place most of the project into an actionscript library project and then have a platform specific project that incorporate my library(ies) and publish to the platform (usually one class only).

Here's a rundown on how to do it:

  • Create a Git project using your favorite Git depository (in your case it has to be online or in your network and not just local of course). If you have your own like me great if not purchase a private one or use a public one.

  • Write down your depository URI (clone) and depository name.

  • Open Flash Builder

  • Go to File-> Import
  • Open the Git section
  • Pick Projects from Git -> click next
  • Choose URI -> Click Next
  • Paste your URI in the URI section at the top. (all fields should fill up)
  • Enter your username and password and check store in secure store
  • click next
  • source is probably empty at this point so click next again, if not pick a branch.
  • now set the local directory where your project will be cloned (should be inside a FB workspace)

At this point I usually set the directory inside my workspace with the name of the depository name.

  • Select Use the New Project Wizard and click finish.
  • This opens the Wizard where you can select the project type (let's say a actionscript library).
  • Go through all screen and create your project.
  • That's it you are set with Git.

Do same operation on your other platform and you end up with a project on each platform that are linked via Git. When you work on one just commit your changes and then pull those changes on the other platform and so on.

For easy convenience I recommend this approach:

  • Shared project (via Git) is set as a actionscript library.
  • Each platform has its own project (not linked) that references that linked library (this makes it easy to implement platform specific features). That platform specific project is made up of just one class (a starting point for the library).
0
votes

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