-
If your dialog makes use of libraries installed in the Context additions folder, you may want to bundle them in your dialog. This brings two advantages: 1 - the user does not have to install additional files, 2 - your handlers will not clog up the user's name space when they are not using your dialog at all.
To bundle a library, copy it into your dialog's package. In Finder, pull down the contextual menu (ctrl-click your dialog's icon), select Show Package Contents, and copy your library at the first level, thus at the same level as the Contents folder.
In the dialog's script, you have to load dynamically the library, using add library. Typically, you load the library in the prepare handler.
on prepare theDialog
set myPath to (path name of theDialog) as text
set theLibPath to myPath & "DivingLib"
add library (theLibPath as alias)
[...]
end prepare
Of course, you can have folders of libraries rather than one library, provided you install them in the first level of the package.
-
To make sure that your dialog does not use resources which are available on your machine and unavailable on the user's machine, proceed as follows.
-
Quit Smile.
- Uninstall (for instance, move them to the Desktop) any third-party osax not shipping with Smile. This includes getting rid of any copy of SmileLab.osax. The osax may be located in any of the directories below.
/Library/ScriptingAdditions/
/Users/<login>/Library/ScriptingAdditions/
-
Move your user's Smile folder to the Desktop. This is the folder located in the Application support directory:
/Users/<login>/Library/Application support/Smile
-
Launch Smile, open your dialog, and check that it works correctly.
-
When you are done, quit Smile again, move back your user's Smile folder into the Application support directory: you will be prompted to confirm that you are replacing a newer item, and re-install your additional osax.
-
When you compress the dialog to upload it or to send it through a network, take care that it is really a directory. Maybe your favorite file compression utility will not work. Be sure to check the expanded archive.
|