Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004849 [Squeak] Kernel minor always 09-09-06 19:55 01-04-07 05:28
Reporter Krivanek View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.10
Summary 0004849: [KernelImageOverride] AutoStart
Description The AutoStart class is dependent on network support. The version in KernelImage is modified to obtain clean code but the function of this class is broken. So this class is not present in the startup list. That also means that processing of command-line arguments is not possible. This class refactoring.

AutoStart class >> checkForUpdates has empty content.

original:

AutoStart class >> startUp: resuming
    "The image is either being newly started (resuming is true), or it's just been snapshotted.
    If this has just been a snapshot, skip all the startup stuff."

    | startupParameters launchers |
    self active ifTrue: [^self].
    self active: true.
    resuming ifFalse: [^self].

    HTTPClient determineIfRunningInBrowser.
    startupParameters _ AbstractLauncher extractParameters.
    (startupParameters includesKey: 'apiSupported' asUppercase )
        ifTrue: [
            HTTPClient browserSupportsAPI: ((startupParameters at: 'apiSupported' asUppercase) asUppercase = 'TRUE').
            HTTPClient isRunningInBrowser
                ifFalse: [HTTPClient isRunningInBrowser: true]].
    self checkForUpdates
        ifTrue: [^self].
    self checkForPluginUpdate.
    launchers _ self installedLaunchers collect: [:launcher |
        launcher new].
    launchers do: [:launcher |
        launcher parameters: startupParameters].
    launchers do: [:launcher |
        Smalltalk at: #WorldState ifPresent: [ :ws | ws addDeferredUIMessage: [launcher startUp] fixTemps]]

override:

AutoStart class >> startUp: resuming
    "The image is either being newly started (resuming is true), or it's just been snapshotted.
    If this has just been a snapshot, skip all the startup stuff."

    | launchers startupParameters |
    self active ifTrue: [^self].
    self active: true.
    resuming ifFalse: [^self].
    
    startupParameters := AbstractLauncher extractParameters.

    self browserSupport.
    
    self checkForUpdates
        ifTrue: [^self].

    launchers _ self installedLaunchers collect: [:launcher |
        launcher new].
    launchers do: [:launcher |
        launcher parameters: startupParameters].
    launchers do: [:launcher |
        Smalltalk at: #WorldState ifPresent: [ :ws | ws addDeferredUIMessage: [launcher startUp] fixTemps]]
Additional Information
Attached Files

- Relationships

- Notes
(0008822 - 951 - 1135 - 1135 - 1135 - 1135 - 1135)
Keith_Hodges
01-04-07 05:28
edited on: 01-05-07 05:51

The AutoStart system could use a review and a revamp.

above

a) The dependency HTTPClient determineIfRunningInBrowser is actually implemented in StandardFileStream.

b) Command line parameters and ExternalSettings could use some synergy.
how about:

squeak squeak-0000.image <script1> <params for script1>... <script N> <params for script N>

Where params are in the typical form.
param1=true param2="hello world" +param3 -param4

i.e. items with an = are parameters,
+ gives param3=true
- give param4=false
the rest are startup scripts/documents, which are also included in params at: #documents

For synergy: Can the commandline parameters override any ExternelSettings and can ExternelSettings provide default startup parameters?

c) Currently starting up with a local document, or url file: is broken (in linux)

d) A document/script has no easy way of determining whether it is being run as a startup document/script.

 

- Issue History
Date Modified Username Field Change
09-09-06 19:55 Krivanek New Issue
01-04-07 05:28 Keith_Hodges Note Added: 0008822
01-04-07 05:38 Keith_Hodges Note Edited: 0008822
01-05-07 05:38 Keith_Hodges Note Edited: 0008822
01-05-07 05:51 Keith_Hodges Note Edited: 0008822


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
41 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker