Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Create Native Installers in Adobe AIR 2

0 (0 Likes / 0 Dislikes)
[Adobe Developer Connection] [Serge Jespers - Platform Evangelist] Hi, my name is Serge and I'm one of the European team members on Adobe's Platform Evangelism team. I want to talk to you a little bit about native installers with AIR 2. It's a new feature in AIR 2, and I just want to show you how that works. I actually have one right here. It's a .dmg file instead of a .air file, and this is actually what we're going to create. Let me show you the installer first, so when I mount the .dmg file, I have the installer right there. And it's going to prompt you to install it in a folder, if you want to. And I'm just going to click OK, and it will launch the application, almost exactly like it would do with AIR. But now we actually have native installers, and that means that I can also add native code, if I wanted to. Let me show you this example, actually. What I did was I just created this little shell script that is just going to call out the native speech synthesizer on a Mac, and it's just going to say whatever I pass it. Now, in my AIR application, I'm just calling that by making a new file object, and in that file object, I'm just going to resolve the path to wherever that file is. Now, obviously, we need to create an installer that also installs this shell script. And that's all we're going to do. Now, this can be a little bit difficult because what you actually have to do is use the command line. And I'm actually showing you what you need to create this installer. So first of all, you call adt, and adt is part the AIR SDK. You can just download that from our website and just use that. Then you say, okay, we're going to package a file. And the next option is where your code signing certificate is, so we're using a pkcs12 file, and I'm just going to tell it where that file is, and also tell it what my password is. The next step is to tell it that we're going to target a native installer and also specify the name for that native installer. The next step is where you set up the actual installer, so we're going to tell it where our application description file is, and also where the .swf file for our application is, and all of the files that I actually use in my application. Now, this isn't very easy, so I thought, "Wait. If AIR2 can launch native applications, why don't I build an application that actually does this for me?" And that's exactly what I'm showing you here. So the PackageAssistant application, as I called it, is going to ask you for a couple of things. So first of all, where is your adt installed? adt is actually part of the SDK, so if you download the SDK from our website, adt is part of that. And I have it installed in my Flash Builder install. And it's in your bin folder, and there you find adt. The next step is the code signing certificate, so you need the code signing certificate to sign your applications. And I'm going to use this one, enter my password, and make sure that's correct as well like that. The next step is the .swf file for your application and also the xml descriptor file. So let's point it to that. It should be in my Flash Builder folder, this .swf file, and then the xml file. And the next step is all of the additional files that you're using. So what I need in this case is my shell script, but also the dialogue. This application actually loads an xml file with a dialogue that it uses to actually just talk to me, really. And then also I need to add all of the icons that I want to use. Then hit Next, enter the file name for the .dmg file, in this case, and hit Compile. It will launch that adt compile process, and then, in a second, your application is done. And right here on my desktop, I now have the .dmg file, and it will install that application just like I showed earlier. Let me just replace it and actually-- "Dude, I can speak for myself." I know he can speak for himself, but--you know--just let's just leave it at this. So hopefully, that gives you a little bit of an idea on how to build native installers with AIR2, how to use my Package Assistant. You can find it on my blog, and I'm looking forward to see what you do with this. Until next time. [Adobe Developer Connection]

Video Details

Duration: 5 minutes
Language: English
License: All rights reserved
Genre: None
Views: 227
Posted by: adobetv on Oct 21, 2010

Platform Evangelist Serge Jespers demonstrates how to build native installers for Adobe AIR 2 using the command line, and he explores how his Package Assistant app simplifies that process.

Caption and Translate

    Sign In/Register for Dotsub to translate this video.