OSWindow in Pharo 6.1 stable

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

OSWindow in Pharo 6.1 stable

Clément Béra
Hi Ronie, Hi all,

I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully opened the window and I can draw on it with Athens (with minor changes compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are not working. It seems some constants are not initialized but I am not sure what is the right way to initialize them.

If I am correct Ronie you said you had a script to run to make OSWindow work in the latest Pharo version. Can you give it to me so I can use it ? I just need keyboard events for my use case.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Ronie Salgado
Hi Clement,

The last time I checked, the 64 bits Mac VM version is eating the keyboard events, but not the mouse and other events. I guess that for the minheadless this is not required. The 32 bits version of Mac works by running the folowing script:

FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors

I think that Pavel fixed this for Pharo 7.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?
They should be a symlink. The correct one is the libSDL2-2.0.

Best regards,
Ronie

2017-09-28 15:02 GMT+02:00 Clément Bera <[hidden email]>:
Hi Ronie, Hi all,

I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully opened the window and I can draw on it with Athens (with minor changes compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are not working. It seems some constants are not initialized but I am not sure what is the right way to initialize them.

If I am correct Ronie you said you had a script to run to make OSWindow work in the latest Pharo version. Can you give it to me so I can use it ? I just need keyboard events for my use case.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Clément Béra


2017-09-28 15:33 GMT+02:00 Ronie Salgado <[hidden email]>:
Hi Clement,

The last time I checked, the 64 bits Mac VM version is eating the keyboard events, but not the mouse and other events. I guess that for the minheadless this is not required. The 32 bits version of Mac works by running the folowing script:

FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors

I think that Pavel fixed this for Pharo 7.

Ok.

I had done that.

But... 

I don't have any keyboard events. I have mouse and window events. I am using Mac 32 bits. 

Ok...

It seems that the keyboard events arrive as touch events...

I will try to make that work. We'll see.

Thanks

 


Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?
They should be a symlink. The correct one is the libSDL2-2.0.

Best regards,
Ronie

2017-09-28 15:02 GMT+02:00 Clément Bera <[hidden email]>:
Hi Ronie, Hi all,

I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully opened the window and I can draw on it with Athens (with minor changes compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are not working. It seems some constants are not initialized but I am not sure what is the right way to initialize them.

If I am correct Ronie you said you had a script to run to make OSWindow work in the latest Pharo version. Can you give it to me so I can use it ? I just need keyboard events for my use case.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?

Thanks


Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Clément Béra
Ok I used the other lib (libSDL2 instead of libSDL2-2.0.0) and it worked.

2017-09-28 16:07 GMT+02:00 Clément Béra <[hidden email]>:


2017-09-28 15:33 GMT+02:00 Ronie Salgado <[hidden email]>:
Hi Clement,

The last time I checked, the 64 bits Mac VM version is eating the keyboard events, but not the mouse and other events. I guess that for the minheadless this is not required. The 32 bits version of Mac works by running the folowing script:

FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors

I think that Pavel fixed this for Pharo 7.

Ok.

I had done that.

But... 

I don't have any keyboard events. I have mouse and window events. I am using Mac 32 bits. 

Ok...

It seems that the keyboard events arrive as touch events...

I will try to make that work. We'll see.

Thanks

 


Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?
They should be a symlink. The correct one is the libSDL2-2.0.

Best regards,
Ronie

2017-09-28 15:02 GMT+02:00 Clément Bera <[hidden email]>:
Hi Ronie, Hi all,

I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully opened the window and I can draw on it with Athens (with minor changes compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are not working. It seems some constants are not initialized but I am not sure what is the right way to initialize them.

If I am correct Ronie you said you had a script to run to make OSWindow work in the latest Pharo version. Can you give it to me so I can use it ? I just need keyboard events for my use case.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?

Thanks



Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Clément Béra
Hi Ronie... I need help again.

In fact I am still not able to work with SDL2 events in Mac with Pharo 6 nor 7.

In Pharo 6 and Pharo 7, 32 and 64 bits I need to run this code: 'FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors'. In all cases I can open the window and draw on it with Cairo, but the problems lie with the events. In all cases when I start with libSDL2 and libSDL2-2.0.0 I have warnings in the command line (2 libs detected, a random one will be used each time), so I usually use only libSDL2 which seems to work better.

In 32 bits (both Pharo 6 and 7) if I delete the libSDL2-2.0.0 lib and use libSDL2 only, I have mouse and window events but only *some* keyboard events. I have around 2/3 of the keyboard events, which makes the app very hard to use (Each time you press a key, you need to check if it worked or press it again if not). I don't know for sure if I have all the other events or only 2/3 of them too as there are so many.

In 64 bits, (both Pharo 6 and 7), whatever combination of lib I attempt I don't have *any* event (keyboard, mouse or window).

I have a working version in Pharo 4 where I have all the events. It's the same 32 bits lib so it has to come from something else (VM changes or image changes).

Any idea on what I have to fix to move from 2/3 of the events to all the events ?
What is the right way to get a working SDL2 window with Pharo 6/7 ?

Thanks

On Thu, Sep 28, 2017 at 4:25 PM, Clément Béra <[hidden email]> wrote:
Ok I used the other lib (libSDL2 instead of libSDL2-2.0.0) and it worked.

2017-09-28 16:07 GMT+02:00 Clément Béra <[hidden email]>:


2017-09-28 15:33 GMT+02:00 Ronie Salgado <[hidden email]>:
Hi Clement,

The last time I checked, the 64 bits Mac VM version is eating the keyboard events, but not the mouse and other events. I guess that for the minheadless this is not required. The 32 bits version of Mac works by running the folowing script:

FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors

I think that Pavel fixed this for Pharo 7.

Ok.

I had done that.

But... 

I don't have any keyboard events. I have mouse and window events. I am using Mac 32 bits. 

Ok...

It seems that the keyboard events arrive as touch events...

I will try to make that work. We'll see.

Thanks

 


Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?
They should be a symlink. The correct one is the libSDL2-2.0.

Best regards,
Ronie

2017-09-28 15:02 GMT+02:00 Clément Bera <[hidden email]>:
Hi Ronie, Hi all,

I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully opened the window and I can draw on it with Athens (with minor changes compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are not working. It seems some constants are not initialized but I am not sure what is the right way to initialize them.

If I am correct Ronie you said you had a script to run to make OSWindow work in the latest Pharo version. Can you give it to me so I can use it ? I just need keyboard events for my use case.

Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?

Thanks




Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

HilaireFernandes
In reply to this post by Clément Béra
Hi,

IMHO, it will make Pharo much more robust if core libraries as sdl,
cairo, etc will be shipped with each plateform dependent virtual machine
and the image modified accordingly to use these core libraries.

The delivery of Pharo application to end users is an issue because of
these recuring problem.

Hilaire


Le 28/09/2017 à 15:02, Clément Bera a écrit :
> Btw for some reason in the one-click version of Pharo 32 bits on Mac
> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to
> conflicts (the VM use randomly one lib or the other). I randomly chose
> one that I use and deleted the other one, do you have advises on which
> one I should prefer ? Maybe the events are working only with the other
> one ?
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Clément Béra


On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
Hi,

IMHO, it will make Pharo much more robust if core libraries as sdl, cairo, etc will be shipped with each plateform dependent virtual machine and the image modified accordingly to use these core libraries.

That's how it is now but some of it is not working (Here SDL events and there are 2 SDL2 libs by default).

I think we should still have a minimal image starting with a minimal UI without using FFI/SDL/Cairo or whatever lib. Else when we start on a platform where one of this thing is not properly supported yet (See the problem on the raspberry pie with some Pharo alpha version) it is too hard to understand what is going on.
 

The delivery of Pharo application to end users is an issue because of these recuring problem.

Honestly I was trying to write a doc on how to deploy Pharo client app with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and Linux, while in theory I could have it working in Windows/Mac/Linux in the latest Pharo.
 
Hilaire



Le 28/09/2017 à 15:02, Clément Bera a écrit :
Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?


--
Dr. Geo
http://drgeo.eu




Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Ronie Salgado
Hi Clément,

I just checked on my machine and it is also not working. It seems to be a VM bug. It will take me some time to debug it. I have some suspicious on ioProcessEvents .

Best regards,
Ronie

2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:


On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
Hi,

IMHO, it will make Pharo much more robust if core libraries as sdl, cairo, etc will be shipped with each plateform dependent virtual machine and the image modified accordingly to use these core libraries.

That's how it is now but some of it is not working (Here SDL events and there are 2 SDL2 libs by default).

I think we should still have a minimal image starting with a minimal UI without using FFI/SDL/Cairo or whatever lib. Else when we start on a platform where one of this thing is not properly supported yet (See the problem on the raspberry pie with some Pharo alpha version) it is too hard to understand what is going on.
 

The delivery of Pharo application to end users is an issue because of these recuring problem.

Honestly I was trying to write a doc on how to deploy Pharo client app with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and Linux, while in theory I could have it working in Windows/Mac/Linux in the latest Pharo.
 
Hilaire



Le 28/09/2017 à 15:02, Clément Bera a écrit :
Btw for some reason in the one-click version of Pharo 32 bits on Mac there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts (the VM use randomly one lib or the other). I randomly chose one that I use and deleted the other one, do you have advises on which one I should prefer ? Maybe the events are working only with the other one ?


--
Dr. Geo
http://drgeo.eu





Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Stephane Ducasse-3
Tx ronie!


On Fri, Sep 29, 2017 at 1:42 PM, Ronie Salgado <[hidden email]> wrote:

> Hi Clément,
>
> I just checked on my machine and it is also not working. It seems to be a VM
> bug. It will take me some time to debug it. I have some suspicious on
> ioProcessEvents .
>
> Best regards,
> Ronie
>
> 2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:
>>
>>
>>
>> On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> IMHO, it will make Pharo much more robust if core libraries as sdl,
>>> cairo, etc will be shipped with each plateform dependent virtual machine and
>>> the image modified accordingly to use these core libraries.
>>
>>
>> That's how it is now but some of it is not working (Here SDL events and
>> there are 2 SDL2 libs by default).
>>
>> I think we should still have a minimal image starting with a minimal UI
>> without using FFI/SDL/Cairo or whatever lib. Else when we start on a
>> platform where one of this thing is not properly supported yet (See the
>> problem on the raspberry pie with some Pharo alpha version) it is too hard
>> to understand what is going on.
>>
>>>
>>>
>>> The delivery of Pharo application to end users is an issue because of
>>> these recuring problem.
>>
>>
>> Honestly I was trying to write a doc on how to deploy Pharo client app
>> with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and
>> Linux, while in theory I could have it working in Windows/Mac/Linux in the
>> latest Pharo.
>>
>>>
>>> Hilaire
>>>
>>>
>>>
>>> Le 28/09/2017 à 15:02, Clément Bera a écrit :
>>>>
>>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts
>>>> (the VM use randomly one lib or the other). I randomly chose one that I use
>>>> and deleted the other one, do you have advises on which one I should prefer
>>>> ? Maybe the events are working only with the other one ?
>>>>
>>>
>>> --
>>> Dr. Geo
>>> http://drgeo.eu
>>>
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Clément Béra
Hi again,

I made many more attempts since those mails: I wrote this page showing how to deploy my game in native app at 50fps on Linux, Mac and Windows.

Currently I deploy with:
Ubuntu 64 bits: Pharo61-64 (Pharo61-32 also works with the right lib installed)
Mac OS X 64 bits: Pharo5Alpha-32 (On Pharo61 the keyboard events do not work correctly)
Windows 64 bits: Pharo61-32 (There are bugs with the SDL2 window, the top bar is not displayed, but the game work. Reportedly it would work better with Pharo61-64 but the default Pharo64 VM on Windows still does not feature the JIT, once the default VM does, I will update).

My goal is to deploy on all platforms with Pharo61-64 (and later Pharo7-64).

I wrote this mail since maybe you are interested in knowing that with Pharo5Alpha-32 and the set-up described on the page of my game the keyboard events work fine on Mac, so it may be possible to write a fix for Pharo61/Pharo7 based on that.

Best,




On Fri, Sep 29, 2017 at 8:56 PM, Stephane Ducasse <[hidden email]> wrote:
Tx ronie!


On Fri, Sep 29, 2017 at 1:42 PM, Ronie Salgado <[hidden email]> wrote:
> Hi Clément,
>
> I just checked on my machine and it is also not working. It seems to be a VM
> bug. It will take me some time to debug it. I have some suspicious on
> ioProcessEvents .
>
> Best regards,
> Ronie
>
> 2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:
>>
>>
>>
>> On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> IMHO, it will make Pharo much more robust if core libraries as sdl,
>>> cairo, etc will be shipped with each plateform dependent virtual machine and
>>> the image modified accordingly to use these core libraries.
>>
>>
>> That's how it is now but some of it is not working (Here SDL events and
>> there are 2 SDL2 libs by default).
>>
>> I think we should still have a minimal image starting with a minimal UI
>> without using FFI/SDL/Cairo or whatever lib. Else when we start on a
>> platform where one of this thing is not properly supported yet (See the
>> problem on the raspberry pie with some Pharo alpha version) it is too hard
>> to understand what is going on.
>>
>>>
>>>
>>> The delivery of Pharo application to end users is an issue because of
>>> these recuring problem.
>>
>>
>> Honestly I was trying to write a doc on how to deploy Pharo client app
>> with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and
>> Linux, while in theory I could have it working in Windows/Mac/Linux in the
>> latest Pharo.
>>
>>>
>>> Hilaire
>>>
>>>
>>>
>>> Le 28/09/2017 à 15:02, Clément Bera a écrit :
>>>>
>>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts
>>>> (the VM use randomly one lib or the other). I randomly chose one that I use
>>>> and deleted the other one, do you have advises on which one I should prefer
>>>> ? Maybe the events are working only with the other one ?
>>>>
>>>
>>> --
>>> Dr. Geo
>>> http://drgeo.eu
>>>
>>>
>>>
>>
>




--
Clément Béra
Pharo consortium engineer
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Ronie Salgado
Hi Clément,

Last night I was checking again the VM. If I remove the hack in the ioProcessEvents, I can receive the events with SDL2, but as soon as I type on the main Pharo window I get a crash in an objective-c message send by SDL2. I still need to debug SDL2 itself with debugging symbols.

I am not sure whether I will be able to fix the problem without modifying SDL2. In the worst case escenario, we will have to move to the minheadless vm.

Best regards,
Ronie

2017-10-18 4:49 GMT-03:00 Clément Bera <[hidden email]>:
Hi again,

I made many more attempts since those mails: I wrote this page showing how to deploy my game in native app at 50fps on Linux, Mac and Windows.

Currently I deploy with:
Ubuntu 64 bits: Pharo61-64 (Pharo61-32 also works with the right lib installed)
Mac OS X 64 bits: Pharo5Alpha-32 (On Pharo61 the keyboard events do not work correctly)
Windows 64 bits: Pharo61-32 (There are bugs with the SDL2 window, the top bar is not displayed, but the game work. Reportedly it would work better with Pharo61-64 but the default Pharo64 VM on Windows still does not feature the JIT, once the default VM does, I will update).

My goal is to deploy on all platforms with Pharo61-64 (and later Pharo7-64).

I wrote this mail since maybe you are interested in knowing that with Pharo5Alpha-32 and the set-up described on the page of my game the keyboard events work fine on Mac, so it may be possible to write a fix for Pharo61/Pharo7 based on that.

Best,




On Fri, Sep 29, 2017 at 8:56 PM, Stephane Ducasse <[hidden email]> wrote:
Tx ronie!


On Fri, Sep 29, 2017 at 1:42 PM, Ronie Salgado <[hidden email]> wrote:
> Hi Clément,
>
> I just checked on my machine and it is also not working. It seems to be a VM
> bug. It will take me some time to debug it. I have some suspicious on
> ioProcessEvents .
>
> Best regards,
> Ronie
>
> 2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:
>>
>>
>>
>> On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> IMHO, it will make Pharo much more robust if core libraries as sdl,
>>> cairo, etc will be shipped with each plateform dependent virtual machine and
>>> the image modified accordingly to use these core libraries.
>>
>>
>> That's how it is now but some of it is not working (Here SDL events and
>> there are 2 SDL2 libs by default).
>>
>> I think we should still have a minimal image starting with a minimal UI
>> without using FFI/SDL/Cairo or whatever lib. Else when we start on a
>> platform where one of this thing is not properly supported yet (See the
>> problem on the raspberry pie with some Pharo alpha version) it is too hard
>> to understand what is going on.
>>
>>>
>>>
>>> The delivery of Pharo application to end users is an issue because of
>>> these recuring problem.
>>
>>
>> Honestly I was trying to write a doc on how to deploy Pharo client app
>> with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and
>> Linux, while in theory I could have it working in Windows/Mac/Linux in the
>> latest Pharo.
>>
>>>
>>> Hilaire
>>>
>>>
>>>
>>> Le 28/09/2017 à 15:02, Clément Bera a écrit :
>>>>
>>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts
>>>> (the VM use randomly one lib or the other). I randomly chose one that I use
>>>> and deleted the other one, do you have advises on which one I should prefer
>>>> ? Maybe the events are working only with the other one ?
>>>>
>>>
>>> --
>>> Dr. Geo
>>> http://drgeo.eu
>>>
>>>
>>>
>>
>




--
Clément Béra
Pharo consortium engineer

Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Stephane Ducasse-3
Tx ronie.


On Thu, Oct 19, 2017 at 7:48 PM, Ronie Salgado <[hidden email]> wrote:

> Hi Clément,
>
> Last night I was checking again the VM. If I remove the hack in the
> ioProcessEvents, I can receive the events with SDL2, but as soon as I type
> on the main Pharo window I get a crash in an objective-c message send by
> SDL2. I still need to debug SDL2 itself with debugging symbols.
>
> I am not sure whether I will be able to fix the problem without modifying
> SDL2. In the worst case escenario, we will have to move to the minheadless
> vm.
>
> Best regards,
> Ronie
>
> 2017-10-18 4:49 GMT-03:00 Clément Bera <[hidden email]>:
>>
>> Hi again,
>>
>> I made many more attempts since those mails: I wrote this page showing how
>> to deploy my game in native app at 50fps on Linux, Mac and Windows.
>>
>> Currently I deploy with:
>> Ubuntu 64 bits: Pharo61-64 (Pharo61-32 also works with the right lib
>> installed)
>> Mac OS X 64 bits: Pharo5Alpha-32 (On Pharo61 the keyboard events do not
>> work correctly)
>> Windows 64 bits: Pharo61-32 (There are bugs with the SDL2 window, the top
>> bar is not displayed, but the game work. Reportedly it would work better
>> with Pharo61-64 but the default Pharo64 VM on Windows still does not feature
>> the JIT, once the default VM does, I will update).
>>
>> My goal is to deploy on all platforms with Pharo61-64 (and later
>> Pharo7-64).
>>
>> I wrote this mail since maybe you are interested in knowing that with
>> Pharo5Alpha-32 and the set-up described on the page of my game the keyboard
>> events work fine on Mac, so it may be possible to write a fix for
>> Pharo61/Pharo7 based on that.
>>
>> Best,
>>
>>
>>
>>
>> On Fri, Sep 29, 2017 at 8:56 PM, Stephane Ducasse
>> <[hidden email]> wrote:
>>>
>>> Tx ronie!
>>>
>>>
>>> On Fri, Sep 29, 2017 at 1:42 PM, Ronie Salgado <[hidden email]>
>>> wrote:
>>> > Hi Clément,
>>> >
>>> > I just checked on my machine and it is also not working. It seems to be
>>> > a VM
>>> > bug. It will take me some time to debug it. I have some suspicious on
>>> > ioProcessEvents .
>>> >
>>> > Best regards,
>>> > Ronie
>>> >
>>> > 2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:
>>> >>
>>> >>
>>> >>
>>> >> On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
>>> >>>
>>> >>> Hi,
>>> >>>
>>> >>> IMHO, it will make Pharo much more robust if core libraries as sdl,
>>> >>> cairo, etc will be shipped with each plateform dependent virtual
>>> >>> machine and
>>> >>> the image modified accordingly to use these core libraries.
>>> >>
>>> >>
>>> >> That's how it is now but some of it is not working (Here SDL events
>>> >> and
>>> >> there are 2 SDL2 libs by default).
>>> >>
>>> >> I think we should still have a minimal image starting with a minimal
>>> >> UI
>>> >> without using FFI/SDL/Cairo or whatever lib. Else when we start on a
>>> >> platform where one of this thing is not properly supported yet (See
>>> >> the
>>> >> problem on the raspberry pie with some Pharo alpha version) it is too
>>> >> hard
>>> >> to understand what is going on.
>>> >>
>>> >>>
>>> >>>
>>> >>> The delivery of Pharo application to end users is an issue because of
>>> >>> these recuring problem.
>>> >>
>>> >>
>>> >> Honestly I was trying to write a doc on how to deploy Pharo client app
>>> >> with SDL2 and Cairo but I have only a version working in Pharo 4 on
>>> >> Mac and
>>> >> Linux, while in theory I could have it working in Windows/Mac/Linux in
>>> >> the
>>> >> latest Pharo.
>>> >>
>>> >>>
>>> >>> Hilaire
>>> >>>
>>> >>>
>>> >>>
>>> >>> Le 28/09/2017 à 15:02, Clément Bera a écrit :
>>> >>>>
>>> >>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>> >>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to
>>> >>>> conflicts
>>> >>>> (the VM use randomly one lib or the other). I randomly chose one
>>> >>>> that I use
>>> >>>> and deleted the other one, do you have advises on which one I should
>>> >>>> prefer
>>> >>>> ? Maybe the events are working only with the other one ?
>>> >>>>
>>> >>>
>>> >>> --
>>> >>> Dr. Geo
>>> >>> http://drgeo.eu
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >
>>>
>>
>>
>>
>> --
>> Clément Béra
>> Pharo consortium engineer
>> https://clementbera.wordpress.com/
>> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
>
>

Reply | Threaded
Open this post in threaded view
|

Re: OSWindow in Pharo 6.1 stable

Tudor Girba-2
In reply to this post by Ronie Salgado
Thanks Ronie. Please keep us posted with the progress.

Cheers,
Doru


> On Oct 19, 2017, at 7:48 PM, Ronie Salgado <[hidden email]> wrote:
>
> Hi Clément,
>
> Last night I was checking again the VM. If I remove the hack in the ioProcessEvents, I can receive the events with SDL2, but as soon as I type on the main Pharo window I get a crash in an objective-c message send by SDL2. I still need to debug SDL2 itself with debugging symbols.
>
> I am not sure whether I will be able to fix the problem without modifying SDL2. In the worst case escenario, we will have to move to the minheadless vm.
>
> Best regards,
> Ronie
>
> 2017-10-18 4:49 GMT-03:00 Clément Bera <[hidden email]>:
> Hi again,
>
> I made many more attempts since those mails: I wrote this page showing how to deploy my game in native app at 50fps on Linux, Mac and Windows.
>
> Currently I deploy with:
> Ubuntu 64 bits: Pharo61-64 (Pharo61-32 also works with the right lib installed)
> Mac OS X 64 bits: Pharo5Alpha-32 (On Pharo61 the keyboard events do not work correctly)
> Windows 64 bits: Pharo61-32 (There are bugs with the SDL2 window, the top bar is not displayed, but the game work. Reportedly it would work better with Pharo61-64 but the default Pharo64 VM on Windows still does not feature the JIT, once the default VM does, I will update).
>
> My goal is to deploy on all platforms with Pharo61-64 (and later Pharo7-64).
>
> I wrote this mail since maybe you are interested in knowing that with Pharo5Alpha-32 and the set-up described on the page of my game the keyboard events work fine on Mac, so it may be possible to write a fix for Pharo61/Pharo7 based on that.
>
> Best,
>
>
>
>
> On Fri, Sep 29, 2017 at 8:56 PM, Stephane Ducasse <[hidden email]> wrote:
> Tx ronie!
>
>
> On Fri, Sep 29, 2017 at 1:42 PM, Ronie Salgado <[hidden email]> wrote:
> > Hi Clément,
> >
> > I just checked on my machine and it is also not working. It seems to be a VM
> > bug. It will take me some time to debug it. I have some suspicious on
> > ioProcessEvents .
> >
> > Best regards,
> > Ronie
> >
> > 2017-09-29 10:39 GMT+02:00 Clément Bera <[hidden email]>:
> >>
> >>
> >>
> >> On Fri, Sep 29, 2017 at 10:29 AM, Hilaire <[hidden email]> wrote:
> >>>
> >>> Hi,
> >>>
> >>> IMHO, it will make Pharo much more robust if core libraries as sdl,
> >>> cairo, etc will be shipped with each plateform dependent virtual machine and
> >>> the image modified accordingly to use these core libraries.
> >>
> >>
> >> That's how it is now but some of it is not working (Here SDL events and
> >> there are 2 SDL2 libs by default).
> >>
> >> I think we should still have a minimal image starting with a minimal UI
> >> without using FFI/SDL/Cairo or whatever lib. Else when we start on a
> >> platform where one of this thing is not properly supported yet (See the
> >> problem on the raspberry pie with some Pharo alpha version) it is too hard
> >> to understand what is going on.
> >>
> >>>
> >>>
> >>> The delivery of Pharo application to end users is an issue because of
> >>> these recuring problem.
> >>
> >>
> >> Honestly I was trying to write a doc on how to deploy Pharo client app
> >> with SDL2 and Cairo but I have only a version working in Pharo 4 on Mac and
> >> Linux, while in theory I could have it working in Windows/Mac/Linux in the
> >> latest Pharo.
> >>
> >>>
> >>> Hilaire
> >>>
> >>>
> >>>
> >>> Le 28/09/2017 à 15:02, Clément Bera a écrit :
> >>>>
> >>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
> >>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to conflicts
> >>>> (the VM use randomly one lib or the other). I randomly chose one that I use
> >>>> and deleted the other one, do you have advises on which one I should prefer
> >>>> ? Maybe the events are working only with the other one ?
> >>>>
> >>>
> >>> --
> >>> Dr. Geo
> >>> http://drgeo.eu
> >>>
> >>>
> >>>
> >>
> >
>
>
>
>
> --
> Clément Béra
> Pharo consortium engineer
> https://clementbera.wordpress.com/
> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
>

--
www.tudorgirba.com
www.feenk.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."