How to lockdown an image for release
Last updated at 5:17 pm UTC on 7 March 2007
Question: How to lockdown the image for release
Answer: From: How to save a part bin Sent: Sunday, December 14, 2003 12:15 PM
Use Ned Konz’s Lockdown package. More details:
http://map1.squeakfoundation.org/sm/packagebyname/lockdown
http://www.bike-nomad.com/squeak/SqueakLockdown-nk.1.cs.gz
This change set makes it easier to lock down an image for application
delivery.
By executing:
Preferences disableProgrammerFacilities
from your personalized World menu and saving the locked image under a new name, the following features are disabled:
- Halos
- Meta and Debug menus
- Command keys in world
- Command-dot interrupts
- Debuggers (though notifiers will still come up)
- World menu (from mouse or key)
- Command keys other than editing & cursor in text
- Reading scripts/projects at startup.
The yellow-button menus in text panes will still come up. It is assumed that text panes in your app will have their own yellow-button menus.
Two existing preferences have been made available in the Preferences tool:
cmdKeysInText – enables the use of many cmd (or alt) keys in text editors
cmdGesturesEnabled – enables halos, debug menus, etc.
Another two new preferences have been added:
appendToErrorLog – appends to the error log rather than replacing it
noDebugButton – suppress the ability to open a debugger from a notifier
You can add this to your personalized World menu:
aMenu add: 'disable pgrmr' target: Preferences action:
#disableProgrammerFacilities.
Or you can add:
Preferences disableProgrammerFacilities
to your do... menu list.
Edgar J De Cleene suggested on the squeak-dev mailing list the following changes to the world menu:
!TheWorldMenu methodsFor: 'construction' stamp: 'edc 1/29/2006 07:18'!
buildWorldMenu
"Build the menu that is put up when the screen-desktop is
clicked on"
| menu |
menu := MenuMorph new defaultTarget: self.
menu commandKeyHandler: self.
self colorForDebugging: menu.
menu addStayUpItem.
self fillIn: menu from: {{'restore display (r)'. {World.
#restoreMorphicDisplay}. 'repaint the screen -- useful for removing unwanted
display artifacts, lingering cursors, etc.'}. nil}.
Preferences simpleMenus
ifFalse: [self fillIn: menu from: {{'open...'. {self. #openWindow}}.
{'windows...'. {self. #windowsDo}}. {'changes...'. {self. #changesDo}}}].
self fillIn: menu from: {{'help...'. {self. #helpDo}. 'puts up a menu of
useful items for updating the system, determining what version you are
running, and much else'}. {'appearance...'. {self. #appearanceDo}. 'put up a
menu offering many controls over appearance.'}}.
Preferences simpleMenus
ifFalse: [self fillIn: menu from: {{'do...'. {Utilities.
#offerCommonRequests}. 'put up an editible list of convenient expressions,
and evaluate the one selected.'}}].
self fillIn: menu from: {
nil.
{'new morph...' . { self . #newMorph }. 'Offers a variety of ways
to create new objects'}.
nil.}.
Preferences simpleMenus
ifFalse: [self fillIn: menu from: {{'debug...'. {self. #debugDo}. 'a
menu of debugging items'}}].
self fillIn: menu from: {nil. {'save'. {SmalltalkImage current.
#saveSession}. 'save the current version of the image on disk'}. {'save
as...'. {SmalltalkImage current. #saveAs}. 'save the current version of the
image on disk under a new name.'}. {'save as new version'. {SmalltalkImage
current. #saveAsNewVersion}. 'give the current image a new version-stamped
name and save it under that name on disk.'}. {'save and quit'. {self.
#saveAndQuit}. 'save the current image on disk, and quit out of Squeak.'}.
{'quit'. {self. #quitSession}. 'quit out of Squeak.'}}.
^ menu! !
Compare with what you have in your image and suit to needs.
Also I usually add a makeRTS method to things what I develop and wihst
close.
This is a morphic button what sends the button to the class in use, do all
Ned trick and mine adds, save image with wishd name and destroy button.