[Touch Diamond, MDA Compact IV ROM Development] cyron_at:
Platformrebuilder - New ROM Kitchen

Features:

- Full support for all HTC devices

- Easy XIP porting

- Does not depend on rgucomp anymore, instate building its own hives

- Native c++ (means faster)

- EXT packages (Extended packages)

- Support for building multiple languages and editions of a rom with a single Kitchen

- More configurable paths

- Using packages in XIP now

Extended Packages Structure:

* .\My EXT Package\

The Package itself can be named as you like

* .\My EXT Package\files\

All files that you put into this 'files' folder will be added to the OS

* .\My EXT Package\app.reg

The reg file can be Unicode or ANSI and contains the Package registry

* .\My EXT Package\app.dat

Same as the reg file, but content will be added to initflashfiles.dat

This part is for the local part of the package, like language dependent reg entries or files:

* .\My EXT Package\0409\files\

* .\My EXT Package\0409\app.reg

* .\My EXT Package\0409\app.dat

It works exactly the same way as 'files', app.reg, app.dat in root of the Package, but it will only be added to the OS if you are building a WWE rom

...

* .\My EXT Package\<LOCALE>\files\

* .\My EXT Package\<LOCALE>\app.reg

* .\My EXT Package\<LOCALE>\app.dat

You can add as many local folders as you like, this is EXTREAMLY useful if you like to build more than one language of your ROM

Summary:

+ Files and RGU file is not in one folder anymore

+ DSM file is not needed anymore

+ Possible to make packages that support multiple languages

+ There will be a tool that converts OEM packages automatically to EXT packages

+ .reg and .dat files can be Unicode or ANSI

+ reg files dont need REGEDIT4 and the empty line anymore

+ The language to use is selected inside the .bat file by: set LOCALE=0409

Skip files:

One very important new part are the skip files, you can place this skip files inside SYS, OEM, EXT packages.

In build_rom.bat you will find this two lines:

set LOCALE=0409

set BUILD=Premium

LOCALE should be set to the language you want to build the ROM for

BUILD is some custom value like Premium/Basic/Lite (you can call it however you like, 高级/基本/建兴 would be working too)

* _skip

This package will be skipped always.

* _skip_0409

This package will not be included to the OS if you set LOCALE to 0409.

* _skip_Lite

This package will not be included to the OS if you set BUILD to Lite.

* _only_0409

This package will only be included to the OS if you set LOCALE to 0409.

* _only_Premium

This package will only be included to the OS if you set BUILD to Premium.

Example:

We are building:

Languages: 0409, 0407, 0404

Editions: Premium, Basic, Lite

OEM\Package 1\_skip_0409

OEM\Package 1\_skip_0407

OEM\Package 2\_skip_Lite

OEM\Package 2\_skip_Premium

OEM\Package 3\_only_Premium

Package 1: Will only be included if you are building a 0404 rom.

Package 2: Will only be included if you are building a Basic rom.

Package 3: Will only be included to a Premium build.

- As you can see there can be more than one skip file in one package.

- A skip file is just a file (like an empty text file) that is renamed to "_skip_xxx", important is that this file MUST not have an extension, only filename!

- In EXT packages put the skip file into the root of the package.

Important to know is that skip files are ignored if you are explicitly referring to a package path... just continue reading...

The following might sound a little complex, but it really is not and you might not need it in case that you are only building a one language rom...

... anyway, there is a sample Diamond Kitchen with multilingual support in the download section.

Paths and Patterns:

This Kitchen is using free configurable patterns for XIP, SYS, OEM, EXT.

Patterns can have wildcards or can be explicit, like this examples:

* set EXT_PATTERNS=EXT\*

This will search for all packages inside .\EXT\ folder. e.g.:

Kitchen\EXT\Package 1\

Kitchen\EXT\Package 2\

... (all packages inside EXT will be added)

* set EXT_PATTERNS=EXT\My Package

This will explicitly add only one package. e.g.:

Kitchen\EXT\My Package\

* set EXT_PATTERNS=EXT1\* ; EXT2\* ; EXT3\Settings

This will explicitly add all packages inside EXT1 and EXT2 and at the end EXT3\Settings. e.g.:

Kitchen\EXT1\Package 1\

Kitchen\EXT1\Package 2\

...

Kitchen\EXT2\Package 1\

Kitchen\EXT2\Package 2\

...

Kitchen\EXT3\Settings\

* set EXT_PATTERNS=EXT\*\*

This is very special, it means you can group your packages into collections like this:

Kitchen\EXT\<collection>\<package>

e.g.:

Kitchen\EXT\Original Diamond\<packages>

Kitchen\EXT\From Raphael\<packages>

Kitchen\EXT\From HD\<packages>

Kitchen\EXT\Own Apps\<packages>

...

* set EXT_PATTERNS=C:\EXT\* ; d:\My Packages\debug apps

This should just show that the packages do not have to be inside the Kitchen anymore

In build_rom.bat you will see this lines:

set ROMHDR=ROM\romhdr.bin

set XIP_PATTERNS=ROM\XIP\*

set SYS_PATTERNS=SYS\*

set OEM_PATTERNS=OEM\*

set EXT_PATTERNS=EXT\*\*

Use your creativity for example for multilingual builds:

* set SYS_PATTERNS=SYS\%LOCALE%\*

This line will use SYS\0409\* in case that you are building with LOCALE=0409, but if you set LOCALE=0407 it will use SYS\0407\*

... you should really try to understand this line, so here an additional explanation:

set LOCALE=0409 is declaring a variable called LOCALE with the value 0409. If you write %LOCALE% somewhere in the bat file it's the same as writing 0409 directly, but if you change the LOCALE variable now, it will automatically change the meaning of %LOCALE%.

This means you can switch the language of your ROM Kitchen by just changing the value of set LOCALE=0409

* set SYS_PATTERNS=SYS\COMMON\* ; SYS\%LOCALE%\*

This line will use packages inside SYS\COMMON for all languages and it will add only the local packages from SYS\0409 if you are building LOCALE=0409

SYS.png

* set OEM_PATTERNS=OEM\* ; OEM\OEM_Lang_%LOCALE%

The idea behind this line is to have all the OEM_Lang_xxxx folders inside OEM:

OEM.png

But right now it would create a list of packages to add to the OS like this:

OEM_Lang_0407

OEM_Lang_0409

OEMDrivers

OEMMISC

OEM_Lang_0409 (<- You see in this case LOCALE was set to 0409, so this package was added for OEM\OEM_Lang_%LOCALE%)

Problems are now that all OEM_Lang_xxxx folders inside OEM have been added and that OEM_Lang_0409 has been added two times.

We solve that using the skip files, we just place a "_skip" file inside all the OEM_Lang_xxxx packages.

The clue is that skip files are ignored if you are explicitly referring to a package, so this will create us the list that we always wanted:

OEMDrivers

OEMMISC

OEM_Lang_0409 (<- Added because of OEM\OEM_Lang_%LOCALE%, but ignored by OEM\* because of the skip file inside the package )

http://xdaforums.com/showthread.php?t=467488