Sorry if this is a bit of a basic question. Could someone enlighten me
on how to install packages please. I want to be able to run command files under windows from within Pharo. It looks like I need OsProcess or maybe CommandShell. I assume these should be installable from Monticello. I don't see any search facility in the Monticello Browser and tried a few repositories but failed to find what I needed. What's the best way to find packages. Thanks Bob _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
The first thing I do (don't know if it's the best idea) when I am searching for a package is to take a loot at www.squeaksource.com and search the project in the "projects" tab.
But, it seems to be down for the moment. Adrien. For OSProcess, i suggest you read that: http://wiki.squeak.org/squeak/708 :) > Date: Thu, 24 Jun 2010 18:16:34 +0100 > From: [hidden email] > To: [hidden email] > Subject: [Pharo-users] Finding packages > > Sorry if this is a bit of a basic question. Could someone enlighten me > on how to install packages please. I want to be able to run command > files under windows from within Pharo. It looks like I need OsProcess or > maybe CommandShell. I assume these should be installable from > Monticello. I don't see any search facility in the Monticello Browser > and tried a few repositories but failed to find what I needed. What's > the best way to find packages. > > Thanks > Bob > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users Vous voulez protéger votre numéro de CB ? Utilisez Internet Explorer 8 _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Hi Adrian
Not having much luck really. I've tried two versions of OsProcess, one I found from a previous Pharo message and the other from your link. Both fail to load with Syntax errors and leave all the categories installed but no code. This is the error which was in UnixProcess (a bit odd seeing as I'm on Windows). I also loaded the OsProcessPlugin but that appears to require compiling according to the readme. This all seems to be much harder than it should be, or maybe it's just me. Regards Bob argsAsFlatArrayAndOffsets: anArrayOfNullTerminatedStrings "Given anArrayOfNullTerminatedStrings, flatten the array into a string buffer, leaving space at the beginning of the buffer for a list of C pointers. Answer the string buffer and an array of address offsets. The address offsets may later be converted to C pointers and overlaid on the beginning of the buffer, resulting in a data structure which can be treated as a C array of strings suitable for use as a Unix argv vector." "OSProcess thisOSProcess argsAsFlatArrayAndOffsets: (UnixProcess arguments collect: [:e | e, (Character value: 0) asString])" | offset arraySize flatStringArray ws addresses | "Preserve offset space to hold address pointers." offset := (anArrayOfNullTerminatedStrings size + 1) * self processAccessor sizeOfPointer. "Allocate flat strings buffer" arraySize := (anArrayOfNullTerminatedStrings collect: [:e | e size]) sum + ((anArrayOfNullTerminatedStrings size + 1) * self processAccessor sizeOfPointer). "Flatten the strings out into a buffer, leaving room at the beginning of the buffer for an array of addresses." flatStringArray := String new: arraySize. ws := WriteStream on: flatStringArray. offset timesRepeat: [ws nextPut: (Character value: 0)]. anArrayOfNullTerminatedStrings do: [:e | ws nextPutAll: e]. "Find address offsets to be used in creating the addresses for the strings." ws := WriteStream on: (Array new: anArrayOfNullTerminatedStrings size). (anArrayOfNullTerminatedStrings collect: [:e | e size]) inject: offset into: [:p :e | ws nextPut: p. Cannot store into ->p := p + e]. addresses := ws contents. "Results" ^ Array with: flatStringArray with: addresses Adrien BARREAU wrote: > The first thing I do (don't know if it's the best idea) when I am > searching for a package is to take a loot at www.squeaksource.com and > search the project in the "projects" tab. > But, it seems to be down for the moment. > > Adrien. > > For OSProcess, i suggest you read that: > http://wiki.squeak.org/squeak/708 :) > > > Date: Thu, 24 Jun 2010 18:16:34 +0100 > > From: [hidden email] > > To: [hidden email] > > Subject: [Pharo-users] Finding packages > > > > Sorry if this is a bit of a basic question. Could someone enlighten me > > on how to install packages please. I want to be able to run command > > files under windows from within Pharo. It looks like I need OsProcess or > > maybe CommandShell. I assume these should be installable from > > Monticello. I don't see any search facility in the Monticello Browser > > and tried a few repositories but failed to find what I needed. What's > > the best way to find packages. > > > > Thanks > > Bob > > > > _______________________________________________ > > Pharo-users mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > ------------------------------------------------------------------------ > Vous voulez protéger votre numéro de CB ? Utilisez Internet Explorer 8 > <http://clk.atdmt.com/FRM/go/232102479/direct/01/> > ------------------------------------------------------------------------ > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
I just load OSProcess from Monticello and it does not display any error.
MCHttpRepository location: 'http://www.squeaksource.com/OSProcess' user: '' password: '' This is this repository. Adrien. > Date: Fri, 25 Jun 2010 09:45:43 +0100 > From: [hidden email] > To: [hidden email] > Subject: Re: [Pharo-users] Finding packages > > Hi Adrian > > Not having much luck really. I've tried two versions of OsProcess, one I > found from a previous Pharo message and the other from your link. Both > fail to load with Syntax errors and leave all the categories installed > but no code. This is the error which was in UnixProcess (a bit odd > seeing as I'm on Windows). I also loaded the OsProcessPlugin but that > appears to require compiling according to the readme. This all seems to > be much harder than it should be, or maybe it's just me. > > Regards > Bob > > argsAsFlatArrayAndOffsets: anArrayOfNullTerminatedStrings > "Given anArrayOfNullTerminatedStrings, flatten the array into a > string buffer, > leaving space at the beginning of the buffer for a list of C > pointers. Answer > the string buffer and an array of address offsets. The address > offsets may later > be converted to C pointers and overlaid on the beginning of the > buffer, resulting > in a data structure which can be treated as a C array of strings > suitable for > use as a Unix argv vector." > > "OSProcess thisOSProcess argsAsFlatArrayAndOffsets: > (UnixProcess arguments collect: > [:e | e, (Character value: 0) asString])" > > | offset arraySize flatStringArray ws addresses | > "Preserve offset space to hold address pointers." > offset := (anArrayOfNullTerminatedStrings size + 1) * self > processAccessor sizeOfPointer. > "Allocate flat strings buffer" > arraySize := (anArrayOfNullTerminatedStrings collect: [:e | e size]) sum > + ((anArrayOfNullTerminatedStrings size + 1) * self > processAccessor sizeOfPointer). > "Flatten the strings out into a buffer, leaving room at the > beginning of the buffer for an array of addresses." > flatStringArray := String new: arraySize. > ws := WriteStream on: flatStringArray. > offset timesRepeat: [ws nextPut: (Character value: 0)]. > anArrayOfNullTerminatedStrings do: [:e | ws nextPutAll: e]. > "Find address offsets to be used in creating the addresses for the > strings." > ws := WriteStream on: (Array new: anArrayOfNullTerminatedStrings size). > (anArrayOfNullTerminatedStrings collect: [:e | e size]) > inject: offset into: [:p :e | ws nextPut: p. Cannot store into > ->p := p + e]. > addresses := ws contents. > "Results" > ^ Array with: flatStringArray with: addresses > > > Adrien BARREAU wrote: > > The first thing I do (don't know if it's the best idea) when I am > > searching for a package is to take a loot at www.squeaksource.com and > > search the project in the "projects" tab. > > But, it seems to be down for the moment. > > > > Adrien. > > > > For OSProcess, i suggest you read that: > > http://wiki.squeak.org/squeak/708 :) > > > > > Date: Thu, 24 Jun 2010 18:16:34 +0100 > > > From: [hidden email] > > > To: [hidden email] > > > Subject: [Pharo-users] Finding packages > > > > > > Sorry if this is a bit of a basic question. Could someone enlighten me > > > on how to install packages please. I want to be able to run command > > > files under windows from within Pharo. It looks like I need OsProcess or > > > maybe CommandShell. I assume these should be installable from > > > Monticello. I don't see any search facility in the Monticello Browser > > > and tried a few repositories but failed to find what I needed. What's > > > the best way to find packages. > > > > > > Thanks > > > Bob > > > > > > _______________________________________________ > > > Pharo-users mailing list > > > [hidden email] > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > > > ------------------------------------------------------------------------ > > Vous voulez protéger votre numéro de CB ? Utilisez Internet Explorer 8 > > <http://clk.atdmt.com/FRM/go/232102479/direct/01/> > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Pharo-users mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > > > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users Envie de plus d'originalité dans vos conversations ? Téléchargez gratuitement les Emoch'ticones ! _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Adrian
Thanks, that was easy. Works from Monticello. Strange it doesn't work using the .sar file from that link. Bob Adrien BARREAU wrote: > I just load OSProcess from Monticello and it does not display any error. > > MCHttpRepository > location: 'http://www.squeaksource.com/OSProcess' > user: '' > password: '' > > This is this repository. > > Adrien. > > > > > Date: Fri, 25 Jun 2010 09:45:43 +0100 > > From: [hidden email] > > To: [hidden email] > > Subject: Re: [Pharo-users] Finding packages > > > > Hi Adrian > > > > Not having much luck really. I've tried two versions of OsProcess, one I > > found from a previous Pharo message and the other from your link. Both > > fail to load with Syntax errors and leave all the categories installed > > but no code. This is the error which was in UnixProcess (a bit odd > > seeing as I'm on Windows). I also loaded the OsProcessPlugin but that > > appears to require compiling according to the readme. This all seems to > > be much harder than it should be, or maybe it's just me. > > > > Regards > > Bob > > > > argsAsFlatArrayAndOffsets: anArrayOfNullTerminatedStrings > > "Given anArrayOfNullTerminatedStrings, flatten the array into a > > string buffer, > > leaving space at the beginning of the buffer for a list of C > > pointers. Answer > > the string buffer and an array of address offsets. The address > > offsets may later > > be converted to C pointers and overlaid on the beginning of the > > buffer, resulting > > in a data structure which can be treated as a C array of strings > > suitable for > > use as a Unix argv vector." > > > > "OSProcess thisOSProcess argsAsFlatArrayAndOffsets: > > (UnixProcess arguments collect: > > [:e | e, (Character value: 0) asString])" > > > > | offset arraySize flatStringArray ws addresses | > > "Preserve offset space to hold address pointers." > > offset := (anArrayOfNullTerminatedStrings size + 1) * self > > processAccessor sizeOfPointer. > > "Allocate flat strings buffer" > > arraySize := (anArrayOfNullTerminatedStrings collect: [:e | e size]) sum > > + ((anArrayOfNullTerminatedStrings size + 1) * self > > processAccessor sizeOfPointer). > > "Flatten the strings out into a buffer, leaving room at the > > beginning of the buffer for an array of addresses." > > flatStringArray := String new: arraySize. > > ws := WriteStream on: flatStringArray. > > offset timesRepeat: [ws nextPut: (Character value: 0)]. > > anArrayOfNullTerminatedStrings do: [:e | ws nextPutAll: e]. > > "Find address offsets to be used in creating the addresses for the > > strings." > > ws := WriteStream on: (Array new: anArrayOfNullTerminatedStrings size). > > (anArrayOfNullTerminatedStrings collect: [:e | e size]) > > inject: offset into: [:p :e | ws nextPut: p. Cannot store into > > ->p := p + e]. > > addresses := ws contents. > > "Results" > > ^ Array with: flatStringArray with: addresses > > > > > > Adrien BARREAU wrote: > > > The first thing I do (don't know if it's the best idea) when I am > > > searching for a package is to take a loot at www.squeaksource.com and > > > search the project in the "projects" tab. > > > But, it seems to be down for the moment. > > > > > > Adrien. > > > > > > For OSProcess, i suggest you read that: > > > http://wiki.squeak.org/squeak/708 :) > > > > > > > Date: Thu, 24 Jun 2010 18:16:34 +0100 > > > > From: [hidden email] > > > > To: [hidden email] > > > > Subject: [Pharo-users] Finding packages > > > > > > > > Sorry if this is a bit of a basic question. Could someone > enlighten me > > > > on how to install packages please. I want to be able to run command > > > > files under windows from within Pharo. It looks like I need > OsProcess or > > > > maybe CommandShell. I assume these should be installable from > > > > Monticello. I don't see any search facility in the Monticello > Browser > > > > and tried a few repositories but failed to find what I needed. > What's > > > > the best way to find packages. > > > > > > > > Thanks > > > > Bob > > > > > > > > _______________________________________________ > > > > Pharo-users mailing list > > > > [hidden email] > > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > > > > > > ------------------------------------------------------------------------ > > > Vous voulez protéger votre numéro de CB ? Utilisez Internet Explorer 8 > > > <http://clk.atdmt.com/FRM/go/232102479/direct/01/> > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Pharo-users mailing list > > > [hidden email] > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > > > > > > > > _______________________________________________ > > Pharo-users mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > ------------------------------------------------------------------------ > Envie de plus d'originalité dans vos conversations ? Téléchargez > gratuitement les Emoch'ticones ! > <http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx> > > ------------------------------------------------------------------------ > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Free forum by Nabble | Edit this page |