Saving User Preferences

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving User Preferences

Shaping-3
Is there a way to save User Preferences to a file, so that the environ can
be rapidly reconfigured from a fresh image by loading one's settings and
packages?

Shaping


Reply | Threaded
Open this post in threaded view
|

Re: Saving User Preferences

Ian Bartholomew-19
Shaping wrote:
> Is there a way to save User Preferences to a file, so that the environ can
> be rapidly reconfigured from a fresh image by loading one's settings and
> packages?

I would imagine you can, although I've never tried it, but I think you
will find it easier to work the other way - create a script file that
can be filed into a clean image (default + OA patches) to convert it
into your working image.

Something like the following (my actual setup.st file) which resets all
my preferred defaults, loads my preferred packages and then saves the
image (and a backup) under a new name.

It takes a bit of time to set up by saves time in the long run.

-~-~-~-~-

| ri res |
SmalltalkWorkspace defaultFont: (Font name: 'Microsoft Sans Serif'
pointSize: 10).
"SmalltalkSystem current defaultFont: (Font name: 'Microsoft Sans Serif'
pointSize: 9)."

Compiler syntaxColorAt: #Comment put: '\cf4 '.
SystemBrowserShell defaultShowInheritedMethods: false.
TipOfTheDay showTipsAtStartup: false.
SmalltalkSystem current
        defaultBrowserClass: SystemBrowserShell;
        formatterClass: RBConfigurableFormatter.
TranscriptShell flashOnOutput: false.
Debugger showWalkbacks: false.
SmalltalkSystemShell
        playSystemSounds: false;
        defaultExtent: 560@450.
ApplicationDeploymentWizard saveImageOnDeploy: false.
ViewComposer defaultView: 'Vertical view'.
SystemBrowserShell defaultExtent: 730@500.

SourceManager default fileIn: (FileLocator imageRelative
localFileSpecFor: 'Ian Bartholomew\install.st').

(Smalltalk at: #NewsArchiveBrowser) archiveFolder: (FileLocator
imageRelative localFileSpecFor: 'News Archive').

PackageManager current install: (FileLocator imageRelative
localFileSpecFor: 'DSDN\DSDN.pac').

(Smalltalk at: #DsdnShell) archiveFolder: (FileLocator imageRelative
localFileSpecFor: 'News Archive').

File for: (FileLocator imageRelative localFileSpecFor: 'Patches\*.st')
do: [:each |
        SourceManager default fileIn: each path].

PackageManager current packages  do: [:each | each resetChangeFlags].
View destroyAll.
[Processor sleep: 500.
SmalltalkSystem current
        playSaveImageSound;
  sessionManager saveImage: (SessionManager current imageBase , 'Working').
        SourceManager  default compressChanges.
        #('chg' 'sml' 'img') do: [:each |
                File
                        copy: SessionManager current imageBase , 'Working.' , each
                        to:  SessionManager current imageBase , 'backup\Working.' , each]] fork.

-~-~-~-~-

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.