1 Reply Latest reply on Nov 1, 2010 4:34 AM by flexstone

    AIR Application Installer and Only Installing Select Files

    davedev066 Level 1

      I have a AIR desktop application where I want to allow the user to install the base application and the later add more media files to the application as they purchase the media files. Would it be possible to add the media files using the standard AIR installer? Or would I have to resort to a custom installer?


      When AIR installs an application does it complete delete the files from the previous install?


      Would it be possible to update the base application and not touch existing media files?


      Can you pass an install path to the AIR installer?

        • 1. Re: AIR Application Installer and Only Installing Select Files
          flexstone Level 1

          I have done something similar with a document management app.


          Once the app was installed it would check for a DVD / Thumb drive and silently copy all the documents from another drive to the (ASD) AppStorageDirectory.


          You could also download your media files to the AppStorageDirectory as well.


          When my app gets updated I have a function that deletes obsolete files from the ADS and leave the files I need to persist untouched.



          Here is a snippet that reads available drives and looks for a specific named drive and then creates an Array listing all the files which can

          then be copied using  SOURCE.copyToAsync(DESTINATION)...


          var os:String = Capabilities.os.substr(0, 3).toLowerCase();
                   var currentDrives:Array = (os=="mac") ? new File('/Volumes/').getDirectoryListing() : File.getRootDirectories() ;
                   var fileList:Array;
                   var fileCount:int = 0;
                   var fileListArr:Array = new Array();
                   for each(var file:File in currentDrives){
                       //trace ("Drive: " + file.name + " Size: " + file.size);
                           trace ("Drive: " + file.name + " Size: " + file.size);
                            fileList = (os=="mac") ? new  File('/Volumes/'+file.name).getDirectoryListing() :  new  File(file.name.getDirectoryListing()
                           for(var l:int = 0 ; l<fileList.length; l++){