[Windows Mobile Software Development] Kamill:
Rearranging the Manila Home Screen​

What do I need to know?

Manila uses few types of files: qtc, xml, mode9 and lua. First one is for graphics, second usually for different languages (although not only) and the two last ones are the ones we are interested in. Mode9 files contain information on position, visibility and other properties of almost every element on Manila tabs. Lua files contain different functions, used for animations, updating info and so on.

For editing the Home Screen we need the mode9 file - 1c684cd8_manila and the lua script - 25d04412_manila. You can find these files (from each Manila, starting from 1.0 and ending on 2.5) on this forum.

What tools do I need?

Editing mode9 files is quiet easy. You just have to run m9editor, open the file, make the changes you want and save it. Changing stuff in lua scripts is a bit more complicated, as you have to decompile it. Shorter scripts are easily decompilated by luadec, but some longer ones require us to correct errors. Fortunately, the lua script we have to change is easily decompilated (though there can be a problem with the if condition). To do this follow these points:

- copy luadec.exe and luac.exe to the folder you where you have the lua script (let's say it's c:\compacthome\mod\)

- press Windows Logo + R (or Start > Run) and type cmd

- go to the folder containing the lua script (in this case it's cd \compacthome\mod\)

- type luadec script_name > script_name.txt - where script_name is the script you want to decompile (for example 25d04412_manila) and script_name.txt is the name of the output file, which we will edit

- in case of errors you have to correct them (look for the lua decompiling tutorial by sztupy)

- once you have the script decompiled you don't need to do it again.

- open the output file and change whatever you want

- to compile the file just type luac -o script_name script_name.txt, where script_name is the file we want to have the script_name.txt compiled

What can I change?

When you open the mode9 file we want to edit, expand the tree and you'll see many sections called 'Object'. Below them there are few lines called 'Property'. What you can easily change is:

- Position - just change the value of X and Y (center position (X=0, Y=0) and axis are different for most of the objects - you have to test this)

- Visibility - True or False (sometimes you may have to change the size of a image to 0x0, so that it won't show never)

- Font

- Font Size

- Color of text in RGB format - if Property is not available, add it

In the 25d04412_manila script you can change positions of many objects in both portrait and landscape mode.

- TabsLeft - left part of the clock (animated)

- TabsRight - right part of the clock (animated)

- clock_tabs - background of the clock (pile of tabs)

- alarm_clock - alarm info and date

- NotifiCamera3D - notifications & appointments

- NotificationShiftY - shifting of appointments when changing to small clock

To change the position just modify the first two parameters of Vector3(X, Y, Z) - both CameraPosition.value and LookAtPosition.value.

How to save and test the changes in a fast way?

Open a cab creator (for example WinCE Cab Manager) and add the files you changed to /Windows. Save the cab, copy it to your device, install and reboot Manila. You can also copy manually the file, but I prefer the first way, because in case of any problems you can easily uninstall the cab and get the default Home Screen.

How to get the Home Screen working with Background4AllTabs?

Just open the 1c684cd8_manila file by m9editor, look for 'HomeBackground' and delete the whole paragraph which contains it (from <Object>Type="Group" to the next <Object>Type="Group").

- - -​

If you have any suggestions, propositions or ideas, please write them in this thread, I'll try to complete this tutorial, so it will be useful for everyone. Thanks!