FORUMS
Remove All Ads from XDA

[APP][3rd Aug] Convert your CPR Titanium or PLG file to different (all) resolutions!

2,082 posts
Thanks Meter: 277
 
By OndraSter, Retired Recognized Developer on 2nd August 2009, 11:36 PM
Post Reply Email Thread
Convert your CPR file to different resolution by one click

Hello guys,
TPC asked me for one tool - he has made his own Titanium plugin and wanted to convert it to Fuze, that has got different resolution than Kaiser that he built it on.

I've written that app and here ya go:


It converts all Height, Width, Left, Top, ItemHeight and ItemWidth attribs in .cpr file. It isn't perfect because some values you'll have to adjust manually, but rewriting all thousands lines of code takes much longer.

It was built for Titanium CPR file, but it will probably work on any different CPR file (since it is all the same XML).

You need only .NET Framework!


If you like my work and want me to continue developing tools, Buy me a beer!

Bugfixed:
v1.1: Now it can handle . numbers
 
 
2nd August 2009, 11:38 PM |#2  
OndraSter's Avatar
OP Retired Recognized Developer
Flag Prague
Thanks Meter: 277
 
Donate to Me
More
PLG Resizer - convert your .plg to all resolutions



If you like my work and want me to continue developing tools, Buy me a beer!


V1: without generate landscape function
V2: added generate landscape function + some anti-crash fixes
V2.1: fixed bug that when in file were both landscape + portrait modes tool crashed (occured only in v2, v1 was working fine)
Attached Files
File Type: zip PLG-convertor-v1.0.zip - [Click for QR Code] (7.5 KB, 37 views)
File Type: zip PLG-convertor-v2.0.zip - [Click for QR Code] (7.7 KB, 30 views)
File Type: zip PLG-convertor-v2.1.zip - [Click for QR Code] (7.7 KB, 560 views)
3rd August 2009, 12:08 AM |#3  
Cal-El's Avatar
Senior Member
Flag Golden Valley, MN
Thanks Meter: 78
 
More
WOW! This is ground breaking, I will let you know what I find! Thank you!
3rd August 2009, 12:11 AM |#4  
SRgustavo's Avatar
Senior Member
Flag Rosario
Thanks Meter: 16
 
More
really good man . i'll give it a try
thanx
3rd August 2009, 12:59 AM |#5  
MichelDiamond's Avatar
Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
What a great idea! And I'm not thinking about CPR alone...

What do you think: Would it be possible to take a .plg-File in any resolution (and perhaps landsape and portrait) - and the converter would make the output-plg-File for all resolutions in one file?

A .plg is a part of the .cpr - so it could be possible - your parser should only recogonize then <layer>...</layers>-Tags to know where the Resolution-Parts are to find and where the new resolutions should be inserted (Multi-Select instead of Single-Select)
For fine adjustings - perhaps there are some further algorithm to find - I think, it would work without very good.

That would be totally great!

And thanx for sharing your cpr-converter

Micha
3rd August 2009, 01:07 AM |#6  
gullum's Avatar
Senior Member
Thanks Meter: 10
 
More
since the cpr are realy xml could be good also if prssible to resize aplication skins (full screen player, audio manager) anyway I'll try it
3rd August 2009, 04:14 AM |#7  
twopumpchump's Avatar
Recognized Developer / Retired Senior Moderator
Flag Kentucky
Thanks Meter: 363
 
Donate to Me
More
congrats on the new tool, it works great


ps...i want everybody to know that i came up with this idea because im LAZY lol. great work by ondraster for making this happen
3rd August 2009, 06:32 AM |#8  
drkfngthdragnlrd's Avatar
Retired Recognized Developer
Flag North Hills, CA
Thanks Meter: 272
 
Donate to Me
More
Great work man, works awesome. I just used it to port my NeoTitanium skin to all resolutions & so far so good.

EDIT: Make sure the paths don't have spaces. This will cause an error.
3rd August 2009, 09:23 AM |#9  
OndraSter's Avatar
OP Retired Recognized Developer
Flag Prague
Thanks Meter: 277
 
Donate to Me
More
Quote:
Originally Posted by MichelDiamond

What do you think: Would it be possible to take a .plg-File in any resolution (and perhaps landsape and portrait) - and the converter would make the output-plg-File for all resolutions in one file?

It shouldn't be problem, but I couldn't find any .plg in SYS, so I haven't got it test on. Send me one/link me to one and I'll try it.

Quote:
Originally Posted by gullum

since the cpr are realy xml could be good also if prssible to resize aplication skins (full screen player, audio manager) anyway I'll try it

I took a look at FullScreenPlayer's XML file and I think it won't be hard.

Quote:
Originally Posted by drkfngthdragnlrd

Great work man, works awesome. I just used it to port my NeoTitanium skin to all resolutions & so far so good.

EDIT: Make sure the paths don't have spaces. This will cause an error.

It works with spaces in path OK for me.


Thanks from everyone.
3rd August 2009, 09:38 AM |#10  
MichelDiamond's Avatar
Retired Recognized Developer
Thanks Meter: 272
 
Donate to Me
More
Quote:
Originally Posted by OndraSter

It shouldn't be problem, but I couldn't find any .plg in SYS, so I haven't got it test on. Send me one/link me to one and I'll try it.

Thank you - I'll send you one with VGA portrait and landscape - if the Converter could make a difference betweend portrait resizing and landscape resizing - that would be real cool.

after <layers> the marks of the resolutions are to find

after </layers> the new resolutions should be inserted, that it works in each .plg of each Plugin

Thanx in advance for trying
Micha
Attached Files
File Type: zip JMLToday_v5.3.zip - [Click for QR Code] (1.5 KB, 74 views)
3rd August 2009, 09:56 AM |#11  
OndraSter's Avatar
OP Retired Recognized Developer
Flag Prague
Thanks Meter: 277
 
Donate to Me
More
Quote:
Originally Posted by MichelDiamond

Thank you - I'll send you one with VGA portrait and landscape - if the Converter could make a difference betweend portrait resizing and landscape resizing - that would be real cool.

after <layers> the marks of the resolutions are to find

after </layers> the new resolutions should be inserted, that it works in each .plg of each Plugin

Thanx in advance for trying
Micha

So When I got the beginning

Code:
<?xml version="1.0" encoding="utf-8"?>
<plugin>
	<name>JMLToday</name>
	<position>0</position>
	<layouts>
Then becomes <layout screenWidth="480" screenHeight="640"> where are screen width and height and then starts the layout for this resolution right? Eg if I'd want to have this file from 480x640 to 240x320, all numbers since <layout ..> would change to half in all Left, Top, Height and Width + screenWidth and screenHeight would change and this all will be added as new <layout ..>?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes