Hi,
from a Pharo image, can I detect if another image needs the Spur VM or not? Best -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill |
Hmm, usually an image file has a header that describes some meta data about the image: version, some VM options, size of the image…
If you load: Gofer it squeaksource3: 'ImageWriter' ; package: ‘ImageWriter-Core' ; load.
You’ll get HzCogImageFormat that describes the header. Check the method writeImageHeaderOn: byteStream forWriter: aWriter
|
Guillermo Polito <[hidden email]> writes:
> Hmm, usually an image file has a header that describes some meta data about the image: version, some VM options, size of the image… > > If you load: > > Gofer it > squeaksource3: 'ImageWriter'; > package: ‘ImageWriter-Core'; > load. > > > You’ll get HzCogImageFormat that describes the header. Check the method writeImageHeaderOn: byteStream forWriter: aWriter thanks Guillermo. I won't do it myself because I'm very busy and don't have much time for Pharo programming, but I hope someone using the launcher with Pharo 5 will have a look. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill |
In reply to this post by Guillermo Polito
On 17-12-15 12:53, Guillermo Polito wrote:
> Hmm, usually an image file has a header that describes some meta data > about the image: version, some VM options, size of the image… byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. byteStream binary. version := byteStream nextLittleEndianNumber: 4. byteStream close. version 6505 That supports deciding which vm to use Stephan |
I’d prefer the new API that does not use MultiByteFileStream and friends :)
version := nil. (File named: 'Pharo.image') readStreamDo: [ :stream | version := (stream next: 4) longAt: 1 bigEndian: false ]. version > On 17 dic 2015, at 1:20 p.m., Stephan Eggermont <[hidden email]> wrote: > > On 17-12-15 12:53, Guillermo Polito wrote: >> Hmm, usually an image file has a header that describes some meta data >> about the image: version, some VM options, size of the image… > > byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. > byteStream binary. > version := byteStream nextLittleEndianNumber: 4. > byteStream close. > version > > 6505 > > That supports deciding which vm to use > > Stephan > > > |
‘Pharo.image' asFileReference
readStreamDo: [ :stream | (stream binary; next: 4) longAt: 1 bigEndian: false ]. > On 17 Dec 2015, at 13:26, Guillermo Polito <[hidden email]> wrote: > > I’d prefer the new API that does not use MultiByteFileStream and friends :) > > version := nil. > (File named: 'Pharo.image') readStreamDo: [ :stream | > version := (stream next: 4) longAt: 1 bigEndian: false ]. > version > >> On 17 dic 2015, at 1:20 p.m., Stephan Eggermont <[hidden email]> wrote: >> >> On 17-12-15 12:53, Guillermo Polito wrote: >>> Hmm, usually an image file has a header that describes some meta data >>> about the image: version, some VM options, size of the image… >> >> byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. >> byteStream binary. >> version := byteStream nextLittleEndianNumber: 4. >> byteStream close. >> version >> >> 6505 >> >> That supports deciding which vm to use >> >> Stephan >> >> >> > > |
In reply to this post by Damien Cassou-2
I've commited a PharoLauncher version that adds a setting for a spur vm
path. If you download a spur vm and point set this setting, the launcher will start the image with the right vm Stephan |
In reply to this post by EstebanLM
‘Pharo.image' asFileReference
binaryReadStreamDo: [ :stream | (stream next: 4) reserved asInteger ]. > On 17 Dec 2015, at 14:25, Esteban Lorenzano <[hidden email]> wrote: > > ‘Pharo.image' asFileReference > readStreamDo: [ :stream | (stream binary; next: 4) longAt: 1 bigEndian: false ]. > >> On 17 Dec 2015, at 13:26, Guillermo Polito <[hidden email]> wrote: >> >> I’d prefer the new API that does not use MultiByteFileStream and friends :) >> >> version := nil. >> (File named: 'Pharo.image') readStreamDo: [ :stream | >> version := (stream next: 4) longAt: 1 bigEndian: false ]. >> version >> >>> On 17 dic 2015, at 1:20 p.m., Stephan Eggermont <[hidden email]> wrote: >>> >>> On 17-12-15 12:53, Guillermo Polito wrote: >>>> Hmm, usually an image file has a header that describes some meta data >>>> about the image: version, some VM options, size of the image… >>> >>> byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. >>> byteStream binary. >>> version := byteStream nextLittleEndianNumber: 4. >>> byteStream close. >>> version >>> >>> 6505 >>> >>> That supports deciding which vm to use >>> >>> Stephan >>> >>> >>> >> >> > > |
In reply to this post by Guillermo Polito
On 17-12-15 13:26, Guillermo Polito wrote:
> I’d prefer the new API that does not use MultiByteFileStream and friends :) > > version := nil. > (File named: 'Pharo.image') readStreamDo: [ :stream | > version := (stream next: 4) longAt: 1 bigEndian: false ]. > version File isn't in the PharoLauncher image Stephan |
In reply to this post by Sven Van Caekenberghe-2
Make that
‘Pharo.image' asFileReference binaryReadStreamDo: [ :stream | (stream next: 4) reversed asInteger ]. > On 17 Dec 2015, at 14:28, Sven Van Caekenberghe <[hidden email]> wrote: > > ‘Pharo.image' asFileReference > binaryReadStreamDo: [ :stream | (stream next: 4) reserved asInteger ]. > >> On 17 Dec 2015, at 14:25, Esteban Lorenzano <[hidden email]> wrote: >> >> ‘Pharo.image' asFileReference >> readStreamDo: [ :stream | (stream binary; next: 4) longAt: 1 bigEndian: false ]. >> >>> On 17 Dec 2015, at 13:26, Guillermo Polito <[hidden email]> wrote: >>> >>> I’d prefer the new API that does not use MultiByteFileStream and friends :) >>> >>> version := nil. >>> (File named: 'Pharo.image') readStreamDo: [ :stream | >>> version := (stream next: 4) longAt: 1 bigEndian: false ]. >>> version >>> >>>> On 17 dic 2015, at 1:20 p.m., Stephan Eggermont <[hidden email]> wrote: >>>> >>>> On 17-12-15 12:53, Guillermo Polito wrote: >>>>> Hmm, usually an image file has a header that describes some meta data >>>>> about the image: version, some VM options, size of the image… >>>> >>>> byteStream := FileStream fileNamed: '/home/stephan/.local/share/Pharo/images/50305/50305.image'. >>>> byteStream binary. >>>> version := byteStream nextLittleEndianNumber: 4. >>>> byteStream close. >>>> version >>>> >>>> 6505 >>>> >>>> That supports deciding which vm to use >>>> >>>> Stephan >>>> >>>> >>>> >>> >>> >> >> > |
In reply to this post by Stephan Eggermont-3
Stephan Eggermont <[hidden email]> writes:
> I've commited a PharoLauncher version that adds a setting for a spur vm > path. If you download a spur vm and point set this setting, the launcher > will start the image with the right vm is it weird if I say I love you? :-) Thank you very much -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill |
In reply to this post by Stephan Eggermont-3
> On Dec 17, 2015, at 2:27 PM, Stephan Eggermont <[hidden email]> wrote: > > I've commited a PharoLauncher version that adds a setting for a spur vm path. If you download a spur vm and point set this setting, the launcher will start the image with the right vm Thank you!! |
In reply to this post by Stephan Eggermont-3
Hi Stephan, I love you too ;-). Just in case you weren't aware David Lewis' ImageFormat package on http://source.squeak.org/VMMaker contains the "official" approach to image version ids and will provide you with "the official way" (tm) to test for a Spur image, including 64-bits. On Thu, Dec 17, 2015 at 5:27 AM, Stephan Eggermont <[hidden email]> wrote: I've commited a PharoLauncher version that adds a setting for a spur vm path. If you download a spur vm and point set this setting, the launcher will start the image with the right vm _,,,^..^,,,_ best, Eliot |
On 17-12-15 18:21, Eliot Miranda wrote:
> Hi Stephan, > > I love you too ;-). Just in case you weren't aware David Lewis' > ImageFormat package on http://source.squeak.org/VMMaker contains the > "official" approach to image version ids and will provide you with "the > official way" (tm) to test for a Spur image, including 64-bits. Ah, there is a lot more to do than testing for 6505, I see. I suspect ImageFormat needs an update, the last version is from 2011 and Spur is suspiciously missing. I'll add that instead. Stephan |
> On 17-12-15 18:21, Eliot Miranda wrote:
>> Hi Stephan, >> >> I love you too ;-). Just in case you weren't aware David Lewis' >> ImageFormat package on http://source.squeak.org/VMMaker contains the >> "official" approach to image version ids and will provide you with "the >> official way" (tm) to test for a Spur image, including 64-bits. > > Ah, there is a lot more to do than testing for 6505, I see. > I suspect ImageFormat needs an update, the last version is from 2011 and > Spur is suspiciously missing. I'll add that instead. > > Stephan > Make sure you got the latest version from the repository, it should be fully up to date, including the image format info for the 64-bit Spur image. Dave |
On 17/12/15 22:04, David T. Lewis wrote:
>> On 17-12-15 18:21, Eliot Miranda wrote: >>> Hi Stephan, >>> >>> I love you too ;-). Just in case you weren't aware David Lewis' >>> ImageFormat package on http://source.squeak.org/VMMaker contains the >>> "official" approach to image version ids and will provide you with "the >>> official way" (tm) to test for a Spur image, including 64-bits. >> >> Ah, there is a lot more to do than testing for 6505, I see. >> I suspect ImageFormat needs an update, the last version is from 2011 and >> Spur is suspiciously missing. I'll add that instead. >> >> Stephan >> > > Make sure you got the latest version from the repository, it should be > fully up to date, including the image format info for the 64-bit Spur > image. Ah, that is not the same as squeaksource.com ... My mistake Stephan |
Was this fixed?
I downloaded the latest 5.0 image and also the Moose gttoolkit5 images, and I can't start them, the launcher closes without any further notification. My previous 5.0 image (from Dec/10th 2015) starts normally. It would be great to have a two lines list of the images, one with the name/description, and other subline with the image version and vm version. :) Where can I get the source of the launcher itself? Regards! Esteban A. Maringolo 2015-12-17 18:11 GMT-03:00 Stephan Eggermont <[hidden email]>: > On 17/12/15 22:04, David T. Lewis wrote: >>> >>> On 17-12-15 18:21, Eliot Miranda wrote: >>>> >>>> Hi Stephan, >>>> >>>> I love you too ;-). Just in case you weren't aware David Lewis' >>>> ImageFormat package on http://source.squeak.org/VMMaker contains the >>>> "official" approach to image version ids and will provide you with "the >>>> official way" (tm) to test for a Spur image, including 64-bits. >>> >>> >>> Ah, there is a lot more to do than testing for 6505, I see. >>> I suspect ImageFormat needs an update, the last version is from 2011 and >>> Spur is suspiciously missing. I'll add that instead. >>> >>> Stephan >>> >> >> Make sure you got the latest version from the repository, it should be >> fully up to date, including the image format info for the 64-bit Spur >> image. > > > Ah, that is not the same as squeaksource.com ... > My mistake > > Stephan > > |
Le 08/01/2016 16:45, Esteban A. Maringolo a écrit :
> Was this fixed? > > I downloaded the latest 5.0 image and also the Moose gttoolkit5 > images, and I can't start them, the launcher closes without any > further notification. > > My previous 5.0 image (from Dec/10th 2015) starts normally. > > It would be great to have a two lines list of the images, one with the > name/description, and other subline with the image version and vm > version. :) > > Where can I get the source of the launcher itself? > > Regards! > > > Esteban A. Maringolo > > The launcher is fix but there is no stable version for now. You have to update it from Monticello then you change the path on Spur VM in the settings. -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France signature.asc (836 bytes) Download Attachment |
Free forum by Nabble | Edit this page |