maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [BETA RELEASE] PhoneME Advanced (Java Mobile) (https://talk.maemo.org/showthread.php?t=81969)

Guinoak 2012-02-10 15:31

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by soleil (Post 1163175)
How can you control the game . im stuck at the chosing language screen and can't do anything

are you refering to my post?

impeham 2012-02-10 15:44

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by freemangordon (Post 1163142)
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.

soleil 2012-02-10 16:08

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Guinoak (Post 1163178)
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

Guinoak 2012-02-10 16:13

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by soleil (Post 1163187)
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_IG P_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.

soleil 2012-02-10 16:57

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I can run the game now and yes it's not in full screen

marmistrz 2012-02-10 17:14

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Is the .jad file required? Or is .jar sufficient?

Brian_7 2012-02-10 17:44

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Guinoak (Post 1163189)
The game is touchpad based, no need to do anything.

I tested a filename such as "Sid_Meiers_Civilization_V_Mobile_Nokia_5800_EN_IG P_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.

DavyP 2012-02-10 18:03

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Brian_7 (Post 1163219)
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

DavyP 2012-02-10 18:05

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by marmistrz (Post 1163210)
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

DavyP 2012-02-10 18:08

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by impeham (Post 1163141)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Brian_7 (Post 1163219)
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)?

Brian_7 2012-02-10 18:55

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by marmistrz (Post 1163238)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Brian_7 (Post 1163248)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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.

DavyP 2012-02-10 21:27

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by santiago (Post 1163268)
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

DavyP 2012-02-10 21:32

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by PanzerSajt (Post 1163299)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1163305)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
3 Attachment(s)
Quote:

Originally Posted by DavyP (Post 1163304)
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 ;)

Code:

#!/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..

DavyP 2012-02-10 22:18

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by santiago (Post 1163314)
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 ;)

Code:

#!/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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1163320)
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!!

Guinoak 2012-02-10 23:02

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Brian_7 (Post 1163219)
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?

Brian_7 2012-02-10 23:06

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Guinoak (Post 1163337)
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.

Brian_7 2012-02-10 23:09

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by marmistrz (Post 1163286)
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.

soleil 2012-02-10 23:35

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I tried to add these lines in the manifest file of Sid meier game but no luck :
Quote:

Nokia-MIDlet-Original-Display-Size: 640,360
Nokia-MIDlet-Target-Display-Size: 854,480
Nokia-MIDlet-App-Orientation: landscape

DavyP 2012-02-11 09:04

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by soleil (Post 1163350)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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:
  1. To apply this script for a bunch of files in a folder.
  2. Get the main class out of the jar file and write it in the starter script.

Code:

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.CdcMIDletSuiteLoader 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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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!

DavyP 2012-02-12 10:21

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Joseph9560 (Post 1163732)
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/p...droid_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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by santiago (Post 1163832)
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

DavyP 2012-02-12 11:39

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
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

DavyP 2012-02-12 13:14

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by santiago (Post 1163832)
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/p...ipts/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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1163915)
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/p...ipts/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.

Code:

#!/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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
3 Attachment(s)
Quote:

Originally Posted by DavyP (Post 1163915)
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/p...ipts/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

DavyP 2012-02-12 15:28

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by santiago (Post 1163931)
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

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
@DavyP: Can you upload your "makejad.sh" file??

DavyP 2012-02-13 08:28

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by pvnhattoan (Post 1164281)
@DavyP: Can you upload your "makejad.sh" file??

Look at the many posts above. It is available at:

http://davy.preuveneers.be/phoneme/p...ipts/makejadsh

Davy

[DarkGUNMAN] 2012-02-13 08:56

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
1 Attachment(s)
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 :)

DavyP 2012-02-13 09:15

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 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


All times are GMT. The time now is 12:07.

vBulletin® Version 3.8.8