mac carbon VM 3.8.14b3 pending

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

mac carbon VM 3.8.14b3 pending

johnmci
I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for  
testing.  Some notes are below, the big changes are for ppc, and  
macIntel browser support (safari/firefix), headless support,  
remapping of mouse buttons, and adding Exupery support for MacIntel.

http://www.smalltalkconsulting.com/squeak.html


Please let me know if there are issues.

PS Yes I know sound recording is broken somehow, I hope to explore  
why at some point this weekend, although the unix code was swapped in  
at 3.8.6b5 and no one noticed anything, assuming anyone does sound  
recording anymore, and perhaps it's just a macintel issue, yet  
another endian issue one can hope.


3.8.14b3 sqMacWIndowUnversial.c  Ensure window is created when non-
headless and not running under the browser
                typo in check prevent squeak from showing the window when running  
standalone for 3.8.14b2.
               
                sqMacMain.c Check processsor status at startup, if non-headless  
and LSBackgroundOnly is true, then
                                                switch process to foreground.
                info.plist rest LSBackgroundOnly to false, from true, to avoid  
Dock display issue. People
                                                wanting true headless app need then to alter info.plist

                revert bitBlt>copyLoop changes, introduced drawing problems, look  
at fixing later, or never as time permits

3.8.14b2 Fixes for browser support
               
3.8.14b1 New browser support on os-x mac/macintel for safari and  
firefox.
                This logic now follows the example set by the unix plugin, where we
                run the VM headless and talk to the browser plugin stub via a two-
way pipe to
                enable fetching data via a URL, drawing the screen, and setting the  
cursor.

                Thanks to Viewpoint Research for funding this effort.
                This VM had limited distribution.

                sqMacOpenGL.c - remove BROWSERPLUGIN
                sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h
                sqMacHostWindow.c - remove BROWSERPLUGIN
                sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic,
                                                                rearrange startup to handle startup with out window for  
browser support.
                sqMacMemory.c - remove BROWSERPLUGIN
                sqMacTime.c - remove BROWSERPLUGIN
                sqMacUIAppleEvents.c - remove BROWSERPLUGIN
                sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some  
internals so new browser
                                                                support code can call or access.
                sqMacUnixCommandLineInterface.c - add headfull cmd for browser testing
                sqMacUnixExernalPrims.c - remove BROWSERPLUGIN
                sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for browser  
support,
                                                                assume window is hidden which is different from being headless.
                sqNamedPrims.h - remove BROWSERPLUGIN
                sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH
                npSqueak - Directory, add plugin for browser into source tree
                sqMacNSPLuginUILogic2.c - new file to replace sqmacNSPluginUILogic.c
                sqMacNSPLuginUILogic2.h - new file to replace sqmacNSPluginUILogic2.c


3.8.13.b4  Headless support
                sqMacMain.c
                        headless, set background to false if not headless.
                        alter uuid returned to signify which VM this is

                info.plist
                swap buttons to ensure cmd/opt of trackpad is right
                Add LSBackgroundOnly to yes i

                sqMacEventsUniversal.c
                headless support
               
                sqMacUnixCommandLineInterface.c
                headless parm -headless added
               
                sqMacWindowUniversal.c
                headless support
               
                platforms/Cross/plugins/ExuperyPLugin created

3.8.13.b4, b5, b6, b7
                Had limited distribution to test new button modification logic
               
3.8.13.b3
                bitBlt>copyLoop changes, normally it prefetchs the next byte for  
barrel shifting 64 bits when copying from
                one form to another, and a dirty secret and old bug is that it  
reads one word past the end of the Form
                when it processes the last word in the Form. However when you use  
surfaces where the surface is
                allocated elsewhere not in object space and in fact say the  
allocated form is 2MB and the vm memory
                system makes the frame past the 2MB range non-readable, why then  
you die on a read protection failure.
                So alter the loop to consider if it's preload and the last line we  
don't do the pre-fetch because that could
                cause a read failure.
3.8.13.b2
                Exupery support, via plugin and changes in the VM for Mac Intel,  
use merged VMMaker-Exupery change set

3.8.13.b1
                Exupery support, via plugin and changes in the VM for Mac Intel.
                http://minnow.cc.gatech.edu/squeak/5672

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
Hi John,

I'm trying to get the new VM to run with SqueakPlugin.image, as a  
first step to testing teh plugin (which does not yet work). So I  
first ran it stand-alone.

One problem I saw is that FileDirectory default is

    UnixFileDirectory on '/foobar/tooBar/forSqueak/bogus'

How come?

- Bert -

On Nov 17, 2006, at 7:18 , John M McIntosh wrote:

> I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for  
> testing.  Some notes are below, the big changes are for ppc, and  
> macIntel browser support (safari/firefix), headless support,  
> remapping of mouse buttons, and adding Exupery support for MacIntel.
>
> http://www.smalltalkconsulting.com/squeak.html
>
>
> Please let me know if there are issues.
>
> PS Yes I know sound recording is broken somehow, I hope to explore  
> why at some point this weekend, although the unix code was swapped  
> in at 3.8.6b5 and no one noticed anything, assuming anyone does  
> sound recording anymore, and perhaps it's just a macintel issue,  
> yet another endian issue one can hope.
>
>
> 3.8.14b3 sqMacWIndowUnversial.c  Ensure window is created when non-
> headless and not running under the browser
> typo in check prevent squeak from showing the window when running  
> standalone for 3.8.14b2.
>
> sqMacMain.c Check processsor status at startup, if non-headless  
> and LSBackgroundOnly is true, then
> switch process to foreground.
> info.plist rest LSBackgroundOnly to false, from true, to avoid  
> Dock display issue. People
> wanting true headless app need then to alter info.plist
>
> revert bitBlt>copyLoop changes, introduced drawing problems, look  
> at fixing later, or never as time permits
>
> 3.8.14b2 Fixes for browser support
>
> 3.8.14b1 New browser support on os-x mac/macintel for safari and  
> firefox.
> This logic now follows the example set by the unix plugin, where we
> run the VM headless and talk to the browser plugin stub via a two-
> way pipe to
> enable fetching data via a URL, drawing the screen, and setting  
> the cursor.
>
> Thanks to Viewpoint Research for funding this effort.
> This VM had limited distribution.
>
> sqMacOpenGL.c - remove BROWSERPLUGIN
> sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h
> sqMacHostWindow.c - remove BROWSERPLUGIN
> sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic,
> rearrange startup to handle startup with out window for  
> browser support.
> sqMacMemory.c - remove BROWSERPLUGIN
> sqMacTime.c - remove BROWSERPLUGIN
> sqMacUIAppleEvents.c - remove BROWSERPLUGIN
> sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some  
> internals so new browser
> support code can call or access.
> sqMacUnixCommandLineInterface.c - add headfull cmd for browser  
> testing
> sqMacUnixExernalPrims.c - remove BROWSERPLUGIN
> sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for  
> browser support,
> assume window is hidden which is different from being  
> headless.
> sqNamedPrims.h - remove BROWSERPLUGIN
> sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH
> npSqueak - Directory, add plugin for browser into source tree
> sqMacNSPLuginUILogic2.c - new file to replace sqmacNSPluginUILogic.c
> sqMacNSPLuginUILogic2.h - new file to replace  
> sqmacNSPluginUILogic2.c
>
>
> 3.8.13.b4  Headless support
> sqMacMain.c
> headless, set background to false if not headless.
> alter uuid returned to signify which VM this is
>
> info.plist
> swap buttons to ensure cmd/opt of trackpad is right
> Add LSBackgroundOnly to yes i
>
> sqMacEventsUniversal.c
> headless support
>
> sqMacUnixCommandLineInterface.c
> headless parm -headless added
>
> sqMacWindowUniversal.c
> headless support
>
> platforms/Cross/plugins/ExuperyPLugin created
>
> 3.8.13.b4, b5, b6, b7
> Had limited distribution to test new button modification logic
>
> 3.8.13.b3
> bitBlt>copyLoop changes, normally it prefetchs the next byte for  
> barrel shifting 64 bits when copying from
> one form to another, and a dirty secret and old bug is that it  
> reads one word past the end of the Form
> when it processes the last word in the Form. However when you use  
> surfaces where the surface is
> allocated elsewhere not in object space and in fact say the  
> allocated form is 2MB and the vm memory
> system makes the frame past the 2MB range non-readable, why then  
> you die on a read protection failure.
> So alter the loop to consider if it's preload and the last line  
> we don't do the pre-fetch because that could
> cause a read failure.
> 3.8.13.b2
> Exupery support, via plugin and changes in the VM for Mac Intel,  
> use merged VMMaker-Exupery change set
>
> 3.8.13.b1
> Exupery support, via plugin and changes in the VM for Mac Intel.
> http://minnow.cc.gatech.edu/squeak/5672
>
> --
> ======================================================================
> =====
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://
> www.smalltalkconsulting.com
> ======================================================================
> =====
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
I think in the plugin image it looks for the untrusted directory as  
the default?
By default that should be.
~/Preferences/Squeak/Internet/My Squeak/

