View Full Version : [BETA RELEASE] PhoneME Advanced (Java Mobile)
[DarkGUNMAN]
2012-01-29, 12:41
Background:
We have native versions of Java Standard Edition (Sun JSE Embedded / OpenJDK) to run desktop Java applications .
We could not run Java Mobile Editon apps/games (Opera Mini, Shazam etc) as you would find on other mobile phones, without MicroEmulator running on top of Java SE.
While this worked to an extent it did take a lot of CPU to run JavaSE, running a JavaME emulator, to run a Java ME app.
The ideal solution would be to have a native version of JavaME we can call from the command line like Java SE
.
PhoneME is the equivalent of this and has been around for a while, but compiling it is notoriously difficult, and there have been no working compiled versions of it available for N900 until now.
-------------
I have approached Davy Preuveneers who was behind the following builds (http://davy.preuveneers.be/phoneme) for Android, Linux ARM and Windows Phone, and he has very kindly donated some time to create a Maemo/MeeGo version for the community.
Just to clarify:
This is the main download website with "stable" builds:
http://davy.preuveneers.be/phoneme/?q=node/10#maemo
This is the website where I upload all my builds for testing by the
community, including "unstable" ones:
http://davy.preuveneers.be/phoneme/public/maemo/deb/
On this page, you also find older builds which could be useful to
identify between which two builds a new bug appeared.
Cheers,
Davy
Please download and test with N900 Fremantle, N9 Harmattan, and MeeGo CE / NEMO - any feedback in regard to bugs or performance issues with other mobile applications would be greatly appreciated.
input method (mscim) not work
theonelaw
2012-01-29, 13:57
ok, this might actually be really cool
thanks for sharing this
[DarkGUNMAN]
2012-01-29, 15:05
Post updated with background information about JavaSE, JavaME and PhoneME, to explain which problem this solves for N900.
[DarkGUNMAN], did you try to run Opera Mini v6.5? I tried and it crashes on start. I just replaced names of jar and jad files in opera.sh. I also tested v4.2 which works fine.
blackjack4it
2012-01-29, 22:08
Opera is working on my N900..by testing the examples included...Woow...it is very fast...I've tried to start Skebby.jar but it can't find a PlayerListener class :( any hints?
I've also tried to start Whatsapp jar but it says "Illegal Protocol" because it lacks of s40 nokia libs :(
what does ebuddy says? can anybody try it out? :)
would be fine to have a messneger client running on our N9/N950's (without having to sync all the contacts in our devices)
[DarkGUNMAN]
2012-01-29, 23:03
[DarkGUNMAN], did you try to run Opera Mini v6.5? I tried and it crashes on start. I just replaced names of jar and jad files in opera.sh. I also tested v4.2 which works fine.
OM6.5 doesn't work on this test version as it needs addition jsr support. Thanks for testing it though. it is bloody quick :)
Android_808
2012-01-30, 00:12
anyone tried shazam
[DarkGUNMAN]
2012-01-30, 00:33
I've been asked to try and get a jar file working.
This method might work for other jar files for testing.. no guarantees since this just my own guessworkl
The command line for this is not as straightforward to get working, but reading the .sh files bundled with this it loads the modules before calling jar, then loads the main class.
The main class is named in the jar file.. this can be found by opening the jar file with a zip program.
Open 'META-MF/MANIFEST.MF' with a text editor
The file will look something like this:
Manifest-Version: 1.0
MIDlet-Vendor: Banka Koper
MIDlet-Version: 1.0.5
MIDlet-1: BankaIN,/icon_small.png,si.semantika.bkotp.j2me.BankaIn
MicroEdition-Configuration: CLDC-1.1
MIDlet-Name: BankaIN
MicroEdition-Profile: MIDP-2.0
The Midlet-1 line shows the icon used BankaIN,/icon_small.png, then a comma to separate the main class.. in this case si.semantika.bkotp.j2me.BankaIn
If you navigagte the file using a zip program you will find a file structure similar to this.
To get it working I edited the .sh file and saved a copy:
#!/bin/sh
$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/user/MyDocs/bankain.jar -1 si.semantika.bkotp.j2me.BankaIn2
If there are problems or errors with the midlet once launched will apper in the xterm. Should be able to close it using ctrl+c
[DarkGUNMAN]
2012-01-30, 00:40
anyone tried shazam
Likely won't work yet since the jsr for sound isn't included. But it would still be usefull to try and launch it using the method shown above. Tnis is just my own guesswork here so if anyone else knows their way around java, the help would be appreciated.
ivgalvez
2012-01-30, 08:31
This looks very promising, I have never used MicroEmulator as it was quite difficult to achieve good results.
Will this support those WEB ADDRESSES which require java ?
Will this support those WEB ADDRESSES which require java ?
why? you have oracle java 6/7 SE for that or open jdk...this is java ME
[DarkGUNMAN]
2012-01-30, 09:16
Will this support those WEB ADDRESSES which require java ?
No, web pages which require the java plugin are asking for JavaSE, and if I remember rightly only Firefox and Chromium have been modded to get java working in browser.:)
Do a quick search of the forum for other java related threads.
Hi all,
I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:
http://davy.preuveneers.be/phoneme/public/n900/
This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.
ATM there is no other JSR support, so no audio/video/3d/gps.
I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.
To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).
You cannot use this VM to run java applets or whatever in a
browser.
There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.
Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.
Cheers.
Davy
ivgalvez
2012-01-30, 10:58
Hi all,
I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:
http://davy.preuveneers.be/phoneme/public/n900/
This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.
ATM there is no other JSR support, so no audio/video/3d/gps.
I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.
To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).
You cannot use this VM to run java applets or whatever in a
browser.
There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.
Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.
Cheers.
Davy
Your efforts are highly appreciated, I hope someone could help you pushing this project.
Hi all,
I am the guy that made this phoneME Advanced build for Maemo.
I justed wanted to inform you about a new build I put online at:
http://davy.preuveneers.be/phoneme/public/n900/
This build has JSR-75 support (though not properly tested). This
should make Opera Mini 6.5 work.
ATM there is no other JSR support, so no audio/video/3d/gps.
I also enabled full-screen. I configured Ctrl+Up in the application
to toggle between full screen and normal. Rotation to portrait
mode will probably not work.
To run other midlets, you need to copy and modify one of the
scripts. You can leave out the [-jadpath jadfile] switch, but you do
need to know the main class of the midlet (there can be multiple,
have a look at which ones are listed in the jad file).
You cannot use this VM to run java applets or whatever in a
browser.
There are still some bugs in there. The keyboard/pointer events
from Maemo/Qt4 need to be mapped on those that phoneME
understands, and the way it is currently implemented will cause
some issues when you run two midlets concurrently.
Before you all start launching features requests :-), I would like to
point out that my spare time is limited and I even don't have a
N900/N950/N9 device so I have no way of testing my builds on a
real device. I am using the MADDE emulator to test my build, but
it does have its limitations. For example, performance issues are
hard to detect and not all features can be emulated. Nonetheless,
your feedback on this forum is much appreciated and I hope you
find the builds useful.
Cheers.
Davy
Thanks thanks thanks heaps man love ya :D
hope to see positive feedbacks from testers, hopefully we'll be able to run shazam & whatsapp soon :p
what about you open donations for this project to get yourself the awesome N9 ;)
thanks again
[DarkGUNMAN]
2012-01-30, 12:07
Hi Davy,
I don't know what you did with this build but it definitely runs faster than the first one :)
Full screen mode - screen is redrawn once a text entry box is clicked, after that it works fine.
Scrolling is smoother, BBC page included as per the last test.
No keyboard problems found.
I see Filesystem access is enabled in this build as well..
Where does PMEA create the configuration settings for Opera after it has finished installing? I may need to add a symlink to the MyDocs folder and SDCard
Very nice work :)
what about you open donations for this project to get yourself the awesome N9 ;)
The N9 does seem nice. I don't know if my build for Maemo would
also work on this device (MeeGo compatible?). I would not want to
spend 485 EUR on this device for testing purposes if it would be
completely incompatible.
I appreciate the donation suggestion and the support. Although I
do have a PayPal account, I never put a donate link on my
phoneME website in the past because I wanted to avoid any
obligation on my part and endless discussions with people
expecting me to fix bugs/add features/buy the device asap
because they donated 10 EUR/$.
Of course, I know there are also a bunch of people who just want
to say thanks and buy me a beer :-)
Davy
;1157819']
Full screen mode - screen is redrawn once a text entry box is clicked, after that it works fine.
Weird, I don't have to do this on the MADDE emulator.
;1157819']
Where does PMEA create the configuration settings for Opera
after it has finished installing? I may need to add a symlink to the
MyDocs folder and SDCard
Midlet configuration information and PIM data are usually stored
in one of the subfolders of:
/home/developer/phoneme/midp/midp_linux_fb_gcc/appdb
Davy
Opera and microemo-demo worked fine on my N900, impressive speed. I didn't test much.
[DarkGUNMAN]
2012-01-30, 15:27
Link to thread on forum.meego.com to follow feedback from meego community.
http://forum.meego.com/showthread.php?t=5653
DavyP, is it possible to change code page to Central and East European Latin (Windows-1250 or ISO-8859-2)? Some characters are missing in Slovenian OperaMini.
I found these dictionaries (http://www.kodi.cz/en/download.xhtml) and tested English-Croatian 0.61n MIDP-2.0 Max (http://www.kodi.cz/en/version-2-10-1-3-9.xhtml) which works quite fine with stylus. :)
my .sh file
#!/bin/sh
$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/user/MyDocs/KODi_ENG-HRV_v0.61n_MIDP2.0_FULL.jar -jadpath /home/user/MyDocs/KODi_ENG-HRV_v0.61n_MIDP2.0_FULL.jad -1 MainCl
This is not a code page issue, but a font issue. The phoneME VM is only able to draw a certain subset of characters because it uses a builtin font bitmap with those character to draw them. It is actually a bit more complicated: the font bitmap is first converted into C code that draw these characters as fast as possible. This C code is compiled directly into the VM, so not easy to replace, and it is not possible to convert all characters this way due to the huge amount of code it would generate.
I would need to rewrite the text drawing routines to use Qt4's backend rather then the built-in techniques. This is not straightforward to get right, because when done wrong it could significantly affect the text rendering performance.
Some midlets come with their own text rendering techniques. The Opera Mini 4.2 in the above screenshots and the dictionary application seem to be two examples. They circumvent the text drawing routines by drawing everything themselves on a midlet Canvas or GameCanvas.
So yes, I am aware of the issue, and when I have time I will look into it.
Davy
[DarkGUNMAN]
2012-01-30, 18:22
Note: ROTATION does work, as well as full screen. Requires going into a text entry screen where there is a very brief green flash before appearing the correct size and orientation.
Screenshots to follow when I get home
Arthuro_Adam
2012-01-30, 19:08
I tried with an N9, but it doesn't work for me.
I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.
What did I wrong?
freemangordon
2012-01-30, 19:48
@DavyP - can't believe how fast is opera, thanks a lot man. There is a little problem though - JVM segfaults on exit.
EDIT:
segfault happens only when started under root account.
[DarkGUNMAN]
2012-01-30, 20:53
I tried with an N9, but it doesn't work for me.
I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.
What did I wrong?
If you extracted to root folder as root, your user account probably won't have rights over it.
I'd recommend extracting it to your $HOME folder instead. Don't know what it is on the N9, but MeeGo CE is /home/meego. Create a /home/meego/phoneme folder and try it there.
You may have to set permissions on the folder as well.
@DavyP - can't believe how fast is opera, thanks a lot man. There is a little problem though - JVM segfaults on exit.
EDIT:
segfault happens only when started under root account.
I can explain the segfaults. phoneME was never meant to be
compiled as a library. I did so anyway to simplify the compilation
process, and created a frontend application in Qt4 that:
1) dynamically loads this library through dlopen()
2) uses dlsym() to find cvm's original main() method
3) starts a new thread and
4) calls the original cvm's main() method
The thing is that the either the Qt4 frontend or the cvm's thread
can clean up and call exit() while the other part is still busy,
causing a segfault. This should not happen while the application
is running, only when you end the application.
Not sure though why this only happens under root.
Davy
I tried with an N9, but it doesn't work for me.
I copied the files to the root directory (/phoneme) then I tried to launch opera.sh but permission denied.
What did I wrong?
Did the unpacking succeed? Does the opera.sh script have
execute permissions? Perhaps you unpacked the tgz archive with
a tool that does not preserve execute permissions? Try the
following command in /phoneme:
chmod a+x opera.sh
chmod a+x test.sh
...
do this for all scripts
Also set the execute permission for the cvm binary:
chmod a+x bin/cvm
You can try to run a console application:
bin/cvm -cp testclasses.zip Test
or
./test.sh
I hope this helps.
Davy
munozferna
2012-01-31, 01:39
It works on the N9 :)
http://beford.org/ole/20120130202915.png
Arthuro_Adam
2012-01-31, 06:29
Did the unpacking succeed? Does the opera.sh script have
execute permissions? Perhaps you unpacked the tgz archive with
a tool that does not preserve execute permissions? Try the
following command in /phoneme:
chmod a+x opera.sh
chmod a+x test.sh
...
do this for all scripts
Also set the execute permission for the cvm binary:
chmod a+x bin/cvm
You can try to run a console application:
bin/cvm -cp testclasses.zip Test
or
./test.sh
I hope this helps.
Davy
Thanks, after I ran chmod, it works.
I live in Hungary, so I have the same problem, than the Slovenian member, the program haven't every character, and there is a grey line on the bottom.
Thanks for your work, it's a great progress, I hope there will be a solution for the problems above.
Joseph9560
2012-01-31, 07:37
Awesome, unexpectedly fast! Great job, thanks a lot for your great effort. I hope you would be able to manage more time for the app!
Great to hear that the build also works on the N9. I am aware of the font issues.
Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh
If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.
Thanks for testing.
Davy
Great to hear that the build also works on the N9. I am aware of the font issues.
Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh
If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.
Thanks for testing.
Davy
Now you need an N9 :p " u'll <3 it "
if your work leads us to run WhatsApp i can guaranty you a lot of beers :D
thanks a lot ,appreciated your efforts . Its a great experience !
Now you need an N9 :p " u'll <3
I would just like to remind all N9 fanboys, that applications for harmattan got separate forum part, and there is another topic with feedback from harmattan community about this particular program (PhoneME).
So, please, keep this thread clear from harmattan trash.
/Estel
Lol@Harmattan trash.
DavyP, if we had a whip around to get you an n900 to develop on, would you accept?
Arthuro_Adam
2012-01-31, 11:09
Great to hear that the build also works on the N9. I am aware of the font issues.
Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh
If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.
Thanks for testing.
Davy
Yes, it's there in the microemu too. That's gry bar works similarly than the status bar at the top, it's disappear when you swipe. Would you like to send a screenshot?
blackjack4it
2012-01-31, 11:48
@DavyP
Hi DavyP this is an awesome improvement for our N900, thank you so much. Could you please integrate the S40 javax.microedition libraries to let applications like Whatsapp, Skebby and so on to start? If I try to start them they search for S40 libs but can't find them :p
In addition I've noticed that it search for PlayerListener class..
Thank you
Lol@Harmattan trash.
DavyP, if we had a whip around to get you an n900 to develop on, would you accept?
Not sure where you can still get this N900, but if you are able to pull
this off, I would certainly appreciate it. It would make my life easier
when debugging performance problems or other issues which are
hard to reproduce on the emulator.
I leave this decision up to you all.
Davy
@DavyP
Hi DavyP this is an awesome improvement for our N900, thank you so much. Could you please integrate the S40 javax.microedition libraries to let applications like Whatsapp, Skebby and so on to start? If I try to start them they search for S40 libs but can't find them :p
In addition I've noticed that it search for PlayerListener class..
Thank you
Regarding the S40 libraries: I think the microemu project has an
implementation of the Nokia APIs. If it are those libraries you are
referring to, then I can have a look. If there is no open source
implementation available, then I would have to implement it from
scratch :-(
Regarding the Playerlistener class: it is a similar issue. There is
currently no JSR 135 support. I could first start with a dummy
implementation (making no noise at all), and then hook up the
interfaces to the native ones in Maemo/Qt4 ones I figured out how
multimedia playback works.
Davy
[DarkGUNMAN]
2012-01-31, 13:28
I'll see if I can find 2nd hand N900 for a reasonable price
Hey DavyP,
can you give me some hints, how you compiled that.
I followed some (outdated?) howtos for the n800
(http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvancedPlatformsNokia800)
And I can at least build the cdc binary.
But I can not get it to work to compile the midp
or other components.
regards
Nicolai
The compilation process is fairly complicated, and even at this point not
even a fully automated process.
The wiki you refer to provides some information on how you can
compile CDC and Foundation profile. I used the CodeSourcery
compiler for Linux ARM EABI to make those:
http://davy.preuveneers.be/phoneme/?q=node/10#armgnueabi
The CDC and Foundation builds you find there work OK on the
N900 without further tweaking.
However, as soon as graphics are involved you need to mess around
with the native toolkit, which on Maemo is Qt4. What I did was
customize and tweak the phoneME code so you can compile it as
library rather than as a cvm binary. I replaced some platform specific
methods with function pointers, and wrote a separate Qt4 application
which I compile with MADDE. This Qt4 app initializes these function
pointers with methods it provides. It is not straightforward in the sense
that I have to do a double compilation to build the library where in the
second compilation run I rely on the log output of the first compilation
run. I had to do something similar for Android too.
I am going to spare you the details, but if I can somehow fully automate
the build process in a script, I will also put it on my website.
Davy
How can I run theses opera.sh script .
I always get permission denied on my N9 when trying to run opera,sh or bin/cvm
How can I run theses opera.sh script .
I always get permission denied on my N9 when trying to run opera.sh or bin/cvm
How can I run theses opera.sh script .
I always get permission denied on my N9 when trying to run opera.sh or bin/cvm
A similar error was reported before:
http://talk.maemo.org/showpost.php?p=1158079&postcount=32
Your scripts and the cvm did to maintain their execute permissions while unpacking. Do the following in a terminal:
chmod a+x bin/cvm
chmod a+x opera.sh
chmod a+x test.sh
etc.
Davy
DavyP, I'm sure, that having N900 would make Your life easier in much more things, that "just" developing PhoneME ;)
I've just checked current, prices, and second-hand N900 in ideal condition can be bought (in Poland) for 250-300$ without much hassle. It seems, that it's price is getting *higher* lately...
/Estel
DavyP, I'm sure, that having N900 would make Your life easier in much more things, that "just" developing PhoneME ;)
I've just checked current, prices, and second-hand N900 in ideal condition can be bought (in Poland) for 250-300$ without much hassle. It seems, that it's price is getting *higher* lately...
/Estel
I will try to find out if I can get hold of used N900 here in India, Bangalore, should be able to get a cheap deal since not many ppl here know about our awesome N900 ..
buchanmilne
2012-02-01, 11:44
DavyP, I'm sure, that having N900 would make Your life easier in much more things, that "just" developing PhoneME ;)
I've just checked current, prices, and second-hand N900 in ideal condition can be bought (in Poland) for 250-300$ without much hassle. It seems, that it's price is getting *higher* lately...
/Estel
ebay.co.uk currently lists a number of 2nd hand devices ranging from GBP 42 (current bind) to GBP 120 (buy-it-now price).
(More applicable to me, seems there is one on auction at bidorbuy.co.za ending tonight, current bind R970 - about GBP 80).
nice!
Opera mini has the best rss builtin and I've needed something like that. And it is fast (typing from here). Only thing I miss is copy paste
thanks
woow, thanks to those behind this development. em, how do i go about if i wanna try my own java apps? help? thanks
ebay.co.uk currently lists a number of 2nd hand devices ranging from GBP 42 (current bind) to GBP 120 (buy-it-now price).
(More applicable to me, seems there is one on auction at bidorbuy.co.za ending tonight, current bind R970 - about GBP 80).
I was looking on ebay.be but there were no N900 models available.
The disadvantage with getting a model from outside the EU is that
there are other costs to consider, like import taxes and custom fees,
and VAT. This could easily be an additional 30% of the article's
original value.
Davy
woow, thanks to those behind this development. em, how do i go about if i wanna try my own java apps? help? thanks
Any online J2ME tutorial on developing MIDlets will help you get you started.
Davy
[DarkGUNMAN]
2012-02-01, 23:23
woow, thanks to those behind this development. em, how do i go about if i wanna try my own java apps? help? thanks
http://talk.maemo.org/showpost.php?p=1157623&postcount=10
just tried out one facebook chat java app and it worked like charm. buh while i tried accessin some other .jar files like mozat, winrar says the archive is not a valid .jar file. so, which other programs can help me access the meta inf folder inside a .jar app. thanks again.......
just tried out one facebook chat java app and it worked like charm. buh while i tried accessin some other .jar files like mozat, winrar says the archive is not a valid .jar file. so, which other programs can help me access the meta inf folder inside a .jar app. thanks again.......
I just change the extension to .zip and then use the default windows extraction utility.
I just change the extension to .zip and then use the default windows extraction utility.
Still gives d same error
I just change the extension to .zip and then use the default windows extraction utility.
Still gives d same error
[DarkGUNMAN]
2012-02-02, 21:46
A JAR file is a renamed zip archive, with the java classes for the program inside.
If the file won't open with a Zip manager, it is likely the file is corrupt. You may need to download it again
[DarkGUNMAN]
2012-02-03, 13:15
Test post from unstable build, uploaded photo succeeded from OM6.5
Some midlets come with their own text rendering techniques. The Opera Mini 4.2 in the above screenshots and the dictionary application seem to be two examples. They circumvent the text drawing routines by drawing everything themselves on a midlet Canvas or GameCanvas.
As far as I know, opera mini works through Opera servers, which is why it can render lots of things properly - the mini jar java part just has to display the graphics from the Opera servers...
As far as I know, opera mini works through Opera servers, which is why it can render lots of things properly - the mini jar java part just has to display the graphics from the Opera servers...
This is only partially true. Opera indeed does some compression
on the servers to reduce the amount communication and
computation on your handheld. However, with Opera Mini 6.5 you
can render the pages using the monospace font that is included in
the build.
Also, if you would for example develop midlets with the LWUIT or
J2ME Polish GUI library, then you can use their built-in support to
do the text rendering. These libraries render their own GUI
widgets and text on top of the J2ME GameCanvas class and come
with their own custom font support.
Davy
munozferna
2012-02-03, 19:59
Great to hear that the build also works on the N9. I am aware of the font issues.
Can you confirm this grey bar issue with other midlets as well?
Try ./microemu-demo.sh
If so, then I am afraid this is an N9 specific issue, which I unfortunately cannot reproduce at the moment without a real device.
Thanks for testing.
Davy
Yes it is N9 specific I believe. You can see other screenshots here:
http://beford.org/ole/
I asked on the #harmattan IRC channel and somebody told me it was required to change the application type to MApplication.
<ieatlint> oh, yeah... that appears whenever an application is based on QApplication
<ieatlint> you need to use MApplication instead
Yes it is N9 specific I believe. You can see other screenshots here:
http://beford.org/ole/
I asked on the #harmattan IRC channel and somebody told me it was required to change the application type to MApplication.
Thanks for the screenshots and the MApplication suggestion. However, it seems I will need to install an additional SDK (Qt SDK
1.2?) to use MApplication.
Davy
Hi DavyP, thanks for this great program :)
i was trying some apps and games and the first game that it works is pacman, but i have a problem with the screen resolution, it looks really small:
http://www.subeimagenes.com/thumb/screenshot-20120204-162950-165379.png (http://www.subeimagenes.com/img/screenshot-20120204-162950-165379.html) Subido en SubeImagenes.com (http://www.subeimagenes.com)
Can i change the resolution changing something from the sh file?
Hi DavyP, thanks for this great program :)
i was trying some apps and games and the first game that it works is pacman, but i have a problem with the screen resolution, it looks really small:
http://www.subeimagenes.com/thumb/screenshot-20120204-162950-165379.png (http://www.subeimagenes.com/img/screenshot-20120204-162950-165379.html) Subido en SubeImagenes.com (http://www.subeimagenes.com)
Can i change the resolution changing something from the sh file?
Technically, I think it is possible to render the midlet on a 400x240
or 266x160 canvas (rather than 800x480), and then have Qt
scale up the resolution by a factor of 2 or 3. However, this is not
implemented, so I am afraid there is currently no support for
that.
Davy
Technically, I think it is possible to render the midlet on a 400x240
or 266x160 canvas (rather than 800x480), and then have Qt
scale up the resolution by a factor of 2 or 3. However, this is not
implemented, so I am afraid there is currently no support for
that.
Davy
At least with the last CSSU update, i am able to zoom in using ctrl+shift+s.
I got opera.sh working and all other tests was successful.
I has the grey bar issue on my N9 .
Opera mini can display vietnamese font. How can I change the font on Opera Mini ?
I'm trying to get other jar file working
santiago
2012-02-05, 10:57
i think we missed some features like
copy/paste option from the OS<->JVM
the JSR implementation.. this is too important for a valid JVM
but u made a great START with Phoneme i hope we can enjoy jsr support. ;) thx for your WORK!
Could anyone give the one from this page a try:
http://www.vbl.ch/getdoc/02801f6e-933b-4ef1-9729-418208cb7896/Installationsanleitung.aspx
I'm getting some weird errors, for files I don't even see inside the jar, perhaps I'm not looking in the right place/way..?
BTW I took the touchscreen (3rd) version.
Yes it is N9 specific I believe. You can see other screenshots here:
http://beford.org/ole/
I asked on the #harmattan IRC channel and somebody told me it was required to change the application type to MApplication.
I installed Qt SDK 1.2 that got released a couple of days ago.
I changed QApplication to MApplication, and linked against the
meegotouchcore library, but the grey bar is still there in the
N9 emulator (i.e. I see no difference with the Maemo build running on N9).
Davy
I got opera.sh working and all other tests was successful.
I has the grey bar issue on my N9 .
Opera mini can display vietnamese font. How can I change the font on Opera Mini ?
I'm trying to get other jar file working
I am working on a build that replaces the current font subsystem
which uses a builtin monospace bitmap font (with limited
character set) to render text.
My latest 'unstable' snapshot now uses the default font on Maemo
and supports more text styles and sizes. The text rendering looks
much better, but rendering speed has become slower. I figured
as much on the emulator, and [DarkGUNMAN] confirmed the
performance hit on a real device too. However, should you care
trying the latest snapshot yourself, you can find them over here:
http://davy.preuveneers.be/phoneme/public/n900/unstable/
The most recent build is on top.
Davy
Could anyone give the one from this page a try:
http://www.vbl.ch/getdoc/02801f6e-933b-4ef1-9729-418208cb7896/Installationsanleitung.aspx
I'm getting some weird errors, for files I don't even see inside the
jar, perhaps I'm not looking in the right place/way..?
BTW I took the touchscreen (3rd) version.
I just gave one of the midlets at the above url a try, and I too get
errors about missing png images and text files that don't exist in
the jar file.
Davy
i think we missed some features like
copy/paste option from the OS<->JVM
the JSR implementation.. this is too important for a valid JVM
but u made a great START with Phoneme i hope we can enjoy jsr support. ;) thx for your WORK!
The original phoneME implementation does not come with copy
paste support. Copying text in a midlet and pasting it to another
Maemo application is technically pretty hard (because you cannot
select text in a textfield or textbox). The other way around might
be possible by trapping the Ctrl+V key combination, looking which
text has been copied from elsewhere, and replaying this text as if
you would have entered the text manually.
I am well aware JSR support is limited. There are a bunch of
JSRs out there that would be nice to have. Unfortunately, there
aren't that many JSR implementations available as open source.
The only ones that Sun/Oracle have made available are those
that they 'own'. Have a look over here:
https://svn.java.net/svn/phoneme~svn/components/
Also, some of the JSRs you find there don't compile well or need
detailed knowledge about the underlying platform so you can port
these JSRs to a new device. This ain't easy, especially with just
the emulator at hand. I am aware of projects like microemu and
MIDPath. However, they have the luxury of being able to exploit
all the features of a full Java SE environment. Many of their
components would not work on a Java ME environment.
Right now, I just have JSR 172 and JSR 75 (with some minor
issues). Based on my experiences with porting for Windows
Mobile and Android, I think JSR 179 (Location API) and audio
playback with JSR 135 are doable given enough time and effort.
However, I am not sure if the Madde emulator can handle all
these features so that I would be able to test this. Things like 3D
support with JSR 184 are out of the question.
Davy
santiago
2012-02-06, 00:59
The original phoneME implementation does not come with copy
paste support. Copying text in a midlet and pasting it to another
Maemo application is technically pretty hard (because you cannot
select text in a textfield or textbox). The other way around might
be possible by trapping the Ctrl+V key combination, looking which
text has been copied from elsewhere, and replaying this text as if
you would have entered the text manually.
I am well aware JSR support is limited. There are a bunch of
JSRs out there that would be nice to have. Unfortunately, there
aren't that many JSR implementations available as open source.
The only ones that Sun/Oracle have made available are those
that they 'own'. Have a look over here:
https://svn.java.net/svn/phoneme~svn/components/
Also, some of the JSRs you find there don't compile well or need
detailed knowledge about the underlying platform so you can port
these JSRs to a new device. This ain't easy, especially with just
the emulator at hand. I am aware of projects like microemu and
MIDPath. However, they have the luxury of being able to exploit
all the features of a full Java SE environment. Many of their
components would not work on a Java ME environment.
Right now, I just have JSR 172 and JSR 75 (with some minor
issues). Based on my experiences with porting for Windows
Mobile and Android, I think JSR 179 (Location API) and audio
playback with JSR 135 are doable given enough time and effort.
However, I am not sure if the Madde emulator can handle all
these features so that I would be able to test this. Things like 3D
support with JSR 184 are out of the question.
Davy
you're right... I have seen here in the talk tha someone has done something with the Openlapi and jsr 179.. To get working gps location antenna, by the way, the only possibility to get "partial" jsr support then can be using the jsr179? :( will be good having sound working :( i think the ctrl + v / ctrl + x / ctrl + c can be good for this powerfull jvm becouse some applets have a different input method and during the emulation you have no way to paste/insert caracters in the text field Thx for your detailed answer and for the support with phoneme!
edit: i attached a sshot about the font and window of phoneme, i'm using your last versione the one with font changes.. but i see it in this way i mean big font size respetc to the layout
you're right... I have seen here in the talk tha someone has done something with the Openlapi and jsr 179.. To get working gps location antenna, by the way, the only possibility to get "partial" jsr support then can be using the jsr179? :( will be good having sound working :( i think the ctrl + v / ctrl + x / ctrl + c can be good for this powerfull jvm becouse some applets have a different input method and during the emulation you have no way to paste/insert caracters in the text field Thx for your detailed answer and for the support with phoneme!
edit: i attached a sshot about the font and window of phoneme, i'm using your last versione the one with font changes.. but i see it in this way i mean big font size respetc to the layout
The text does not seem to be well-aligned in your screenshot. This is what I have:
http://davy.preuveneers.be/phoneme/public/image/maemo/microemu-demo.jpg
http://davy.preuveneers.be/phoneme/public/image/maemo/opera2.jpg
About audio support: I cannot seem to produce any sound with the emulator, not even with the built-in 'play-sound' application or the Qt4 qmusicplayer example application. I am guessing QSound in Qt4 is not properly supported for audio playback :-(
/home/developer $ play-sound testmp3.mp3
socket(): Address family not supported by protocol
ca_context_open: Not available
About GPS: Yes, JSR 179 would provide the unifying API to get location information. Any location provider could be plugged into JSR 179, but GPS is quite likely the most important one.
I am aware of OpenLAPI. That is the implementation I used to support JSR 179 on my Android port. The only thing I need to figure out is how to get the GPS data natively on the N900 and how to activate and deactivate GPS programmatically, etc.
Davy
santiago
2012-02-07, 01:28
The text does not seem to be well-aligned in your screenshot. This is what I have:
http://davy.preuveneers.be/phoneme/public/image/maemo/microemu-demo.jpg
http://davy.preuveneers.be/phoneme/public/image/maemo/opera2.jpg
About audio support: I cannot seem to produce any sound with the emulator, not even with the built-in 'play-sound' application or the Qt4 qmusicplayer example application. I am guessing QSound in Qt4 is not properly supported for audio playback :-(
/home/developer $ play-sound testmp3.mp3
socket(): Address family not supported by protocol
ca_context_open: Not available
About GPS: Yes, JSR 179 would provide the unifying API to get location information. Any location provider could be plugged into JSR 179, but GPS is quite likely the most important one.
I am aware of OpenLAPI. That is the implementation I used to support JSR 179 on my Android port. The only thing I need to figure out is how to get the GPS data natively on the N900 and how to activate and deactivate GPS programmatically, etc.
Davy
to play a sound you can also use mplayer too
# if you don't have
# sudo apt-get install mplayer
mplayer testmp3.mp3
# it can play mp3, ogg, wav, aac etc etc
for the gps data i don't know seems there's not a command dbus line to switch on/off the gps radio, there's a python script that makes it. If you want to try using jython maybe it can works ;)
I know GPS isn't working yet, but has anyone tried the Google Maps applet yet?
to play a sound you can also use mplayer too
# if you don't have
# sudo apt-get install mplayer
mplayer testmp3.mp3
# it can play mp3, ogg, wav, aac etc etc
for the gps data i don't know seems there's not a command dbus line to switch on/off the gps radio, there's a python script that makes it. If you want to try using jython maybe it can works ;)
I installed a bunch of packages in the Madde N900 emulator,
including mplayer, alsasound, mediaplayer, pulseaudio, etc. I
restarted the emulator. Some of the errors I got before are gone
and mplayer seems to be playing a test wav and mp3 file, but I
still hear no sound. Same problems with aplay and play-sound. I
checked my mixer settings too.
Has anyone tried to play audio in the emulator?
Davy
Arthuro_Adam
2012-02-07, 09:18
I tried the newest version (0206) on N9, and the fonts are great, it shows every Hungarian character (őűí), but it's slower, than the first one.
The grey bar is there.
I tried the newest version (0206) on N9, and the fonts are great, it shows every Hungarian character (őűí), but it's slower, than the first one.
The grey bar is there.
Text rendering is indeed slower.
I am still investigating the grey bar issue. Merely replacing
QApplication with MApplication as suggested before, does not
seem to cut it.
Davy
manojkumaru
2012-02-07, 12:40
I will try to find out if I can get hold of used N900 here in India, Bangalore, should be able to get a cheap deal since not many ppl here know about our awesome N900 ..
Looking for an used N900?? Little late, I had a friend in Banglore who sold it for 7000INR, just before he left for US of A,a month ago. No worries, still there is another friend of mine from Gujarat willing to sell his N900. I am less fortunate to make it mine, but still I don't want it to go to any hands which don't know the awesomeness of this phone. If you're willing, I can connect you to him. PM me.
Text rendering is indeed slower.
I am still investigating the grey bar issue. Merely replacing
QApplication with MApplication as suggested before, does not
seem to cut it.
Davy
I found out that this grey bar is actually the system tray that can
be disabled on the N9 device:
http://forum.meego.com/showthread.php?t=1868
Another way is to run the app in fullscreen by default, or to use
PageStackWindow, but for that I would need to change my port to
use the Qt Quick Components .
http://forum.meego.com/showthread.php?t=3636
I put a new build online and added a separate build for N9 that
starts in full screen.
Davy
Arthuro_Adam
2012-02-07, 18:58
I found out that this grey bar is actually the system tray that can
be disabled on the N9 device:
http://forum.meego.com/showthread.php?t=1868
Another way is to run the app in fullscreen by default, or to use
PageStackWindow, but for that I would need to change my port to
use the Qt Quick Components .
http://forum.meego.com/showthread.php?t=3636
I put a new build online and added a separate build for N9 that
starts in full screen.
Davy
Thanks for your work.
[DarkGUNMAN]
2012-02-07, 20:43
Tested new version:
Default font is slightly smaller, works better for medium fonts but still jerky - I have not tried this overclocked yet.
Fullscreen and rotation now automatically redraw the screen to fit :)
Very nice work.
File upload and download is supported:
download only seems to work in Opera Mini 4.2.. in v6.5 download fails
upload works fine - access to MyDocs and SDCard
Looking for an used N900?? Little late, I had a friend in Banglore who sold it for 7000INR, just before he left for US of A,a month ago. No worries, still there is another friend of mine from Gujarat willing to sell his N900. I am less fortunate to make it mine, but still I don't want it to go to any hands which don't know the awesomeness of this phone. If you're willing, I can connect you to him. PM me.
Thanks for the suggestion, but my hope is that I can do as much as possible with the emulators and have others do some testing for the things I cannot check myself. If I would have to buy a device for each platform and OS revision I had to test against or create a custom build for, I would be spending a lot of money too :-). Up to now, I managed to do all my Windows Mobile and Android porting with emulators and a dual boot device. A pitty it cannot triple boot to Maemo or MeeGo. That would be really cool :-)
Cheers,
Davy
Arthuro_Adam
2012-02-07, 21:27
;1161853']Tested new version:
Default font is slightly smaller, works better for medium fonts but still jerky - I have not tried this overclocked yet.
Fullscreen and rotation now automatically redraw the screen to fit :)
Very nice work.
File upload and download is supported:
download only seems to work in Opera Mini 4.2.. in v6.5 download fails
upload works fine - access to MyDocs and SDCard
Testing now :)
Another question for N9xx and N9 owners.
I know N900 and N950 have a physical keyboard, but the N9 has not. Can both devices use a built-in virtual/soft keyboard for text input? I tried the Notes application on the emulator, and on N9 I get this grey bar that people have been complaining about, with a + sign on it which activates a virtual keyboard. On N900 I don't get this virtual keyboard.
I am just asking because I see these requests for copy-paste functionality and I am wondering whether lack of input support is the reason. On Windows Mobile and Android I was able to integrate the built-in virtual keyboard into the phoneME ports.
Davy
;1161853']Tested new version:
Default font is slightly smaller, works better for medium fonts but still jerky - I have not tried this overclocked yet.
Fullscreen and rotation now automatically redraw the screen to fit :)
Very nice work.
Yes I reduced the font size. The reason why font drawing could be slow is because there are a lot of bitmap operations going on to render text. PhoneME renders all graphics etc. on a 16-bit RGB array of pixels. I then convert this array to a QImage() and then to a QPixmap() and ask Qt4 to render the text. Unfortunately, by doing so, the QPixmap() becomes a 32-bit RGB pixmap which I then have to convert back to 16-bit before I copy the raw RGB pixel array back to phoneME. Obviously there is a lot of overhead.
Hopefully I can find another faster way to have Qt4 render text on a 16-bit RGB buffer without all this copying and transformation.
;1161853']
File upload and download is supported:
download only seems to work in Opera Mini 4.2.. in v6.5 download fails
upload works fine - access to MyDocs and SDCard
Yes, I have not looked what Opera Mini does different v6.5. It is on my todo list.
Davy
Arthuro_Adam
2012-02-07, 21:53
It's working on N9, status bar and grey bar disappeared. It's great, but laggy. Download, rotate not working. If you click on landscape mode, than it's rotate to the wrong side (NOKIA logo on the down not the top).
Thanks for your work, it's get better day by day.
If I turn off the Opera keyboard, I can't get any virtual keyboard on N9.
It's working on N9, status bar and grey bar disappeared. It's great, but laggy. Download, rotate not working. If you click on landscape mode, than it's rotate to the wrong side (NOKIA logo on the down not the top).
Thanks for your work, it's get better day by day.
If I turn off the Opera keyboard, I can't get any virtual keyboard on N9.
The grey bar is gone because I started the application in full screen. I think the grey bar is intended as a status bar from which you could activate a virtual keyboard (if I compare with the Notes app). Since with fullscreen it is now hidden, we cannot pop up a virtual keyboard anymore (if I would now how to enable it). I had to do something similar for Android devices without a physical keyboard. The problem was that phoneME text input fields are different from Android input fields (that would automatically pop up the virtual keyboard), but on Android I managed to enforce popping up the virtual keyboard even if there was no Android textfield widget being displayed. I have not found a way how to do this on N9.
About the rotation: This is Opera rotating in the wrong way, not phoneME. There is not much I can do about this :-(. Actually, on both the N9 and N900 emulators phoneME always runs in landscape mode it seems.
Davy
Arthuro_Adam
2012-02-07, 22:22
The grey bar is gone because I started the application in full screen. I think the grey bar is intended as a status bar from which you could activate a virtual keyboard (if I compare with the Notes app). Since with fullscreen it is now hidden, we cannot pop up a virtual keyboard anymore (if I would now how to enable it). I had to do something similar for Android devices without a physical keyboard. The problem was that phoneME text input fields are different from Android input fields (that would automatically pop up the virtual keyboard), but on Android I managed to enforce popping up the virtual keyboard even if there was no Android textfield widget being displayed. I have not found a way how to do this on N9.
About the rotation: This is Opera rotating in the wrong way, not phoneME. There is not much I can do about this :-(. Actually, on both the N9 and N900 emulators phoneME always runs in landscape mode it seems.
Davy
Yes, the portrait mode is wrong, but it's nothing. I don't need any virtual keyboards, the opera's keyboard is perfect for me.
I think, for the N9 there is two problem left, but you know both of them (speed and download).
I tweaked the text rendering a bit and uploaded new builds (dated 2012-02-08):
http://davy.preuveneers.be/phoneme/?q=node/10#maemo
Can you check if you see some improvement in the text rendering speed?
I avoided all of the pixel buffer copying and rgb depth transformation. If it is still too slow, it is Qt4 itself that is slow at text rendering ....
Davy
munozferna
2012-02-08, 05:24
I tweaked the text rendering a bit and uploaded new builds (dated 2012-02-08):
http://davy.preuveneers.be/phoneme/?q=node/10#maemo
Can you check if you see some improvement in the text rendering speed?
I avoided all of the pixel buffer copying and rgb depth transformation. If it is still too slow, it is Qt4 itself that is slow at text rendering ....
Davy
I did not test the previous version but the last one seems to be fast enough using Opera. Also the fullscreen trick works nice! Thanks a lot. Regarding the input, I was unable to get the VKB appearing on the microemu-demo. Maybe the people from #maliit can help you figure it out
[DarkGUNMAN]
2012-02-08, 08:01
Tested v08-02:
MUCH faster! No delayed response. Scrolling in OM4.2 and 6.5 is much improved, menus are quick with no delay - it it is very usable now at Medium font settings :)
;1161992']Tested v08-02:
MUCH faster! No delayed response. Scrolling in OM4.2 and 6.5 is much improved, menus are quick with no delay - it it is very usable now at Medium font settings :)
Great to hear my efforts paid off :-). When time permits, I will look into the JSR 75 (file download) issue, as it seems Opera Mini is one of the more popular midlet applications on the N900.
Davy
Right chaps, lets talk turkey.
I will pledge $25 dollars to buy this guy an N900. I can accumulate all pledges till we have enough to get this Mofo an n900. Who is in?
[DarkGUNMAN]
2012-02-08, 09:12
I'm in. £10 from my next pay packet
[DarkGUNMAN]
2012-02-08, 09:32
Quick update, scrolling in portrait mode is jerky for Medium fonts.
Landscape is fine.
Small fonts no problem
Hi DavyP,
I tried again to compile midp, but I can not get this to work.
I tried different howtos I found (phoneme for webos (http://www.webos-internals.org/wiki/Building_phoneME_%28for_Java_Mobile_-_J2ME_support_in_webOS%29_with_scratchbox2)for example)
Starting with building the PCSL part I get this error:
gcc: error trying to exec 'cc1'
looks like a PATH entry is missing.
If I manually change the PATH it can find the cc1 from my arm-toolchain
but I get errors "can not find stdio.h" and if I manually change the
CFLAGS to include that path for stdio.h I get more errors
about other includes missing.
So, somehow my cross-compiler toolchain isn't correct, but
I don't understand what I could have done wrong.
It is working for developing apps for maemo, but for maemo
scratchbox environment is used within its one login shell.
For midp I can not directly use this envirionment because
midp depends on java tools that aren't useable from
within scratchbox.
But it should work to just use scratchbox toolchain I even
tried different toolchains (scratchbox, the one from WebOs,
codesourcery) always the same errors.
Any ideas.
Nicolai
Right chaps, lets talk turkey.
I will pledge $25 dollars to buy this guy an N900. I can accumulate all pledges till we have enough to get this Mofo an n900. Who is in?
Count me in (10€), not only for his work he already done, but also
because every developer should own a N900 :-)
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
Total = £34.06
Ok, I have found a guy who will sell me his old n900 for £69. It is a bit of a beater with a scratched screen in poor cosmetic condition but apparently it all works fine. This means we are %49 of the way to buying it.
If you feel you will benefit from using this piece of software AT ALL now or in the future I ask you to donate some $$$ for the cause. It does not matter how little just donate something, or I will toe your balls the next time you come with a rétarded feature request.
File download issue should be fixed now. It turned there was a seek() operation issue. OperaMini 6.5 did an openOutputStream(0) whereas the older version did an openOutputStream(). This '0' parameter triggered a seek(0) operation, which failed. Unfortunately, the underlying stream implementation does not support seeking, but luckily for OperaMini 6.5 the fix was simple as a seek(0) is the same as not seeking at all. For now, I just check the byte offset for the seek operation and if it is 0 I skip it.
There are new builds on my website (with the same date of 2012-02-08).
One note: I added another virtual folder /FileSystem so you can access any folder you like. However, when you try to save a file, make sure you have write permissions to that folder. The /Private virtual folder should work as it is mapped onto the /home/user/MyDocs folder. The /Storage one is mapped onto /media/mmc1.
Cheers
Davy
;1162033']Quick update, scrolling in portrait mode is jerky for Medium fonts.
Landscape is fine.
Small fonts no problem
Strange, as I am doing the same thing whether I am in portrait or
landscape mode.
Perhaps in portrait mode, the slowdown is caused because
phoneME needs to print many more smaller (single line) strings,
whereas in landscape mode Opera Mini prints fewer but longer
strings. I am just guessing here.
Davy
Arthuro_Adam
2012-02-08, 11:25
Thanks for the update, I will try it at afternoon.
Hi DavyP,
I tried again to compile midp, but I can not get this to work.
I tried different howtos I found (phoneme for webos (http://www.webos-internals.org/wiki/Building_phoneME_%28for_Java_Mobile_-_J2ME_support_in_webOS%29_with_scratchbox2)for example)
Starting with building the PCSL part I get this error:
gcc: error trying to exec 'cc1'
looks like a PATH entry is missing.
If I manually change the PATH it can find the cc1 from my arm-toolchain
but I get errors "can not find stdio.h" and if I manually change the
CFLAGS to include that path for stdio.h I get more errors
about other includes missing.
So, somehow my cross-compiler toolchain isn't correct, but
I don't understand what I could have done wrong.
It is working for developing apps for maemo, but for maemo
scratchbox environment is used within its one login shell.
For midp I can not directly use this envirionment because
midp depends on java tools that aren't useable from
within scratchbox.
But it should work to just use scratchbox toolchain I even
tried different toolchains (scratchbox, the one from WebOs,
codesourcery) always the same errors.
Any ideas.
Nicolai
Count me in (10€), not only for his work he already done, but also
because every developer should own a N900 :-)
I am using the ARM 2011.03 GNU EABI cross-compiler from CodeSourcery (which apparently changed its name to Mentor Graphics). The Lite versions of the compilers are a bit harder to find, but you can download the latest ones over here:
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
You have to register first, but you can get the compilers directly from:
https://sourcery.mentor.com/sgpp/lite/arm/portal/release2029
I use these compilers directly on my linux OS so not in a scratchbox environment. See if this somehow already helps with the missing headers files.
Davy
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
Total = £34.06
Thank you all for your efforts on trying to get me a N900 :)
Davy
I am using the ARM 2011.03 GNU EABI cross-compiler from CodeSourcery (which apparently changed its name to Mentor Graphics). The Lite versions of the compilers are a bit harder to find, but you can download the latest ones over here:
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
You have to register first, but you can get the compilers directly from:
https://sourcery.mentor.com/sgpp/lite/arm/portal/release2029
I use these compilers directly on my linux OS so not in a scratchbox environment. See if this somehow already helps with the missing headers files.
Davy
No, I already use that one.
All I ask is that when you feel it is time to move on to greener pastures of code that you leave your program in a useable state, open enough for someone to carry on where you leave off.
[DarkGUNMAN]
2012-02-08, 11:41
Strange, as I am doing the same thing whether I am in portrait or
landscape mode.
Perhaps in portrait mode, the slowdown is caused because
phoneME needs to print many more smaller (single line) strings,
whereas in landscape mode Opera Mini prints fewer but longer
strings. I am just guessing here.
Davy
Hi Davy,
I think the portrait issue may be more to do with the SGX drivers in Maemo, there is a known screen tearing issue and the default web browser also seems slower in portrait.
Didnmt realise until now
All I ask is that when you feel it is time to move on to greener pastures of code that you leave your program in a useable state, open enough for someone to carry on where you leave off.
My intention is to:
1) first get the build in a decent shape
2) clean up my patches
3) try to find a way to automate the build process as much as possible with a shell script
4) put all that info, including Maemo specific sources and patches on my website.
5) let the community have a go at compiling it themselves
And rest assured, it is quite likely that phoneME will be on my website for quite a while :)
Cheers,
Davy
No, I already use that one.
Mmmm, odd. If I have time I will have a go at building everything on a clean machine and write down all the steps I took.
Davy
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
Total = £34.06
Add 10€ from me.
[DarkGUNMAN]
2012-02-08, 14:29
Just out of curiosity, in the next release is it possible to change the name of the CVM window to that of the name of the Midlet once launched, as listed in the manifest or jad file?
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
MaddogG - £8.34
Total = £42.40
Achievement, developer phone for DavyP:
achievement 61% unlocked
Ok, I have found a guy who will sell me his old n900 for £69. It is a bit of a beater with a scratched screen in poor cosmetic condition but apparently it all works fine. This means we are %49 of the way to buying it.
If you feel you will benefit from using this piece of software AT ALL now or in the future I ask you to donate some $$$ for the cause. It does not matter how little just donate something, or I will toe your balls the next time you come with a rétarded feature request.
£69 looks very cheap.we need to get one for Davy ASAP. how can we donate..any paypal ID ??
I will accumulate the payments via paypal when we have reached the £69 mark. I then pay the chap and mail the n900 to davyp.
A user here by the name of 'phedders' has my address, I sent him my old LCD to test his broken n900 with, I supplied him with my name and address so you will know where to find me to break my legs if this goes wrong.
Android_808
2012-02-08, 14:50
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
MaddogG - £8.34
Total = £42.40
Achievement, developer phone for DavyP:
achievement 61% unlocked
LOL
ten chars
Mmmm, odd. If I have time I will have a go at building everything on a clean machine and write down all the steps I took.
Davy
Here are some preliminary build instructions. The patches aren't
fully ready, but even without them the dual stack configuration
should build:
http://davy.preuveneers.be/phoneme/?q=node/35
There are several more build steps required before you can run
midlets, but you could try to run the test application:
bin/cvm -cp testclasses.zip Test
Regards
Davy
I would just like to remind all N9 fanboys, that applications for harmattan got separate forum part, and there is another topic with feedback from harmattan community about this particular program (PhoneME).
So, please, keep this thread clear from harmattan trash.
/Estel
This sub-forum is platform neutral...
Maemo6x/N9 users have as much of a right to participate as Maemo5x/N900 owners
Your comments serve no good purpose but to weaken the community overall.
Perhaps that really is your end goal...
Can you please improve the virtual keyboard of PhoneME? It's a bit too small on Nokia N9
I'm trying to use a java chat client and it crash somtimes.
I got this error messages : catched signal 11
QThread : Destroyed while thread is still running
PS: opera mobile 6.5 works very nice on my N9 :)
Right chaps, lets talk turkey.
I will pledge $25 dollars to buy this guy an N900. I can accumulate all pledges till we have enough to get this Mofo an n900. Who is in?
Ok, I have found a guy who will sell me his old n900 for £69. It is a bit of a beater with a scratched screen in poor cosmetic condition but apparently it all works fine. This means we are %49 of the way to buying it.
Well done, I pledge $15AUD, just over 10 pounds.
If we don't get anywhere fast enough, I'll pledge more.
Next step, finding a second-hand/beaten-up N9...
I'm following this thread weekly so won't read this thread for another 5-days or so.
If you need me to submit my payment via pp before then, just shoot me a PM.
Arthuro_Adam
2012-02-08, 17:05
I tested the last one on N9. It's very snappy, characters are good. (medium size)
Download not working, the characters not good when you choose small size.
Is it possible, that the zoom to pinch not working?
[DarkGUNMAN]
2012-02-08, 17:13
I don't think that Opera Mini supports zoom to pinch. What you see is what you get. Best you can do is pick font size.
thedead1440
2012-02-08, 17:24
zoom to pinch is supported by opera mobile.
opera mini on symbian only supports double-tap to zoom which is missing in this version as the page is by default zoomed to optimal level for reading.
freemangordon
2012-02-08, 17:38
zoom to pinch is supported by opera mobile.
opera mini on symbian only supports double-tap to zoom which is missing in this version as the page is by default zoomed to optimal level for reading.
Well, at least here double-tap to zoom works :)
I tested the last one on N9. It's very snappy, characters are good. (medium size)
Download not working, the characters not good when you choose small size.
Is it possible, that the zoom to pinch not working?
I can confirm that download is indeed not working on the N9 emulator although on the N900 emulator it is. Strangely enough
the same code base used but perhaps there are some JSR 75 incompatibilities with the underlying platform.
Cheers,
Davy
I can confirm that download is indeed not working on the N9 emulator although on the N900 emulator it is. Strangely enough
the same code base used but perhaps there are some JSR 75 incompatibilities with the underlying platform.
Cheers,
Davy
I figured out the problem. The directory /media/mmc1 does not
exist on the N9 by default like on the N900. If you create this
directory the problem should be fixed.
To avoid further problems like this, I am going to map the /Storage
virtual folder on /media (which I presume will always be there).
Davy
munozferna
2012-02-08, 18:58
I figured out the problem. The directory /media/mmc1 does not
exist on the N9 by default like on the N900. If you create this
directory the problem should be fixed.
To avoid further problems like this, I am going to map the /Storage
virtual folder on /media (which I presume will always be there).
Davy
Maybe you should use /home/user/MyDocs instead. That way the downloads the saved to the eMMC instead of the nand flash, and it will work on n9 and n900.
vi_, $10 USD from me.
Maybe you should use /home/user/MyDocs instead. That way the downloads the saved to the eMMC instead of the nand flash, and it will work on n9 and n900.
The /Private virtual folder is already mapped on /home/user/MyDocs
The builds have been updated online with the following mappings:
/Storage -> /media
/Private -> /home/user/MyDocs
/PIMdb -> midp/midp_linux_fb_gcc/appdb/pimdb
/FileSystem -> /
Perhaps I should get rid of the /Storage and /Private virtual folders
and add just one /MyDocs virtual folder which maps onto
/home/user/MyDocs. This might be more intuitive for N9xx
owners. What do you think/prefer?
Davy
Hello, i tried other java games.
When it ask me to use the number bottons like 1,3,4,6,8, which botton should i use on the n900?
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
MaddogG - £8.34
Jaylist - £10.24
munozferna - £6.31
Total = £58.95
FSCK.DONATION /dev/davyP ... /
|------------------------------>*****|85% Complete
vi - £15.72
Darkgunman - £10
Nicolai - £8.34
MaddogG - £8.34
Jaylist - £10.24
munozferna - £6.31
Mrsellout - £10
Total = £68.95
__ _____ ___ _____
\ \ / / _ \ / _ \_ _|
\ \ /\ / / | | | | | || |
\ V V /| |_| | |_| || |
\_/\_/ \___/ \___/ |_|
http://images.pictureshunt.com/pics/f/finished_rubiks_cube-13770.jpg
We have enough! PM containing my paypal address sent to the donators above. If anyone still wants to contribute there is still the need to cover postage, £5 will probably cover it. Either way, I am going to get the n900 now...
munozferna, you need to enable private messages so I can send you my paypal account details. Cheers brah.
We have enough! PM containing my paypal address sent to the donators above. If anyone still wants to contribute there is still the need to cover postage, £5 will probably cover it. Either way, I am going to get the n900 now...
Thank you to all the donators, and especially to vi_ for the effort
put into collecting the donations :-)
I am looking forward to run my port on a real device!
Davy
munozferna
2012-02-08, 21:00
munozferna, you need to enable private messages so I can send you my paypal account details. Cheers brah.
hey, I can't enable PM as I have not verified my email address, but the verification message is not getting on my inbox so.. can you mail me the paypal add
f [at] beford.net
or just post it here :D
Hello, i tried other java games.
When it ask me to use the number bottons like 1,3,4,6,8, which botton should i use on the n900?
Normally you would have to enter the key combinations that
would produce the 1,3,5,6,8 digits. However, on a N900 I guess
these buttons don't make as much sense for gameplay as on a
regular feature phone.
I have to map Qt4 key events onto other events that phoneME
understands. I guess it should be possible to add an alternative
keymapping where these digits are mapped onto other buttons
more suitable for gameplay (with a special key combo to swap
between keymappings).
Davy
Count me in, donating 10€.
branek
Here are some preliminary build instructions. The patches aren't
fully ready, but even without them the dual stack configuration
should build:
http://davy.preuveneers.be/phoneme/?q=node/35
There are several more build steps required before you can run
midlets, but you could try to run the test application:
bin/cvm -cp testclasses.zip Test
Regards
Davy
The checkout.sh and build.sh aren't accessible, and the path
file cdc.diff is empty.
The webserver seems to block shell scripts :-(. I tar-gzip'ed them in the scripts.tgz archive.
I added a few more patches (not sure if I need them all), but there are still a few I need to create. However, check first if you can build the software without applying the patches. If that works, then at least your toolchain is set up correctly.
Davy
Can you please improve the virtual keyboard of PhoneME Davy? It's a bit too small on Nokia N9
I'm trying to use a java chat client and it crash somtimes. The program crashed when it gives me a question and I tried to answer yes or no.
I got this error messages : catched signal 11
QThread : Destroyed while thread is still running
[DarkGUNMAN]
2012-02-09, 07:28
The virtual keyboard is from Opera Mini, so there is nothing that can be done regarding the size of it. The only other way that would improve would be if PhoneMe was able to call the system keyboard.
Arthuro_Adam
2012-02-09, 07:33
Maybe you should use /home/user/MyDocs instead. That way the downloads the saved to the eMMC instead of the nand flash, and it will work on n9 and n900.The /Private virtual folder is already mapped on /home/user/MyDocs
The builds have been updated online with the following mappings:
/Storage -> /media
/Private -> /home/user/MyDocs
/PIMdb -> midp/midp_linux_fb_gcc/appdb/pimdb
/FileSystem -> /
Perhaps I should get rid of the /Storage and /Private virtual folders
and add just one /MyDocs virtual folder which maps onto
/home/user/MyDocs. This might be more intuitive for N9xx
owners. What do you think/prefer?
Davy
I think MyDocs is enough.
Arthuro_Adam
2012-02-09, 07:35
zoom to pinch is supported by opera mobile.
opera mini on symbian only supports double-tap to zoom which is missing in this version as the page is by default zoomed to optimal level for reading.Well, at least here double-tap to zoom works :)
I thought the double-tap to zoom. It should work in the Opera Mini?
;1162519']The virtual keyboard is from Opera Mini, so there is nothing that can be done regarding the size of it. The only other way that would improve would be if PhoneMe was able to call the system keyboard.
There is also one in phoneME, but it is a pretty ugly one (and not really that useful as it does not scale to the full width of the screen).
Davy
Anyone who has not fulfilled their pledge can you do so now so we can finish this thing...
munozferna
2012-02-09, 17:52
Anyone who has not fulfilled their pledge can you do so now so we can finish this thing...
money sent :)
PanzerSajt
2012-02-09, 17:55
I have tested out the latest version. (Foundation_Profile_MIDP_HiRes-phoneme_advanced_mr2_b168-linux_arm_n900-bin-rev20547-20120208.tgz)
Opera mini 6 can see all the filesystems on my n900 but the downloading fails. The text rendering is awesome. The font is perfect and the rendering is as fast as it was before the introduction of the new font system.
Edit.: I managed to enter into a strange menu. When I press ctrl+t a joystick like thing appears. I don't know what is it for or how can I use it because touching it seem to do nothing.
Edit2.:When I turn on ladscape mode in opera mini 6 the screen rotates but in the wrong direction. But when I turn off landscape in opera mini 6 and enable maemo's screen rotation everything work fine. Opera mini 6 rotates and scales everything again.
I hope this project will develop, and we can play j2me games on the device.
Thanks a lot for your efforts.
Since i am no java developer, does anyone have an idea how this can be run (if at all) using Phoneme?
i tried several commands (taking base ones from the sh files supplied in the tar) but was unsuccessful.
This application is very important for me - it is a BT/Network remote control which i usually use from a palm tungsten 3.
The jar itself runs fine on a sony erricson but i was unable to make it work on the N900.
Any help would be appreciated.
freemangordon
2012-02-10, 14:04
Since i am no java developer, does anyone have an idea how this can be run (if at all) using Phoneme?
i tried several commands (taking base ones from the sh files supplied in the tar) but was unsuccessful.
This application is very important for me - it is a BT/Network remote control which i usually use from a palm tungsten 3.
The jar itself runs fine on a sony erricson but i was unable to make it work on the N900.
Any help would be appreciated.
/opt/phoneme# cat SallingClicker.sh
#!/bin/sh
$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath SallingClicker.jar -jadpath SallingClicker.jad -1 com.salling.ClickerMIDlet
It runs, but of course it cannot open BlueTooth, so you're given a message "Device Inquiry Failed"
BTW I am not Java developer too :p
/opt/phoneme# cat SallingClicker.sh
#!/bin/sh
$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath SallingClicker.jar -jadpath SallingClicker.jad -1 com.salling.ClickerMIDlet
It runs, but of course it cannot open BlueTooth, so you're given a message "Device Inquiry Failed"
BTW I am not Java developer too :p
Thanks for the help - i can see it runs :)
well, salling clicker has many versions - one of them for the palm tungsten 3 which can also work with a network ip - i thought the java version will also allow this
Is there a way to enable bluetooth recognition by these types of applications?
It truly is a great one.
freemangordon
2012-02-10, 14:27
Thanks for the help - i can see it runs :)
well, salling clicker has many versions - one of them for the palm tungsten 3 which can also work with a network ip - i thought the java version will also allow this
It's a great application.
I quickly look through the code and it seems this one can connect using IP, unfortunately it seeks some local IP settings which most probably don't exists. BTW what this application does?
Thanks for the help - i can see it runs :)
well, salling clicker has many versions - one of them for the palm tungsten 3 which can also work with a network ip - i thought the java version will also allow this
Is there a way to enable bluetooth recognition by these types of applications?
It truly is a great one.
Looking at the supported devices on their website it looks like any phone which uses the Java version doesn't support WiFi. Shame as I use Salling Clicker on my symbian phones and it is very useful.
I quickly look through the code and it seems this one can connect using IP, unfortunately it seeks some local IP settings which most probably don't exists. BTW what this application does? It's basically a PC remote control app, allowing to control applications, mouse etc from the phone.
[DarkGUNMAN]
2012-02-10, 14:46
Donation for Davy's N900 sent
This is a really great work. It has allowed me to play to the only one game I ever play, which is Sid Meiers Civilization.
You will need a legit java jar file(e.g. sidciv.jar), then It run to me invoking the follwing cmd:
bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.lib
rary.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.m
ainClass.name=com.sun.midp.main.CdcMIDletSuiteLoad er sun.misc.MIDPLauncher -suit
epath sidciv.jar -1 GloftCIVI
Do you guys know an easy way to call a shell script and place it in the launcher?
How can you control the game . im stuck at the chosing language screen and can't do anything
How can you control the game . im stuck at the chosing language screen and can't do anything
are you refering to my post?
I quickly look through the code and it seems this one can connect using IP, unfortunately it seeks some local IP settings which most probably don't exists. BTW what this application does?
It basically allows to do everything on a computer with windows using the remote.
It exposes Server side API for UI in javascript (it comes with many already made scripts to control Winamp, BSPlayer, Media Player etc.)
I wrote many scripts for it for my media center machine at home.
I currently use it to control BSPlayer, WinAmp, PowerDVD, ACDSee, DVB recorded and live TV (using media center of Win7) , Audio mixer, Mouse pad, system operations (restart/shutdown/sleep) and many more...
The client side remote is interactive - you can actually see the point in a movie/music track you're at, change it, and see the name of tracks/active media on the remote itself.
are you refering to my post?
yes itried to play Sid meier civilazation . i got the .jar for 5800 but can't play with it
yes itried to play Sid meier civilazation . i got the .jar for 5800 but can't play with it
The game is touchpad based, no need to do anything.
I tested a filename such as "Sid_Meiers_Civilization_V_Mobile_Nokia_5800_EN_IGP _EU_TS_103", be sure you are using the correct .jar file.
The game runs very quick, the only issue is that only cover 2/3 parts of the screen.
I can run the game now and yes it's not in full screen
marmistrz
2012-02-10, 17:14
Is the .jad file required? Or is .jar sufficient?
The game is touchpad based, no need to do anything.
I tested a filename such as "Sid_Meiers_Civilization_V_Mobile_Nokia_5800_EN_IGP _EU_TS_103", be sure you are using the correct .jar file.
The game runs very quick, the only issue is that only cover 2/3 parts of the screen.
If you have the CSSU update, press ctrl+shift+S to zoom in.
If you have the CSSU update, press ctrl+shift+S to zoom in.
On the N900: Press Ctrl+Arrow Up to switch between full screen and
normal layout.
If the game canvas itself is hardcoded to a low resolution, use the zoom in CSSU trick.
Davy
Is the .jad file required? Or is .jar sufficient?
In most cases the JAR is sufficient, as you can find the name of the
main class in the MANIFEST.MF in the jar file.
However, in some cases the JAD file contains additional key value
pairs not in the manifest that the application might rely on.
Davy
Thanks for the help - i can see it runs :)
well, salling clicker has many versions - one of them for the palm tungsten 3 which can also work with a network ip - i thought the java version will also allow this
Is there a way to enable bluetooth recognition by these types of applications?
It truly is a great one.
Bluetooth requires JSR 82 support, which is currently not available
in the phoneME port. Adding this feature may require some effort
depending on the native bluetooth stack of the N900,
Davy
marmistrz
2012-02-10, 18:39
If you have the CSSU update, press ctrl+shift+S to zoom in.
And how to move the zoomed part (so that I can see what's right from it)?
And how to move the zoomed part (so that I can see what's right from it)?
move it using the touch screen. If you used ctrl+up to set up it on fullscreen, you won't be able to move it.
santiago
2012-02-10, 19:57
Hi Davy, is it possible to change the phoneme font size? I changed the system font size, the phoneme UI font is'nt correct, how can i fix it?
marmistrz
2012-02-10, 20:42
move it using the touch screen. If you used ctrl+up to set up it on fullscreen, you won't be able to move it.
Thanks, seems it's a hildon-desktop problem that on desktop I cannot move it (or it's very hard). I'll report it as a bug.
PanzerSajt
2012-02-10, 21:15
I have succesfully started some games but the problem is that I can't use the traditional layout so the numbers and special keys # * are not working therefore I can't play games that aren't made for touch java phones.
Hi Davy, is it possible to change the phoneme font size? I changed the system font size, the phoneme UI font is'nt correct, how can i fix it?
The phoneME defines 3 different font sizes:
Small -> 18
Medium -> 26
Large -> 32
At this point, these font sizes are fixed. To ensure that text is
rendered correctly, I take into account the ascent, descent and
leading information of the font.
If you say that the phoneME UI font isn't correct, can you perhaps
make a screenshot of the problem so that I understand what is
going on (as I assume it is not going to be a font size issue).
Davy
I have succesfully started some games but the problem is that I can't use the traditional layout so the numbers and special keys # * are not working therefore I can't play games that aren't made for touch java phones.
The only solution is that I come up with an alternative keymapping
so that game play with typical feature phone buttons is also possible
on a N900.
This is not a trivial feature, but I added it to my feature todo list:
http://davy.preuveneers.be/phoneme/?q=node/34#todo
If there are other feature requests not in this list, let me know
(though I cannot promise I will/can implement them all).
Davy
PanzerSajt
2012-02-10, 21:38
The only solution is that I come up with an alternative keymapping
so that game play with typical feature phone buttons is also possible
on a N900.
This is not a trivial feature, but I added it to my feature todo list:
http://davy.preuveneers.be/phoneme/?q=node/34#todo
If there are other feature requests not in this list, let me know
(though I cannot promise I will/can implement them all).
Davy
Thanks for your efforts! ;)
santiago
2012-02-10, 21:58
The phoneME defines 3 different font sizes:
Small -> 18
Medium -> 26
Large -> 32
At this point, these font sizes are fixed. To ensure that text is
rendered correctly, I take into account the ascent, descent and
leading information of the font.
If you say that the phoneME UI font isn't correct, can you perhaps
make a screenshot of the problem so that I understand what is
going on (as I assume it is not going to be a font size issue).
Davy
Thx for the answer, i mean this
kind of size i see..
Other thing.. can you add this to the phoneme for maemo? It creates a jad from a jar file ;)
#!/bin/bash
FILE=$1
if [ ! -f "${FILE}" ]; then
echo "Select an input file first!"
exit 1
fi
JAD="${FILE%.*}.jad"
if [ -f "${JAD}" ]; then
echo "${JAD} Already exists, overwrite the file? (y/N)"
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "yes" ]; then
echo "Not overwriting ${JAD} file!"
exit 1
else
rm -f "${JAD}"
fi
fi
unzip -aa -j -p ${FILE} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${FILE}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat %s "${FILE}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file Created!"
exit 0
i saved like jadmaker on /usr/bin/. to create a jad file starting from a jar, now i simple digit
jadmaker /path/jarfilename.jar
and it makes the jad file just becouse sometimes we need a jad file too..
Thx for the answer, i mean this
kind of size i see..
Other thing.. can you add this to the phoneme for maemo? It creates a jad from a jar file ;)
#!/bin/bash
FILE=$1
if [ ! -f "${FILE}" ]; then
echo "Select an input file first!"
exit 1
fi
JAD="${FILE%.*}.jad"
if [ -f "${JAD}" ]; then
echo "${JAD} Already exists, overwrite the file? (y/N)"
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "yes" ]; then
echo "Not overwriting ${JAD} file!"
exit 1
else
rm -f "${JAD}"
fi
fi
unzip -aa -j -p ${FILE} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${FILE}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat %s "${FILE}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file Created!"
exit 0
i saved like jadmaker on /usr/bin/. to create a jad file starting from a jar, now i simple digit
jadmaker /path/jarfilename.jar
and it makes the jad file just becouse sometimes we need a jad file too..
Hehe, I actually already had a similar script like yours as well as
another one to create the shell script. I will put them both in my
next build.
I see what you mean with the font issue. I will check again if I did
not make any mistake with the font anchor points.
Davy
santiago
2012-02-10, 22:31
Hehe, I actually already had a similar script like yours as well as
another one to create the shell script. I will put them both in my
next build.
I see what you mean with the font issue. I will check again if I did
not make any mistake with the font anchor points.
Davy
thx Davy! u r the best!!
If you have the CSSU update, press ctrl+shift+S to zoom in.
Thanks for the tip! Unfortunately this is not working in my n9. I tried to send the keys on the shell process, but no effect on the game. Is there another way to scale it up?
Thanks for the tip! Unfortunately this is not working in my n9. I tried to send the keys on the shell process, but no effect on the game. Is there another way to scale it up?
That's for the n900. I think that there is no CSSU update for the N9.
Thanks, seems it's a hildon-desktop problem that on desktop I cannot move it (or it's very hard). I'll report it as a bug.
You can not move it on the desktop. But you can do it on a windows like contatcs.
If the game is touchscreen only, i think that this tip won't be useful.
I tried to add these lines in the manifest file of Sid meier game but no luck :
Nokia-MIDlet-Original-Display-Size: 640,360
Nokia-MIDlet-Target-Display-Size: 854,480
Nokia-MIDlet-App-Orientation: landscape
I tried to add these lines in the manifest file of Sid meier game but no luck :
This is Nokia specific stuff, and only works if you have a Java ME
runtime (and some other custom APIs) from Nokia .
phoneME is an open source implementation of Java ME, initially
developed by Sun, and now Oracle, with ports to different hardware
platforms by me. It does not have these Nokia extensions.
Cheers,
Davy
PanzerSajt
2012-02-11, 10:57
I was trying to create a shell script for making some other shell scripts with which you can start the java applications. I'm not very good at linux but I'm wiling to learn. ;)
I have figured out how to make this for one file. It runs perfectly but still missing that part to recognise the main calss from META-INF. I have commented out that lines because they are not working.
So there are two problems:
To apply this script for a bunch of files in a folder.
Get the main class out of the jar file and write it in the starter script.
FILE="coffinboff7uk1jctt.jar"
#FILEZIP="coffinboff7uk1jctt.zip"
echo -n "/home/phoneme/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/home/phoneme/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/phoneme/apps/"${FILE%%.*}.${FILE#*.} -1 "" > /home/phoneme/starters/"${FILE%%.*}.sh"
chmod +x /home/phoneme/starters/*.sh
#mv $FILE ${FILE%%.*}.zip
#cp /home/phoneme/apps/waiting/$FILEZIP /home/phoneme/apps/waiting/tmp
#unzip /home/phoneme/apps/waiting/tmp/$FILEZIP
Joseph9560
2012-02-12, 02:00
It would be great if something like webos games manager is developed for phone me as well.
Associate .jar and .jad with this app.
Install shortcuts menu by clicking in the jar file
Launch the file directly from hildon-menu just like any other app.
So that noobs don't have to play with scripts and command line to run apps.
thanks!
It would be great if something like webos games manager is developed for phone me as well.
Associate .jar and .jad with this app.
Install shortcuts menu by clicking in the jar file
Launch the file directly from hildon-menu just like any other app.
So that noobs don't have to play with scripts and command line to run apps.
thanks!
Actually, I have done something similar for my Android port. I
wrote a simple midlet manager:
http://davy.preuveneers.be/phoneme/public/image/android/android_midp.png
If you click on a jad file in a file manager or on a jad link in a
browser, it will download and cache the corresponding jar file, add
a short cut in the midlet manager, and you would be able to run it
from there, or delete it, or ... without having to rely on shell scripts.
It doesn't create separate icons for each midlet in the main menu,
because in theory you can have multiple midlet applications in the
same midlet jad/jar file. I did this because I got these reports that
some people tried to delete one app, but noticed that a few others
stopped working as well. That is why everything goes through the
midlet manager, for which on Android there is an icon in the main
menu.
Another nice thing with the midlet manager is you can add a list of
urls to working midlets (like a midlet store), and leave it up to the
users whether they want to download and run it or not.
Unfortunately, this app is written in Java running on the Android
dalvik VM. For N900, this would have to rewritten completely from
scratch, for example in Qt4, but it would not be impossible.
There are two aspects you have to keep in mind though:
1) not all jar files are midlets, so I would argue to only associate
jad files to this app
2) error handling and reporting is a little bit less straightforward.
You have to make sure you can collect all the information you
need so that noobs can do bug reporting too. Otherwise, you get
eports like "my app does not work, can you fix it?". And this is not
really helpful.
Davy
santiago
2012-02-12, 10:31
to associate jar/jad file is last step i think, it's easy with dbus, can be created a bash executable file that find the midlet class automatically and creates a .desktop file.. i'lll try this week maybe if i've time, but Davy is doing a good work, let's him free to include basically features like jsr and his todo/hopefully features, isn't hard for the moment to create a sh script witch runs the applet u want
guilledoc
2012-02-12, 11:30
isn't hard for the moment to create a sh script witch runs the applet u want
Sorry for out of topic, but what about a nnoob how to create those sh script?
thanks
I will include the script to do that in my next build. I have I have time today,
I will upload a new build to my website.
Davy
to associate jar/jad file is last step i think, it's easy with dbus, can be created a bash executable file that find the midlet class automatically and creates a .desktop file.. i'lll try this week maybe if i've time, but Davy is doing a good work, let's him free to include basically features like jsr and his todo/hopefully features, isn't hard for the moment to create a sh script witch runs the applet u want
Hi Santiago,
While trying out your script I noticed I had to modify the stat
command 'stat %s "${FILE}"' to 'stat -c %s "${FILE}"' (i.e. add the
'-c' parameter.
There are new builds on my website. There is a link to a
makejadsh script to create missing jad files and shell script to run
the midlet. It is also included in the archives.
http://davy.preuveneers.be/phoneme/public/n900/scripts/makejadsh
I applied some minor tweaks on the fonts. I am especially
interested in feedback from people who are using 'non standard'
fonts, preferably with screenshots.
Also, don't worry if you are getting the following error:
Java VM panic: (null)
Aborted
I still have to figure out a clean way to shut down at the same time
both the phoneME vm running in one thread and the Qt4 gui
doing all the screen updates and the key/pointer events in
another thread (and for that I need to trap calls to exit() in the
phoneME vm and do a lot of other stuff to ensure that the Qt4 gui
thread does not segfault) .
Davy
PanzerSajt
2012-02-12, 13:35
Hi Santiago,
While trying out your script I noticed I had to modify the stat
command 'stat %s "${FILE}"' to 'stat -c %s "${FILE}"' (i.e. add the
'-c' parameter.
There are new builds on my website. There is a link to a
makejadsh script to create missing jad files and shell script to run
the midlet. It is also included in the archives.
http://davy.preuveneers.be/phoneme/public/n900/scripts/makejadsh
I applied some minor tweaks on the fonts. I am especially
interested in feedback from people who are using 'non standard'
fonts, preferably with screenshots.
Also, don't worry if you are getting the following error:
Java VM panic: (null)
Aborted
I still have to figure out a clean way to shut down at the same time
both the phoneME vm running in one thread and the Qt4 gui
doing all the screen updates and the key/pointer events in
another thread (and for that I need to trap calls to exit() in the
phoneME vm and do a lot of other stuff to ensure that the Qt4 gui
thread does not segfault) .
Davy
Thanks for the new makejad.sh script. I have created another script which applies your script to every single .jar file in a folder.
You have to put all the .jar files the makejad.sh and this script in one folder and it perfectly works.
#!/bin/bash
for FILE in /path/to/jar/files/*.jar
do
/path/to/jar/files/makejad.sh ${FILE%%.*}.${FILE#*.}
done
santiago
2012-02-12, 13:43
Hi Santiago,
While trying out your script I noticed I had to modify the stat
command 'stat %s "${FILE}"' to 'stat -c %s "${FILE}"' (i.e. add the
'-c' parameter.
There are new builds on my website. There is a link to a
makejadsh script to create missing jad files and shell script to run
the midlet. It is also included in the archives.
http://davy.preuveneers.be/phoneme/public/n900/scripts/makejadsh
I applied some minor tweaks on the fonts. I am especially
interested in feedback from people who are using 'non standard'
fonts, preferably with screenshots.
Also, don't worry if you are getting the following error:
Java VM panic: (null)
Aborted
I still have to figure out a clean way to shut down at the same time
both the phoneME vm running in one thread and the Qt4 gui
doing all the screen updates and the key/pointer events in
another thread (and for that I need to trap calls to exit() in the
phoneME vm and do a lot of other stuff to ensure that the Qt4 gui
thread does not segfault) .
Davy
hey ;) thx then we have all the necessaries files :D ok i try the new build now and i'll post some screenshots about it ;)
thx davy!
:D you made my day!!! everything seems to be ok!!! THXXXXX
hey ;) thx then we have all the necessaries files :D ok i try the new build now and i'll post some screenshots about it ;)
thx davy!
:D you made my day!!! everything seems to be ok!!! THXXXXX
Yes, I fixed an issue with the y-offset in the anchor point position
that only occurred when drawing text with a vertical alignment
different from the default one.
Davy
pvnhattoan
2012-02-13, 06:19
@DavyP: Can you upload your "makejad.sh" file??
@DavyP: Can you upload your "makejad.sh" file??
Look at the many posts above. It is available at:
http://davy.preuveneers.be/phoneme/public/n900/scripts/makejadsh
Davy
[DarkGUNMAN]
2012-02-13, 08:56
No problems with the new build so far.
Text anchoring with alternate font tested with Tahoma, looks fine.
I see the active class is now listed in the window title :)
;1164323']No problems with the new build so far.
Text anchoring with alternate font tested with Tahoma, looks fine.
I see the active class is now listed in the window title :)
Yes, I took the main class name because it was quicker to implement
(na parsing of jad or manifest files required) and this way you can
also distinguish different midlets in the same jar file.
Davy
Just got it, geeze what a beater. Filled with photos of the previous owners kids (I hope) and porn. Digitiser is totally scratched to F. It is like looking through a frosted glass toilet window, however it is still useable.
Full re-flash, CSSU stable, KP49, SSH, rootsh. I am soldering down the USB port now, also it is a HW. Rev 2101.
http://www.picturehost.eu/uploads/b087486b1b1414dc5fda0b160bafb1cd_n900thumb.jpg
santiago
2012-02-13, 19:22
DavyP, i just edited something in the Makejadsh, by the way feel free to edit as u want.. Now it creates the Right shortcut, but i missed something about unzip $JAR "specific file and parameters that i miss.." -destination $MIDLET_NAME.png, then i left it like this and i used "java" icon in my path then..
To invoke it, i moved it on /usr/bin/, ahh, one more thing, if i leave $PWD path, it searches for /home, then i inserted the complete path, assuming it like /home/phoneme/..
this is the script, everything works fine for me ;)
#!/bin/sh
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Welcome to MakeJadSHortcutter!"
sleep 2
JAR=$1
if [ ! -f "${JAR}" ]; then
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"JAR file does not exist!" && sleep 3
echo "Usage: makejadsh JAR file";
exit 1
fi
JAD="${JAR%.*}.jad"
if [ -f "${JAD}" ]; then
echo -n "${JAD} already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${JAD} file!"
else
rm -f "${JAD}"
fi
fi
if [ ! -f "${JAD}" ]; then
unzip -aa -j -p ${JAR} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${JAR}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat "${JAR}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file created!"
MIDLET_ICON=`grep "MIDlet-Icon: " $JAD | sed "s/\MIDlet-Icon://g" | sed 's/\///g'`
# more here
fi
SH="${JAR%.*}.sh"
if [ -f "${SH}" ]; then
echo -n "${SH} Already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${SH} file!"
else
rm -f "${SH}"
fi
fi
if [ ! -f "${SH}" ]; then
MAINCLASS=`cat $JAD | grep 'MIDlet-1:' | cut -d ',' -f 3`
READLINKJAR=`readlink -f $JAR`
echo '#!/bin/sh' > $SH
echo '' >> $SH
echo '/home/user/phoneme/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/home/user/phoneme/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath' $READLINKJAR '-jadpath' $JAD -1 $MAINCLASS >> $SH
chmod a+x $SH
echo "${SH} file created!"
READLINK=`readlink -f $SH`
# MIDLET_ICON=`grep "MIDlet-Icon: " $JAD | sed /MIDlet-Icon:/s///`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s///`
MIDLET_VERSION=`grep "MIDlet-Version: " $JAD | sed /MIDlet-Version:/s///`
echo -e "[Desktop Entry]
Encoding=UTF-8
Version=$MIDLET_VERSION
Type=Application
Name=$MIDLET_NAME
Exec=.$READLINK
X-Osso-Type=application/x-executable
Terminal=true
Icon=java" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
sleep 6
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Created! The $MIDLET_NAME shortcut is now on the Menu"
echo "$MIDLET_NAME added as a .desktop shortcut"
sleep 4 ; else
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Unable to create $MIDLET_NAME.desktop file, check the ownership and try again!"
sleep 2
echo "Unable to add $MIDLET_NAME added as a .desktop shortcut, check the ownership!"
fi
exit 0
DavyP, i just edited something in the Makejadsh, by the way feel free to edit as u want..
Nice, I was already exploring dbus and will definitely have a look
at the changes in your script and include it my next build.
The reason why I used the $PWD variable, is because I am not
sure where people unpack this application. In my case with the
emulator, it is in /home/developer/phoneme but on a real device
this would be in /home/user/phoneme. I probably should have
used some shell script tricks to figure out the location of the
midlet scripts, but maybe these problems can be more easily
solved if I would package the phoneME application in a deb file
rather than in a tgz file you have to unpack manually.
Cheers,
Davy
santiago
2012-02-13, 22:35
Nice, I was already exploring dbus and will definitely have a look
at the changes in your script and include it my next build.
The reason why I used the $PWD variable, is because I am not
sure where people unpack this application. In my case with the
emulator, it is in /home/developer/phoneme but on a real device
this would be in /home/user/phoneme. I probably should have
used some shell script tricks to figure out the location of the
midlet scripts, but maybe these problems can be more easily
solved if I would package the phoneME application in a deb file
rather than in a tgz file you have to unpack manually.
Cheers,
Davy
hey bro! ;)
is there a way to select some buttons? i add screenshots some games works! :D i'm trying The Wolfman, i add a screenshot of what i cannot push as a button event. By the way, the correct path for the phoneme, like standard optifyed apps is
/opt/phoneme, i left /home/phoneme becouse your How-to say this, just to not complicate the things to the newbies that try to run it from a shel command
i think is better to symlink the CVM binary and the gcc library like follow
/usr/bin/cvm (full or symlinked to the opt)
/usr/lib/libcvm.so (full or symlinked to the opt)
i add a screenshot of what i cannot push..
edit: just the Enter Button is mapped in phoneme?
in this game i cannot use other keys just the Enter Button.. is it caused by the jsr implementation? by the way it's an amazing JVM!
hey bro! ;)
is there a way to select some buttons? i add screenshots some games works! :D i'm trying The Wolfman, i add a screenshot of what i cannot push as a button event. By the way, the correct path for the phoneme, like standard optifyed apps is
/opt/phoneme, i left /home/phoneme becouse your How-to say this, just to not complicate the things to the newbies that try to run it from a shel command
i think is better to symlink the CVM binary and the gcc library like follow
/usr/bin/cvm (full or symlinked to the opt)
/usr/lib/libcvm.so (full or symlinked to the opt)
i add a screenshot of what i cannot push..
edit: just the Enter Button is mapped in phoneme?
in this game i cannot use other keys just the Enter Button.. is it caused by the jsr implementation? by the way it's an amazing JVM!
About the buttons: the left and right soft buttons are mapped onto
Ctrl+Left and Ctrl+Right.
However, I think this game like many others suffers from not
having a keyboard layout like on a feature phone. At the moment,
I am not having a lot of spare time to add an alternative
keymapping, but it will be one of the features I will look into first.
Davy
santiago
2012-02-14, 00:55
About the buttons: the left and right soft buttons are mapped onto
Ctrl+Left and Ctrl+Right.
However, I think this game like many others suffers from not
having a keyboard layout like on a feature phone. At the moment,
I am not having a lot of spare time to add an alternative
keymapping, but it will be one of the features I will look into first.
Davy
one thing more,
the midlet extract midi temporany files in the /tmp, will be nice and light to move the temp in /home/user/MyDocs/phoneme-cache/ becouse it has much more space and, with more maemo tools we can access directly to every temp single file on it (logs, midi, mp3, or more..)
thx for you big work,
Cristian
munozferna
2012-02-14, 01:13
one thing more,
the midlet extract midi temporany files in the /tmp, will be nice and light to move the temp in /home/user/MyDocs/phoneme-cache/ becouse it has much more space and, with more maemo tools we can access directly to every temp single file on it (logs, midi, mp3, or more..)
thx for you big work,
Cristian
This recommendation also makes sense for n9, for unknown reasons the /tmp is just 4Mb on Harmattan.
Joseph9560
2012-02-14, 06:17
1) not all jar files are midlets, so I would argue to only associate
jad files to this app
Davy
Maybe having option to tick jar file (not checked/ticked by default) would be better then.
Arthuro_Adam
2012-02-14, 07:11
Last build works great on N9, download in Opera Mini also works. Double tap to zoom not working.
santiago
2012-02-14, 08:10
Maybe having option to tick jar file (not checked/ticked by default) would be better then.
? why do u want to tick / untick them?
run the script for the midlet you want ;)
i go to sleep :) when i'll be ok, i'll add a string to remove the jar, jar, .desktop file of a game/app you want to remove
zzz ZZZZ zzz ZZZz goodnight you all
, but i missed something about unzip $JAR "specific file and parameters that i miss.." -destination $MIDLET_NAME.png, then i left it like this and i used "java" icon in my path then..
The unzip package is not available on the emulator
/home/developer $ devrootsh apt-get update
/home/developer $ devrootsh apt-get install unzip
...
E: Package unzip has no installation candidate
/home/developer $ devrootsh apt-cache search unzip
zlib-bin - compression library - sample programs
busybox-power - Tiny utilities for small and embedded systems - enhanced package
So I had to install the busybox-power package. However, the unzip implementation it provides does not support the -aa -j command line switches:
BusyBox v1.19.3 (Debian 1.19.3power1) multi-call binary.
Usage: unzip [-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]
Extract files from ZIP archives
-l List archive contents (with -q for short form)
-n Never overwrite files (default)
-o Overwrite
-p Send output to stdout
-q Quiet
-x XLST Exclude these files
-d DIR Extract files into DIR
Davy
The modified script that also creates the icons does not seem to work.
The application is running in the background and all the paths are OK
but as soon as I tap on the icon, the whole interface becomes
unresponsive. I actually have to shut down the whole emulator and start
it up again.
Strangely enough, if start the X terminal application in the N900 menu,
and run the script from there, I have no problem, and neither when I
start a terminal from my Linux desktop via the "mad remote shell"
command.
Davy
santiago
2012-02-14, 16:56
The modified script that also creates the icons does not seem to work.
The application is running in the background and all the paths are OK
but as soon as I tap on the icon, the whole interface becomes
unresponsive. I actually have to shut down the whole emulator and start
it up again.
Strangely enough, if start the X terminal application in the N900 menu,
and run the script from there, I have no problem, and neither when I
start a terminal from my Linux desktop via the "mad remote shell"
command.
Davy
Hi bro! try this script, now it uses Original icon on a Jar file and moves it like a copy into /usr/share/icons/hicolor/scalable/hildon/$MIDLET_NAME.png
edit: open the sh file you have (midletname.sh) and change the phoneme path there
remember? you told me you have a different path in you Madde emulator
#!/bin/sh
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Welcome to MakeJadSHortcutter!"
sleep 2
JAR=$1
if [ ! -f "${JAR}" ]; then
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"JAR file does not exist!" && sleep 3
echo "Usage: makejadsh JAR file";
exit 1
fi
JAD="${JAR%.*}.jad"
if [ -f "${JAD}" ]; then
echo -n "${JAD} already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${JAD} file!"
else
rm -f "${JAD}"
fi
fi
if [ ! -f "${JAD}" ]; then
unzip -aa -j -p ${JAR} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${JAR}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat "${JAR}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file created!"
MIDLET_ICON=`grep "MIDlet-Icon: " $JAD | sed "s/\MIDlet-Icon://g" | sed 's/\///g' | sed 's/^[ \t]*//'`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s///`
UNZIP_ICON=`unzip "$JAR" "$MIDLET_ICON" -d /usr/share/icons/hicolor/scalable/hildon/`
RENAME_ICON=`mv "/usr/share/icons/hicolor/scalable/hildon/$MIDLET_ICON" "/usr/share/icons/hicolor/scalable/hildon/$MIDLET_NAME.png"`
fi
SH="${JAR%.*}.sh"
if [ -f "${SH}" ]; then
echo -n "${SH} Already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${SH} file!"
else
rm -f "${SH}"
fi
fi
if [ ! -f "${SH}" ]; then
MAINCLASS=`cat $JAD | grep 'MIDlet-1:' | cut -d ',' -f 3`
READLINKJAR=`readlink -f $JAR`
echo '#!/bin/sh' > $SH
echo '' >> $SH
echo '/home/user/phoneme/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/home/user/phoneme/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath' $READLINKJAR '-jadpath' $JAD -1 $MAINCLASS >> $SH
chmod a+x $SH
echo "${SH} file created!"
READLINK=`readlink -f $SH`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s///`
MIDLET_VERSION=`grep "MIDlet-Version: " $JAD | sed /MIDlet-Version:/s///`
echo -e "[Desktop Entry]
Encoding=UTF-8
Version=$MIDLET_VERSION
Type=Application
Name=$MIDLET_NAME
Exec=.$READLINK
X-Osso-Type=application/x-executable
Terminal=true
Icon=$MIDLET_NAME" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
sleep 6
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Created! The $MIDLET_NAME shortcut is now on the Menu"
echo "$MIDLET_NAME added as a .desktop shortcut"
sleep 4 ; else
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Unable to create $MIDLET_NAME.desktop file, check the ownership and try again!"
sleep 2
echo "Unable to add $MIDLET_NAME added as a .desktop shortcut, check the ownership!"
fi
exit 0
pedsarjon
2012-02-14, 17:00
this is my menu item opera-mini
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=OperaMini-Java
Exec=/opt/java2/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/opt/java2/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /opt/java2/opera_mini_6.5_.jar -1 Browser
X-Osso-Type=application/x-executable
Icon=opera
If I do "mad remote shell", I am logged in with username 'developer'. To
become root I have to run devrootsh [command].
I basically think that all these are issues with the emulator doing things
differently compared to a regular N900 device.
Also note that not all midlets ship with an icon.
Davy
santiago
2012-02-14, 17:17
If I do "mad remote shell", I am logged in with username 'developer'. To
become root I have to run devrootsh [command].
I basically think that all these are issues with the emulator doing things
differently compared to a regular N900 device.
Also note that not all midlets ship with an icon.
Davy
umm.. strange, you moved the phoneme path.. then i change the script too, to have common paths, :D for the icon, i've got to quote the icon, give me one minute ;) i've not an emulator on my ubuntu pc, :'( i'm doing all from my device.. i'm back soon
pedsarjon
2012-02-14, 17:23
tanks santiago its worked in maemo but must delet "sudo" in
Icon=$MIDLET_NAME" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
meaning
Icon=$MIDLET_NAME" | tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
Santiago: I took care of correcting all the paths.
There is something else going on. The midlet is actually running, but
behind the hildon menu with all the icons. If I close the emulator, it kills
the application (including the hildon menu app) and then I see the
midlet very briefly before the emulator completely shuts down.
So it is probably not a problem with your script.
Davy
pvnhattoan
2012-02-14, 17:51
I have a java game. When i make a "file.sh" manual, then i can run that java game, but when i make "file.sh" by makejadsh, then I saw whitescreen. What do you think about this problem ?
santiago
2012-02-14, 17:52
tanks santiago its worked in maemo but must delet "sudo" in
Icon=$MIDLET_NAME" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
meaning
Icon=$MIDLET_NAME" | tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
Pedsarjon: The only way i found to pipe it to /usr/share/applications/hildon was just "sudo tee" becouse it creates a loop without the sudo.. By the way, now i corrected the iconame (if you restart you'll see the icon), and i moved the phoneme path to /opt/, so you can change phoneme path or edit this script to your own path..
Davy this is the corrected script
#!/bin/sh
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Welcome to MakeJadSHortcutter!"
sleep 2
JAR=$1
if [ ! -f "${JAR}" ]; then
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"JAR file does not exist!" && sleep 3
echo "Usage: makejadsh JAR file";
exit 1
fi
JAD="${JAR%.*}.jad"
if [ -f "${JAD}" ]; then
echo -n "${JAD} already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${JAD} file!"
else
rm -f "${JAD}"
fi
fi
if [ ! -f "${JAD}" ]; then
unzip -aa -j -p ${JAR} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${JAR}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat "${JAR}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file created!"
MIDLET_ICON=`grep "MIDlet-Icon: " $JAD | sed "s/\MIDlet-Icon://g" | sed 's/\///g' | sed 's/^[ \t]*//'`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s///`
ICON_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s/// | sed 's/^[ \t]*//' | sed 's/ //g'`
UNZIP_ICON=`unzip "$JAR" "$MIDLET_ICON" -d /usr/share/icons/hicolor/scalable/hildon/`
RENAME_ICON=`mv "/usr/share/icons/hicolor/scalable/hildon/$MIDLET_ICON" "/usr/share/icons/hicolor/scalable/hildon/$ICON_NAME.png"`
fi
SH="${JAR%.*}.sh"
if [ -f "${SH}" ]; then
echo -n "${SH} Already exists, overwrite the file? (Y/N) "
read tmpans
answer=$(echo "$tmpans" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${SH} file!"
else
rm -f "${SH}"
fi
fi
if [ ! -f "${SH}" ]; then
MAINCLASS=`cat $JAD | grep 'MIDlet-1:' | cut -d ',' -f 3`
READLINKJAR=`readlink -f $JAR`
echo '#!/bin/sh' > $SH
echo '' >> $SH
echo '/opt/phoneme/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/opt/phoneme/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath' $READLINKJAR '-jadpath' $JAD -1 $MAINCLASS >> $SH
chmod a+x $SH
echo "${SH} file created!"
READLINK=`readlink -f $SH`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s///`
MIDLET_VERSION=`grep "MIDlet-Version: " $JAD | sed /MIDlet-Version:/s///`
echo -e "[Desktop Entry]
Encoding=UTF-8
Version=$MIDLET_VERSION
Type=Application
Name=$MIDLET_NAME
Exec=.$READLINK
X-Osso-Type=application/x-executable
Terminal=true
Icon=$ICON_NAME" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
sleep 6
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Created! The $MIDLET_NAME shortcut is now on the Menu"
echo "$MIDLET_NAME added as a .desktop shortcut"
sleep 4 ; else
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Unable to create $MIDLET_NAME.desktop file, check the ownership and try again!"
sleep 2
echo "Unable to add $MIDLET_NAME added as a .desktop shortcut, check the ownership!"
fi
exit 0
pvnhattoan: does it run from xterm? not all the midlets are fully supported, run the script and poste here the output, DavyP will correct phoneme features to have more compatibility
I have a java game. When i make a "file.sh" manual, then i can run that java game, but when i make "file.sh" by makejadsh, then I saw whitescreen. What do you think about this problem ?
There is not much to go on without the content of both files. If you
can show us both, we can have a look at how they and hopefully tell
you what is wrong.
Davy
Hi all,
I am still having issues with the emulator not properly starting when applications with the shortcut/icon in the menu. I have the same problems with the template applications from madde, so it is a general problem and a bug in my application. However, it means I am not able to test the deb package I created:
http://davy.preuveneers.be/phoneme/public/n900/deb/
It installs phoneme in /opt and creates shortcuts to phoneME (which does nothing because it calls cvm without parameters), Opera Mini and microemu-demo.
Could somebody install this (with dpkg -i xxx.deb) and test this and see if the shortcuts work?
I think there might be an issue that the package will be installed as root, and that the midlets won't have write access to certain subdirectories in /opt/phoneme because they don't run with root privileges. The Opera Mini midlet would be a good test case for that.
Thanks,
Davy
munozferna
2012-02-14, 23:36
Nokia-N900:/home/user# dpkg --install cvm_mr2.b168\+svn20547-20120214_armel.deb
Selecting previously deselected package cvm.
(Reading database ... 46881 files and directories currently installed.)
Unpacking cvm (from cvm_mr2.b168+svn20547-20120214_armel.deb) ...
dpkg: error processing cvm_mr2.b168+svn20547-20120214_armel.deb (--install):
trying to overwrite `/usr/share/applications/hildon/opera.desktop', which is also in package opera-mobile
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
cvm_mr2.b168+svn20547-20120214_armel.deb
I'm removing opera (native) to test it. and will update soon.
Nokia-N900:/home/user# dpkg --install cvm_mr2.b168\+svn20547-20120214_armel.deb
(Reading database ... 46792 files and directories currently installed.)
Unpacking cvm (from cvm_mr2.b168+svn20547-20120214_armel.deb) ...
Setting up cvm (mr2.b168+svn20547-20120214) ...
Nokia-N900:/home/user#
And the Opera launcher works, but I get an error ' Cannot finish installation because of insufficient storage space'.
Microemu-demo works though. where is it trying to install opera mini?
In my next deb I will rename the files to operamini to avoid the name clash.
Edit: opera name clash fixed in latest build.
Davy
I'm removing opera (native) to test it. and will update soon.
And the Opera launcher works, but I get an error ' Cannot finish installation because of insufficient storage space'.
Microemu-demo works though. where is it trying to install opera mini?
Opera is trying to save some files in a record store. These files are created in /opt/phoneme/midp/midp_linux_fb_gcc/appdb.
However, this folder is owned by root:root and the phoneME vm is executed under the account 'user' which does not have write permissions to this folder.
See if you can do the following as root:
chmod a+rwx /opt/phoneme/midp/midp_linux_fb_gcc/appdb
and if that changes the problem. The reason why microemu does not have this issue, is because it does not write to this appdb folder.
If I can then figure out how this folder can maintain its write permissions while creating the deb archive, then we are good to go.
Davy
munozferna
2012-02-14, 23:58
See if you can do the following as root:
chmod a+rwx /opt/phoneme/midp/midp_linux_fb_gcc/appdb
and if that changes the problem. The reason why microemu does not have this issue, is because it does not write to this appdb folder.
If I can then figure out how this folder can maintain its write permissions while creating the deb archive, then we are good to go.
Davy
That worked :D Can you add the chmod on the post-install script or something like that?
Jep, fixed in my last upload of 1 minute ago (same filename though).
Davy
santiago
2012-02-15, 11:17
i'll post a new script this evening ;) i did it, but i didnt save it! :(
then later i'll finish it
edit:
@DavyP
The script name is excalibur, just becouse it's fast, and powerfull, also easy to remember.. I added more features like
- use the right midlet name in the shortcut
- use the right icon name for the shortcut
- call to gtk-update-icon-cache to see immediately the icon on the shortcut (*** minor maybe fix at the end of this message)
- possibility to remove all files after installation of the midlet, expecially:
$SH file
$JAD file
$JAR file
$DESKTOP shortcut
After the installation, without closing the shell, the excalibur script (for newbies must be on /usr/bin/ with chmod +rwx or 775) will ask you to go on the menu, and to try the midlet.. (maybe you want an auto test that run it with final question about the result?) By now, if you will answer with Y, it will keep the midlet, else it will remove it..
####### Excalibur Script ########
#!/bin/sh
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Welcome to Excalibur Script!"
sleep 2
JAR=$1
if [ ! -f "${JAR}" ]; then
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"JAR file does not exist!" && sleep 3
echo "Usage: excalibur JAR file";
exit 1
fi
JAD="${JAR%.*}.jad"
if [ -f "${JAD}" ]; then
echo -n "${JAD} already exists, overwrite the file? (Y/N) "
read midlet
answer=$(echo "$midlet" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${JAD} file!"
else
rm -f "${JAD}"
fi
fi
if [ ! -f "${JAD}" ]; then
unzip -aa -j -p ${JAR} "META-INF/MANIFEST.MF" | sed -e '/^[ \t]*$/d' > "${JAD}"
echo "MIDlet-Jar-URL: ${JAR}" >> "${JAD}"
echo "MIDlet-Info-URL: http://" >> "${JAD}"
FILESIZE=$(stat "${JAR}")
echo "MIDlet-Jar-Size: ${FILESIZE}" >> "${JAD}"
echo "${JAD} file created!"
# find png file
MIDLET_ICON=`grep "MIDlet-Icon: " $JAD | sed "s/\MIDlet-Icon://g" | sed 's/\///g' | sed 's/^[ \t]*//'`
# use the correct name of the icon file
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s/// | sed 's/^[a \t]*//' | sed 's/ .*//'`
# extract the icon
UNZIP_ICON=`unzip "$JAR" "$MIDLET_ICON" -d /usr/share/icons/hicolor/scalable/hildon/`
# rename the icon using the midlet name
RENAME_ICON=`mv "/usr/share/icons/hicolor/scalable/hildon/$MIDLET_ICON" "/usr/share/icons/hicolor/scalable/hildon/$MIDLET_NAME.png"`
fi
SH="${JAR%.*}.sh"
if [ -f "${SH}" ]; then
echo -n "${SH} Already exists, overwrite the file? (Y/N) "
read midlet
answer=$(echo "$midlet" | tr '[:upper:]' '[:lower:]')
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "Not overwriting ${SH} file!"
else
rm -f "${SH}"
fi
fi
if [ ! -f "${SH}" ]; then
MAINCLASS=`cat $JAD | grep 'MIDlet-1:' | cut -d ',' -f 3`
READLINKJAR=`readlink -f $JAR`
echo '#!/bin/sh' > $SH
echo '' >> $SH
echo '/opt/phoneme/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=/opt/phoneme/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.Cdc MIDletSuiteLoader sun.misc.MIDPLauncher -suitepath' $READLINKJAR '-jadpath' $JAD -1 $MAINCLASS >> $SH
chmod a+x $SH
echo "${SH} file created!"
READLINK=`readlink -f $SH`
MIDLET_NAME=`grep "MIDlet-Name: " $JAD | sed /MIDlet-Name:/s/// | sed 's/^[a \t]*//' | sed 's/ .*//'`
MIDLET_VERSION=`grep "MIDlet-Version: " $JAD | sed /MIDlet-Version:/s///`
echo -e "[Desktop Entry]
Encoding=UTF-8
Version=$MIDLET_VERSION
Type=Application
Name=$MIDLET_NAME
Exec=.$READLINK
Comment=`readlink -f $JAD`
Comment=`readlink -f $JAR`
X-Osso-Type=application/x-executable
Terminal=true
Icon=$MIDLET_NAME" | sudo tee /usr/share/applications/hildon/"$MIDLET_NAME".desktop
sleep 6
echo "$MIDLET_NAME added as a desktop shortcut"
sleep 4
fi
echo "Does the midlet work fine? Run it and and come back here to say (Y/N)"
read test
ICONS_PATH=/usr/share/icons/hicolor/scalable/hildon/
DESKTOP_PATH=/usr/share/applications/hildon
answer0=$(echo "$test" | tr '[:upper:]' '[:lower:]')
if [ "$answer0" != "n" ] && [ "$answer0" != "N" ]; then
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Thanks for using Excalibur Script!" && sleep 3
exit 1; else
echo "Write the Midlet Name here: "
read input_name
DESKTOP_FILE=`grep "$input_name" $DESKTOP_PATH/* | sed -e 's/[^:]*$//g' | sed -e 's/[:^]//g'`
SH_FILE=`cat $DESKTOP_FILE | grep "Exec=." | sed /Exec=./s///`
JAR_FILE=`cat $DESKTOP_FILE | grep ".jar" | sed /Comment=/s///`
JAD_FILE=`cat $DESKTOP_FILE | grep ".jad" | sed /Comment=/s///`
ICON_FILE=`cat $DESKTOP_FILE | grep "MIDlet-Name: " | sed /MIDlet-Name:/s/// | sed 's/^[ \t]*//' | sed 's/ //g'`
echo "Do you want to remove $input_name? (Y/N)"
read answer
if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
echo "$input_name not removed!"; else
echo "Removing all $input_name files . ."
echo "Remoing $SH_FILE . ."
sudo rm -rf $SH_FILE
echo "Removed!"
echo "Removing $JAR_FILE . ."
sudo rm -rf $JAR_FILE
echo "Removed!"
echo "Removing $JAD_FILE . ."
sudo rm -rf $JAD_FILE
echo "Removed!"
echo "Removing $ICON_FILE . ."
sudo rm -rf $ICONS_PATH$ICON_FILE*
echo "Removed!"
echo "Removing $DESKTOP_FILE . ."
sudo rm -rf $DESKTOP_FILE
echo "Removed!"
echo "All files Removed! Midlet is removed!"
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Thanks for using Excalibur Script!" && sleep 3 fi
fi
fi
exec /usr/bin/gtk-update-icon-cache
***gtk-update-icon-cache fix***
cause of some strange reason, my device is an example about it, the /usr/bin/gtk-update-icon-cache doesn't work as well, then i searched on this Amazing Talk foundig the Bug Report about /usr/bin/gtk-update-icon-cache. Seems to be that /usr/bin/gtk-update-icon-cache just has one line in:
#!/bin/sh -e
nothing more, someone fixed it in
#!/bin/sh -e
[ -d "$1" ] && touch "$1"
then you just have to edit it and to save it to refresh the Maemo Icon Cache and to see immediately the icons without rebooting maemo. Excalibur script creates a desktop file but if you don't fix it with the method i found you will not see an icon on the created shortcut untill a device reboot
Ciao you all,
Cristian
Hi Cristian,
Thanks for all these script updates. At the moment I cannot test
this on the emulator due to incompatibilities with a real device.
There is one thing I wanted to point out: you do not need to
generate the jad file if it does not exist. In such a case, you create
the sh file without the '-jadpath midlet.jad' parameters.
Also, you could argue if you create a desktop file, you can directly
put the startup command in the desktop file rather than in a
separate script.
Then there are a few minor other issues I have come across with
certain midlets (like wrong line endings and dangling spaces).
I will see how I can fix these issues and embed the script in my
next build. My plan was actually to build something directly within
the phoneME application in native Qt4 code in a similar way like
I did for my Android build, but for the time being I think you script
will do.
Cheers,
Davy
santiago
2012-02-15, 22:41
Hi Cristian,
Thanks for all these script updates. At the moment I cannot test
this on the emulator due to incompatibilities with a real device.
There is one thing I wanted to point out: you do not need to
generate the jad file if it does not exist. In such a case, you create
the sh file without the '-jadpath midlet.jad' parameters.
Also, you could argue if you create a desktop file, you can directly
put the startup command in the desktop file rather than in a
separate script.
Then there are a few minor other issues I have come across with
certain midlets (like wrong line endings and dangling spaces).
I will see how I can fix these issues and embed the script in my
next build. My plan was actually to build something directly within
the phoneME application in native Qt4 code in a similar way like
I did for my Android build, but for the time being I think you script
will do.
Cheers,
Davy
Yes. I'm not a bash expert, :D i added the lines without comments, :D i was in panic! :D ahahahah, i'll fix it soon :D
i can try with zenith for now, but first i remove $JAD and $SH variables, i made confusion! ahahhaah
** foe the lines, you say this or the other script? beccouse i changed sed lines here to use correct icon, names etc
edit:
Script is changed now, i fixed everything except it doesnt accept jar file names with spaces ( ex: ciao from the italy.jar )i'm tired, i go to sleep i see caracters everywhere..
changes
removed sh line
removed jad line
changed the echo >> to $MIDLET_NAME.desktop as u wrote
down here is the zip file with gtk-update-icon-cache and excalibur script, they must be on /usr/bin/ with rwx permissions.
Ciao dall'Italia :D
Cristian
santiago
2012-02-16, 06:53
Yes. I'm not a bash expert, :D i added the lines without comments, :D i was in panic! :D ahahahah, i'll fix it soon :D
i can try with zenith for now, but first i remove $JAD and $SH variables, i made confusion! ahahhaah
** foe the lines, you say this or the other script? beccouse i changed sed lines here to use correct icon, names etc
edit:
Script is changed now, i fixed everything except it doesnt accept jar file names with spaces ( ex: ciao from the italy.jar )i'm tired, i go to sleep i see caracters everywhere..
changes
removed sh line
removed jad line
changed the echo >> to $MIDLET_NAME.desktop as u wrote
down here is the zip file with gtk-update-icon-cache and excalibur script, they must be on /usr/bin/ with rwx permissions.
Ciao dall'Italia :D
Cristian
edit2:
just couse i cant sleep.. :D i decided to add more lines like..
"Select the kind of file"
somenting like
echo "write JAR for a .jar file or JAD for a .jad file"
for Jad file, it will wget the jar file asking for a connection first else it will abort.. when downloaded, it will ask if disconnect or not, if install it or not..
for a Jar file it will jump to the Jar line :D
maybe i had to use the functions.. becouse it's becoming too disorganized in and uncommented :D
Moderators: apologize me, i quoted my self for mistake! Sorry for the x post!
Joseph9560
2012-02-16, 08:46
? why do u want to tick / untick them?
run the script for the midlet you want ;)
i go to sleep :) when i'll be ok, i'll add a string to remove the jar, jar, .desktop file of a game/app you want to remove
zzz ZZZZ zzz ZZZz goodnight you all
I don't always like command line. Don't tell me you launch you phone app from command line!
santiago
2012-02-16, 09:49
I don't always like command line. Don't tell me you launch you phone app from command line!
sometimes yes i do it, why? then you'll wait the official Davip's UI for the phoneme, :) i just made this script to cut the time, i'm working at new one, it can be launched from the desktop icon ;) but, if you dont like the command line, it runs on xterminal session..
PS: one of the Maemo Amazing things is just.. The command line! imo by the way, i'll made the possible to finish it today, i started at 7.55 am, this new is coloured and more easy to use.. It ll run in a shell from a shortcut launcher
PS2: maybe the shell isn't graphically "beautiful" but it helps you to find every kind of error ;)
About the command line use:
I hope at some point to be able to integrate everything in the Qt4 application in the way I did for my Android port. Now this takes time, and I think for the time being the script for santiago is the best there is.
Cheers,
Davy
santiago
2012-02-16, 12:08
About the command line use:
I hope at some point to be able to integrate everything in the Qt4 application in the way I did for my Android port. Now this takes time, and I think for the time being the script for santiago is the best there is.
Cheers,
Davy
Hey bro! :) do you know how to colorize a variable with echo -e? I'm trying by one hour, and i didnt find a way on Google
i made some variables like
$RED
$BLU
$YELLOW
$GREEN
$END # closes single color
i'd like to print the "ls *.jad" coloured, i'm in panic.. Do you know how to do it?
thx
Cristian
PS: what does the "Panic" message mean?
munozferna
2012-02-16, 14:37
About the command line use:
I hope at some point to be able to integrate everything in the Qt4 application in the way I did for my Android port. Now this takes time, and I think for the time being the script for santiago is the best there is.
Cheers,
Davy
I thought about making a simple UI in QML and calling the scripts here for the N9, but I did not want to waste the effort if somebody else is doing it too :) by the way, does the .deb work on the N9? I did not try it because i thought the binary was different.
I thought about making a simple UI in QML and calling the scripts here for the N9, but I did not want to waste the effort if somebody else is doing it too :) by the way, does the .deb work on the N9? I did not try it because i thought the binary was different.
I have not checked on the N9 emulator, but if it works you will
definitely have the grey bar.
In fact, the only difference is a simple method call and if I can
somehow at runtime find out if I am running either Maemo or MeeGo
I could produce one build for all.
Davy
Hi all,
I uploaded a new deb to my website at: http://davy.preuveneers.be/phoneme/public/n900/deb/
The build now contains a simple Qt4-based frontend "Run MIDlet", which will allow you to select a jar file from the filesystem and run it. It does not create desktop shortcuts (yet).
For those still favoring the terminal, you can now run a midlet like his:
/opt/phoneme/bin/runmidlet midlet.jar
You could also pass along the jad descriptor if you have the jar file in the same directory:
/opt/phoneme/bin/runmidlet midlet.jad
This way, you no longer need to specify a bunch of parameters at the command line or create shell scripts or jadfiles. Also, if there is a way on Maemo to associate jar/jad files with the runmidlet application, you could run midlets from your file manager. Running from a browser might be possible, but only for jar files and if the browser downloads the jar file to the filesystem and starts runmidlet with a local filepath as parameter (i.e. no http url as parameter).
Davy
I uploaded another deb with a new minor feature. It detects whether
the app is running on Maemo or on MeeGo by looking at the contents
of /etc/issue. On the latter it will run the midlet in full screen to avoid the
grey bar. If this works reliably on the N900 and the N9/N950, I no
longer need to produce 2 different builds.
Davy
cutehunk04
2012-02-17, 12:41
Looking for an used N900?? Little late, I had a friend in Banglore who sold it for 7000INR, just before he left for US of A,a month ago. No worries, still there is another friend of mine from Gujarat willing to sell his N900. I am less fortunate to make it mine, but still I don't want it to go to any hands which don't know the awesomeness of this phone. If you're willing, I can connect you to him. PM me.
hi am willing to sell my N900. you can email me dashin.veer@gmail.com
for further information....
Has anyone tried UC Browser? http://www.ucweb.com/English/UCbrowser/download.html
It does the same as opera mini, is just as fast and in addition supports animated gifs
it didn't work when I tried
[DarkGUNMAN]
2012-02-17, 16:20
No problems with installation of new deb file - working fine :)
santiago
2012-02-17, 21:50
I uploaded another deb with a new minor feature. It detects whether
the app is running on Maemo or on MeeGo by looking at the contents
of /etc/issue. On the latter it will run the midlet in full screen to avoid the
grey bar. If this works reliably on the N900 and the N9/N950, I no
longer need to produce 2 different builds.
Davy
Hey DavyP, on my n900 the comments
# Version of this .desktop file. For software package version see
# debian/changelog and/or rpm .spec files for version information.
in the desktop file, dont make it to execute the launcher.. Deleting them the Qt UI you made, will start..
By the way, fullscreen doesnt work.. the darkgreybar appears
Has anyone tried UC Browser? http://www.ucweb.com/English/UCbrowser/download.html
It does the same as opera mini, is just as fast and in addition supports animated gifs
it didn't work when I tried
It doesnt i tryed it now..
Not all the midlet are supported for the moment
guilledoc
2012-02-17, 22:08
Thanks for your hardwork this is great progress to port javame to n900
some of the jar files I have oppened after a short period of time they shut down. Any clue?
Thanks for your hardwork this is great progress to port javame to n900
some of the jar files I have oppened after a short period of time they shut down. Any clue?
That happened to me too
Thanks for your hardwork this is great progress to port javame to n900
some of the jar files I have oppened after a short period of time they shut down. Any clue?
This happened to me with Opera. I had a feeling it used up a resource such as memory.
Hey DavyP, on my n900 the comments
# Version of this .desktop file. For software package version see
# debian/changelog and/or rpm .spec files for version information.
in the desktop file, dont make it to execute the launcher.. Deleting them the Qt UI you made, will start..
By the way, fullscreen doesnt work.. the darkgreybar appears
Thanks for testing. I did not experience these problems on the
emulator.
I uploaded a new build to my website with those lines removed. It
also includes the excalibur.sh script for those wishing to use it.
Davy
Has anyone tried UC Browser? http://www.ucweb.com/English/UCbrowser/download.html
It does the same as opera mini, is just as fast and in addition supports animated gifs
it didn't work when I tried
The reason why this midlet does not work, is because it requires
support for the javax.wireless.messaging.* wireless messaging APIs.
These classes are provided by JSR 120 or JSR 205 and they
require a tight integration with the underlying platform. There is
currently no support for that.
Davy
By the way, fullscreen doesnt work.. the darkgreybar appears
Could you check again with the latest build? Maybe my runtime
detection of Maemo and MeeGo is not accurate enough.
I check the file /etc/issue, and if it begins with "Maemo 5", I run the
midlet in normal window mode, otherwise in fullscreen.
On the N900 emulator, this file contains: 'Maemo 5 \n \l'
On the N9 emulator, this file contains: 'MeeGo 1.2 Harmattan \n \l'
Maybe your platform has a /etc/issue file with a different contents.
If so, I would like to know the other possibilities.
Davy
Thanks for your hardwork this is great progress to port javame to n900
some of the jar files I have oppened after a short period of time they shut down. Any clue?
Are they actually running for a while and then suddenly crash, or
do they not start at all due to no support for certain APIs and JSRs?
If you start a terminal, do the following:
/opt/phoneme/bin/runmidlet /path/to/midlet.jar
If the application crashes or whatever, have a look at the error on
the terminal and post it here. If you see something like,
java.lang.NoClassDefFoundError: xxx
It means the midlet requires support for certain features that the
phoneME build does not have.
Davy
vBulletin® v3.8.8, Copyright ©2000-2025, vBulletin Solutions, Inc.