For security and performance reasons, you may want to remove the source code of your scripts before you release them for others to use.
Starting with Frontier 3.0 (released in late 1993), you can remove the source code from compiled scripts, and export them for others to use. They run exactly as they do in your Frontier environment, except that the user of the script doesn't get the source code. With earlier versions of Frontier, distributing a script for others to use required you to distribute its source code.
Any script can be compiled and have its source code removed. This includes shared menu scripts, scripts that run from the object database, desktop scripts, droplets, and glue scripts. And scripts written in AppleScript or any OSA-compatible language.
This feature is provided mainly for script writers who need to protect their intellectual property, and for system managers who want to ensure that their users can't change the scripts.
How it works
Open a script that you want to protect and choose Remove Source Code from the Script menu. It's best to experiment on a copy of the script, once the source code is removed it can't be brought back. It's gone.
Scripts are compiled into an intermediate code executed by the UserTalk interpreter, commonly referred to as P-code. It does not generate 68000 machine instructions, and therefore will run correctly on other Macintosh-compatible CPUs, such as the PowerPC. Frontier or Frontier Runtime must be present to run scripts.
Compiled scripts are smaller than scripts stored in source code. They take up less memory, so if you are memory-constrained, it may also make sense to use compiled scripts.
A new verb has been added to the UserTalk language, script.removeSource, allowing you to write your own scripts to compile and export entire tables of scripts.
See samples.basicStuff.removingSource for an example script.
The Remove Source Code command works equally well for UserTalk scripts and AppleScript scripts.
© Copyright 1996-97 UserLand Software. This page was last built on 5/7/97; 1:42:37 PM.
It was originally posted on 9/27/96; 1:14:17 PM.
Internet service provided by Conxion.