Tải bản đầy đủ - 0 (trang)
Chapter 2. Getting Started with Adobe AIR Development

Chapter 2. Getting Started with Adobe AIR Development

Tải bản đầy đủ - 0trang

developmentenvironment.

YoucandownloadtheAIRSDKforfreefrom

http://www.adobe.com/go/getairsdk.



2.1.3.HTML/JavaScriptIDEorEditor

BuildingAIRapplicationswithHTMLandJavaScriptrequires

thatyouhaveawaytocreatetheHTMLandJavaScriptfiles.

Youcanuseanytoolthatsupportscreatingandeditingtext

files(suchasVIMorNotepad),althoughit'srecommendedthat

youuseatoolthathasrichersupportforworkingwithHTML

andJavaScriptfiles,suchasAdobeDreamweaver,Panic'sCoda,

orAptanaStudio.



NOTE

YoucanfindmoreinformationonAdobeDreamweaver

athttp://www.adobe.com/go/dreamweaver,Panic's

Codaathttp://www.panic.com/coda/,andAptana

Studioathttp://www.aptana.com.



2.1.4.SupportedOperatingSystem

AlthoughitispossibletodevelopandpackageAIRapplications

onvirtuallyanyoperatingsystem(includingLinux),youcan

testanddeployAIRapplicationsonlyonoperatingsystems

supportedbyAdobeAIR.

Thesupportedoperatingsystemsare:

MicrosoftWindows2000SP4

MicrosoftWindowsXPSP2

WindowsVistaHomePremium,Business,Ultimate,or

Enterprise

MacOS10.4.910andlater(IntelandPowerPC)



NOTE

H.264videoplaybackonaMacrequiresanIntel

processor.

AdobeisalsocurrentlyworkingonaddingsupportforLinux.



Chapter2.GettingStartedwithAdobe

AIRDevelopment

Thischapterdiscusseshowtostartdevelopingapplicationsfor

AdobeAIRusingHTMLandJavaScript.Itcovers:

InstallingAdobeAIR

ConfiguringtheAdobeAIRSDKandcommand-linetools

CreatingyourfirstAIRapplication

TestingAIRapplications

Signing,packaging,anddeployingAIRapplications

Onceyouhavecompletedthischapter,yourenvironmentfor

developingAIRapplicationsshouldbeconfiguredcorrectly,and

youshouldhaveasolidunderstandingofhowtobegintobuild,

test,anddeployAdobeAIRapplications.



2.1.WhatDoYouNeedtoDevelop

AdobeAIRApplications?

YouneedanumberofitemstobegindevelopingAIR

applications.



2.1.1.AdobeAIRRuntime

TheAdobeAIRruntimeisrequiredtotestapplicationiconsand

deployAIRapplications.Youcandownloadtheruntimeforfree

fromhttp://www.adobe.com/go/getair.



2.1.2.AdobeAIRSDK

TheAdobeAIRSDKcontainscommand-linetools,samplefiles,

andotherresourcestomakeiteasiertodevelopAIR

applications.Inparticular,wewillbeusingthecommand-line

toolsincludedintheSDK(ADLandADT),whichwillallowusto

test,sign,andpackageourAIRapplicationsfromvirtuallyany



developmentenvironment.

YoucandownloadtheAIRSDKforfreefrom

http://www.adobe.com/go/getairsdk.



2.1.3.HTML/JavaScriptIDEorEditor

BuildingAIRapplicationswithHTMLandJavaScriptrequires

thatyouhaveawaytocreatetheHTMLandJavaScriptfiles.

Youcanuseanytoolthatsupportscreatingandeditingtext

files(suchasVIMorNotepad),althoughit'srecommendedthat

youuseatoolthathasrichersupportforworkingwithHTML

andJavaScriptfiles,suchasAdobeDreamweaver,Panic'sCoda,

orAptanaStudio.



NOTE

