Mobiles Mania: Creating ur own icons for ur apps - Mobiles Mania

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating ur own icons for ur apps Rate Topic: -----

#1 User is offline   nouxxer Icon

  • Nouxxer[Network]Studio
  • Icon
  • Group: Special Poster
  • Posts: 2,098
  • Joined: 10-July 06
  • Gender:Male
  • Location:Malaysia
  • Interests:Hehe
  • Mobile:5800 xm (Cert by iMobile), 6120classicv6(Cert by Bajak)

Posted 18 August 2008 - 01:11 AM

Creating ur own icons for ur apps


First of all you need to have the following software installed installed on your machine:


A. Symbian SDK

B. Python plug-in for the SDK

A.download Symbian SDK by googling

B.http://www.mobilenin...._2ndEd_SDK.exe


1. Creating the icons

In order to create these icons you can use e.g. a graphic editor like photoshop or fireworks:

icon1 for the top of the canvas (when your app is running):

Create a colour bitmap icon (icon1.bmp) and a one-bit mask
(icon1mask.bmp) for it, both 44 x 44 pixels in size, save them to your
C:\myapps folder

Downloadable examples: icon1.bmp icon1mask.bmp

icon2 for the desktop:

Create a colour bitmap icon (icon2.bmp) and a one-bit mask
(icon2mask.bmp) for it, both 42 x 29 pixels in size, save them also to
your C:\myapps folder

Examples: icon2.bmp icon2mask.bmp

Note:

Regarding the one-bit mask: In order to create an icon that has
tranparent areas, we need to create a corresponding mask to identify
those areas. Such transparent areas need to be coloured white in the
mask (e.g. in icon1mask.bmp) and areas that stay visible in the icon
shall be coloured black in the mask (e.g. icon1mask.bmp).

2. Merging the icons and its masks into an *.mbm file (MultiBitMap):

As a next step you need to create an mbm file with your created *.bmp
files using a tool called bmconv that came with the Symbian SDK
intallation. You can do this via the command line terminal. (mbm files
(MultiBitMap) are pictures in native Symbian OS format. MBM files can
consist of either one or multiple pictures (frames)).

Make sure you have saved all your earlier created *.bmp files to C:\myapps

On the command line terminal go to the myapps directory by typing: cd C:\myapps

On the command line terminal type:

bmconv testapp.mbm /c24icon1.bmp icon1mask.bmp /c24icon2.bmp icon2mask.bmp

Hint: make sure you add /c24 (as 24bit colour picture) in front of the icon file name and leave no space inbetween.

The resulting file is testapp.mbm which is found in your C:\myapps folder.

Example: testapp.mbm

3. Creating an *.aif file (application information file):

Now you need to create an *.aif file (application information file that
links your icons to your app) using a tool called aif tool that came
with the Symbian SDK intallation.

But in order to do that you need to:

A. first have a *.rss file.

For now you can use this example mobiLen.rss file and modify it - e.g.
with notepad - See the modifying instructions in bold here:

//--------------------------------------------------------------------------------

// mobiLen.rss

#include <aiftool.rh>

RESOURCE AIF_DATA

{

caption_list=

{

// Determine the name of your app:

// You need to replace the name mobiLen with the name of your own app

// It determines what name is printed below the icon on the phone

CAPTION { code=ELangEnglish; caption="mobiLen"; },

CAPTION { code=ELangFrench; caption="mobiLen";}

// to work round an AIFTOOL bug, you need to have at least

// one language mentioned here

};

// You need to replace the following app uid with your own applications UID that you plan // to use for your app.

app_uid=0x0FFFFFFF;

// Put here the number of icons (not including the masks), in our case we use 2 icons

num_icons=2;

}

//--------------------------------------------------------------------------------

Note: Do not copy & paste the rss file content from the text above (html), rather download and use this example file here:

Example file: mobiLen.rss

Modify the mobiLen.rss file and save it to your myapps folder.

B. Now finally create the *.aif file

On the command line terminal type:

aiftool mobiLen testapp.mbm

