Creating an IPK from the HelloWorldApplet

The instructions are very crude and may not be complete quite yet. The file and instructions below will help you create an ipk file for the  HelloWorldApplet you created earlier.   Throughout this tutorial you will be renaming files and editing files so that instead of it making an ipk for a Hangman app it will make and ipk for the HelloWorldApp.

In the future I will be creating a GUI app that will help you create ipk files.

Download -

    ipkcreatorhangman.zip - unzip this to create the necessary folder structure and file on your pc, this zip file contains the contents of the Hangman applet

    hangman_2.0_arm.ipk - ipk that is created from using the ipkcreatorhangman.zip

---------

    ipkcreatorhelloworldapplet.zip - this is the folder structure after you have edited all the files, it contains the contents of the HelloWorldApplet applet

    helloWorld_1.0_arm.ipk - ipk that is created from this tutorial

---------

    HelloWorldApplet.class - class file that you are going to use later

    HelloWorldApplet.html - html file that you are going to use later

Instructions -

    Bear with me, these instructions may not be perfect.

    Extract the contents of the ipkcreator.zip file onto your computer into a new folder called ipk keeping intact the folder structure. 

    wpe19.jpg (32619 bytes)

    Edit the contents of the makepack.bat file.This batch file will tar, gzip, and rename all your files up into an ipk file later.  I have shown the contents of this file below.  The words in red can be changed to match the any app that you need to make an ipk for.

makefile.bat

tar -cvf control.tar ./control

gzip control.tar

tar -cvf data.tar ./home

gzip data.tar

tar -cvf HelloWorldApplet.tar ./control.tar.gz ./data.tar.gz

gzip HelloWorldApplet.tar

ren HelloWorldApplet.tar.gz HelloWorldApplet_1.0_arm.ipk

   After changing the red text to match the name of your app save your changes.  (Make sure it is still called makepack.bat and not makepack.bat.txt)

   Next, edit the control file.  I have shown the contents of this file below.  The words in red can be changed to match the name of your app.

control

Package: HelloWorldApplet

Installed-Size: 3k

Filename: ./HelloWorldApplet_1.0_arm.ipk

Section: java

Maintainer: Hello <hello@sharp.com>

Architecture: arm

Version: 1.0

Description: Test sample

 

After changing the red text to match the name of your app save your changes.

Next, open the ipk\home\QtPalmtop\Jeode folder, rename the Hangman.desktop to HelloWorldApplet.desktop and edit the newly renamed file. 

wpeD.jpg (26533 bytes)

Change the Hangman references in the file to HelloWorldApplet.

HelloWorldApplet.desktop

[Desktop Entry]

Comment=A HelloWorldApplet Applet

Exec=runHelloWorldApplet

Icon=HelloWorldApplet

Type=Application

Name=HelloWorldApplet

Save your changes to this file.

Next open the c:\ipk\home\QtPalmtop\bin folder, rename the runHangman file to runHelloWorldApplet, and edit the newly renamed file. 

ipk7.jpg (21400 bytes)

runHelloWorldApplet

. /home/QtPalmtop/bin/installdir.sh # set INSTALLDIR

$QPEDIR/bin/evm -XappName=runHelloWorldApplet -appletviewer $QPEDIR/java/HelloWorldApplet.html

 

If you are going to run an application instead of an applet from an html file you will want to use the following instead of the above.  However, for this tutorial we are using and applet called from and html file and you will want to use the text above instead.

runHelloWorldApplet

   #1/bin/sh $QPEDIR/bin/evm -XappName=runHelloWorldApp -cp $QPEDIR/java HelloWorldApp

 

Save your changes to this file.

Next open the c:\ipk\home\QtPalmtop\java folder, copy the HelloWorldApplet.class file and the HelloWorldApplet.html file from the top of this page.

HelloWorldApplet.html

<applet code="HelloWorldApplet" width="240" height="280">

</applet>

<html>

<head>

<title></title>

</head>

<body>

</body>

</html>

Save your changes.

Next, copy your class file to the c:\ipk\home\QtPalmtop\java folder.

After you are finished with all this you can open a command prompt and run the makepack.bat file.

If it worked correctly this should be your output.

wpe1A.jpg (41582 bytes)

You can now upload the HelloWorld_1.0_arm.ipk to your Zaurus and install it.