Hi All, I just added code to the Cog branch for the Mac VM so that whether primVmPath/primitiveVMPath answers the directory containing the VM.app or answers the Resources directory within the .app is controlled by the SqueakVMPathAnswersResources preference in the Info.plist file. primVmPath is used to determine where to derive the sources file from. By default primVmPath answers the directory containing the VM.app and therefore the sources file is at the same level, e.g. /Applications/Squeak.app & /Applications/SqueakV41.sources. But some installations (e.g. Newspeak and the EToys all-in-one) may find it more convenient to put the sources in VM.app/Contents/Resources. This means one file to install, not 2, etc. I think it useful that this behavior be in the standard VM. Esteban, if you agree, perhaps you could integrate into the trunk platforms/Mac OS?
-- best, Eliot |
On 31.07.2011, at 19:18, Eliot Miranda wrote: > Hi All, > > I just added code to the Cog branch for the Mac VM so that whether primVmPath/primitiveVMPath answers the directory containing the VM.app or answers the Resources directory within the .app is controlled by the SqueakVMPathAnswersResources preference in the Info.plist file. primVmPath is used to determine where to derive the sources file from. Among other places. > By default primVmPath answers the directory containing the VM.app and therefore the sources file is at the same level, e.g. /Applications/Squeak.app & /Applications/SqueakV41.sources. But some installations (e.g. Newspeak and the EToys all-in-one) may find it more convenient to put the sources in VM.app/Contents/Resources. That's what Etoys does, of course. > This means one file to install, not 2, etc. I think it useful that this behavior be in the standard VM. Esteban, if you agree, perhaps you could integrate into the trunk platforms/Mac OS? Not opposed to the change, but it's unnecessary for all-in-ones like Etoys. The Squeak logic to open the sources file looks in the image directory anyway, which is the Resources folder. - Bert - |
Hi Bert, On Sun, Jul 31, 2011 at 10:52 AM, Bert Freudenberg <[hidden email]> wrote:
I didn't find this code when I looked yesterday. Can you spell this out for me?
-- best, Eliot |
On 31.07.2011, at 20:55, Eliot Miranda wrote: Hi Bert, FileDirectory class>>openSources:forImage: {system start up} tpr 2/17/2004 19:59 openSources: fullSourcesName forImage: imageName "We first do a check to see if a compressed version ofthe sources file is present. Open the .sources file read-only after searching in: a) the directory where the VM lives b) the directory where the image came from c) the DefaultDirectory (which is likely the same as b unless the SecurityManager has changed it). " | sources fd sourcesName | (fullSourcesName endsWith: 'sources') ifTrue: ["Look first for a sources file in compressed format." sources _ self openSources: (fullSourcesName allButLast: 7) , 'stc' forImage: imageName. sources ifNotNil: [^ CompressedSourceStream on: sources]]. sourcesName _ FileDirectory localNameFor: fullSourcesName. "look for the sources file or an alias to it in the VM's directory" fd _ FileDirectory on: SmalltalkImage current vmPath. (fd fileExists: sourcesName) ifTrue: [sources _ fd readOnlyFileNamed: sourcesName]. sources ifNotNil: [^ sources]. "look for the sources file or an alias to it in the image directory" fd _ FileDirectory on: (FileDirectory dirPathFor: imageName). (fd fileExists: sourcesName) ifTrue: [sources _ fd readOnlyFileNamed: sourcesName]. sources ifNotNil: [^ sources]. "look for the sources in the current directory" fd _ DefaultDirectory. (fd fileExists: sourcesName) ifTrue: [sources _ fd readOnlyFileNamed: sourcesName]. "sources may still be nil here" ^sources - Bert - |
In reply to this post by Eliot Miranda-2
Hi, Sorry for the delay... I've been running this days. I think it can be useful to incorporate, and I will do it as soon as I find time, but not this month because I will be traveling... cheers, Esteban El 31/07/2011, a las 2:18p.m., Eliot Miranda escribió: > Hi All, > > I just added code to the Cog branch for the Mac VM so that whether primVmPath/primitiveVMPath answers the directory containing the VM.app or answers the Resources directory within the .app is controlled by the SqueakVMPathAnswersResources preference in the Info.plist file. primVmPath is used to determine where to derive the sources file from. By default primVmPath answers the directory containing the VM.app and therefore the sources file is at the same level, e.g. /Applications/Squeak.app & /Applications/SqueakV41.sources. But some installations (e.g. Newspeak and the EToys all-in-one) may find it more convenient to put the sources in VM.app/Contents/Resources. This means one file to install, not 2, etc. I think it useful that this behavior be in the standard VM. Esteban, if you agree, perhaps you could integrate into the trunk platforms/Mac OS? > -- > best, > Eliot > |
In reply to this post by Bert Freudenberg
Hi Bert, On Mon, Aug 1, 2011 at 5:12 AM, Bert Freudenberg <[hidden email]> wrote:
yes, I saw that. But the above implies that the only way the sources are going to be found in the Resources directory is if primVmPath answers the Resources directory, right? And at least in the Cog sources that wasn't the case until I made modifications. Does the etoys VM have some modifications to primVmPath or does it patch the method or...?
-- best, Eliot |
On 01.08.2011, at 21:34, Eliot Miranda wrote: Hi Bert, No.
As I wrote above "The Squeak logic to open the sources file looks in the image directory anyway, which is the Resources folder" because the Etoys image is in the Resources folder. Just like any other all-in-one I know. - Bert - |
On Mon, Aug 1, 2011 at 12:39 PM, Bert Freudenberg <[hidden email]> wrote:
Ah, got you. So the Info.plist names the image in the Resources directory and everything follows from there. Thanks.
-- best, Eliot |
Free forum by Nabble | Edit this page |