Go Back   xda-developers > HTC Diamond: Touch Diamond, MDA Compact IV > Touch Diamond, MDA Compact IV General


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th July 2008, 03:54 AM
sushilange sushilange is offline
Senior Member
 
Join Date: Aug 2007
Posts: 427
Default [TUT] How to make tweaks for Diamond TF3D Config

Hi,

since Diamond TF3D Config v.0.5 my app supports a custom tweak-file!

Just create a XML-file called 'tweaks_custom.xml' and copy it to program folder of Diamond TF3D Config! Those tweaks then will be shown in the tweak-list of my app. They have a gray background color in tweak-list.

The XML-file have to look like this:

Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Name of Tweak 1</Name>
  <Description>Description for Tweak 1</Description>
  <RegRoot>HKLM</RegRoot>
  <RegKey>Software\HTC\Manila\Program Launcher\0</RegKey>
  <RegValue>DispName</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>Hello</DefaultValue>
  <NewValue>World</NewValue>
 </Tweak>
<Tweak>
  <Name>Name of Tweak 2</Name>
  <Description>Description for Tweak 2</Description>
  <RegRoot>HKLM</RegRoot>
  <RegKey>SYSTEM\GDI\GLYPHCACHE</RegKey>
  <RegValue>limit</RegValue>
  <RegValueKind>DWord</RegValueKind>
  <DefaultValue>8192</DefaultValue>
  <NewValue>32768</NewValue>
 </Tweak>
 
</Tweaks>
Name: Name of Tweak. Keep it short like I did in my tool
Description: A description of what the tweak will do! DO NOT descripe which reg key will change, because my app will add these information automatically to the description text!
RegRoot: HKLM or HKCU
RegKey: the key
RegValue: the value to change
RegValueKind: String, ExpandString, MultiString or DWord
DefaultValue: the old default value
NewValue: the new value

So it is up to you to share good tweaks! Have fun!

Best regards,
Sascha
__________________
mirabyte Touch Controls

Donate

Last edited by sushilange; 11th August 2008 at 09:44 PM..
Reply With Quote
Sponsored Links

  #2  
Old 12th July 2008, 09:32 AM
teddyen66's Avatar
teddyen66 teddyen66 is offline
Senior Member
 
Join Date: Sep 2005
Posts: 200
Default

Nice one :-)
So much easier than changing it in registry every time.
__________________
Qtek 8310 + HTC Touch Diamond + HTC Advantage X7500
http://www.kimfyrst.dk
http://www.mytouch.dk (comming soon)
http://www.sponsorcar.dk/default.asp...&refere=211872
Reply With Quote

  #3  
Old 12th July 2008, 09:41 AM
boxhillab boxhillab is offline
Member
 
Join Date: Jun 2008
Posts: 35
Default

Thank you so much!

I modify the xml file, please help me to check, make sure no problems.
If someone want to use it, just rename it to .xml then replace the exist file, and please give me some feedback, thanks!
Attached Files
File Type: txt tweaks_custom.txt (6.9 KB, 1808 views)

Last edited by boxhillab; 12th July 2008 at 02:33 PM..
Reply With Quote

  #4  
Old 12th July 2008, 09:45 AM
MonteCristoffOn's Avatar
MonteCristoffOn MonteCristoffOn is offline
Senior Member
 
Join Date: Oct 2005
Posts: 412
Default Good beginning

Hi sushi,

Well, it's a great improvement ! And possibilities are endless...

But you already know that bad registry settings can do a lot of damage on a device.
So everyone must be careful with that !

A suggestion : systematically add the default values for all keys or a reset functionnality for a stock registry restore.

Anyway, good job ! I will try it soon.

Thanks.
__________________

Last edited by MonteCristoffOn; 12th July 2008 at 09:48 AM..
Reply With Quote

  #5  
Old 12th July 2008, 09:55 AM
boxhillab boxhillab is offline
Member
 
Join Date: Jun 2008
Posts: 35
Default

Quote:
Originally Posted by MonteCristoffOn View Post
Hi sushi,

Well, it's a great improvement ! And possibilities are endless...

But you already know that bad registry settings can do a lot of damage on a device.
So everyone must be careful with that !

A suggestion : systematically add the default values for all keys or a reset functionnality for a stock registry restore.

Anyway, good job ! I will try it soon.

Thanks.
we can backup by some backup tools
Reply With Quote

  #6  
Old 12th July 2008, 10:10 AM
MonteCristoffOn's Avatar
MonteCristoffOn MonteCristoffOn is offline
Senior Member
 
Join Date: Oct 2005
Posts: 412
Default

Quote:
Originally Posted by boxhillab View Post
we can backup by some backup tools
Of course boxhillab... but it's not very useful for common users.
You could add that a simple hard reset also do the job...

I think it's an important feature for any soft.

__________________
Reply With Quote

  #7  
Old 12th July 2008, 10:50 AM
sushilange sushilange is offline
Senior Member
 
Join Date: Aug 2007
Posts: 427
Default

@Monte: DefaultValue is the old default value in the registry.

So just unchecking all tweaks in Diamond TF3D Config, and you have restored your registry.


That's why you all should named the tweaks so, that it is clear, why it is unchecked on default.

e.g. i add the tweak "NoFaceDownMuteRing", because "FaceDownMuteRing" is true on default, and on default a tweak in my app should shown unchecked.

