user183928
user183928

Reputation: 783

How to install OSProcess in Pharo?

I want to use OSProcess to execute external programs in Linux and MacOS from Pharo 1.4. I've followed other post install instructions but when I evaluate

(PipeableOSProcess command: 'pwd') output asFileReference

it hangs the VM under Ubuntu. For OSProcessPlugin There is a Squeak wiki page with instructions but execution returns:

OSProcess not available or OSProcess plugin not functioning

Loading OSProcess sar file from the File Browser leads to a Syntax Error

(anArrayOfNullTerminatedStrings collect: [:e | e size])
    inject: offset into: [:p :e | ws nextPut: p. Cannot store into -> p := p + e].

Do I have to build my own VM to make it work? What do I need to do to execute commands in Linux under latest Pharo 1.4?

Upvotes: 1

Views: 1004

Answers (3)

John Pfersich
John Pfersich

Reputation: 135

In Pharo 5.0 or alpha 6, use the Catalog Browser, found in the Tools menu of the world menu.

Screenshot of Pharo window

Upvotes: 2

nes1983
nes1983

Reputation: 22

From the Pharo book (read it!)

Gofer new
    squeaksource3: 'coral';
    package: 'OSProcess'; 
    load.

Upvotes: 0

camillobruni
camillobruni

Reputation: 2318

Use the Configuration for OSProcess available in the Metacello Repository:

Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfOSProcess';
    load.

((Smalltalk at: #ConfigurationOfOSProcess) project version: #stable) load.

Using the configuration you avoid loading unstable versions.

Upvotes: 3

Related Questions