addingpydextensionfilestoasisbuild

Adding PYD extension files

to a SIS build

Extensions make you look and feel young again!

more tutorial pages

There are tons of cool extensions you can add to your PyS60 applications. My favorite is uikludges by Simo Salmine, which allows you to change the label on the right soft key. These extensions are usually written in C++ and only give you a *.PYD, which you easily can push to your phone (via bluetooth or cable). Your phone automatically installs it in the right place for all the python apps to use it.

When you build a SIS application, it would be nice to include the PYD extension inside the SIS file, saving people an annoying set of extra install steps.

First, you should be familiar with Jürgen's tutorial on building python SIS files.

There, you will notice the last step where you use makesis to create a sis from your application's PKG file.

In his example, you will find the sample PKG file:

; Standalone Python for S60 app

;Languages

&EN

#{"mobiLen"},(0x0FFFFFFF),1,0,0

;Supports Series 60 v 2.0

(0x101F7960), 0, 0, 0, {"Series60ProductID"}

; Files to install:

"default.py" -"!:\system\apps\mobiLen\default.py"

"mobiLen.app" -"!:\system\apps\mobiLen\mobiLen.app"

"mobiLen.rsc" -"!:\system\apps\mobiLen\mobiLen.rsc"

"mobiLen.aif" -"!:\system\apps\mobiLen\mobiLen.aif"

Basically, we need one line to tell makesis two things. First, the path to where we have our PYD file on disk. For this example, lets say we copied it to the same folder as the PKG file. Second, we need to tell the SIS file where to install the PYD file. These are installed by default in the system's LIBS dir, but can also be installed wherever python is installed. I'll use the default LIBS dir for this example.

So, we will add the line:

"UIKLUDGES.PYD" -"!:\system\libs\UIKLUDGES.PYD"

You can see this sample.pkg for reference.

© Copyright David Ayman Shamma: ayman shamma•gmail com