lua 5.2 : merging lua for Windows CE/Mobile upstream

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

lua 5.2 : merging lua for Windows CE/Mobile upstream

Vincent Torri-2
Hey,


One can find here : http://github.com/ynezz/luace a port of lua for Windows CE. The main difference is (I think) the use of a file (luace.c) to provide some missing ANSI functions.

Would it be possible to add that file (and its header luace.h), and provide a way to (cross) compile it with cegcc (http://cegcc.sourceforge.net/) ? It would be less work, as it is a fork, for now. As cegcc is just a gcc the compilation is the same except that there is a "prefix" before the tools (gcc, ar, ranlib,strip, etc...)

thank you

Vincent Torri
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Petr Štetiar
Vincent Torri <[hidden email]> [2010-03-21 09:37:25]:

> Hey,

Hi,

> One can find here : http://github.com/ynezz/luace a port of lua for Windows
> CE. The main difference is (I think) the use of a file (luace.c) to provide
> some missing ANSI functions.

No, it's not that simple as you think :-) It uses wcelibcex[1] library and luace.h
contains all the missing ANSI/C bits for the CE/Mobile. Because there's no
main() function in CE/Mobile luace.c is trying to mimic it's behaviour using
WinMain() and at the end it calls main() from lua.c.

> Would it be possible to add that file (and its header luace.h), and provide
> a way to (cross) compile it with cegcc (http://cegcc.sourceforge.net/) ? It
> would be less work, as it is a fork, for now.

What do you mean? Include this bits in Lua? Why?

BTW I've played with cegcc and PocketPutty, but it was quite unusable 3 years
ago. Don't know the status of cegcc now. Patches are always welcome :-)

1. http://wcelibcex.sourceforge.net/

-- ynezz
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Vincent Torri-2


On Sun, Mar 21, 2010 at 2:39 PM, Petr Štetiar <[hidden email]> wrote:
Vincent Torri <[hidden email]> [2010-03-21 09:37:25]:

> Hey,

Hi,

> One can find here : http://github.com/ynezz/luace a port of lua for Windows
> CE. The main difference is (I think) the use of a file (luace.c) to provide
> some missing ANSI functions.

No, it's not that simple as you think :-) It uses wcelibcex[1] library and luace.h
contains all the missing ANSI/C bits for the CE/Mobile. Because there's no
main() function in CE/Mobile luace.c is trying to mimic it's behaviour using
WinMain() and at the end it calls main() from lua.c.

hrm. And what if I only need the library ? Is wcelibcex still needed ?

Anyway, instead of having a fork, having everything upstream is quite better.
 

> Would it be possible to add that file (and its header luace.h), and provide
> a way to (cross) compile it with cegcc (http://cegcc.sourceforge.net/) ? It
> would be less work, as it is a fork, for now.

What do you mean? Include this bits in Lua? Why?

these bits == luace.c and luace.h ? or even more (wcelibcex) ?
 

BTW I've played with cegcc and PocketPutty, but it was quite unusable 3 years
ago. Don't know the status of cegcc now. Patches are always welcome :-)

It's quite usuable now. Here is what i achived with some graphic libraries : http://www.calaos.fr/pub/moshi_wince.avi
So no problem with cegcc.

Vincent Torri
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Vincent Torri-2


On Sun, Mar 21, 2010 at 3:16 PM, Vincent Torri <[hidden email]> wrote:


On Sun, Mar 21, 2010 at 2:39 PM, Petr Štetiar <[hidden email]> wrote:
Vincent Torri <[hidden email]> [2010-03-21 09:37:25]:

> Hey,

Hi,

> One can find here : http://github.com/ynezz/luace a port of lua for Windows
> CE. The main difference is (I think) the use of a file (luace.c) to provide
> some missing ANSI functions.

No, it's not that simple as you think :-) It uses wcelibcex[1] library and luace.h
contains all the missing ANSI/C bits for the CE/Mobile. Because there's no
main() function in CE/Mobile luace.c is trying to mimic it's behaviour using
WinMain() and at the end it calls main() from lua.c.

hrm. And what if I only need the library ? Is wcelibcex still needed ?


and btw, is the whole wcelibcex needed ? Maybe only some functions need to be ported. In that case, writing them would be sufficient. I did that for the graphic libraries i mentioned in my previous mail

Vincent Torri
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Petr Štetiar
In reply to this post by Vincent Torri-2
Vincent Torri <[hidden email]> [2010-03-21 15:16:26]:

> On Sun, Mar 21, 2010 at 2:39 PM, Petr Štetiar <[hidden email]> wrote:
> >
> > No, it's not that simple as you think :-) It uses wcelibcex[1] library and
> > luace.h contains all the missing ANSI/C bits for the CE/Mobile. Because
> > there's no main() function in CE/Mobile luace.c is trying to mimic it's
> > behaviour using WinMain() and at the end it calls main() from lua.c.
>
> hrm. And what if I only need the library ? Is wcelibcex still needed ?
> Anyway, instead of having a fork, having everything upstream is quite
> better.

You need wcelibcex, look at luace.h for all functions starting with wceex_
prefix.

> these bits == luace.c and luace.h ? or even more (wcelibcex) ?

luace.c is only needed for the interpreter, for lua.c as I said there's no
main() function in Windows CE so you need something which have WinMain().

> > BTW I've played with cegcc and PocketPutty, but it was quite unusable 3
> > years ago. Don't know the status of cegcc now. Patches are always welcome
> > :-)
>
> It's quite usuable now. Here is what i achived with some graphic libraries :
> http://www.calaos.fr/pub/moshi_wince.avi So no problem with cegcc.

Looks nice, can you tell me more about it(source would rox! :-))? What's
Moshi? I've seen some EFL libraries in the file explorer on the video and the
UI looks like it's made using it. Thanks.

-- ynezz
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Vincent Torri-2


2010/3/21 Petr Štetiar <[hidden email]>
Vincent Torri <[hidden email]> [2010-03-21 15:16:26]:

> On Sun, Mar 21, 2010 at 2:39 PM, Petr Štetiar <[hidden email]> wrote:
> >
> > No, it's not that simple as you think :-) It uses wcelibcex[1] library and
> > luace.h contains all the missing ANSI/C bits for the CE/Mobile. Because
> > there's no main() function in CE/Mobile luace.c is trying to mimic it's
> > behaviour using WinMain() and at the end it calls main() from lua.c.
>
> hrm. And what if I only need the library ? Is wcelibcex still needed ?
> Anyway, instead of having a fork, having everything upstream is quite
> better.

You need wcelibcex, look at luace.h for all functions starting with wceex_
prefix.

ok. So wcelibcex can be a dependency of lua on Windows CE. But the lua source can be hacked so that the compilation with cegcc is possible. So no fork.
 

> these bits == luace.c and luace.h ? or even more (wcelibcex) ?

luace.c is only needed for the interpreter, for lua.c as I said there's no
main() function in Windows CE so you need something which have WinMain().

all the app that i have written for Windows CE, and compiled with cegcc, use main() and not WinMain(). I guess that gcc is doing something to have in the end WinMain().
 

> > BTW I've played with cegcc and PocketPutty, but it was quite unusable 3
> > years ago. Don't know the status of cegcc now. Patches are always welcome
> > :-)
>
> It's quite usuable now. Here is what i achived with some graphic libraries :
> http://www.calaos.fr/pub/moshi_wince.avi So no problem with cegcc.

