Skip to main content

Building Basis without QT?

57 replies [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
darryl_m
Offline
Joined: 2006-10-16
Points: 0

Hello Jonek. It would be good if you could give me the details as to what your looking for. I was under the impression, from your previous post, that you were looking for just Personal Profile with GTK. The phoneME Advanced MR2 product (which includes the AMS) has been built and tested on top of Basis, not Personal.

I'm guessing you "just want to see some graphics on the screen"? If this is the case, I think just a Personal Profile build (without the AMS) is your best option. BTW, building Personal Profile with GTK results in a Personal Profile v1.0 spec product. Personal Profile is currently at version 1.1. So there will probably be build errors because the GTK code is 1.0 compliant but the shared PP code is 1.1 compliant. The best thing to do is make the GTK code 1.1 compliant.

This is the make command you should use:
make J2ME_CLASSLIB=personal AWT_IMPLEMENTATION=gtk

I'll give you more details in a future post as to the PBP-PP differences.

cjplummer
Offline
Joined: 2006-10-16
Points: 0

I believe you want AWT_PEERSET=gtk for personal.

make J2ME_CLASSLIB=personal AWT_PEERSET=gtk

or

make J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=gtk

And yes, the build will eventually fail because the personal and basis GTK implementations are based on the 1.0 spec, and probably the GTK related makefiles need a bit of work also.

Chris

darryl_m
Offline
Joined: 2006-10-16
Points: 0

Microwindows is also supported for Basis. Microwindows has since been renamed to Nano-X (http://www.microwindows.org). It supports an Xlib-like API, so it might be what you're looking for. Look in src/share/basis/classes/awt and you'll see the microwindows and qt directories. These are the Java classes. The native code to interact with the toolkit can be found in src/share/basis/native/awt/microwindows. It has been a while since we tested the Microwindows implementation, so if you try it and find problems, please let us know. You can also add support for other toolkits by implementing the appropriate code underneath these directories.

There is a version of Personal Profile using GTK, but not Basis. Basis is a subset of Personal. The Personal and Basis implementations are different, but you might gain insight into how to implement Basis on GTK by looking at the Personal on GTK code. The GTK classes can be found in the src/share/personal/classes/awt/peer_based/sun/awt/gtk directory and the native code can be found in the src/share/personal/native/awt/gtk directory.

Let me know if you're interested in working on a version of Basis using GTK. I can help point you in the right direction.

jonek
Offline
Joined: 2006-12-13
Points: 0

Hi Darryl.

I would like to try building the Personal Profile using GTK for the 770. Currently I have the source of MR1 working on it with Foundation Profile. A look for the .../awt/gtk directory you mentioned showed that it isn't available in MR1. Do I have to give MR2 a try to get PP+GTK? Can you tell me the required steps to change my build from FP to PP? What exactly are the differences between an awt implementation using GTK in BP and PP?

Thanks and greets, Jonek.

darryl_m
Offline
Joined: 2006-10-16
Points: 0

glachac,

Personal Basis Profile includes a java.awt package and requires graphics capabilities.

glachac
Offline
Joined: 2007-01-05
Points: 0

Does it have to be QT? Can't it be just plain X?

jonek
Offline
Joined: 2006-12-13
Points: 0

Interesting question! I would like to see it answered in more detail, too. The information I found so far is chapter 10 / part V (page 151ff) of the CDC porting guide [1].

I'm especially interested in the question if there is any project or plans to or experience in using GTK+ instead of QT because the Nokia 770 (my target device) is tightly coupled with Gnome/GTK+ regarding UI and I'd like to see CDC using more than just the foundation profile on it.

[1] http://java.sun.com/javame/reference/docs/cdc_porting_guide.pdf