YoucanfindmoreinformationonAdobeDreamweaver

athttp://www.adobe.com/go/dreamweaver,Panic's

Codaathttp://www.panic.com/coda/,andAptana

Studioathttp://www.aptana.com.



2.1.4.SupportedOperatingSystem

AlthoughitispossibletodevelopandpackageAIRapplications

onvirtuallyanyoperatingsystem(includingLinux),youcan

testanddeployAIRapplicationsonlyonoperatingsystems

supportedbyAdobeAIR.

Thesupportedoperatingsystemsare:

MicrosoftWindows2000SP4

MicrosoftWindowsXPSP2

WindowsVistaHomePremium,Business,Ultimate,or

Enterprise

MacOS10.4.910andlater(IntelandPowerPC)



NOTE

H.264videoplaybackonaMacrequiresanIntel

processor.

AdobeisalsocurrentlyworkingonaddingsupportforLinux.



2.2.UninstallingPrereleaseVersionsof

AdobeAIR

Ifyouhaveinstalledprerelease(alphaand/orbeta)versionsof

AdobeAIR,youmayneedtouninstallthembeforeinstallingthe

1.0runtime.However,whetherthisisstrictlyrequiredcanbea

littletrickytodetermine.

Table2-1liststheprereleaseversionsofAdobeAIRand

whethertheyshouldbeuninstalledbeforeinstallingAdobeAIR

1.0.

Table2-1.PrereleaseversionsofAdobeAIR

Version Uninstall?

Alpha



Uninstall



Beta1



WillbeuninstalledautomaticallybytheAdobeAIR

1.0installer



Beta2



Noneedtouninstall



Beta3



Noneedtouninstall



AsTable2-1shows,thebeta2andbeta3runtimescanrun

sidebysidewithAdobeAIR1.0.Thisallowsyoutorun

applicationsbuiltforbeta2andbeta3untilthosebetasexpire.

Ifyoudonotknowwhetheryouhaveinstalledthealpha

version,itisagoodideatogoaheadanduninstallall

prereleaseversionsofAdobeAIR.



2.2.1.UninstallingonWindows

TouninstallallprereleaseversionsofAdobeAIRonWindows,

followthesesteps:

1. IntheWindowsStartmenu,selectSettings



ControlPanel.



2. SelecttheAddorRemoveProgramscontrolpanel.



3. SelecttheprereleaseversionofAdobeAIRtouninstall

(dependingontheversion,itmaybereferredtobyitscode

nameof"Apollo").

4. ClicktheChange/Removebutton.



2.2.2.UninstallingonMac

FollowthesestepstouninstallallprereleaseversionsofAdobe

AIRontheMac.Dependingontheprereleaseversion(s)of

AdobeAIRthatyouhaveinstalled,allstepsmaynotapply.

1. RuntheAdobeAIRUninstallerinthe

/Users//Applicationsdirectory(whereisyour

systemuseraccountname).

2. RuntheAdobeAIRUninstallerinthe/Applicationsdirectory.

3. Deletethe/Library/Frameworks/AdobeApollo.framework

directory.

4. Deletethe/Library/Receipts/AdobeApollo.pkgfile.

5. EmptytheTrash.

Onceyouhavedonethis,youarereadytoinstallthe1.0

runtime.



2.3.InstallingAdobeAIR

AlthoughitisnotnecessarytohaveAdobeAIRinstalledonyour

computertodevelopandtestAdobeAIRapplications,itis

usefultohaveittotryotherAIRapplicationsandtotestyour

finalapplication'sdeploymentandpackaging.

Installingtheruntimeissimple,andrequiresdownloadingand

runningtheAdobeAIRInstaller.

1. DownloadtheAIRInstallerfrom

http://www.adobe.com/go/getair.

2. Launchtheinstaller.OnaMac,youmustfirstmountthe

.dmgfile,whichcontainstheinstaller.

3. Followtheinstallationinstructions.



