![]() |
SWT on N900/Fremantle works
Hi,
as Java "kind of" works (http://talk.maemo.org/showthread.php?t=37405) it would be great to have also SWT running. One option would be to build SWT in Scratchbox on the ARMEL target. Though afaik building SWT requires Java and here unfortunately both JDK's fail to run under Scartchbox with similar errors: Quote:
Is it feasible to get the required files from debian packages or is the whole task a bigger endeavor? At least the guys from Jalimo also got SWT packaged for their Java port. ;) Any comments are highly appreciated. Best regards Wonko |
SWT on N900/Fremantle works
Allright it works! :D
Just managed to build SWT and run the first example application on my N900. The short story: As Java does not run under Scratchbox i built SWT in two steps. The first was to build the native libraries in Scratchbox and the second to build the Java part on the N900 itself. You can find the patches etc. at the project garage site: https://garage.maemo.org/projects/swt-hildon/ I'll also add another post where i'll explain the details of building SWT later on. In order to test the whole stuff i used the "SimpleSwtSample" example from http://wiki.evolvis.org/jalimo/index.php/Maemo. Compile the example as follows (note: i am using the openjdk downloaded from http://www.camswl.com/openjdk): Code:
CLASSPATH="path_to_swt/swt.jar" /home/user/java/openjdk/camswl/j2sdk-image/bin/javac SimpleSwtSample.java Code:
CLASSPATH=.:path_to_swt/swt.jar /home/user/java/openjdk/camswl/j2sdk-image/bin/java -Djava.library.path=path_to_swt/ SimpleSwtSample Best regards Wonko |
Building SWT
Here are the detailed steps used for building SWT.
The following is executed in Scratchbox (in the armel target of course): Code:
#!/bin/sh Code:
mkdir swt |
Re: SWT on N900/Fremantle?
:( java.lang.UnsatisfiedLinkError : no swt-gtk-3555 or swt-gtk in swt.library.path? or jar file etc.
Please help. JRE 1.6.0.10 |
Re: SWT on N900/Fremantle?
Quote:
You do this by setting the "-Djava.library.path" "option" as follows: Code:
CLASSPATH=./swt.jar java -Djava.library.path=path_to_swt/ SimpleSwtSample Another option would be to copy the native libs to /usr/lib or (better, if you want this solution) copy the libs to /opt/maemo/usr/lib and then place symlinks to /usr/lib. If you are just playing around i think the first option (setting "-Djava.library.path") is best. |
Re: SWT on N900/Fremantle?
Alright,
i adapted the patch from http://wiki.evolvis.org/jalimo/index.php/Maemo (namely: http://evolvis.org/plugins/scmsvn/vi...20&root=jalimo) to work with the current SWT version and Fremantle. The patch can be downloaded from: http://user.fh-frankfurt.de/~rc9000/...t-hildon.patch Also the build instructions above have been updated to make use of the patch. Edit: And of course the downloads at http://user.fh-frankfurt.de/~rc9000/maemo_swt have also been updated ;) |
Re: SWT on N900/Fremantle?
I added a patch which enables scrolling via the touch UI for org.eclipse.swt.widgets.Tree and Table instead of using scrollbars.
The patch can be found at: http://user.fh-frankfurt.de/~rc9000/...ee-table.patch A compiled version of SWT with this patch applied can be downloaded from http://user.fh-frankfurt.de/~rc9000/...t/experimental So far everything worked nicely here. Please let me know if this works also well for you. |
Re: SWT on N900/Fremantle?
I added two more patches.
The first simply adds native methods for using hildon buttons and file dialog chooser and (most important) cleans a little bit up the code. I.e. the methods flagged with "no_gen" have been moved into os_custom.c. This should improve the maintainability. The second patch changes org.eclipse.swt.widgets.FileDialog to make use of HildonFileChooserDialog. Again the patches are in the usual place and a compiled version has been uploaded to experimental. |
Re: SWT on N900/Fremantle?
Added another patch which enables pop-up menus.
Note: This is only provided for compatibility reasons as, according to the documentation (http://wiki.maemo.org/Documentation/...s#Context_menu) pop-up or context menus should not be used. Patch and compiled binaries are at the usual locations. |
Re: SWT on N900/Fremantle?
Alright, had some time to update the patches etc. to SWT-3.5.2.
As usual patches and compiled versions can be found at http://user.fh-frankfurt.de/~rc9000/maemo_swt/ The swt.jar now also includes the *.so libraries. An additional jar is available without the *.so files. Best regards Wonko |
All times are GMT. The time now is 02:11. |
vBulletin® Version 3.8.8