[Wing, P4350 Herald Upgrading] ginolin:
How To Manually Make your own OEM Package from a .cab

--------------------------------------------------------------------------------

please go on with your cource .i like it very much.

:)

You can use Cab analyzer.

But you might as well get your hands dirty. I have added the Cab in Question.

1. Put the Cab file in a working folder to play in.

2. Extract the Cab using a good unzipper like 7-Zip

3. You will get a whole bunch of files with weird names the only one that will make sense is the _setup.xml.

4. So let's open this in Note Pad and take a look.

First concentrate on translating all the filenames

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<characteristic type="touchpal.dll" translation="install">

<characteristic type="Extract">

<parm name="Source" value="touchpal.005" />

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5. Simply said Rename "touchpal.005" to "touchpal.dll"

Any file left is either a .000 which is just a setup file not needed to make the app work so thow it away if it's mentioned in the XML file.

6. Now take a look at this part in the _setup.xml.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<characteristic type="HKCR\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\DefaultIcon">

<parm name="" value="\Program Files\TouchPal\touchpal.dll,0" datatype="string" />

</characteristic>

<characteristic type="HKCR\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\IsSIPInputMethod">

<parm name="" value="1" datatype="string" />

</characteristic>

<characteristic type="HKCR\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\InprocServer32">

<parm name="" value="\Program Files\TouchPal\touchpal.dll" datatype="string" />

</characteristic>

<characteristic type="HKCR\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}">

<parm name="" value="TouchPal" datatype="string" />

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

7. Make a new Blank .txt file in this directory and rename .txt extension to .rgu.

8. Translate the above registry settings into a correct format, the translation below should be reasonably self explanatory.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

REGEDIT 4

[HKEY_CURRENT_USER\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\DefaultIcon]

@="\\Windows\\touchpal.dll,0"

[HKEY_CURRENT_USER\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\IsSIPInputMethod]

@="1"

[HKEY_CURRENT_USER\CLSID\{802C691C-EB46-442c-BC54-DC2C42B156C3}\InprocServer32"]

@=""\\Windows\\touchpal.dll"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

9. Put this information into the rgu file and be sure leave one blank line at the end.

As you can see i have changed the directory to Windows. Since everything you flash to rom starts out in the Windows directory anyway there's no sense in copying it into another directory later on because then it will take up twice the amount of space on the device.

At the moment i think that the best way to interpret the empty Param Name is as either "default" or @. I used @ because it's what i see mostly used for CLSID's. (Whatever they are good for)

10. No more need for the _setup.xml file thow it out of this folder.

11. At this point you should only have all the files that could be renamed and a .rgu file.

12. Time to get a Unique IDentifier Code.

Go here:

http://www.famkruithof.net/uuid/uuidgen

Press Create and copy the code.

13. Rename the something.rgu to 659626bc-7794-11dc-8314-0800200c9a66.rgu

14 Create a new blank.txt file and without doing anything with it rename it to 659626bc-7794-11dc-8314-0800200c9a66.dsm

15. In the case of this app, it will not need a shortcut in the folder nor an initflash.txt file

Create a blank textfile again and change the extension .lnk the extension should now dissapear. On the first and only line type "23#"\Windows\APPNAME.exe".

And then save the file as "Shortcutname.lnk".

16. Download BuildDSM.zip and unzip.

Now read closely.

Drop the folder Containing all the files on top of the BuildDSM.exe.

The .DSM file should now populated with the needed info.

I still don't know what it's good for but i think it has some sort of use as some Cooks swear by it.

Why can tell my why this is so important? But you do this before adding initflash and option.xml becuase those will not go into rom.

17. Now this app will not need an initflashfiles.txt because it doesn't need a shortcut to the app but in case it does need it

Creeate a blank File with the name initflashfiles.txt

Write down:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Directory("\Windows\Start Menu\Programs"):-File("Shortcutname.lnk","\Windows\Shortcutname.lnk ")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Take note off adding blank lines just for fun.

17. Create another Blank text file and name it option.xml.

Open it in notepad.

And paste in this

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<?xml version="1.0" encoding="UTF-16" standalone="yes"?>

<Items>

<Item name="My New SuperDuper App" group="Applications - 300 Group" checked="true">

<Tip>My New SuperDuper App</Tip>

<Guid type="p">659626bc-7794-11dc-8314-0800200c9a66</Guid>

</Item>

</Items>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note that You put the earlier created UID into the xml file.

If your package consists of more than one folder (in the case of WLM and office)

Ad extra lines for every extra folder with their UID numbers.

So it will look like this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<Guid type="p">659626bc-7794-11dc-8314-0800200c9a66</Guid>

<Guid type="1">50898fbc-e5a3-45e4-9cf2-a04a8a01d69b</Guid>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now when you open your BuildOS this app will be selectable so you can choose to Cook it or not.

Oem Packages without option.xml will always be cooked into rom.

Note that "<Tip>" is the info when you highlight the App in BuildOs.

18. Fini

I will ad a part how to adjust it so you can make SD installer for this to, soon.

Variables found in installers

%CE1% = Program Files

%CE2% = Windows

%CE4% = Windows\Start Up

%CE5% = My Documents

%CE8% = Program Files\Games

%CE11% = Windows\Start Menu\Programs

%CE14% = Windows\Start Menu\Programs\Games

%CE15% = Windows\Fonts

%CE17% = Windows\Start Menu

There are more variables so if any one knows more please tell.

Please report Inconsistencies and let's see who's the first one to get a working TouchPal OEM package.

BTW we can't publish it as it's not going to be Freeware and it's being patented at the moment. Which doesn't mean you can make it for personal use and PM it so others can test it

You can grab the cab from http://www.cootek.com/ or try with another of course.