PDA

View Full Version : Making a cab - a small tutorial


frauhottelmann
11th April 2008, 03:18 PM
Because people asked and didn't find the threat on MoDaCo, a small tutorial here. The example is from my Slide Panther theme, there is another one in make.zip. You have to write an *.inf for each cab you want to create. I t contains all files from a specific location and where they will be copied to. You can also specify reg keys.
[Version]
Signature = "$Windows NT$" <-- no changes needed
CESignature = "$Windows CE$" <-- no changes needed
Provider = "frauhottelmann" <-- change to your name

[CEStrings]
Appname="slide panther" <-- the name that will be displayed in the programs menu in settings

[CEDevice] <-- you don't have to change this for the vox
ProcessorType=0
VersionMin=5.2
VersionMax=6.0

[SourceDisksNames]
1=,"Source1",,"Home" <-- specify the name of your source and then the folder with your files (should be in the same location of the *.ini)

[SourceDisksFiles] <-- All files you want to copy have to be here. The 1 stands for Source1 mentioned above, if you have more than one sources (folders) you have to add it above and add an = 2 ... to the end of the corresponding files!
"Slide Panther.home.xml"= 1
"panther.jpg" = 1
"pantherlc.jpg" = 1

[CopyFiles1] <-- Here you have to list the files for one destination folder on the phone. More than one destiantion means more [CopyFiles2] etc.
"Slide Panther.home.xml"
"panther.jpg"
"pantherlc.jpg"

[DestinationDirs] <-- Specify the destinations for the above
CopyFiles1=0,"\Application Data\Home"

[RegData] <-- add reg data, the following is for string values, I don't know how to add dwords, but I never needed it!
HKCU,ControlPanel\Home,Scheme,,\Application Data\Home\Slide Panther.home.xml

[DefaultInstall] <-- Finally specify what you want to be installed, here every destination dir and reg data should be included
CopyFiles=CopyFiles1
AddReg=RegData

Once your done with your *.inf, just drag'n'drop it onto the cabwiz.exe and it'll make a cab with the same name as the *.inf! Now you can install it!

Or the alternative, use this (http://www.gpcarreon.com/?p=524) program!

kimamil
11th April 2008, 03:25 PM
BIIIIIIIIIIIIG thx to the german guy ;D

but don't we have to change the versionmax to 6.1 or we will get this stupid "this prog may not display correctly" message??

frauhottelmann
11th April 2008, 04:03 PM
No, this is the version of WinCE not Windows Mobile, which is still at 5.2...!

Rolandh
12th April 2008, 11:23 AM
Can this be used to install changes to the registry that will be lost after a hard reset?

Roland

frauhottelmann
12th April 2008, 11:42 AM
Yes everything you install with a cab is lost after hard reset

TheBo
12th April 2008, 01:07 PM
Nice work...as always...

/**still waiting for german emulator image...;)...same here for italian's one. **/

kimamil
14th April 2008, 07:21 PM
could you please be a bit more precise about those regkeys? what are all these commas? what are the folder, keys, values?

frauhottelmann
14th April 2008, 08:05 PM
HKCU,ControlPanel\Home,Scheme,,\Application Data\Home\Slide Panther.home.xml
HKCU = HKEY_CURRENT_USER
then after the comma the "folder" path, after the next comma the key name
then after the next comma comes the reg key type, so none is for a string, for others you have to search, because I don't know them. And finally after the last comma comes the value of the reg key! :)

kimamil
15th April 2008, 08:13 AM
funny thing, now that i was looking for th value-types i found the tutorial on modaco.

http://www.modaco.com/content/Smartphone-Customisation-General-Discussion/235885/Tutorial-Creating-Cab-Files/

kimamil
15th April 2008, 08:46 AM
and here are the flags for diferrent types of registry entries:


[add_registry_section]

registry_root_string , subkey,[value_name], flags, value[,value]

[registry_root_string, subkey,[value_name], flags, value[,value]]

registry_root_strings

String that specifies the registry root location. The following table shows the values that are supported by Windows CE.

Root string Description

HKCR The same as HKEY_CLASSES_ROOT

HKCU The same as HKEY_CURRENT_USER

HKLM The same as HKEY_LOCAL_MACHINE

value_name

Registry value name. If empty, the "(default)" registry value name is used.

flags

Numeric value that specifies information about the registry key. The following table shows the values that are supported by Window CE.

Flag Value Description

FLG_ADDREG_NOCLOBBER 0x00000002 If the registry key exists, do not overwrite it. This flag can be used in combination with any of the other flags in this table.

FLG_ADDREG_TYPE_SZ 0x00000000 The REG_SZ registry data type.

FLG_ADDREG_TYPE_MULTI_SZ 0x00010000 The REG_MULTI_SZ registry data type. The value field that follows can be a list of strings separated by commas.

FLG_ADDREG_TYPE_BINARY 0x00000001 The REG_BINARY registry data type. The value field that follows must be a list of numeric values separated by commas, one byte per field, and must not use the 0x hexadecimal prefix.

FLG_ADDREG_TYPE_DWORD 0x00010001 The REG_DWORD data type. Only the non-compatible format in the Win32 Setup .inf documentation is supported.

The following code example shows a typical [AddReg] section.

AddReg = RegSettings.All

[RegSettings.All]

HKLM,%reg_path%,,0x00000000,alpha ; <default> = "alpha"


got it from here http://www.sundialsoft.freeserve.co.uk/cabinfo.htm

kimamil
15th April 2008, 04:58 PM
could it be that we need to make a .inF (as it says in the instructions) file and not a .inI file?

kimamil
15th April 2008, 07:39 PM
Is it possible to delete registry entries??

frauhottelmann
15th April 2008, 10:53 PM
Yes it's inf sorry. And I am not aware of a way to delete reg key with cabs!

prabhatnath
23rd April 2008, 09:42 AM
Hi frauhottelmann,

It is realy great starting point for CAB maker. I will use this instructions for making my Sliding Panel Default Green cab for 6.1 ver 1.1 ROM.

frauhottelmann
5th May 2008, 08:12 PM
I have found something really great for cab makers: http://www.gpcarreon.com/?p=524
Haven't tried it though!

EDIT: Under Vista it does, unfortunately, not work!

frauhottelmann
7th May 2008, 06:40 PM
It DOES work, in compatibility mode!