Symbian OS
read last symbian news on www.newlc.com read last symbian reviews on www.newlc.com
read last symbian tutorial on www.newlc.com read last symbian download on www.newlc.com
13 Aug 2006 - 14:55

NLMakesis is a small utilities that improves the way Symbian OS Makesis works by adding two new capabilities for packaging your application with the possibility to:
-  have SDK independent pkg file
-  process your pkg file using the CPP preprocessor (thus ading macros and #ifdef, etc.... support to the original pkg syntax).

SDK Independent PKG file

A annoying features of the PKG file syntax is that, unless you mount drives to handle your development projects, the content of a PKG file is dependent of:
-  the SDK you have used to compile your project if written like this:

"\Symbian\8.1a\S60_2nd_FP3\epoc32\release\thumb\urel\HelloWorld.APP"                          -"!:\system\apps\HelloWorld\HelloWorld.app"
"\Symbian\8.1a\S60_2nd_FP3\epoc32\data\z\system\apps\HelloWorld\HelloWorld.rsc"          -"!:\system\apps\HelloWorld\HelloWorld.rsc"
"\Symbian\8.1a\S60_2nd_FP3\epoc32\data\z\system\apps\HelloWorld\HelloWorld_caption.rsc"  -"!:\system\apps\HelloWorld\HelloWorld_caption.rsc"
"\Symbian\8.1a\S60_2nd_FP3\epoc32\data\z\system\apps\HelloWorld\HelloWorld.aif"          -"!:\system\apps\HelloWorld\HelloWorld.aif"

-  or the relative location of your project if written like that:

"..\..\..\epoc32\release\thumb\urel\HelloWorld.APP"                          -"!:\system\apps\HelloWorld\HelloWorld.app"
"..\..\..\epoc32\data\z\system\apps\HelloWorld\HelloWorld.rsc"          -"!:\system\apps\HelloWorld\HelloWorld.rsc"
"..\..\..\epoc32\data\z\system\apps\HelloWorld\HelloWorld_caption.rsc"  -"!:\system\apps\HelloWorld\HelloWorld_caption.rsc"
"..\..\..\epoc32\data\z\system\apps\HelloWorld\HelloWorld.aif"          -"!:\system\apps\HelloWorld\HelloWorld.aif"
This is not very convenient when working on a single project with different SDKs,with people having different project directories or just when moving a project from one directory to another.

NLMakesis solves this by letting the makesis command know about your current SDK thus allowing you specify the files to include in your SIS file like this:

"\epoc32\release\armi\urel\HelloWorld.APP"                          -"!:\system\apps\HelloWorld\HelloWorld.app"
"\epoc32\data\z\system\apps\HelloWorld\HelloWorld.rsc"          -"!:\system\apps\HelloWorld\HelloWorld.rsc"
"\epoc32\data\z\system\apps\HelloWorld\HelloWorld_caption.rsc"  -"!:\system\apps\HelloWorld\HelloWorld_caption.rsc"
"\epoc32\data\z\system\apps\HelloWorld\HelloWorld.aif"          -"!:\system\apps\HelloWorld\HelloWorld.aif"

No more dependencies with the SDK or project directories location!

Preprocessor support

If you rename your PKG file with a .pkgp extension, then NLMakesis will send it to the CPP preprocessor along with any -D or -I parameters it found on the command line.

The result of the preprocessing will be stored with a .pkg extension and processed as a standard package file.

Syntax

With cpp preprocessing:

nlmakesis [-h] [-v] [-s] [-ppassword] [-Dmacro[=val]][-Iincludepath] pkgpfile [sisfile]

Normal mode:

nlmakesis [-h] [-v] [-s] [-p password] pkgfile [sisfile]

Download and Installation

Current version: v1.4
nlmakesis.zip
nlmakesis.zip

Download the zip file above, and unzip its content in the Symbian common tools directories which should be located in :

C:\Program Files\<Common Files>\Symbian\tools

Note that the Common Files directory name is dependant of your locale (will be "Fichiers Communs" if you have a french version of Windows, etc...).

Compatibility

NLMakesis has been tested successfully with most Symbian OS v7 and v8 SDKs.

MLMakesis requires an update in the makesis command to work with S60 v3 or UIQ 3 SDKs yet. You can download the updated makesis from UIQ Developer website or get a mirrored version here [1]. Note that the makesis.exe file shall be written in your <YourSDK>/epoc32/tools directory. Not the C:\Program Files\Common Files\Symbian\tools one.

[1] Thanks to Marcus Groeber for pointing out the Symbian v9 makesis issue.

AttachmentSize
makesis.zip266.15 KB
Download posted August 13th, 2006 by eric

Submitted by Marcus Groeber (not verified) on Mon, 2006-08-14 09:15.

One feature I found very useful in a makesis "wrapper" tool that I wrote for my own projects is the ability to pass .pkg files through the C pre-processor, allowing you to use directives such as #include, #define, #ifdef etc. in a package file.

This is especially helpful when using similar .pkg files for different platforms. It also allows you to use a single set of #include files, e.g. for version numbers, UIDs, or product names, within both the source code and the .pkg file.

Essentially I wrote a simple Ruby script that takes the usual makesis switches, plus additionally "-I dir" and "-Dmacro[=val]", and sends the .pkg file through cpp with a commandline such as

cpp -lang-asm -P -undef [-I and -D switches]

before calling the original makesis on the output. Using lang-asm seems to match the .pkg syntax best for comment recognition etc.

As a convention, I use the extension .pkgp for .pkg files that contain pre-processor directives.

I think integrating this function into NLMakesis could be worth looking at.


Submitted by eric on Mon, 2006-08-14 16:36.

Nice idea. The script and the page are now updated with this new feature.

Submitted by Marcus Groeber (not verified) on Mon, 2006-08-14 09:21.

For Symbian 9 SDKs, this article may be helpful, which refers to a bug-fixed version of makesis that again properly interprets the "-d" switch. Could this be the reason why the tool fails for 3rd Edition and UIQ3?

Submitted by eric on Mon, 2006-08-14 12:04.

Yes, the problem is with the interpretation of the "-d" parameter. Thank you for pointing to this!

Submitted by eric on Mon, 2006-08-14 17:10.

For those who uploaded the very first version yesterday:
 v1.1: added support for Symbian v9 SDKs
 v1.2: added cpp preprocessor support
 v1.3: added support for SDK with an alias

Submitted by eric on Mon, 2006-08-14 19:27.


-  v1.4: add support for the @<device> syntax


copyright 2003-2009 NewLC SARL