[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] RubyGems-like tool for gnu-smalltalk?
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] RubyGems-like tool for gnu-smalltalk? |
Date: |
Mon, 17 Nov 2008 15:52:49 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
> I'm new to gnu-smalltalk. I would like to know if there is something
> similar to ruby gems (http://www.rubygems.org/) for gnu-smalltalk.
> I know there are star packages and the package loader, with
> dependencies. What I meant is a tool to load those package remotely from
> a server.
No, there's no tool to download packages. There is no such need for
now, since all packages existing are distributed with GNU Smalltalk
except one (Stephen Compall's Presource). If you want a repository for
your own .star packages I suggest using smalltalk.gnu.org or at least
publishing your project there.
I was putting together a couple of notes on gst-load and gst-package as
a reply to your first message;
http://smalltalk.gnu.org/wiki/creating-and-distributing-packages covers
the complicated case which involves the Autotools but you may prefer
something simpler if you do not have C source code. It then goes like
this...
Suppose your package is contained in a single TestPack.st file:
Object subclass: TestPack [
TestPack class >> greet: aString [
('hello %1!' % {aString}) printNl
]
]
package.xml should look like this:
<package>
<name>TestPack</name>
<file>TestPack.st</file>
<filein>TestPack.st</filein>
</package>
You can make a TestPack.star file and install it to the system-wide
package directory (usually /usr/share/smalltalk) using simply
gst-package package.xml
but you usually need root access for that. You can also install it just
for you:
gst-package -t ~/.st package.xml
(-t is short for --target-directory) and use it normally:
$ gst
GNU Smalltalk ready
st> PackageLoader fileInPackage: 'TestPack'
Loading package TestPack
PackageLoader
st> TestPack greet: 'world'
'hello world!'
TestPack
st>
If you want to distribute the .star file, just create it in the current
directory:
gst-package -t. package.xml
Then, you or other people will be able to do any of
gst-package TestPack.star
gst-package -t ~/.st TestPack.star
to install it (either globally or locally).
It should be clear from the lack of activity here that I have very
limited time for GNU Smalltalk, so if anyone with the copyright papers
signed would like to integrate into the wiki page that would be great.
If you have no copyright papers you can do that too, but please notify me.
Paolo