[Windows Mobile Software Development] 12aon:
Working with Manila Files

Once the HTC Manila OEM files have been decompiled, changes may be made as required. The Manila Kitchen provides a single work area for Manila file editing; this is:

Workspace

Workspace

This workspace contains all of the decompiled Mode9 files, graphics, and other Non-LUA files that are typically manipulated using the M9Editor, Notepad2, and/or CFC_GUI.

Workspace\_lua

This area of the workspace contains all of the decompiled LUA files. Use a standard UTF-8 compatible editor such as Notepad2 to make changes to the files.

LUA Editing

Files that have failed to decompile during the initial decompilation process typically need to be manually edited so as to address the cause of the failure. Editable *.lua Manila files reside in the .\Workspace\_lua folder and may be change with a text editor such as Notepad2.

Once the Manila file has been fixed, initiate the the LUA Comparison (luatool.exe) tool to validate that the changes made to the file are correct.

The LUA Comparison process will compare the changes made to the decompiled Manila file against the original Manila file. If successful, the Manila file will be moved from the .\Incomplete or .\Error folder to the

.\Completed folder.

The following procedure will initiate the comparison process.

► To initiate Manila file comparison

At the prompt, type the following command: manilatool.cmd -cmp

Press ENTER.

Mode9 Editing (Mode 9, Graphics, PNG)

M9Editor is a tool for editing Manila files; nearly all aspects of a Mode9 LUA file can be viewed, changed, and saved. Mode 9 LUA Manila files are stored in the .\Workspace\Mode 9 folder and are changed with from within the M9Editor.

Additionally, the M9Editor tool provides graphics import/export capabilities as well as Chainfire File Compression (CFC) support. Lastly, the M9Editor tool includes a folder (directory) viewer which displays information specific to Manila files.

Although it is possible to decompile Manila files with the M9Editor tool, the current version (3.0.03) utilizes a deprecated version of the LUA Decompiler (luadec.exe) which is not supported by this Manila Kitchen.

► To initiate the M9Editor tool

Navigate to the Manila Kitchen folder.

Double-click the M9Editor shortcut.

General Editing (InternetPortal, Manilapages, QTC, PNG, SQLite, TTF, XML)

Some of the Manila files found in the .\Workspace folder may also be changed by other tools such as Notepad2 and CFC_GUI.

► To use an other tool to edit certain Manila files

Launch the desired tool (ex: Notepad2, CFC_GUI, etc.)

Select the Open file option from within the tool.

Navigate to the .\Workspace folder.

Select the Manila file to change.

Updating 'm9editor.names.txt'

From time to time, HTC adds new Manila files or updates the names of existing ones. To update the M9Editor Reference Index file, initiate the Manila name scan process using the MANILATOOL command script. The Manila Name Finder (mnf.exe) tool will iterate through the HTC Manila OEM files found in the .\_SOURCE folder and obtain the new names.

Updating the m9editor.names.txt reference index file ensures that the M9Editor tool is able to display the friendly Manila file name making it easier to work with Manila files - instead of the compiled Hash name used by HTC. Currently, there are two versions of Manila reference index names; one for pre-Manila 2.5 and one for post-Manila 2.5.

The Manila name scan process supports the following Manila versions: 2.5, 2.2, 2.1, 2.0, 1.3, 1.2, 1.1, and 1.0. Specifying a Manila version other than 2.5 will initiate the Manila Name Finder (mnf.exe) tool in pre-Manila 2.5 scan mode. The MANILATOOL command script determines which scan mode to use by first querying the 'kitchen-ver' file - if the value is 0.0; the mode specified in the command parameter is utilized.

Use one of the following procedures to initiate the appropriate M9Editor reference index update process.

► To initiate a pre-Manila 2.5 reference index update

At the prompt, type the following command: manilatool.cmd -mnf:2.1

Press ENTER.

► To initiate a Manila 2.5 reference index update

At the prompt, type the following command: manilatool.cmd -mnf:2.5

Press ENTER.

Updating the Repository

Updating the .\Repository folder ensures that a recent backup copy is available in the event that a change to *.lua must be reversed. During the repository update, decompiled *.lua files found in the .\Workspace\_lua folder are copied to the .\Repository\_lua and a hierarchy (by unhashed names) is created in the .\Repository\windows folder.

The .\Repository\windows folder hierachy displays shortcut links to the Manila files that correspond to a Manila feature. For example, navigate the hierarchy and double-click the shortcut link that corresponds to the file that requires modification - the appropriate tool will be launched.

The following procedure will initiate the repository update process.

► To initiate a repository update

At the prompt, type the following command: manilatool.cmd -lib

Press ENTER.