The image provides
ObjectMemory getHeraldString from which one can obtain the OE version number with code like: | versionString commasLocation afterVWCopyrightString afterNumberLocation | versionString := IOAccessor convertSimpleStringFromPlatform: ObjectMemory getHeraldString. commasLocation := versionString indexOf: Character space. afterVWCopyrightString := (versionString copyFrom: commasLocation + 1 to: versionString size) removeSurroundingWhiteSpace. afterNumberLocation := afterVWCopyrightString indexOf: Character space. ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 Please provide SystemUtils objectEngineVersionNumber so my code doesn't depend on the format of the herald string. In the same way, the image provides SystemUtils version from which one can obtain the image version number with code like | versionString commasLocation afterVWCopyrightString afterNumberLocation | versionString := SystemUtils version. commasLocation := versionString indexOf: $,. afterVWCopyrightString := (versionString copyFrom: commasLocation + 1 to: versionString size) removeSurroundingWhiteSpace. afterNumberLocation := afterVWCopyrightString indexOf: Character space. ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 Please provide SystemUtils imageVersionNumber so my code doesn't depend on the format of the version string. |
ObjectMemory versionId
Return a 12 element ByteArray where: bytes 1 - 4 contain this platform's id where: 1 = platform version, 2 = platform number, 3 = platform release major number, 4 = platform release minor number (bits 7-4) and flags (bits 3-0) bytes 5 - 8 contain this image's id where: 5 = image major version, 6 = image minor version, 7 = image release major number, 8 = image release minor number bytes 9 - 12 contain the platform id that made this image. Isn't that what you need? -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: Monday, January 28, 2008 1:40 PM > To: [hidden email] > Subject: enhancement request -- have base image provide protocol to obtain > object engine version number and image version number > > The image provides > ObjectMemory getHeraldString > from which one can obtain the OE version number with code like: > > | versionString commasLocation afterVWCopyrightString > afterNumberLocation | > versionString := IOAccessor convertSimpleStringFromPlatform: > ObjectMemory getHeraldString. > commasLocation := versionString indexOf: Character space. > afterVWCopyrightString := (versionString copyFrom: > commasLocation + 1 > to: versionString size) > removeSurroundingWhiteSpace. > afterNumberLocation := afterVWCopyrightString indexOf: Character > space. > ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 > > Please provide > SystemUtils objectEngineVersionNumber > so my code doesn't depend on the format of the herald string. > > In the same way, the image provides > SystemUtils version > from which one can obtain the image version number with code like > > | versionString commasLocation afterVWCopyrightString > afterNumberLocation | > versionString := SystemUtils version. > commasLocation := versionString indexOf: $,. > afterVWCopyrightString := (versionString copyFrom: > commasLocation + 1 > to: versionString size) > removeSurroundingWhiteSpace. > afterNumberLocation := afterVWCopyrightString indexOf: Character > space. > ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 > > > Please provide > SystemUtils imageVersionNumber > so my code doesn't depend on the format of the version string. |
I don't think so....
this is what I get for a versionId #[61 40 61 32 73 1 0 0 61 40 61 32] I don't see the ObjectEngine version of 7.1d anywhere. The image version of 7.3.1 could be obtained from bytes 5 and 6, I suppose. -----Original Message----- From: Boris Popov [mailto:[hidden email]] Sent: Monday, January 28, 2008 1:45 PM To: Ballard, Mark B; [hidden email] Subject: RE: enhancement request -- have base image provide protocol to obtain object engine version number and image version number ObjectMemory versionId Return a 12 element ByteArray where: bytes 1 - 4 contain this platform's id where: 1 = platform version, 2 = platform number, 3 = platform release major number, 4 = platform release minor number (bits 7-4) and flags (bits 3-0) bytes 5 - 8 contain this image's id where: 5 = image major version, 6 = image minor version, 7 = image release major number, 8 = image release minor number bytes 9 - 12 contain the platform id that made this image. Isn't that what you need? -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] > Sent: Monday, January 28, 2008 1:40 PM > To: [hidden email] > Subject: enhancement request -- have base image provide protocol to obtain > object engine version number and image version number > > The image provides > ObjectMemory getHeraldString > from which one can obtain the OE version number with code like: > > | versionString commasLocation afterVWCopyrightString > afterNumberLocation | > versionString := IOAccessor convertSimpleStringFromPlatform: > ObjectMemory getHeraldString. > commasLocation := versionString indexOf: Character space. > afterVWCopyrightString := (versionString copyFrom: > commasLocation + 1 > to: versionString size) > removeSurroundingWhiteSpace. > afterNumberLocation := afterVWCopyrightString indexOf: Character > space. > ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 > > Please provide > SystemUtils objectEngineVersionNumber > so my code doesn't depend on the format of the herald string. > > In the same way, the image provides > SystemUtils version > from which one can obtain the image version number with code like > > | versionString commasLocation afterVWCopyrightString > afterNumberLocation | > versionString := SystemUtils version. > commasLocation := versionString indexOf: $,. > afterVWCopyrightString := (versionString copyFrom: > commasLocation + 1 > to: versionString size) > removeSurroundingWhiteSpace. > afterNumberLocation := afterVWCopyrightString indexOf: Character > space. > ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 > > > Please provide > SystemUtils imageVersionNumber > so my code doesn't depend on the format of the version string. |
The VM release number is:
|id| id := ObjectMemory versionId. (id at: 3) printString, '.', (((id at: 4) bitShift: -4) + 1) printString In your case, this is '61.3'. This is the "release number" which is different than the product version like '7.4d'. For that, try IOAccessor convertSimpleStringFromPlatform: (ObjectMemory getHeraldString) If you want to conditionally execute based on the VM version, you should use (in this case) '61.3' as the VM version since it's possible to change the herald string and since the version string is arbitrary. See src/doc/vm/hpsversion.text for the details. HTH, pete On Jan 28, 2008, at 4:28 PM, [hidden email] wrote: > I don't think so.... > > this is what I get for a versionId > > #[61 40 61 32 73 1 0 0 61 40 61 32] > > I don't see the ObjectEngine version of 7.1d anywhere. > > The image version of > > 7.3.1 > > could be obtained from bytes 5 and 6, I suppose. > > -----Original Message----- > From: Boris Popov [mailto:[hidden email]] > Sent: Monday, January 28, 2008 1:45 PM > To: Ballard, Mark B; [hidden email] > Subject: RE: enhancement request -- have base image provide protocol > to > obtain object engine version number and image version number > > > ObjectMemory versionId > > Return a 12 element ByteArray where: > > bytes 1 - 4 contain this platform's id where: > 1 = platform version, > 2 = platform number, > 3 = platform release major number, > 4 = platform release minor number (bits 7-4) and flags (bits > 3-0) > bytes 5 - 8 contain this image's id where: > 5 = image major version, > 6 = image minor version, > 7 = image release major number, > 8 = image release minor number > bytes 9 - 12 contain the platform id that made this image. > > Isn't that what you need? > > -Boris > > -- > +1.604.689.0322 > DeepCove Labs Ltd. > 4th floor 595 Howe Street > Vancouver, Canada V6C 2T5 > http://tinyurl.com/r7uw4 > > [hidden email] > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > header. Unless otherwise indicated, it contains information that is > private and confidential. If you have received it in error, please > notify the sender and delete the entire message including any > attachments. > > Thank you. > >> -----Original Message----- >> From: [hidden email] > [mailto:[hidden email]] >> Sent: Monday, January 28, 2008 1:40 PM >> To: [hidden email] >> Subject: enhancement request -- have base image provide protocol to > obtain >> object engine version number and image version number >> >> The image provides >> ObjectMemory getHeraldString >> from which one can obtain the OE version number with code like: >> >> | versionString commasLocation afterVWCopyrightString >> afterNumberLocation | >> versionString := IOAccessor convertSimpleStringFromPlatform: >> ObjectMemory getHeraldString. >> commasLocation := versionString indexOf: Character space. >> afterVWCopyrightString := (versionString copyFrom: >> commasLocation + 1 >> to: versionString size) >> removeSurroundingWhiteSpace. >> afterNumberLocation := afterVWCopyrightString indexOf: Character >> space. >> ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 >> >> Please provide >> SystemUtils objectEngineVersionNumber >> so my code doesn't depend on the format of the herald string. >> >> In the same way, the image provides >> SystemUtils version >> from which one can obtain the image version number with code like >> >> | versionString commasLocation afterVWCopyrightString >> afterNumberLocation | >> versionString := SystemUtils version. >> commasLocation := versionString indexOf: $,. >> afterVWCopyrightString := (versionString copyFrom: >> commasLocation + 1 >> to: versionString size) >> removeSurroundingWhiteSpace. >> afterNumberLocation := afterVWCopyrightString indexOf: Character >> space. >> ^afterVWCopyrightString copyFrom: 1 to: afterNumberLocation - 1 >> >> >> Please provide >> SystemUtils imageVersionNumber >> so my code doesn't depend on the format of the version string. > |
Free forum by Nabble | Edit this page |