4 Replies Latest reply on Nov 3, 2010 9:58 PM by ImAStreamer

    How to add additional files into Native Installer?

    ImAStreamer Level 1

      I've been advised to post this question in this forum after being unable to get a resolution in the AIR forums:


      I have extra text and XML files used as configuration files I'd like to  package and install into the application directory with my AIR app.  I'm  trying to create a Native Install package in Flash Builder and I can't  figure out how to include these extra files that will be installed.  Is  there a way to do this in Flash Builder or do I have to use some other  method to achieve this?


      Here is what I have tried so far without success:



      No matter what I do when I click:

      Export Release Build ->Next->Next and get to the AIR file contents screen, I never see any additional files to be included in my AIR file.


      1) I've tried placing files in the myapp\src folder.

      2) I've tried placing files in the myapp\bin-debug folder.

      3) I've tried adding a New->File into my project and associating it with a file sitting in the myapp\src folder


      None of these things work.


      WIthout adding these extra files to the AIR app, my project will be pointless. How can I achieve this in Flash Builder?


      Thank you!

        • 1. Re: How to add additional files into Native Installer?
          George Comninos Adobe Employee

          The extra files should show up in the AIR package contents table in the AIR Export step which lets you select which files to include. When you copy these files to your src folder and do a build, are they auotmatically copied to your bin-debug folder? If not then the problem lies somewhere there. Make sure "Copy non-embedded files to putput folder" is checked in your Project Properties->Flex Compiler section.

          • 2. Re: How to add additional files into Native Installer?
            ImAStreamer Level 1

            I have discovered how to get it to work, but I'm not sure what the problem is. I can consistently duplicate it.


            If I manually copy a file into the myapp\src folder, the file does not get copied to the bin-debug folder and, thus does not get added to the list of files to include.  I build my app dozens of times. This file NEVER appears in the file list under the src folder in the Package Explorer View.  Even if I close Flash Builder and open it again, my added file NEVER appears in the file list.


            Only if I right click on my project in the Package Explorer View and select Refresh, will the file appear in the list.  Then and only then, when I go through the Export process, the file will appear in the list and be included in the AIR package.


            That seems like a bug to me.  Even if you said it wouldn't detect the file being added while Flash Builder is open, it should at least check the project folder when I open it and update the list with any new files.


            I'd still like to know how to get this to work without manually refreshing the project although admittedly I won't be adding files to the project often.


            The "Copy non-embedded files to output folder" option is something good to know. I initially unchecked it and saved and rechecked it, just to be sure it was set.

            • 3. Re: How to add additional files into Native Installer?
              George Comninos Adobe Employee

              Ah ok I see what the problem is now. The issue is with the the way Eclipse (and thus Flash Builder) deal with files and workspaces. Eclipse maintains its own representation of the file system view for files/projects in your workspace. If you add files manually outside of Eclipse, it will not notice, you must tell it to refresh. Whenever I sync files in Perforce for instance, I always select all top level working sets in Eclipse and hit Refresh.


              Now there is an option for auto-refreshing, it is under  Preferences->General->Workspace, the "Refersh automatically"  checkbox. Checking that will help you when you work outside Eclipse in  like source control systems etc.


              Instead of adding files via the file system, you can also copy files from Windows/Mac file system and then Paste them into the Package Explorer View in Flash Builder, then it will know about them.


              Hope that helps!


              • 4. Re: How to add additional files into Native Installer?
                ImAStreamer Level 1

                The auto-refresh option is exactly what I needed! Once I enabled it, everything works as expected.  As soon as I dropped the file in the folder manually, it appeared in the Package Explorer View and it was available for export in the AIR package.


                Problem solved. Thank you so much!!!!