I think that is easier for the user to understand.
__________________
mirabyte Touch Controls

Donate
Reply With Quote

  #8  
Old 12th July 2008, 10:57 AM
sushilange sushilange is offline
Senior Member
 
Join Date: Aug 2007
Posts: 427
Default

Quote:
Originally Posted by boxhillab View Post
Thank you so much!

I modify the xml file, please help me to check, make sure no problems.
If someone want to use it, just rename it to .xml then replace the exist file, and please give me some feedback, thanks!
NO!!!

DO NOT replace the exist file! You have to rename your file to 'tweaks_custom.xml' and just put in the program folder.The 'tweaks.xml' file is mine, so don't replace it, because on every new version of Diamond TF3D Config the 'tweaks.xml' will be overwritten with a new version. The 'tweaks_custom.xml' won't be overwritten ;-)
__________________
mirabyte Touch Controls

Donate
Reply With Quote

  #9  
Old 12th July 2008, 01:46 PM
MonteCristoffOn's Avatar
MonteCristoffOn MonteCristoffOn is offline
Senior Member
 
Join Date: Oct 2005
Posts: 412
Default

Quote:
Originally Posted by sushilange View Post
@Monte: DefaultValue is the old default value in the registry.

So just unchecking all tweaks in Diamond TF3D Config, and you have restored your registry.


That's why you all should named the tweaks so, that it is clear, why it is unchecked on default.

e.g. i add the tweak "NoFaceDownMuteRing", because "FaceDownMuteRing" is true on default, and on default a tweak in my app should shown unchecked.

I think that is easier for the user to understand.
Reading your xml, I've understood that.
But what about the multi values keys ?

Just a little example with ringtones...
Of course you can change it via the classic WM Phone Settings panel, but imagine we want to add this tweak in TF3D Config... just to illustrate how it could be.
  • The key is : HKCU\ControlPanel\Sounds\RingTone0\Script
  • Values are :
    a (for none)
    apw3r (simple ring)
    c50apw3c150r (increasing ring)
    p (ring once)
    av3w3r (vibrate)
    av0pw3r (vibrate and ring)
    v3w3apw3r (vibrate then ring)
    c50av0pw3c150r (vibrate and increasing ring)
    v1w1v1w1v1w1c50apw3c150r (vibrate 3x then increasing ring, this is my favorite...)

OK, let's do the TF3D Custom xml file with that...
(not tested, it's just for the exercise )
Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Ringtone 1</Name>
  <Description>Change the Ringtone : none</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>a</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 2</Name>
  <Description>Change the Ringtone : ring (default)</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>apw3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 3</Name>
  <Description>Change the Ringtone : increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>c50apw3c150r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 4</Name>
  <Description>Change the Ringtone : ring once</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>p</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 5</Name>
  <Description>Change the Ringtone : vibrate</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>av3w3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 6</Name>
  <Description>Change the Ringtone : vibrate and ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>av0pw3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 7</Name>
  <Description>Change the Ringtone : vibrate then ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>v3w3apw3r</NewValue>
 </Tweak>
 <Tweak>
  <Name>Ringtone 8</Name>
  <Description>Change the Ringtone : vibrate and increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>c50av0pw3c150r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 7</Name>
  <Description>Change the Ringtone : vibrate 3x then increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>v1w1v1w1v1w1c50apw3c150r</NewValue>
 </Tweak>
</Tweaks>
I think you will agree with me : this is not a very elegant solution...

What about this kind of xml structure ?

Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Ringtone</Name>
  <Description>Change the Ringtone</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <Options>
      <OptionValue>a</OptionValue><OptionDescription>None</OptionDescription>
      <OptionValue>apw3r</OptionValue><OptionDescription>Ring (default)</OptionDescription>
      <OptionValue>c50apw3c150r</OptionValue><OptionDescription>Increasing ring</OptionDescription>
      <OptionValue>p</OptionValue><OptionDescription>Ring once</OptionDescription>
      <OptionValue>av3w3r </OptionValue><OptionDescription>Vibrate</OptionDescription>
      <OptionValue>av0pw3r</OptionValue><OptionDescription>Vibrate and ring</OptionDescription>
      <OptionValue>v3w3apw3r</OptionValue><OptionDescription>Vibrate then ring</OptionDescription>
      <OptionValue>c50av0pw3c150r</OptionValue><OptionDescription>Vibrate and increasing ring</OptionDescription>
      <OptionValue>v1w1v1w1v1w1c50apw3c150r</OptionValue><OptionDescription>vibrate 3x then increasing ring</OptionDescription>
</Options>
 </Tweak>

</Tweaks>
Of course, parsing will be different and your app will probably need some modifications...
But I'm sure it would be better !

CU soon.

__________________
Reply With Quote

  #10  
Old 12th July 2008, 01:51 PM
sushilange sushilange is offline
Senior Member
 
Join Date: Aug 2007
Posts: 427
Default

I know what you mean, but there are so many tools for doing this. For example Advanced Config.

I just want to implement easy tweaks for Diamond and TouchFlo3D, so that the user just have to check or uncheck. I think that is more user friendly.

Advanced user, how know what all these options do, are also know how to change this manually or do this with another config tool like Advanced Config, etc.
__________________
mirabyte Touch Controls

Donate
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:45 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.