Ted Patrick > { Events & Community } > Adobe Systems


The Central Installer/Updater - 101

Working with the Central installer/updater is confusing, yet it is critical to successful deployment of your application.\0

Key concepts and problem areas for installing and updating Central applications:
-----------------------------
1. Central applications are deployed to a URL with a domain name. The URL cannot run on your local machine or on a local web server "localhost". Central apps are installed locally based on the domain name as the root of the file system.

2. The Central Installer/Updater works only with the product.xml file. If you change files on the web server but not update the product.xml, Central will NOT know files have been updated. The only users that receive these updates will be on new installations of the application.

If product.xml is not modified, Central will not update. (See 5 for specifics on version property of product.xml)

3. I have encountered problems with relative path urls within the product.xml file. As such I use the full URL path within the product.xml file. Central documentation clearly says otherwise (this is used within the sample apps in the SDK), but I tend to do what works in practice. Call me crazy!

4. I version all files by filename within the product.xml. This makes updates work perfectly. Here is a sample:

http://www.powersdk.com/icon/explorer/product.xml

Note that each swf file for apps or pods are always named per version. If I am working with version 1.2, the application src will denote a file "main12.swf". This avoids caching errors and makes absolutely sure my updates take when an update occurs.

5. For Central to update a deployed application, the following values must be modified by a full .1 in value. Changing versions by .001 or .03 will not force Central to update anything. These values are essential in the product.xml file as follows:

product.version
product.application.version

6. DO NOT EDIT THE INSTALLER BADGE!!! Just drop the badge swf file(s) adjacent to the product.xml and this will create a perfect installer. This also allows you to share this installer URL so your application will install from other sites for marketing/promotion purposes. This is the logic behind using absolute paths in product.xml as in certain cross domain installations, relative path urls will fail. ;(

http://www.powersdk.com/icon/explorer/installer.swf

The badge dynamically imports the product.xml file and loads the icon and text content automatically regardless of where you call the application.

7. Every application deserves its own directory. I also recommend adding a index.html file so just the path will provide access to the installer.

http://www.powersdk.com/icon/explorer/

8. The product id inside of product.xml defines the application licensing. Sample applications ship with a common product id and thus when Central attempts to install one, it will overwrite the other application for licensing reasons. This product id is the same in the Central SDK sample applications:

CND100-062234-167221-651442

This is ok to use for development, but when you go to deploy these product ids will cause problems if they are not changed.

9. Within your swf make sure that this actionScript executes only 1 time:

Central.initApplication(this, this)

This code initializes your Central Application. When it doesn't execute, Central will not execute onActivate and you will thus not receive argument references to the shell and other good stuff.

10. For your first application, upload a sample app to a URL. Install the application within Central. Navigate to the locally installed path inside of the Central path, this is typically:

C:/Documents and Settings/{UserAccount}/Application Data/Macromedia/Central/#Central/{RANDOMKEY}/{domain}/{path}/{files}

I am not sure of the local install path on Mac.

//UPDATE

Mac path is as follows:

{Hard Drive}/Users/{USERNAME}/Library/Application Support/Macromedia/Central/{domain}/{path}/{files}

Special thanks to Sean Voisen for the Mac path info.

//UPDATE



Once you locate the installation directory, if you modify any of these files and simply restart Central, your application will change. This is a great way to develop as you can do iterative build and test locally without posting anything to a web server. This has saved me hours of hassle, time, and frustration.

11. THE SAMPLE APPS ALL NEED TO BE COMPILED!!! None of the Central apps are compiled in the Central SDK and for first timers this can be overwhelming and exhaustive. Here is the HelloWorld Sample app for review. This version has been modified to make deployment easier. I flattened the file system on the example to make it easier to understand. Also the badge and badge html is included in the example. Just post compiled.zip a valid domain name and call the URL, successful install!

Compiled HelloWorld Application(Only deployment Files)
Source HelloWorld Application(All Files)
Install HelloWorld in Central

This alone might explain developer frustration in getting first applications working. This isn't rocket surgery, lets keep things simple. ;)

12. I have also encountered problems with Central debug panel installed in MX2004Pro. On many occasions, the trace events simply do not occur at all and monitoring a Central application within FlashMXPro is frustrating switching between apps.

13. The icon tag in product.xml must be listed within the product.icon and application.icon otherwise it will fail to install locally in the badge, Central Installer dialog, and the application icon in the toolbar. The HelloWorld app in the Central SDK contains this error and the icon will not load for the product. This has been corrected in the version above.

----------------------

At first glance all these gotcha items seem overwhelming, but don't let that stop you from working with Central. Once you get your first application installed, you will discover just how simple Central is to work with.

Take the plunge and deploy your first Central app today. Central simply rocks! ;)

Cheers,

ted ;)

0 Responses to “ The Central Installer/Updater - 101 ”

Post a Comment



© 2008 Ted On Flex