6 Replies Latest reply on Jun 16, 2010 2:27 AM by dargre

    Packaging an AIR application in a native installer

    luisborlido

      Hi! I'm trying to create a native installer of my AIR Application,  because (I think) it's the only way make the native processes working.  But I have a problem: I used the following command to pack: "adt  -package -storetype pkcs12 -keystore myCert.pfx -target native  -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp-app.xml", but I get  the error: "File myApp-app.xml is not a valid AIRI or AIR file". In the  Flash Builder I use as additional compiler arguments:  "-locale=pt_PT,en_UK,fr_FR,de_DE,ro_RO,es_ES  -allow-source-path-overlap=true -source-path=assets" and I add the  source path "src/locale/{locale}/". What is the sintax for packing my  AIR application in a native installer? Thanks in advance.

        • 1. Re: Packaging an AIR application in a native installer
          chris.campbell Adobe Employee

          Hello,

          In case you haven't seen this document, I'd like to suggest taking a look at:

           

          Packaging an AIR application in a Native Installer

           

          If this doesn't help, can you post the contents of your descriptor file and the output of the command "adt -version"?

           

          Thanks,

          Chris

          1 person found this helpful
          • 2. Re: Packaging an AIR application in a native installer
            luisborlido Level 1

            Hi again! Thanks for the reply. I based myself on the link to see what command syntax I should use to pack my Air Windowed Application and it was the command that I presented in the previous post.

             

            adt version "2.0.1.12090"

             

             

            /***************************************************************************************** ************

                                                          My Descriptor File

            ****************************************************************************************** ***********/

            <?xml version="1.0" encoding="utf-8" standalone="no"?>
            <application xmlns="http://ns.adobe.com/air/application/2.0">

             

            <!-- Adobe AIR Application Descriptor File Template.

             

                Specifies parameters for identifying, installing, and launching AIR applications.

             

                xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.0
                        The last segment of the namespace specifies the version
                        of the AIR runtime required for this application to run.
                       
                minimumPatchLevel - The minimum patch level of the AIR runtime required to run
                        the application. Optional.
            -->

             

                <!-- A universally unique application identifier. Must be unique across all AIR applications.
                     Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
                <id>com.MyCompany.Application</id>

             

                <!-- Used as the filename for the application. Required. -->
                <filename>Production Control System</filename>

             

                <!-- The name that is displayed in the AIR application installer.
                     May have multiple values for each language. See samples or xsd schema file. Optional. -->
                <name>Production Control System</name>

             

                <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
                <version>2.1.3</version>

             

                <!-- Description, displayed in the AIR application installer.
                     May have multiple values for each language. See samples or xsd schema file. Optional. -->
                <!-- <description></description> -->

             

                <!-- Copyright information. Optional -->
                <!-- <copyright></copyright> -->

             

                <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
                <!-- <publisherID>My Company</publisherID> -->

             

                <!-- Settings for the application's initial window. Required. -->
                <initialWindow>
                    <!-- The main SWF or HTML file of the application. Required. -->
                    <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
                    <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
                   
                    <!-- The title of the main window. Optional. -->
                    <!-- <title></title> -->

             

                    <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
                    <systemChrome>none</systemChrome>

             

                    <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
                    <transparent>true</transparent>

             

                    <!-- Whether the window is initially visible. Optional. Default false. -->
                    <!-- <visible></visible> -->

             

                    <!-- Whether the user can minimize the window. Optional. Default true. -->
                    <!-- <minimizable></minimizable> -->

             

                    <!-- Whether the user can maximize the window. Optional. Default true. -->
                    <!-- <maximizable></maximizable> -->

             

                    <!-- Whether the user can resize the window. Optional. Default true. -->
                    <!-- <resizable></resizable> -->

             

                    <!-- The window's initial width in pixels. Optional. -->
                    <!-- <width></width> -->

             

                    <!-- The window's initial height in pixels. Optional. -->
                    <!-- <height></height> -->

             

                    <!-- The window's initial x position. Optional. -->
                    <!-- <x></x> -->

             

                    <!-- The window's initial y position. Optional. -->
                    <!-- <y></y> -->

             

                    <!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
                    <!-- <minSize></minSize> -->

             

                    <!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
                    <!-- <maxSize></maxSize> -->
                </initialWindow>

             

                <!-- We recommend omitting the supportedProfiles element, -->
                <!-- which in turn permits your application to be deployed to all -->
                <!-- devices supported by AIR. If you wish to restrict deployment -->
                <!-- (i.e., to only mobile devices) then add this element and list -->
                <!-- only the profiles which your application does support. -->
                <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
                <supportedProfiles>extendedDesktop</supportedProfiles>

             

                <!-- The subpath of the standard default installation location to use. Optional. -->
                <!-- <installFolder></installFolder> -->

             

                <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
                <!-- <programMenuFolder></programMenuFolder> -->

             

                <!-- The icon the system uses for the application. For at least one resolution,
                     specify the path to a PNG file included in the AIR package. Optional. -->
                <!-- <icon>
                    <image16x16></image16x16>
                    <image32x32></image32x32>
                    <image48x48></image48x48>
                    <image128x128></image128x128>
                </icon> -->

             

                <!-- Whether the application handles the update when a user double-clicks an update version
                of the AIR file (true), or the default AIR application installer handles the update (false).
                Optional. Default false. -->
                <customUpdateUI>true</customUpdateUI>
               
                <!-- Whether the application can be launched when the user clicks a link in a web browser.
                Optional. Default false. -->
                <!-- <allowBrowserInvocation></allowBrowserInvocation> -->

             

                <!-- Listing of file types for which the application can register. Optional. -->
                <!-- <fileTypes> -->

             

                    <!-- Defines one file type. Optional. -->
                    <!-- <fileType> -->

             

                        <!-- The name that the system displays for the registered file type. Required. -->
                        <!-- <name></name> -->

             

                        <!-- The extension to register. Required. -->
                        <!-- <extension></extension> -->
                       
                        <!-- The description of the file type. Optional. -->
                        <!-- <description></description> -->
                       
                        <!-- The MIME content type. -->
                        <!-- <contentType></contentType> -->
                       
                        <!-- The icon to display for the file type. Optional. -->
                        <!-- <icon>
                            <image16x16></image16x16>
                            <image32x32></image32x32>
                            <image48x48></image48x48>
                            <image128x128></image128x128>
                        </icon> -->
                       
                    <!-- </fileType> -->
                <!-- </fileTypes> -->

             

                <!-- iPhone/iPad -specific capabilities -->
                <!-- <iPhone> -->

             

                    <!-- A list of plist key/value pairs to be added to the application Info.plist -->
                    <!-- <InfoAdditions>
                        <![CDATA[
                            <key>UIDeviceFamily</key>
                            <array>
                                <string>1</string>
                                <string>2</string>
                            </array>
                            <key>UIStatusBarStyle</key>
                            <string>UIStatusBarStyleBlackOpaque</string>
                            <key>UIRequiresPersistentWiFi</key>
                            <string>YES</string>
                        ]]>
                    </InfoAdditions> -->

             

                <!-- </iPhone> -->

             

            </application>

            • 3. Re: Packaging an AIR application in a native installer
              dargre

              I am also having a problem with this although I have got a little further than luisborlido. I am using AIR2.0Beta2, with ADT version 2.0.0.11670. AIR2beta2 is installed on my system. I compile my app (accesses Java via NativeProcess) using the command line:

              adt -package -tsa none -storetype pkcs12 -keystore certificate.p12 -target native MyApp.exe MyApp-app.xml MyApp.swf.

              this asks me for a password for the certificate, then creates a very nice looking MyApp.exe file. However when I double click to install the thing I am deeply saddened to receive the following message:

              "This application requires an update to Adobe AIR but downloading that update on your system is not allowed by you administrator. Please contact your administrator."

              Given that I am the administrator, and there is already the latest version of AIR installed, I am left a bit mystified. I guess there are some internet access defaults that I need to set ... any clues?

              Thanks!

              1 person found this helpful
              • 4. Re: Packaging an AIR application in a native installer
                luisborlido Level 1

                Hi again! On windows, my application is already working. I used the command line similar to dargre adt -package -storetype pkcs12 -keystore key.p12 -target native MyApp.exe MyApp-app.xml MyApp.swf. Now, I just need to figure out why is not working on Ubuntu. I used de command "adt_lin -package -storetype pkcs12 -keystore key.p12 -target native  MyApp.deb MyApp-app.xml MyApp.swf" and all went fine. But when I install, a warning appears saying that is already installed a newer version. When I figure out what it's wrong I post here.

                 

                 

                Edit: It's already working on Ubuntu too. I needed to remove the package through dpkg -r and not with apt-get remove.

                dargre: I'm a newbie, but try to use the latest air 2 sdk.

                 

                Message was edited by: luisborlido

                • 5. Re: Packaging an AIR application in a native installer
                  angarrid Level 1

                  I suggest moving to GM version of AIR 2.0 for future packaging and installation.

                   

                  What is the namespace set to in your MyApp-app.xml?

                   

                  Can you view log file to see if there is any valid info relating to error?  Log is appended, so run your native installer again, dismiss error and view updated info posted at end of log.

                  User folder (Vista/Win7 path) \AppData\Local\Adobe\AIR\logs\

                  User folder (XP path)\LocalSettings\Adobe\AIR\logs\

                   

                  Check for the "updateDisabled flag in your

                  User folder (Vista/Win7 path) \AppData\Roaming\Adobe\AIR\ .

                  User folder (XP path)\ApplicationData\Adobe\AIR\  .

                  If flag is posted... remove.

                  • 6. Re: Packaging an AIR application in a native installer
                    dargre Level 1

                    Ah ... moving to AIR2 from beta2 fixed all. Compiling and installing fine on windows now.

                    Thanks!