Re: [J2me-device-db-general] Plugin Problems
Brought to you by:
s_szczygiel,
space2
|
From: James B. <jm...@ho...> - 2006-09-20 15:32:53
|
Hum,
It changed the device.profile so that it now contains the mapping between
the image names and the images eg:
splash.png = splash240x320.png
bg.png = bg240x320.png
but it doesn't have the image size information in there.
Interestingly it no longer includes all the other device information, would
that be a problem or does the rest of the framework use the
device.properties that is produced instead?
Cheers,
James
----- Original Message -----
From: "Sebastian Szczygiel" <seb...@op...>
To: <j2m...@li...>
Sent: Wednesday, September 20, 2006 4:12 PM
Subject: Re: [J2me-device-db-general] Plugin Problems
> Try this:
>
> In microcode build.xml in target "db-exporter"
>
> Change the following line
>
> line="--root ${j2me.device.db} --set ${exporter.props} --format
> cpp:prefix=//#,nameprefix=$,noupper,nostrings ${device}"/>
>
> to
>
> line="--root ${j2me.device.db} --set ${exporter.props} --res
> ${res.bld} --format cpp:prefix=//#,nameprefix=$,noupper,nostrings
> ${device}"/>
>
> the option "--res ${res.bld}" was missing.
>
> BR, Sebastian
>
>> -----Original Message-----
>> From: j2m...@li... [mailto:j2me-
>> dev...@li...] On Behalf Of James Brook
>> Sent: Mittwoch, 20. September 2006 17:10
>> To: j2m...@li...
>> Subject: Re: [J2me-device-db-general] Plugin Problems
>>
>> Thanks for the reply,
>>
>> I've just taken the latest version from CVS (at about 3.30 today) and
>> rebuilt. I've then taken the framework project example
>> mariobros-example.zip. Unpacked it, altered the properties etc.
>>
>> Then I've added a new resource called donkey.png and added the following
>> to
>> the res.bld
>>
>> #pngsize on
>> +donkey.png
>>
>> In the generated device.profile I get the following:
>>
>> //#define $full_canvas 1
>> //#define $vendor nokia
>> //#define $model s60
>> //#define $profile nokia/s60
>> //#define $nokia 1
>> //#define $nokia/s60 1
>> //#define $uses.nokia/s60
>> //#define $uses.nokia/base
>> //#define $uses.generic/midp1
>> //#define $midp.version 1
>> //#define $cldc.version 1.0
>> //#define $mmapi 0
>> //#define $btapi 0
>> //#define $nokiaapi 1
>> //#define $siemensapi 0
>> //#define $samsungapi 0
>> //#define $vscl 0
>> //#define $wmapi 0
>> //#define $mascotapi 0
>> //#define $m3gapi 0
>> //#define $pdaapi 0
>> //#define $locationapi 0
>> //#define $webservicesapi 0
>> import javax.microedition.lcdui.*;
>> import javax.microedition.midlet.*;
>> import javax.microedition.rms.*;
>> //#define $uses.includes/nokiaapi
>> import com.nokia.mid.ui.*;
>> import com.nokia.mid.sound.*;
>> //#define $nokiaapi.ott 1
>> //#define $nokiaapi.wav 1
>> //#define $key.up -1
>> //#define $key.down -2
>> //#define $key.left -3
>> //#define $key.right -4
>> //#define $key.softleft -6
>> //#define $key.softright -7
>> //#define $key.clear -8
>> //#define $canvas_class FullCanvas
>> //#define $uses.nokia/canvas_176x208
>> //#define $canvas.width 176
>> //#define $canvas.height 208
>> //#define $icon.width 42
>> //#define $icon.height 29
>>
>> Which is missing the donkey properties.
>>
>> Is there a step I'm missing, or is this a bug?
>>
>> Cheers,
>>
>> James Brook
>>
>> ----- Original Message -----
>> From: "Sebastian Szczygiel" <seb...@op...>
>> To: <j2m...@li...>
>> Sent: Wednesday, September 20, 2006 3:48 PM
>> Subject: Re: [J2me-device-db-general] Plugin Problems
>>
>>
>> > Hi,
>> >
>> > microcode framework creates a "device.profile" which can be found in
>> > /dist/src after deployment.
>> >
>> > Like written in the documentation you have to include this file in your
>> > java-sources with
>> >
>> > //#include "device.profile"
>> >
>> > After that you can access all device-properties and also the properties
>> > generated by pngsize plugin.
>> >
>> > BR, Sebastian
>> >
>> >> -----Original Message-----
>> >> From: j2m...@li...
>> [mailto:j2me-
>> >> dev...@li...] On Behalf Of Szasz
>> >> Pal
>> >> Sent: Mittwoch, 20. September 2006 16:43
>> >> To: James Brook
>> >> Cc: j2m...@li...
>> >> Subject: Re: [J2me-device-db-general] Plugin Problems
>> >>
>> >> Hi!
>> >>
>> >> I'm not very familiar with the microcode framework (I use the other,
>> >> linux/shell/gcc based one), but here is how the pngsize works:
>> >>
>> >> When the exporter runs in resource collector mode (ie creates the JAR
>> >> file), it can also save the profile as text file. The profile contains
>> >> all the properties from the phone database (for the given phone) as
>> well
>> >> as all the properties defined in the "resource recepie" file, hence
>> also
>> >> the image sizes.
>> >>
>> >> For example let's take a test image, call it test.png. Write the
>> >> following res.txt:
>> >>
>> >> //--------8<----------
>> >> #pngsize on
>> >> +test.png
>> >> //--------8<----------
>> >>
>> >> I executed the exporter this way:
>> >>
>> >> $ ~/work/j2me-device-db/tools/exporter/exporter --root
>> >> /work/j2me-device-db/db --res res.txt --jar out.jar --format cpp
>> >> --output profile.h sonyericsson/k750
>> >>
>> >> (I have the j2medd project at ~/work/j2me-device-db)
>> >> In short what each options does:
>> >> --root - specifies where the phone database is
>> >> --res - means work in resource collector mode, read the resource list
>> >> from res.txt
>> >> --jar - create the jar file with the resource
>> >> --format - use the C header file format for output (for the profile
>> file)
>> >> --output - save the profile file
>> >>
>> >> Now in profile.h I will have all the properties and image sizes:
>> >>
>> >> ...
>> >> //+TEST_PNG
>> >> #define TEST_PNG_WIDTH 256
>> >> #define TEST_PNG_WIDTH_ "256"
>> >> #define TEST_PNG_HEIGHT 256
>> >> #define TEST_PNG_HEIGHT_ "256"
>> >>
>> >> I think the microcode framework creates the profile file as well, but
>> >> I
>> >> don't know where. Also it uses a different naming convention (ie. the
>> >> properties are not converted to uppercase, etc).
>> >> Actually now I just took a look in microcode, it seems it does not
>> >> save
>> >> the profile file when collecting resources. It executes the exporter
>> >> twice: first to get the profile file, then to create the jar. This has
>> >> the disadvantage that the properties set in the resource file cannot
>> >> be
>> >> accessed from the code... but I might be mistaken here...
>> >>
>> >>
>> >> James Brook wrote:
>> >> > Hello All,
>> >> >
>> >> > I don't seem to be able to get the plugins to work properly with my
>> >> > basic test project.
>> >> >
>> >> > I have added the command "#pngsize on" to my res.bld and it doesn't
>> >> > appear to have any effect.
>> >> >
>> >> > The documentation says "When this plugin is enabled for each PNG
>> >> > file
>> >> > added to the jar it find out it size and adds the properties
>> >> > '<filename>.width' and '<filename>.height' "
>> >> >
>> >> > Where does it add this property to?
>> >> >
>> >> > Also when I try and include the pngcheck that causes a "[exec] [E]
>> >> > Unknown command `pngcheck' at
>> >> > c:/development/microcode/mariobros/build/res.bld:10!"
>> >> >
>> >> > Any pointers would be great.
>> >> >
>> >> > Cheers,
>> >> >
>> >> > James Brook
>> >> >
>> >> >
>> >> > ---------------------------------------------------------------------
>> ---
>> >> >
>> >> > ---------------------------------------------------------------------
>> ---
>> >> -
>> >> > Take Surveys. Earn Cash. Influence the Future of IT
>> >> > Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> > opinions on IT & business topics through brief surveys -- and earn
>> cash
>> >> >
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> >
>> >> >
>> >> > ---------------------------------------------------------------------
>> ---
>> >> >
>> >> > _______________________________________________
>> >> > J2me-device-db-general mailing list
>> >> > J2m...@li...
>> >> > https://lists.sourceforge.net/lists/listinfo/j2me-device-db-general
>> >>
>> >>
>> >> --
>> >> Best regards,
>> >> Szasz Pal
>> >> ----------------
>> >> Space Software Studio
>> >> http://www.spacesoftwarestudio.com
>> >>
>> >> -----------------------------------------------------------------------
>> --
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> >> share
>> >> your
>> >> opinions on IT & business topics through brief surveys -- and earn
>> >> cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >> _______________________________________________
>> >> J2me-device-db-general mailing list
>> >> J2m...@li...
>> >> https://lists.sourceforge.net/lists/listinfo/j2me-device-db-general
>> >
>> >
>> > ------------------------------------------------------------------------
>> -
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> > your
>> > opinions on IT & business topics through brief surveys -- and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > _______________________________________________
>> > J2me-device-db-general mailing list
>> > J2m...@li...
>> > https://lists.sourceforge.net/lists/listinfo/j2me-device-db-general
>> >
>> >
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> J2me-device-db-general mailing list
>> J2m...@li...
>> https://lists.sourceforge.net/lists/listinfo/j2me-device-db-general
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> J2me-device-db-general mailing list
> J2m...@li...
> https://lists.sourceforge.net/lists/listinfo/j2me-device-db-general
>
>
|