1. #11
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    It was a test.
    But to compile app.air
    We have to use something like
    C:\air\bin\adt.exe application.xml

    But it is not simple cause we have to know keys and order of params to run.
    Do you know how to compile helloWorld on it?

    Aptana is good, but also have problems to run.
    For example how can I run ExtJS 3.3.1 or ExtJS 4.1 on it?

  2. #12
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    299
    Vote Rating
    62
    Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough

      0  

    Default


    After you downloaded the AIR pluging for Aptana studio.

    1) Change to the Aptana Perpective and create an Adobe AIR project
    Project->new->other

    2) Tip "AIR" in the text field you should see something like "Adobe AIR Project"

    3 )Setup your project the way you want it

    4) Do NOT include any JS library that is shiped with Aptana studio

    5) Finish. You should have an AIR project set up

    this is a regular web project so you are able to add Ext-JS 3 or 4 just like you would add it in any webproject

    6) To run : right click on project -> run as -> AIR Application

    7) the ADL should pup up


    8) To build an .air file : click on the project -> on the eclipse menu there is a button with the tooltip "Export as AIR package" -> follow the wizard

    9 ) Et voila

    If any question feel free

    Alain

    P.S
    Ext-JS 4 will not work in the application sandbox of AIR. To know why look at the post of Makana about support for Ext-JS 4.

  3. #13
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    Which version of Aptana do you use?

    May I ask you to do screencast from installing to do helloworld?

  4. #14
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    I'm a command line tool type, too

    I only use PSPad as editor. There you have the possibilities to access commands via keyboard shortcut. So I wrote some PowerShell scripts and simply press F9 and voila, we have a new build

    To run the application:
    Code:
    # $args[0] Pfad zur aktuellen application.xml
    $file = $args[0]
    
    # Adobe Air SDK aus application.xml Namespace holen
    $xml = [xml](Get-Content $file)
    $ns = $xml.DocumentElement.GetAttribute("xmlns")
    $ns = $ns.split('/')
    $sdk = $ns[-1]
    
    # ADL ausführen
    $adl = "P:\AIR\SDK\$sdk\bin\adl.exe"
    & $adl $file
    To build an example:
    Code:
    # $args[0] Pfad zur aktuellen application.xml
    $file = $args[0]
    # args[1] Pfad zum Ordner der Projektdatei (*.ppr)
    $project = $args[1]
    
    # branch aus XML Version holen
    $xml = [xml](Get-Content $file)
    $ns = $xml.DocumentElement.GetAttribute("xmlns")
    $ns = $ns.split('/')
    $sdk = $ns[-1]
    $version = $xml.application.versionNumber;
    if (!$version) {
    	$version = $xml.application.version;
    }
    # Version nicht vorhanden
    if (!$version) {
    	"Keine Version in $file angegeben"
    	# Tastendruck abwarten
    	Read-Host
    # Version ungültig
    } elseif (!([Regex]::IsMatch($version, "\d{1,3}(\.\d{1,3}){0,2}"))) {
    	"Version in $file muss die Form <0-999>[.<0-999>[.<0-999>]] haben"
    	# Tastendruck abwarten
    	Read-Host
    # korrekte Version vorhanden
    } else {
    	# Namen des Projekts holen
    	$pParts = $file.Split('\')
    	$example = $pParts[-2]
    	
    	# Pfade
    	$adt = "P:\AIR\SDK\$sdk\bin\adt.bat"
    	$exampleDir = "$project\$version\examples"
    	$projectDir = $pParts[0..($pParts.length - 2)]
    	$projectDir = [String]::Join('\', $projectDir)
    
    	# Zertifikat erstellen
    	& $adt -certificate -cn SelfSigned 1024-RSA "$exampleDir\$example.pfx" $example
    	
    	# Build ausführen
    	& $adt -package -storetype pkcs12 -keystore "$exampleDir\$example.pfx" "$projectDir\..\$example.air" "$projectDir\application.xml" "$projectDir\html" "$projectDir\js" "$projectDir\lib" "$projectDir\data" "$projectDir\resources"
    
    	"Taste drücken, um zu schließen..."
    	Read-Host
    }
    To understand it better, recognize the following directory structure:
    P
    - AIR
    -- SDK
    --- 2.0.0
    --- 2.5.0
    --- <x.x.x>
    - ExtAIR
    -- 3.3.0
    --- examples
    ---- helloworld
    ----- application.xml
    ---- <another_example>
    -- <x.x.x>

    I read the SDK version from application.xml and the name of the project folder (where the ppr-file in PSPad is located, similar to .project in Eclipse) or rather the directory structure in general.

    I call the run script with
    Code:
    powershell.exe "P:\ExtAIR\run.ps1" "<path to application.xml>"
    and the build script with
    Code:
    powershell.exe "P:\ExtAIR\build_example.ps1" "<path to application.xml> "<project directory>"
    Regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  5. #15
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    Thanks a lot
    How diffilcult, I don't understand at all(((

    Is the way to get hello.air like this.
    C:\air\bin\adt.bat –package hello.air application.xml ?

  6. #16
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    You cannot build an air file without certificate. So you have to create one first.
    Code:
    adt.bat -certificate -cn SelfSigned 1024-RSA "certificate.pfx" myPassword
    It is enough to run this only once. You don't have to build a certificate before every build.


    Then you have to build the air file with the certificate.
    Code:
    adt.bat -package -storetype pkcs12 -keystore "certificate.pfx" "hello.air" "application.xml" "html" "js" "resources"
    You will be asked for a password. Type the password you used to build the certificate (here "myPassword").

    "html", "js" and "resources" are directories you want to include in your build. You can append more directories and/or files you want to include.

    All arguments starting from "certificate.pfx" are path's, so you can use "myCertificateDirectory\certificate.pfx" or "builds\hello.air" or something like this.

    Regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  7. #17
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    I can get hello.air but when I try to run hello.air
    I get this


    In English
    It is not possible to instal this aplication due to
    not right properties of program install.
    Please connect with author of this apllication.

  8. #18
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    299
    Vote Rating
    62
    Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough

      0  

    Default


    Why go through all this trouble when there is an IDE for that ?

  9. #19
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    Please do screencast how you do helloworld of ExtAir in Aptana.

    Of cause for you it is very simple but for newbie is difficult.

    The most difficult is first's steps.

  10. #20
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    299
    Vote Rating
    62
    Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough Ekambos is a jewel in the rough

      0  

    Default


    OK.
    I ll try to do a tutorial for that. Will post the URL later on.

Similar Threads

  1. Need to get started with GWT
    By Krishna_tgkk in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 4 Mar 2010, 6:02 AM
  2. Getting Started to Ext GWT
    By aklahiri in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 4 Dec 2009, 11:23 AM
  3. getting started with ExtJS 3
    By bauchinj in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 23 Oct 2009, 4:15 PM
  4. Getting started with ExtJS and having issues with Async Tree
    By chanceusc in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 25 Apr 2008, 4:49 PM
  5. I mean "really" getting started - add Extjs to website?
    By HardCode in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 17 Sep 2007, 1:42 AM

Thread Participants: 3