FAQ : General Information : Q: How do I hide source code?
Q: How do I hide source code?
A: Source is hidden on export to DAT files on an export by export basis.
How to Hide Code
Introduction
Sometimes a user may wish to hide the source of part of the application.
Pros:
1. Black Box Deployment with no "user-serviceable parts
2. Hide implementation so that a vendor has more freedom to change the guts later on
3. hide security features
Cons:
1. Once source is hidden and imported into a manager that DOES have source code, that source code may be wiped out such that developers can no longer view the source code to their methods.
2. Hiding source for any method that is forced to be recompiled (such as for compile time constants) will break for any VM updates.
3. Hiding source should be used SPARINGLY.
Mechanics
Source is hidden on export to DAT files on an export by export basis. What is hidden is stored in an application specific data structure ( a Dictionary) that is stored in the library (As an inherited user field).
The SubApplication class has API to retrieve and change the settings as to what is hidden.
These are the steps:
1. Set up any remove source structures using the API SubApplication class>>#removeSourceStructure: For a detailed example see http://www.stic.org/Smalltalk_Solutions/sts2004/pdf/clayberg.pdf
2. From configuration maps browser, select the configuration map and the correct version including all applications which should be exported but without source code.
3. Select in the menu “Names”->”Settings” the option “Remove source”
4. Export using “Export…” menu in the Versions-space of the Configuration Maps-Browser Export to desired library (used File-I/O-Access) Library may exist or a new one can be created. (Used 16 GC option.)
To check if source is removed, connect to the new library or import the application into a virgin image.
Last modified date: 01/29/2015