'From Squeak3.2alpha of 14 October 2001 [latest update: #4441] on 10 November 2001 at 5:00:49 pm'! "Change Set: readDocumentPref-ls Date: 10 November 2001 Author: Lex Spoon Honor the readDocumentAtStartup preference. "! !ProjectLauncher methodsFor: 'running' stamp: 'ls 11/10/2001 16:44'! startUpAfterLogin | scriptName loader isUrl | self setupFlaps. Preferences readDocumentAtStartup ifTrue: [ HTTPClient isRunningInBrowser ifTrue:[ self setupFromParameters. scriptName _ self parameterAt: 'src'. CodeLoader defaultBaseURL: (self parameterAt: 'Base'). ] ifFalse:[ scriptName _ (Smalltalk getSystemAttribute: 2) ifNil:['']. scriptName isEmpty ifFalse:[ "figure out if script name is a URL by itself" isUrl _ (scriptName asLowercase beginsWith:'http://') or:[ (scriptName asLowercase beginsWith:'file://') or:[ (scriptName asLowercase beginsWith:'ftp://')]]. isUrl ifFalse:[scriptName _ 'file://',scriptName]]. ]. ] ifFalse: [ scriptName := '' ]. scriptName isEmptyOrNil ifTrue:[^Preferences eToyFriendly ifTrue: [self currentWorld addGlobalFlaps]]. loader _ CodeLoader new. loader loadSourceFiles: (Array with: scriptName). (scriptName asLowercase endsWith: '.pr') ifTrue:[self installProjectFrom: loader] ifFalse:[loader installSourceFiles]. ! !