If that directory is missing, then you'll get the
'/foobar/tooBar/forSqueak/bogus'

and you say the plugin does not work yet?

On 19-Nov-06, at 1:38 PM, Bert Freudenberg wrote:

> Hi John,
>
> I'm trying to get the new VM to run with SqueakPlugin.image, as a  
> first step to testing teh plugin (which does not yet work). So I  
> first ran it stand-alone.
>
> One problem I saw is that FileDirectory default is
>
>    UnixFileDirectory on '/foobar/tooBar/forSqueak/bogus'
>
> How come?
>
> - Bert -
>
> On Nov 17, 2006, at 7:18 , John M McIntosh wrote:
>
>> I've posted a 3.8.14b3 Mac carbon VM to my ftp site and idisk for  
>> testing.  Some notes are below, the big changes are for ppc, and  
>> macIntel browser support (safari/firefix), headless support,  
>> remapping of mouse buttons, and adding Exupery support for MacIntel.
>>
>> http://www.smalltalkconsulting.com/squeak.html
>>
>>
>> Please let me know if there are issues.
>>
>> PS Yes I know sound recording is broken somehow, I hope to explore  
>> why at some point this weekend, although the unix code was swapped  
>> in at 3.8.6b5 and no one noticed anything, assuming anyone does  
>> sound recording anymore, and perhaps it's just a macintel issue,  
>> yet another endian issue one can hope.
>>
>>
>> 3.8.14b3 sqMacWIndowUnversial.c  Ensure window is created when non-
>> headless and not running under the browser
>> typo in check prevent squeak from showing the window when  
>> running standalone for 3.8.14b2.
>>
>> sqMacMain.c Check processsor status at startup, if non-headless  
>> and LSBackgroundOnly is true, then
>> switch process to foreground.
>> info.plist rest LSBackgroundOnly to false, from true, to avoid  
>> Dock display issue. People
>> wanting true headless app need then to alter info.plist
>>
>> revert bitBlt>copyLoop changes, introduced drawing problems,  
>> look at fixing later, or never as time permits
>>
>> 3.8.14b2 Fixes for browser support
>>
>> 3.8.14b1 New browser support on os-x mac/macintel for safari and  
>> firefox.
>> This logic now follows the example set by the unix plugin, where we
>> run the VM headless and talk to the browser plugin stub via a  
>> two-way pipe to
>> enable fetching data via a URL, drawing the screen, and setting  
>> the cursor.
>>
>> Thanks to Viewpoint Research for funding this effort.
>> This VM had limited distribution.
>>
>> sqMacOpenGL.c - remove BROWSERPLUGIN
>> sqMacUnixFileInterface.c - needed include for sqUnixCharConv.h
>> sqMacHostWindow.c - remove BROWSERPLUGIN
>> sqMacMain.c - remove BROWSERPLUGIN, add browser pipe logic,
>> rearrange startup to handle startup with out window for  
>> browser support.
>> sqMacMemory.c - remove BROWSERPLUGIN
>> sqMacTime.c - remove BROWSERPLUGIN
>> sqMacUIAppleEvents.c - remove BROWSERPLUGIN
>> sqMacUIEventsUniversal.c - remove BROWSERPLUGIN, expose some  
>> internals so new browser
>> support code can call or access.
>> sqMacUnixCommandLineInterface.c - add headfull cmd for browser  
>> testing
>> sqMacUnixExernalPrims.c - remove BROWSERPLUGIN
>> sqMacWIndowUnversial.c - remove BROWSERPLUGIN, changes for  
>> browser support,
>> assume window is hidden which is different from being  
>> headless.
>> sqNamedPrims.h - remove BROWSERPLUGIN
>> sqPlatformSpecific.h - remove BROWSERPLUGIN, add URL_FETCH
>> npSqueak - Directory, add plugin for browser into source tree
>> sqMacNSPLuginUILogic2.c - new file to replace  
>> sqmacNSPluginUILogic.c
>> sqMacNSPLuginUILogic2.h - new file to replace  
>> sqmacNSPluginUILogic2.c
>>
>>
>> 3.8.13.b4  Headless support
>> sqMacMain.c
>> headless, set background to false if not headless.
>> alter uuid returned to signify which VM this is
>>
>> info.plist
>> swap buttons to ensure cmd/opt of trackpad is right
>> Add LSBackgroundOnly to yes i
>>
>> sqMacEventsUniversal.c
>> headless support
>>
>> sqMacUnixCommandLineInterface.c
>> headless parm -headless added
>>
>> sqMacWindowUniversal.c
>> headless support
>>
>> platforms/Cross/plugins/ExuperyPLugin created
>>
>> 3.8.13.b4, b5, b6, b7
>> Had limited distribution to test new button modification logic
>>
>> 3.8.13.b3
>> bitBlt>copyLoop changes, normally it prefetchs the next byte for  
>> barrel shifting 64 bits when copying from
>> one form to another, and a dirty secret and old bug is that it  
>> reads one word past the end of the Form
>> when it processes the last word in the Form. However when you  
>> use surfaces where the surface is
>> allocated elsewhere not in object space and in fact say the  
>> allocated form is 2MB and the vm memory
>> system makes the frame past the 2MB range non-readable, why then  
>> you die on a read protection failure.
>> So alter the loop to consider if it's preload and the last line  
>> we don't do the pre-fetch because that could
>> cause a read failure.
>> 3.8.13.b2
>> Exupery support, via plugin and changes in the VM for Mac Intel,  
>> use merged VMMaker-Exupery change set
>>
>> 3.8.13.b1
>> Exupery support, via plugin and changes in the VM for Mac Intel.
>> http://minnow.cc.gatech.edu/squeak/5672
>>
>> --
>> =====================================================================
>> ======
>> John M. McIntosh <[hidden email]>
>> Corporate Smalltalk Consulting Ltd.  http://
>> www.smalltalkconsulting.com
>> =====================================================================
>> ======
>>
>>
>>
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
On Nov 20, 2006, at 8:37 , John M McIntosh wrote:

> I think in the plugin image it looks for the untrusted directory as  
> the default?
> By default that should be.
> ~/Preferences/Squeak/Internet/My Squeak/
>
> If that directory is missing, then you'll get the
> '/foobar/tooBar/forSqueak/bogus'

If the directory does not exist yet, it should be created on startup.  
That's what I do on the X11 browser plugin - no need for a separate  
per-user installation procedure. I also copy the image (although that  
might have been not so brilliant an idea, making system-wide image  
upgrades more difficult) and create the Desktop symlink. Anyway, we  
would just have the VM and the plugin (in my install I renamed the VM  
to Squeakland.app and included the image - starts to look like a  
regular Mac application).

At the very least it should still report the supposedly right  
directory even if it does not exist, yet. In that case it will be  
created in FileDirectory>>startUp.

> and you say the plugin does not work yet?

Not yet, but maybe I got the paths wrong. The console log says:

2006-11-19 18:30:07.053 Squeak VM Opt[2648] *** _NSAutoreleaseNoPool
(): Object 0x4183d0 of class NSPathStore2 autoreleased with no pool  
in place - just leaking
Squeak Plugin: Image file not found: SqueakPlugin.image
Squeak Plugin: no failure URL:

Another problem is that the secure directory seems to be reported as  
the image path. But in a regular install, Squeak would not be allowed  
to write there. I'd prefer a directory structure similar to what the  
X11 browser plugin uses (next to "My Squeak"). The secure directory  
must be in a user-writable location.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:

> On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
>
>> and you say the plugin does not work yet?
>
> Not yet, but maybe I got the paths wrong. The console log says:

Yep, that was it. Plugin is running now. Yay! :)

A problem is that the right mouse button is equivalent to ctrl-click  
(debug menu), the middle one is cmd-click (halo). Outside the plugin,  
right mouse button is cmd-click (halo), and middle one is option  
click (context menu).

Cmd-shortcuts do not work in plugin.

Shift-shortcuts (e.g., shift-arrow for select) does not work in plugin.

Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert  
invisible characters in plugin.

On startup I get an error because Project squeakletDirectory tries to  
create

        /foobar/tooBar/forSqueak/bogus/Squeaklets

which inexplicably fails - the directory is actually there.

Scrolling the plugin (mouse scroll wheell / two finger touchpad  
scroll) draws over the browser's bookmark bar and status bar.

Apart from those problems, I'd prefer to not see the Squeak VM icon  
in the task bar at all.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Bert Freudenberg
ok,

a) The failure URL is passed in the HTML
        failureURL="http://www.cnn.com"

b) You need to ensure the image name and the image path is correct,  
see http://www.smalltalkconsulting.com/html/squeakinfoplist.html
that information is stored in the info.plist of the plugin.

On 20-Nov-06, at 3:30 AM, Bert Freudenberg wrote:

> On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
>
>> I think in the plugin image it looks for the untrusted directory  
>> as the default?
>> By default that should be.
>> ~/Preferences/Squeak/Internet/My Squeak/
>>
>> If that directory is missing, then you'll get the
>> '/foobar/tooBar/forSqueak/bogus'
>
> If the directory does not exist yet, it should be created on  
> startup. That's what I do on the X11 browser plugin - no need for a  
> separate per-user installation procedure. I also copy the image  
> (although that might have been not so brilliant an idea, making  
> system-wide image upgrades more difficult) and create the Desktop  
> symlink. Anyway, we would just have the VM and the plugin (in my  
> install I renamed the VM to Squeakland.app and included the image -  
> starts to look like a regular Mac application).
>
> At the very least it should still report the supposedly right  
> directory even if it does not exist, yet. In that case it will be  
> created in FileDirectory>>startUp.
>
>> and you say the plugin does not work yet?
>
> Not yet, but maybe I got the paths wrong. The console log says:
>
> 2006-11-19 18:30:07.053 Squeak VM Opt[2648] *** _NSAutoreleaseNoPool
> (): Object 0x4183d0 of class NSPathStore2 autoreleased with no pool  
> in place - just leaking
> Squeak Plugin: Image file not found: SqueakPlugin.image
> Squeak Plugin: no failure URL:
>
> Another problem is that the secure directory seems to be reported  
> as the image path. But in a regular install, Squeak would not be  
> allowed to write there. I'd prefer a directory structure similar to  
> what the X11 browser plugin uses (next to "My Squeak"). The secure  
> directory must be in a user-writable location.
>
> - Bert -
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Bert Freudenberg

On 20-Nov-06, at 5:34 AM, Bert Freudenberg wrote:

> On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:
>
>> On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
>>
>>> and you say the plugin does not work yet?
>>
>> Not yet, but maybe I got the paths wrong. The console log says:
>
> Yep, that was it. Plugin is running now. Yay! :)
>
> A problem is that the right mouse button is equivalent to ctrl-
> click (debug menu), the middle one is cmd-click (halo). Outside the  
> plugin, right mouse button is cmd-click (halo), and middle one is  
> option click (context menu).

Likely that is a bug, didn't test with multi button mice.

>
> Cmd-shortcuts do not work in plugin.

mmm, the browser grabs most cmd-key short cuts, it is after all the  
controlling application.

>
> Shift-shortcuts (e.g., shift-arrow for select) does not work in  
> plugin.
>
> Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert  
> invisible characters in plugin.

Likely that is a bug, let me see.

>
> On startup I get an error because Project squeakletDirectory tries  
> to create
>
> /foobar/tooBar/forSqueak/bogus/Squeaklets
>
> which inexplicably fails - the directory is actually there.

Not sure why that isn't the user's preference directory.

>
> Scrolling the plugin (mouse scroll wheell / two finger touchpad  
> scroll) draws over the browser's bookmark bar and status bar.

Ya, need to clip things.

>
> Apart from those problems, I'd prefer to not see the Squeak VM icon  
> in the task bar at all.

The problem is that if we hide the squeak VM, then when we show it  
does not show the arrow in the dock. If you have the
VM in your dock then you have no indication it is running, this is a  
bug in 10.4.  To test this change the VM info.plist
LSBackgroundOnly  to true.   Lastly I'll note if you truly hide the  
application and the browser quits you end up with squeak
as a disconnected background task and I suspect many squeakland users  
will not understand that it is still there and
running because for them it's invisible.

>
> - Bert -
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
On Nov 20, 2006, at 16:29 , John M McIntosh wrote:

>> On startup I get an error because Project squeakletDirectory tries  
>> to create
>>
>> /foobar/tooBar/forSqueak/bogus/Squeaklets
>>
>> which inexplicably fails - the directory is actually there.
>
> Not sure why that isn't the user's preference directory.

Previously you wrote this is the case if the directory does not  
exist? You should try removing your's.

>> Apart from those problems, I'd prefer to not see the Squeak VM  
>> icon in the task bar at all.
>
> The problem is that if we hide the squeak VM, then when we show it  
> does not show the arrow in the dock. If you have the VM in your  
> dock then you have no indication it is running, this is a bug in  
> 10.4.  To test this change the VM info.plist LSBackgroundOnly  to  
> true.   Lastly I'll note if you truly hide the application and the  
> browser quits you end up with squeak as a disconnected background  
> task and I suspect many squeakland users will not understand that  
> it is still there and running because for them it's invisible.

Well, we would only want to disable the the icon when we are inside  
the browser. If the last image is closed, why don't we kill the VM?

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
Ok, the way the way it works, I hope, is that each instance of the  
plugin that is created causes us to instantiate and run a different  
VM sub process, say you've four windows open. That means four VMs are  
running in the back ground. Normally what will happen is if the  
plugin instance is destroyed we then sigterm the associated child  
process.   But if the browser crashes, not uncommon, the sub-process  
are left running... Mmm I wonder if the child process can get  
notification if the parent is terminated?

On 20-Nov-06, at 7:55 AM, Bert Freudenberg wrote:

>> The problem is that if we hide the squeak VM, then when we show it  
>> does not show the arrow in the dock. If you have the VM in your  
>> dock then you have no indication it is running, this is a bug in  
>> 10.4.  To test this change the VM info.plist LSBackgroundOnly  to  
>> true.   Lastly I'll note if you truly hide the application and the  
>> browser quits you end up with squeak as a disconnected background  
>> task and I suspect many squeakland users will not understand that  
>> it is still there and running because for them it's invisible.
>
> Well, we would only want to disable the the icon when we are inside  
> the browser. If the last image is closed, why don't we kill the VM?
>
> - Bert -
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Juergen Gmeiner
On 20.11.2006, at 21:53, John M McIntosh wrote:
> Normally what will happen is if the plugin instance is destroyed we  
> then sigterm the associated child process.   But if the browser  
> crashes, not uncommon, the sub-process are left running... Mmm I  
> wonder if the child process can get notification if the parent is  
> terminated?

Notification - no.  But it can check it's parent process via getppid
().  If a process's parent is terminated, it gets the process with  
PID 1 as new parent.  It's not init as in traditional unix systems  
but launchd, but it seems they kept the magic process id 1.

cheers,
Juergen

--
Juergen Gmeiner





Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Juergen Gmeiner
In reply to this post by johnmci
On 20.11.2006, at 21:53, John M McIntosh wrote:

> Ok, the way the way it works, I hope, is that each instance of the  
> plugin that is created causes us to instantiate and run a different  
> VM sub process, say you've four windows open. That means four VMs  
> are running in the back ground. Normally what will happen is if the  
> plugin instance is destroyed we then sigterm the associated child  
> process.   But if the browser crashes, not uncommon, the sub-
> process are left running... Mmm I wonder if the child process can  
> get notification if the parent is terminated?

Another idea after the first reply ...

You are communicating with the browser process via a pipe or  
socketpair, I assume.  When the browser terminates, you should get  
EOF for read/select on that filehandle, and SIGPIPE or an error code  
for writes.  I guess this could be considered a notification.

cheers,
Juergen

--
Juergen Gmeiner




Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
In reply to this post by johnmci
Hmm, on X11 you would notice if the window was going away ... not the  
same on Aqua?

- Bert -

On Nov 20, 2006, at 21:53 , John M McIntosh wrote:

> Ok, the way the way it works, I hope, is that each instance of the  
> plugin that is created causes us to instantiate and run a different  
> VM sub process, say you've four windows open. That means four VMs  
> are running in the back ground. Normally what will happen is if the  
> plugin instance is destroyed we then sigterm the associated child  
> process.   But if the browser crashes, not uncommon, the sub-
> process are left running... Mmm I wonder if the child process can  
> get notification if the parent is terminated?
>
> On 20-Nov-06, at 7:55 AM, Bert Freudenberg wrote:
>
>>> The problem is that if we hide the squeak VM, then when we show  
>>> it does not show the arrow in the dock. If you have the VM in  
>>> your dock then you have no indication it is running, this is a  
>>> bug in 10.4.  To test this change the VM info.plist  
>>> LSBackgroundOnly  to true.   Lastly I'll note if you truly hide  
>>> the application and the browser quits you end up with squeak as a  
>>> disconnected background task and I suspect many squeakland users  
>>> will not understand that it is still there and running because  
>>> for them it's invisible.
>>
>> Well, we would only want to disable the the icon when we are  
>> inside the browser. If the last image is closed, why don't we kill  
>> the VM?
>>
>> - Bert -



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
no, the vm draws to a posix shared memory bitmap area via quartz, and  
sends the draw rectangle coordinates to the browser plugin. On idle  
events from the browser the plugin pulls data from the pipe and uses  
quartz to take the bitmap coordinates and draw into the plugin's  
drawing surface using the shared memory bitmap . I don't believe you  
can share a drawing context between processes, however I'll welcome a  
chance to be corrected.  So we don't get window notification, however  
I'll look at the issue of what happens with the pipes when the parent  
process goes away

On 20-Nov-06, at 2:44 PM, Bert Freudenberg wrote:

> Hmm, on X11 you would notice if the window was going away ... not  
> the same on Aqua?
>
> - Bert -
--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Bert Freudenberg

On 20-Nov-06, at 3:30 AM, Bert Freudenberg wrote:

> On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
>
>> I think in the plugin image it looks for the untrusted directory  
>> as the default?
>> By default that should be.
>> ~/Preferences/Squeak/Internet/My Squeak/
>>
>> If that directory is missing, then you'll get the
>> '/foobar/tooBar/forSqueak/bogus'
>
> If the directory does not exist yet, it should be created on  
> startup. That's what I do on the X11 browser plugin - no need for a  
> separate per-user installation procedure. I also copy the image  
> (although that might have been not so brilliant an idea, making  
> system-wide image upgrades more difficult) and create the Desktop  
> symlink. Anyway, we would just have the VM and the plugin (in my  
> install I renamed the VM to Squeakland.app and included the image -  
> starts to look like a regular Mac application).

Well historically we've choosen to have the installation process  
build the directories and copy the files about, versus having the  
directory creation buried in the VM.  I could change that, but I'm  
not sure we've an agreed upon behaviour that is somewhat (or not?)  
cross platform?

On the mac we could have

/Application/SqueakLand/Squeak/Internet/Squeak.app which contains the  
image, and plugins, that removes these older plugins and browser  
interface files.

KedamaPlugin.bundle
LocalePlugin.bundle
mpeg3Plugin.bundle
NPSqueak.bundle
NPSqueakStubCFM
PrintJobPlugin.bundle
SqueakPlugin.image

also we delete the

/Application/SqueakLand/Squeak/Plugins directory.

and add in the  new Squeak.app and
SqueakBrowserPlugin.plugin which needs to be symbolic linked to the ~/
Library/Internet Plug-Ins/  folder
I'll note the /Application/SqueakLand/Squeak/Internet/ still contains  
the prefs folder, and the Squeak.keys file.

Since all users share the application folder, we make the ~/Squeak/
Internet/My Squeak folder to contain user specific files.



--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Bert Freudenberg

On 20-Nov-06, at 5:34 AM, Bert Freudenberg wrote:

> On Nov 20, 2006, at 12:30 , Bert Freudenberg wrote:
>
>> On Nov 20, 2006, at 8:37 , John M McIntosh wrote:
>>
>>> and you say the plugin does not work yet?
>>
>> Not yet, but maybe I got the paths wrong. The console log says:
>
> Yep, that was it. Plugin is running now. Yay! :)
>
> A problem is that the right mouse button is equivalent to ctrl-
> click (debug menu), the middle one is cmd-click (halo). Outside the  
> plugin, right mouse button is cmd-click (halo), and middle one is  
> option click (context menu).

mmm, ok, first the browser is turning button press-2 into some sort  
of control/command/option key pressed and a button 1 event. The
old event logic had the single mouse button which either up or down  
with modifier keys.

What you should do is confirm that the browser plugin works as  
expected with a one button mouse against the modifier keys, and the  
running the VM against the plugin image standalone also has the  
correct behaviour. At least here it seems the behaviour is the same.  
Works with one button mouse as expected.

Now check a three button mouse against the VM running standalone  
against the plugin image and see what the behaviour is. Remember of  
course the VM grinds thru the option/command/control/shift button(s)  
and ends up with results according to data in the info.plist for the VM.


Then compare to what the plugin does with a three button mouse.

>
> Cmd-shortcuts do not work in plugin.
>
> Shift-shortcuts (e.g., shift-arrow for select) does not work in  
> plugin.
>
> Ctrl-shortcuts (e.g., ctrl-n for browsing class refs) insert  
> invisible characters in plugin.
>
> On startup I get an error because Project squeakletDirectory tries  
> to create

Ok, I thought I had tested shift on key board entry, guess not, this  
is a bug I did not pass on the keyboard modifier data (so no shift,  
control, option, or command on keystrokes), I've build a new plugin  
and VM, but it's late here, so in the morning I'll post a new plugin  
and a VM.

>
> /foobar/tooBar/forSqueak/bogus/Squeaklets
>
> which inexplicably fails - the directory is actually there.
>
> Scrolling the plugin (mouse scroll wheell / two finger touchpad  
> scroll) draws over the browser's bookmark bar and status bar.

I still need to fix this

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Juergen Gmeiner
Thank you for this clue, I tried having the VM write to the plugin  
via the pipe ever so often,
but couldn't get it to throw an interesting error code to catch.

