The Win32 VM creates a file named Squeak.ini when it first starts. This file
contains a variety of settings (mostly preferences) which should be preserved
across sessions.
The name of the ini file always matches the name of the VM, which allows for
having different preferences in different VMs. For example, a VM named
"Squeak.exe" will look for "Squeak.ini" whereas a VM named "Hanoi.exe"
will look for "Hanoi.ini".
All of the persistent Win32 VM Preferences are stored under [Global] section
of the ini file. They are:
- DeferUpdate - Preference "defer display updates"
- ShowConsole - Preference "show console"
- DynamicConsole - Preference "show console on errors"
- ReduceCPUUsage - Preference "reduce CPU usage"
- ReduceCPUInBackground - Preference "reduce background CPU usage"
- 1ButtonMouse - Preference "1 button mouse"
- 3ButtonMouse - Preference "3 button mouse"
- PriorityBoost - Preference "thread priority boost"
- UseDirectSound - Preference "use DirectSound"
- B3DXUsesOpenGL - Preference "use OpenGL (instead of D3D)"
- CaseSensitiveFileMode - Preference "case sensitive files"
Entries appearing under the [Security] section of Squeak.ini control some
of the sandbox functionality of Squeak
From a running Squeak image, these locations can be retrieved by evaluating
SecurityManager default untrustedUserDirectory.
SecurityManager default secureUserDirectory.
In addition to the above the ini file can contain the following entries in the [Global] section.
- WindowTitle: This entry allows you to override the default
label shown in the Window's title bar. This is useful when you want
to ship an application and not display the default
"Squeak! (C:\Squeak\Squeak.image)" title.
- ImageFile:This entry allows you to specify a specific
image file to use when the user double clicks on the VM. This option
is for shipping apps where you want to give the user the impression
that there is an app which has the name of the VM rather than a
VM/image pair. The name of the image does not have to end
with .image. In addition, the name can be either given in relative
or absolute form. If the name is relative (e.g., does not start with
a drive letter) then it is assumed to be relative to the VM directory.
Custom short cuts:
- EnableF2Menu: This entry allows you to determine whether
the preference menu should be shown when pressing F2. The default
is 1 (true).
- EnableAltF4Quit: This entry allows you to specify whether
Alt-F4 (and the windows close button) should be honored or not.
The default is 1 (true).
New for 3.10.8:When this setting is disabled (0), the VM generates
a window close event instead which can be handled by the image.
Quit menu:
- QuitDialogMessage: This entry allows you to specify what
message to display upon the Alt-F4 quit dialog.
- QuitDialogLabel: This entry allows you to specify what
label to display upon the Alt-F4 quit dialog.
Splash screen settings:
- SplashScreen: The file name for the initial splash screen
(the default is to use splash.bmp).
- SplashTitle: The title to use for the splash screen window
(this is the title you see in the Windows task bar). Should usually be
the same that is provided via WindowTitle.
- SplashTime: The minimum amount of time to display the splash
screen. If the system starts faster than the amount provided here,
it will wait until at least the minimum amount of time has passed.
The value is provided in milliseconds.
Single Instance Settings:
- RunSingleApp: When non-zero, only one instance of the VM will be run. A second attempt to launch the app will cause the first instance to be activated. When double-clicking on a file associated with the VM, the document file will be delivered as drop event to the running instance. This is consistent with the Mac behavior when trying to launch multiple documents with the same VM.
- WindowClassName: The name for the window class to be used by the VM (something like "MyAppMainWindowClass"). The VM will only consider windows with this class name when determining whether the app already runs or not. This allows the VM to disambiguate different applications using the Squeak VM.
This sets the window title to "The Towers of Hanoi":
[Global]
WindowTitle="The Towers Of Hanoi"
This sets the image file to use "hanoi.data":
[Global]
ImageFile="hanoi.data"
Alternatively, this will use an image file called hanoi.data which must be
in the "data" sub-directory of the VM directory:
[Global]
ImageFile="data\hanoi.data"
And this will use the image file hanoi.data from the given absolute location:
[Global]
ImageFile="C:\The Towers Of Hanoi\hanoi.data"
The following will disable, both the F2 preferences menu and the Alt-F4 quit
dialog (in which case your only way to quit Squeak is via
"Smalltalk quitPrimitive"):
[Global]
EnableF2Menu=0
EnableAltF4Quit=0
And this is an example to customize the Alt-F4 quit dialog accordingly:
[Global]
QuitDialogMessage="Do you really want to quit the game?"
QuitDialogLabel="The Towers of Hanoi"
The following shows the use of a custom splash screen for the towers of hanoi
for at least two seconds:
[Global]
SplashScreen="towers.bmp"
SplashTitle="The Towers of Hanoi"
SplashTime=2000