|
|
|
It is possible for your application to work on all UIQ 3 phones and at the same time take advantage of the SVG icons if that is supported. All the steps you need to take are explained below.
Step-by-step:
Create an SVG icon to be used as an application icon in the application launcher, in this example HelloWorldAppIcon.svg
Copy the HelloWorld_loc.rss file to HelloWorld_svg_loc.rss and change the icon_file from HelloWorldAppIcon.mbg to the newly created HelloWorldAppIcon.svg:
// HelloWorld_loc.rss
//
// © UIQ Technology AB 2007. All rights reserved.
//
#include <AppInfo.rh<
#include "HelloWorld_loc.rls"
// This file localise the applications icons and caption
RESOURCE LOCALISABLE_APP_INFO
{
caption_and_icon =
{
CAPTION_AND_ICON_INFO
{
caption = STRING_r_helloworld_caption;
number_of_icons = 3;
icon_file = "\\Resource\\Apps\\HelloWorldAppIcon.mbg";
}
};
}
// HelloWorld_31_loc.rss
//
// © UIQ Technology AB 2007. All rights reserved.
//
#include <AppInfo.rh<
#include "HelloWorld_loc.rls"
// This file localise the applications SVG icon and caption
RESOURCE LOCALISABLE_APP_INFO
{
caption_and_icon =
{
CAPTION_AND_ICON_INFO
{
caption = STRING_r_helloworld_caption;
number_of_icons = 3;
icon_file = "\\Resource\\Apps\\HelloWorldAppIcon.svg";
}
};
}
Add the HelloWorld_svg_loc.rls file to the HelloWorld.mmp file so that both files are built.
START RESOURCE HelloWorld_loc.rss
TARGETPATH \Resource\Apps
LANG SC
END
START RESOURCE HelloWorld_svg_loc.rss
TARGETPATH \Resource\Apps
LANG SC
END
Build your application.
START RESOURCE HelloWorld_svg_loc.rss
TARGETPATH \Resource\Apps
LANG SC
END
Modify the HelloWorld.pkg file to install the correct files depending on what UIQ platform the application is being installed to.
; HelloWorld.pkg
;
; © UIQ Technology AB 2007. All rights reserved.
;
%{"UIQ SDK Example"}
:"UIQ Technology"
; Package header
#{"HelloWorld"}, (0xE0001001), 1, 0, 0, TYPE=SA
; Use ProductID for the UIQ 3.0 platform to ensure installation on
; UIQ 3.0 as well as UIQ 3.1 based phones
(0x101F6300), 3, 0, 0, {"UIQ30ProductID"}
; Files common to both UIQ 3.0 and UIQ 3.1
"HelloWorld.exe"-"!:\sys\bin\HelloWorld.exe"
"HelloWorld.rsc"-"!:\resource\apps\HelloWorld.rsc"
"HelloWorld_reg.rsc"-"!:\private\10003a3f\import\apps\HelloWorld_reg.rsc"
; If SVG is supported, install SVG icon
; Else, install MBM icon
IF package(0x101F64C7)
"HelloWorldAppIcon.svg"-"!:\resource\apps\HelloWorldAppIcon.svg"
"HelloWorld_svg_loc.rsc"-"!:\resource\apps\HelloWorld_loc.rsc"
ELSE
"HelloWorldAppIcon.mbm"-"!:\resource\apps\HelloWorldAppIcon.mbm"
"HelloWorld_loc.rsc"-"!:\resource\apps\HelloWorld_loc.rsc"
ENDIF
Create the SIS file.