Looks nice, can you tell me more about it(source would rox! :-))? What's
Moshi? I've seen some EFL libraries in the file explorer on the video and the
UI looks like it's made using it. Thanks.

The libraries are used by the Enlightenment windows manager on unix. The EFL are the Enlightenment Fundation Libraries. They are fast and lean. I've ported them to Windows (XP and CE). And we need lua (the library). Moshi is a concept of gui that could be used in the openmoko project. It uses the EFL for the gui.

For a tutorial about how to compile them with cegcc (mingw32ce): http://trac.enlightenment.org/e/wiki/EFLWindowsCE It has been a long time since I compiled them and a lot of things were modified in the svn, so maybe it is not compiling right now. We are working to have an alpha release, so the Windows CE port is a bit on stand by.

Vincent Torri
Reply | Threaded
Open this post in threaded view
|

Re: lua 5.2 : merging lua for Windows CE/Mobile upstream

Petr Štetiar
Vincent Torri <[hidden email]> [2010-03-21 21:13:43]:

> 2010/3/21 Petr Štetiar <[hidden email]>
>
> all the app that i have written for Windows CE, and compiled with cegcc, use
> main() and not WinMain(). I guess that gcc is doing something to have in the
> end WinMain().

In cegcc is missing main() handled in simillar way http://bit.ly/cyvPcN I did.

> For a tutorial about how to compile them with cegcc (mingw32ce):
> http://trac.enlightenment.org/e/wiki/EFLWindowsCE It has been a long time
> since I compiled them and a lot of things were modified in the svn, so maybe
> it is not compiling right now. We are working to have an alpha release, so
> the Windows CE port is a bit on stand by.

Nice, didn't knew about this. I'll play with it for sure.

-- ynezz