However using getppid() and checking every 10 seconds or so enables  
me to terminate the VM if the browser has crashed. Since
the VM has to do periodic tasks, like look for and schedule carbon  
events, ensure the screen is flushed in a timely manner it was easy  
to add in yet another housekeeping task.

On 20-Nov-06, at 2:18 PM, Juergen Gmeiner wrote:

> On 20.11.2006, at 21:53, John M McIntosh wrote:
>> Normally what will happen is if the plugin instance is destroyed  
>> we then sigterm the associated child process.   But if the browser  
>> crashes, not uncommon, the sub-process are left running... Mmm I  
>> wonder if the child process can get notification if the parent is  
>> terminated?
>
> Notification - no.  But it can check it's parent process via getppid
> ().  If a process's parent is terminated, it gets the process with  
> PID 1 as new parent.  It's not init as in traditional unix systems  
> but launchd, but it seems they kept the magic process id 1.
>
> cheers,
> Juergen
>
> --
> Juergen Gmeiner
>
>
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci
In reply to this post by Bert Freudenberg
I've posted a 3.8.14b5 VM and browser plugin to my idisk for testing.

http://www.smalltalkconsulting.com/squeak.html

First I will note I did not yet add the clip logic for the browser  
plugin to fix issues with it overlaying browser scroll bars.
However I did fix the mouse down position issues, the modifiers for  
keystrokes not being correct, and the issue what to do
if the parent browser crashes and how do we terminate the orphaned VM  
with thanks to Juergen Gmeiner for pointing out the getppid solution.


3.8.14b5 Alter browser logic
                npsqueak.c   add some more debugging prints

                sqMacMain.c change version number and UUID

                sqMacNSPluginUILogic2.c More debug printing, also get correct mouse  
and modifer key state when we
                                 have a keystroke event.

                sqMacUIEventsUniversal.c Get browser mouse position via remembering  
fake carbon events to avoid
                                doing the get/setPort and GetMousePoint() 1984 logic.  Add the  
checkBrowserForHeartBeat
                                logic which checks every 6.66 seconds if the parent process (the  
browser) is running, if not then
                                we ask the VM to quit. This suggestion by Juergen Gmeiner ensures  
the VM does not become an
                                orphaned process if the browser crashes.

3.8.14b4 had limited release.


--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg
On Nov 22, 2006, at 8:57 , John M McIntosh wrote:

> I've posted a 3.8.14b5 VM and browser plugin to my idisk for testing.
>
> http://www.smalltalkconsulting.com/squeak.html
>
> First I will note I did not yet add the clip logic for the browser  
> plugin to fix issues with it overlaying browser scroll bars.
> However I did fix the mouse down position issues, the modifiers for  
> keystrokes not being correct,

Ctrl-short cuts work now.

With the first mouse button and modifiers behavior seems to be fixed,  
it's the same in and out of browser.

Two down, couple to go ;-)

Second and third button are still wrong as I reported earlier.

Cmd-shortcuts still do not work.

SecurityPlugin paths appear not to be fixed, yet.

- Bert -




Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

johnmci

On 22-Nov-06, at 1:57 AM, Bert Freudenberg wrote:

>
> Second and third button are still wrong as I reported earlier.

Is single mouse button behavior correct?

>
> Cmd-shortcuts still do not work.

Which cmd-key sequences in which browser.

>
> SecurityPlugin paths appear not to be fixed, yet.

What should they be?

>
> - Bert -
>
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: mac carbon VM 3.8.14b3 pending

Bert Freudenberg

On Nov 22, 2006, at 15:59 , John M McIntosh wrote:

>
> On 22-Nov-06, at 1:57 AM, Bert Freudenberg wrote:
>
>>
>> Second and third button are still wrong as I reported earlier.
>
> Is single mouse button behavior correct?

Yes.

>> Cmd-shortcuts still do not work.
>
> Which cmd-key sequences in which browser.

I'm using Safari. Cmd-m, Cmd-p, etc. invoke the browser's menu items.

>> SecurityPlugin paths appear not to be fixed, yet.
>
> What should they be?

Should point into the user's library folder - named "My Squeak", and  
"private" maybe.

IMHO the Right Place for these would be ~/Library/Application Support/
Squeakland, the VM should be /Applications/Squeakland.app, and the  
image /Applications/Squeakland.app/Contents/Resources/
SqueakPlugin.image.

Not sure if everyone would agree on that, though, I won't fight the  
status quo too hard ;)

- Bert -



12