Re: [J2me-device-db-general] Plugin Problems
Brought to you by:
s_szczygiel,
space2
From: Szasz P. <sp...@sp...> - 2006-09-20 14:43:42
|
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 |