running pharo image with scripts on mac

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

running pharo image with scripts on mac

Tudor Girba
Hi,

I am trying to run some scripts on a startup of an image. I am on a  
Mac and I am using a call like:

/Applications/Squeak4.2.2beta1U/Squeak\ 4.2.2beta1U.app/Contents/MacOS/
Squeak\ VM\ Opt x.image test.st

- x.image is the image
- test.st is a script that I would like to run in the image

However, I get an error due to the input stream being nil, see the  
below debugger stack. Can anyone tell me what I am doing wrong?

Doru

---------------------
VM: Mac OS - intel - 1058 - Squeak3.8.1 of '28 Aug 2006' [latest  
update: #6747] Squeak VM 4.2.2b1
Image: Pharo-1.0-10508-rc2 [Latest update: #10508]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /Users/girba/Work/Code/moose-on-pharo
Trusted Dir /foobar/tooBar/forSqueak/bogus
Untrusted Dir /Users/girba/Library/Preferences/Squeak/Internet/My Squeak

CodeLoader(Object)>>error:
        Receiver: a CodeLoader
        Arguments and temporary variables:
                aString: 'No content to install'
        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

CodeLoader>>installSourceFile:
        Receiver: a CodeLoader
        Arguments and temporary variables:
                aStream: nil
                contents: nil
                trusted: nil
        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

[] in CodeLoader>>installSourceFiles
        Receiver: a CodeLoader
        Arguments and temporary variables:
                req: a HTTPDownloadRequest
        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

Array(SequenceableCollection)>>do:
        Receiver: an Array(a HTTPDownloadRequest)
        Arguments and temporary variables:
                aBlock: [closure] in CodeLoader>>installSourceFiles
                index: 1
                indexLimiT: 1
        Receiver's instance variables:
an Array(a HTTPDownloadRequest)

CodeLoader>>installSourceFiles
        Receiver: a CodeLoader
        Arguments and temporary variables:

        Receiver's instance variables:
                baseURL: ''
                sourceFiles: an Array(a HTTPDownloadRequest)
                segments: nil
                publicKey: nil

ProjectLauncher>>startUpAfterLogin
        Receiver: a ProjectLauncher
        Arguments and temporary variables:
                scriptName: 'file:test.st'
                loader: a CodeLoader
                isUrl: false
        Receiver's instance variables:
                parameters: a Dictionary()
                showSplash: true
                splashURL: nil
                whichFlaps: nil
                eToyAuthentificationServer: nil

ProjectLauncher>>startUp
        Receiver: a ProjectLauncher
        Arguments and temporary variables:

        Receiver's instance variables:
                parameters: a Dictionary()
                showSplash: true
                splashURL: nil
                whichFlaps: nil
                eToyAuthentificationServer: nil

[] in [] in [] in AutoStart class>>startUp:
        Receiver: AutoStart
        Arguments and temporary variables:
                launcher: a ProjectLauncher
        Receiver's instance variables:
                superclass: Object
                methodDict: a MethodDictionary()
                format: 132
                instanceVariables: #('parameters')
                organization: ('as yet unclassified')

                subclasses: nil
                name: #AutoStart
                classPool: a Dictionary(#Active->true #InstalledLaunchers->an  
OrderedCollection...etc...
                sharedPools: nil
                environment: Smalltalk
                category: #'System-Support'
                traitComposition: nil
                localSelectors: nil

WorldState>>runStepMethodsIn:
        Receiver: a WorldState
        Arguments and temporary variables:
                aWorld: a PasteUpMorph(1622) [world]
                queue: a SharedQueue
                nextInQueue: [closure] in [] in [] in AutoStart class>>startUp:
        Receiver's instance variables:
                hands: an Array(a HandMorph(3216))
                viewBox: 0@0 corner: 1150@795
                canvas: a FormCanvas on: DisplayScreen(1150x795x32)
                damageRecorder: a DamageRecorder
                stepList: a Heap(StepMessage(#stepAt: -> a SystemWindow(3825))(a  
SystemWindow(3...etc...
                lastStepTime: 10693
                lastStepMessage: nil
                lastCycleTime: 10662
                commandHistory: a CommandHistory
                alarms: a Heap()
                lastAlarmTime: 10693

PasteUpMorph>>runStepMethods
        Receiver: a PasteUpMorph(1622) [world]
        Arguments and temporary variables:

        Receiver's instance variables:
                bounds: 0@0 corner: 1150@795
                owner: nil
                submorphs: an Array(a TaskbarMorph(3095) a SystemWindow(3825) a  
SketchMorph(107...etc...
                fullBounds: 0@0 corner: 1150@795
                color: an InfiniteForm
                extension: a MorphExtension (2543) [eventHandler = an  
EventHandler]  [other:  (...etc...
                borderWidth: 0
                borderColor: (Color r: 0.03 g: 0.02 b: 0.0)
                presenter: a Presenter (1246)
                model: a MorphicModel(1926)
                cursor: 1
                padding: 3
                backgroundMorph: nil
                isPartsBin: nil
                autoLineLayout: false
                indicateCursor: nil
                resizeToFit: nil
                wantsMouseOverHalos: nil
                worldState: a WorldState
                griddingOn: nil

WorldState>>doOneCycleNowFor:
        Receiver: a WorldState
        Arguments and temporary variables:
                aWorld: a PasteUpMorph(1622) [world]
        Receiver's instance variables:
                hands: an Array(a HandMorph(3216))
                viewBox: 0@0 corner: 1150@795
                canvas: a FormCanvas on: DisplayScreen(1150x795x32)
                damageRecorder: a DamageRecorder
                stepList: a Heap(StepMessage(#stepAt: -> a SystemWindow(3825))(a  
SystemWindow(3...etc...
                lastStepTime: 10693
                lastStepMessage: nil
                lastCycleTime: 10662
                commandHistory: a CommandHistory
                alarms: a Heap()
                lastAlarmTime: 10693

WorldState>>doOneCycleFor:
        Receiver: a WorldState
        Arguments and temporary variables:
                aWorld: a PasteUpMorph(1622) [world]
        Receiver's instance variables:
                hands: an Array(a HandMorph(3216))
                viewBox: 0@0 corner: 1150@795
                canvas: a FormCanvas on: DisplayScreen(1150x795x32)
                damageRecorder: a DamageRecorder
                stepList: a Heap(StepMessage(#stepAt: -> a SystemWindow(3825))(a  
SystemWindow(3...etc...
                lastStepTime: 10693
                lastStepMessage: nil
                lastCycleTime: 10662
                commandHistory: a CommandHistory
                alarms: a Heap()
                lastAlarmTime: 10693

PasteUpMorph>>doOneCycle
        Receiver: a PasteUpMorph(1622) [world]
        Arguments and temporary variables:

        Receiver's instance variables:
                bounds: 0@0 corner: 1150@795
                owner: nil
                submorphs: an Array(a TaskbarMorph(3095) a SystemWindow(3825) a  
SketchMorph(107...etc...
                fullBounds: 0@0 corner: 1150@795
                color: an InfiniteForm
                extension: a MorphExtension (2543) [eventHandler = an  
EventHandler]  [other:  (...etc...
                borderWidth: 0
                borderColor: (Color r: 0.03 g: 0.02 b: 0.0)
                presenter: a Presenter (1246)
                model: a MorphicModel(1926)
                cursor: 1
                padding: 3
                backgroundMorph: nil
                isPartsBin: nil
                autoLineLayout: false
                indicateCursor: nil
                resizeToFit: nil
                wantsMouseOverHalos: nil
                worldState: a WorldState
                griddingOn: nil

[] in Project class>>spawnNewProcess
        Receiver: Project
        Arguments and temporary variables:
<<error during printing>
        Receiver's instance variables:
                superclass: Model
                methodDict: a MethodDictionary(size 168)
                format: 172
                instanceVariables: #('world' 'changeSet' 'transcript'  
'parentProject' 'previous...etc...
                organization: ('*Polymorph-Widgets'  
assureTaskbarPresenceMatchesPreference crea...etc...
                subclasses: nil
                name: #Project
                classPool: a Dictionary(#AllProjects->an OrderedCollection(a  
Project(Unnamed)) ...etc...
                sharedPools: nil
                environment: Smalltalk
                category: #'System-Support'
                traitComposition: {}
                localSelectors: nil

[] in BlockClosure>>newProcess
        Receiver: [closure] in Project class>>spawnNewProcess
        Arguments and temporary variables:

        Receiver's instance variables:
                outerContext: Project class>>spawnNewProcess
                startpc: 53
                numArgs: 0


--- The full stack ---
CodeLoader(Object)>>error:
CodeLoader>>installSourceFile:
[] in CodeLoader>>installSourceFiles
Array(SequenceableCollection)>>do:
CodeLoader>>installSourceFiles
ProjectLauncher>>startUpAfterLogin
ProjectLauncher>>startUp
[] in [] in [] in AutoStart class>>startUp:
WorldState>>runStepMethodsIn:
PasteUpMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockClosure>>newProcess


---------------------


--
www.tudorgirba.com

"Some battles are better lost than fought."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: running pharo image with scripts on mac

Michael J. Forster
On Thu, Mar 25, 2010 at 10:39 AM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> I am trying to run some scripts on a startup of an image. I am on a Mac and
> I am using a call like:
>
> /Applications/Squeak4.2.2beta1U/Squeak\
> 4.2.2beta1U.app/Contents/MacOS/Squeak\ VM\ Opt x.image test.st
[...]

You need to specify the absolute path to the script, test.st.

Mike

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project