How to make MPKG programs
Wednesday, 22 November 2006

Now we have a very useful step by step tutorial by our Russian commrade whitemoto of how to pack MPKG archives. It follows:

MPKG - that is standart tar.gz archive, which have special file structure that makes it usable on the phone.

The easiest way to learn how to make MPKG programs is to see a simple example. We will use the following hide MPKG program

A) The MPKG will contain the following files:

1) hide.desktop
That is the most important file, which describes the structure of the program. It contains:
    [Desktop Entry]
    BigIcon=hide.png
    Comment=Hide hVideo
    Exec=hide.lin
    Icon=hide_small.png
    Name= HideVideo
    OsVersion=1.1
    Shared=0
    Type=Application

2)hide.png
Big icon of the image of the program that will appear in the main menu. 50x50 pixels is the required size

3) hide_small.png
Small icon 28х28 pixels. Can be used for example when you assign the program on the joystick

4) hide.lin
This is a simple script, which execute commands directly on the phone OS:
    #!/bin/sh
    mv /mmc/mmca1/hVideo /mmc/mmca1/.hVideo

NOTE: This just renames hVideo folder on the flash card to .hVideo, which makes it hidden. You can put any other bash code in the script

B) Now we are on the step of compilling the mpkg archive
Under Linux we just type the following command:
    tar czf hide.mpkg hide

NOTE: Since our phone is linux-based OS - you can do it directly on the phone via Telnet

If you wish to compile under Windows you will need to use the tar and gzip utilities. Download them HERE.

C) Install the MPKG by just starting the file tough your file manager. If you install the MPKG on the Memory Card, then it will write in the address /mmc/mmca1/.system/QTDownLoad and load data to /mmc/mmca1/.system/java/CardRegistry
You can remove the application only manually after that