Shu Tips & Troubleshooting

The Shu commands aren't working?

Check the following things:

  • Are you correctly linking in the Shu.swc? See this page.
  • Are you initializing the shu object? e.g. var shu:Shu = Shu.GetInstance();
  • Have you packaged your application with the Shu Packager? No command will work until the AIR file is wrapped using the Shu Packager.

Before trying any of the advanced commands, do the following test to ensure the commands are available:

import mx.controls.Alert;
var shu:Shu = Shu.GetInstance();
if(shu.isAvailable())
{
    Alert.show("Shu commands are available.");
}

Adobe AIR runtime directory

If you have performed a default install of AIR, the runtime is found in:

C:\Program Files\Common Files
on Windows and
/Library/Frameworks
on Mac.

Getting log output

Shu programs write a log of their operations to stdout. Viewing this output can be beneficial in trapping your problem.

To read this output in Mac, either:

  • open /Applications/Utilities/Console.app to view the output; or
  • run the application from within a terminal (e.g. /Applications/Utilities/Terminal.app) and capture the output.

In Windows:

  • run the application from within a shell and capture the output.

Shu Installer Problems

If the Shu Installer returns an error during the installation process, it is useful to view the log output from both the Adobe AIR Installer and the Shu Installer itself.

  • Getting log output from AIR Installer

    Set up .airinstall.log and .airappinstall.log (see http://www.adobe.com/go/kb403123 for more information) and view them after running the Shu Installer.

  • Getting log output from Shu Installer

    See the section on logging.

If the Shu Installer reported an error from the AIR Installer with an exitcode, see the Adobe AIR Runtime Installer documentation for the meaning of these error codes. The documentation is downloadable from the same location as the AIR Installer.

Calling external DLLs

It is possible to make use of external, non-Shu DLLs from within Shu by creating a Shu extension wrapper DLL. In your Shu extension wrapper DLL, simply make calls to the functions of your 3rd party DLL.

i.e. AIR app calls Shu wrapper DLL function; Shu wrapper DLL calls 3rd-party DLL function.

See the Shu Extensions page for information on how to make a Shu extension.