NOTE

ItisalsopossibletoinstallAdobeAIRdirectlyfromthe

runtimeviaexpressinstall.WewillcoverthisinChapter

4.

AsAdobeAIRissimplyaruntimeandnotanapplicationthat

canbelaunched,theeasiestwaytoconfirmthatitisinstalled

correctlyistotryinstallinganAIRapplication.Youcandothis

byeitherdownloadinganAIRapplicationandinstallingit,or

followingtheinstructionslaterinthechaptertobuildasimple

AIRapplication.



NOTE

YoucandownloadsampleAIRapplicationsfromAdobe's

website,athttp://www.adobe.com/go/air_samples.



2.4.UninstallingAdobeAIR

TheprocessforuninstallingAdobeAIRisdifferentdependingon

youroperatingsystem.



2.4.1.UninstallingonWindows

OnWindows,youcanuninstallAdobeAIRthesamewaythat

youuninstallanyotherapplication.JustselectAdobeAIRinthe

Add/RemoveProgramssectionoftheControlPanel.



2.4.2.UninstallingonanMac

TheAdobeAIRinstallerplacesanuninstallapplicationonthe

user'ssystemwhenitisinstalled.TouninstallAdobeAIR,

launchtheuninstallernamedAdobeAIRUninstallerwhichyou

canfindinthe/Applications/Utilitiesdirectory.



2.5.SettingUptheAdobeAIRSDKand

Command-LineTools

TheAdobeAIRSDKbetacontainstools,samples,andcodethat

makeiteasiertodevelop,test,anddeployapplications.In

particular,itcontainstwocommand-linetoolsthatwewilluse:

ADL

YouusethistooltolaunchandtestanAdobeAIR

applicationwithouthavingtoinstallitfirst.



ADT

YouusethistooltopackageandsignanAIRapplicationfor

distribution.



2.5.1.InstallingtheAdobeAIRSDK

Toeasedevelopment,youshouldplacethepathtothesefiles

withinyoursystem'spath.Thiswillallowyoutoexecutethe

toolsfromanywhereonyoursystem.

Thecommand-linetoolsarelocatedinthebindirectorywithin

theSDK.

1. DownloadtheAdobeAIRSDKfrom

http://www.adobe.com/go/getairsdk.

2. OpentheSDK:

a)OnWindows,uncompresstheZIParchive.

b)OnMac,mountthe.dmgfile.

3. CopythecontentsoftheSDKtoyoursystem(wewillrefer

tothislocationas).



NOTE



Torunthecommand-linetools,youneedtocopy

onlythebin,lib,andruntimedirectoriesfromthe

SDK.

It'simportantthatthebin,lib,andruntime

directorieswithintheSDKmaintaintheirrelative

pathstoeachother.

4. Atthispoint,youshouldhaveatleastthefollowingthree

directories:/bin,/lib,and

/runtime.TheADLandADTcommand-linetools

arelocatedinthebindirectory.



2.5.2.PlacingtheCommand-LineToolsWithinthe

SystemPath

Allthatislefttodoistoplacethe/bindirectoryinto

yoursystempathsothatyoucanexecutethecommand-line

applicationsfromanywhereonyoursystem.

Theinstructionsforthisaredifferentdependingonwhetheryou

areonaMacorWindows-basedsystem.



2.5.3.Windows

IfyouareonaWindowssystem,followthesesteps:

1. OpentheSystemPropertiesdialogboxandclickthe

Advancedtab.YoucanfindthisintheSystemsettingsin

theControlPanel.

2. ClicktheEnvironmentVariablesbutton.

3. SelectthePATHentryandthenclicktheEditbutton.Add

thepathtothebindirectorytotheendofthecurrent

variablevalue,separatingitfrompreviousvalueswitha

semicolon:

;/bin



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 2. Getting Started with Adobe AIR Development

Tải bản đầy đủ ngay(0 tr)

×