(C:\myapps>aiftool mobiLen testapp.mbm )

You can find your ready mobiLen.aif file in your C:\myapps folder . It contains the icons.

Example of the ready usable file: mobiLen.aif

4. Create a preliminary *.sis file to generate a modifyable *.pkg file

The idea here is that we need a *.pkg (packaging file) to insert some
information about the myapp.aif file how it should be packaged.

A. On the command line terminal type:

py2sis test.py myfirst.sis --uid=0x0FFFFFFF --appname=mobiLen --leavetemp

(C:\myapps>py2sis test.py mobiLen.sis --uid=0x0FFFFFFF --appname=mobiLen --leavetemp)

What is what?

py2sis - an executable that does the file conversion, the rest are parameters:

test.py - Source script in this case your python script

mobiLen.sis - the name the resulting SIS file

uid=0x0FFFFFFF - Symbian UID for the app (can be between 0x0FFFFFFF and 0x0FFFFFFF)

appname=mobiLen - this is the name of your application inside the
phone. (it also defines paths and filenames inside the *.pkg according
to this name)

leavetemp - this leaves a temporary folder called temp in which you find useful files


The resulting file that we need at this point is the mobiLen.pkg file
(and not the *.sis file). You find it inside a folder called temp that
is left over inside your myapps folder.

Example file (unmodified): mobiLen.pkg


Note: the file name mobiLen.pkg comes from the appname that we used in
the previous command. If you use a different appname also the *.pkg
will change accordingly as well as the paths inside and filenames of
other files etc. !).


B. Modify the mobiLen.pkg file


You can do the editing e.g. with notepad according the instructions here in bold text.


mobiLen.pkg example:

----------------------------------------------------------------------------

;

; Standalone Python for S60 app

;

;Languages

&EN

;

; make sure the UID her as 0x0FFFFFFF is changed according to your own

#{"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"



; Add this line and change the myapp.aif to your *.aif file (at beginning and at the end)

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

; ---------------------------------------------------------------------------

Note: Do not copy & paste the *.pkg file content from the text
above (html), rather download and use this ready modified example file
here:

Modified example: mobiLen.pkg

C. Save your modified file as mobiLen.pkg to the temp folder inside your myapps folder.

(make sure the mobiLen.pkg is stored to the temp folder)

D. Copy now your earlier created mobiLen.aif file also to the temp folder inside your myapps folder.

(NOTE: make sure your *.aif file has the same name as the *.pkg file
which should be the same name as the "appname" given when you generated
the *pkg file in step 4)

5. Create now your final *.sis file by using this time the makesis tool:

A. Go to the temp directory by typing on the command line: cd temp

B. On the command line terminal type:

makesis mobiLen.pkg

(C:\myapps\temp>makesis mobiLen.pkg )

The resulting standalone app file is called mobiLen.sis and is found in
your C:\myapps\temp folder. You can push this to your phone, install it
and run. It should now have your own icons included.

Final working example: mobiLen.sis

Note: If you want to add also the python interpreter into your sis
file, you can go through the detailed instructions below, or take this
shortcut: all you need to do is basically copy the python interpreter
sis file into you temp direcory and add this line in the mobiLen.pkg
file: @".\PythonForSeries60.SIS",(0x1020151 0) . After that run:
makesis mobiLen.pkg

This post has been edited by nouxxer: 18 August 2008 - 01:13 AM

₪nouxxer[network]studio₪



Kaspersky Antivirus Definition Update [S60v2] [S60v3 v7 v8]
0

#2 User is offline   WackyWonderkid  Icon

  • Mobile Genius
  • Icon
  • Group: SZ Member
  • Posts: 276
  • Joined: 10-August 05
  • Gender:Male
  • Location:Indonesia
  • Interests:Symbian 3rd Edition OS 9.2
    Themes
    Photoshop
  • Mobile:Nokia 6120 Classic 2GB

Posted 18 August 2008 - 04:34 AM

Wow.. Can you provide the screenshot please?..
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic