Главная » Просмотр файлов » Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007

Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (779887), страница 13

Файл №779887 Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (Symbian Books) 13 страницаWiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (779887) страница 132018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 13)

Symbian OS does notuse a makefile because:•The system supports many types of build tools (including make programs) and so needs a generic solution with platform independence.•A custom build system can define information specific to Symbian,such as the program UIDs.•IDE tools such as Carbide.c++ have the ability to import MMP files tocreate Symbian application projects.As you will see later, Symbian build tools generate makefiles basedon this MMP file – this is all done behind the scenes from an applicationdeveloper’s viewpoint.The Symbian build system will be discussed in Chapter 5. For thisexample the main thing to note is that it defines what source and resourcefiles should be compiled and what libraries should be used for linking.The locations to search for project-defined and system include files, andsource files and locations, are also defined.TARGET TYPE should always be EXE and the first number underUID should always be 0x100039CE for GUI applications.

The secondnumber under UID identifies the application specifically and shouldalways match the one returned by AppDllUid in the application object(in file SimpleEx app.cpp in this example).The only difference between the platforms in the MMP file is theGUI-specific library for that particular platform. S60 uses avkon.liband UIQ uses qikctl.lib.Creating the bld.inf fileThe file bld.inf points the build tools to the correct project definition(MMP) file. Type this into a file and name it bld.inf in the groupdirectory:PRJ_MMPFILESSimpleEx.mmp2.4 Building and Executing on the EmulatorTo build the application, change directory to the group subdirectory andexecute these commands:c:\...\group> bldmake bldfilesc:\...\group> abld build winscw udebBUILDING AND EXECUTING ON THE EMULATORFigure 2.10S60 3rd Edition ExampleFigure 2.11 UIQ 3 Example5758SYMBIAN OS QUICK STARTMake sure you have the appropriate SDK selected when you enter thesecommands.

This can be done with the devices command as describedin section 2.2.Run the emulator on the PC (for example, by typing epoc at thecommand prompt as described in section 2.2.1) and select the applicationlabeled SimpleEx from the desktop on UIQ or ‘Installed’ folder for S60.Figures 2.10 and 2.11 show how the example looks on the differentsoftware platforms.2.5 A Carbide.c++ ProjectYou can import the SimpleEx program into Carbide.c++ as described atthe end of section 2.2.3.

Once you have the project in Carbide.c++, youcan place breakpoints and step through the code.Figure 2.12 shows the S60 SimpleEx project in Carbide.c++. I set abreakpoint at the beginning of the command handler in the applicationUI class by double-clicking in the gray column at the left of the code line(the dot there indicates that a breakpoint is set).

You can start runningyour program in the debugger by selecting Run->Debug. Then when youhit breakpoints, you can step through your code (the Run menu will giveyou the various options for stepping through the code).Figure 2.12 S60 SimpleEx in Carbide.c++BUILDING FOR THE SMARTPHONE592.6 Building for the SmartphoneTo build for a smartphone target (we are back on the command line now),you’ll need to specify a different build target; ARM (gcce) in release(urel) mode:c:\...\group>abld build gcce urelThis will build an ARM executable suitable for running on your phone.After you’ve built the binary, you need to create an installation filefor installing and running the application on the phone.

Symbian OSprovides a utility called makesis to create the SIS file. You’ll need tocreate a package definition file (PKG file); this defines what goes into theSIS file. The package file specifies various attributes of the installationfile and includes a list of files that belong in the installation. This file listincludes where each program file is found on the host PC (so makesiscan locate them to build them into the SIS file) and where each of thesefiles should be placed on the phone when the SIS is installed. Once wehave a SIS file, we’ll sign this SIS file with a self-created certificate inorder to create what is called a SISX file.

Although it sounds complicated,it isn’t really and, for Symbian OS v9, smartphones typically require theapplications to be signed (more on this in Chapter 7) so you need tofamiliarize yourself with this step early on.Let’s look at the package definition files (PKG files) for S60 3rd Editionand UIQ 3. Type in the one corresponding to your platform, save it asSimpleEx.pkg, and save it in the group directory. The text in boldshould correspond to the location where you installed your SDK.The following shows the S60 package file. The path in bold representsthe default location of the S60 3rd Edition FP1 SDK and should bechanged if you installed your SDK in a location different to the defaultdirectory (c:\Symbian\9.2\S60 3rd FP1).; SimpleEx.pkg for S60 3rd Edition;;Language - standard language definitions&EN; standard SIS file header#{"SimpleEx"},(0xE000027F),1,0,0;Localised Vendor name%{"Vendor"};Supports Series 60 v 3.0[0x101F7961], 0, 0, 0, {"Series60ProductID"};;Files to install"c:\Symbian\9.2\S60_3rd_FP1\epoc32\release\gcce\urel\SimpleEx.exe"-"!:\sys\bin\SimpleEx.exe"60SYMBIAN OS QUICK START"c:\Symbian\9.2\S60_3rd_FP1\epoc32\data\z\resource\apps\SimpleEx.rsc"-"!:\resource\apps\SimpleEx.rsc""c:\Symbian\9.2\S60_3rd_FP1\epoc32\data\z\private\10003a3f\apps\SimpleEx_reg.rsc" -"!:\private\10003a3f\import\apps\SimpleEx_reg.rsc"The UIQ package file is as follows:; SimpleEx.pkg for UIQ 3;;Language - standard language definitions&EN; standard SIS file header#{"SimpleEx"},(0xE000027F),1,0,0;Localised Vendor name%{"Vendor-EN"}; Unique vendor name mandatory for UIQ:"Vendor"; Supports UIQ 3[0x101F6300], 3, 0, 0, {"UIQ30ProductID"};;Files to install"c:\Symbian\UIQ3SDK\epoc32\release\gcce\urel\SimpleEx.exe"-"!:\sys\bin\SimpleEx.exe""c:\Symbian\UIQ3SDK\epoc32\data\z\resource\apps\SimpleEx.rsc"-"!:\resource\apps\SimpleEx.rsc""c:\Symbian\UIQ3SDK\epoc32\data\z\private\10003a3f\apps\SimpleEx_reg.rsc"-"!:\private\10003a3f\import\apps\SimpleEx_reg.rsc"The last few lines of the package file specify the individual files to copyto the phone – the first filename specifying where to find the file on thePC and the second where to place it on the phone.

Further discussion ofthe format of these files can be found in Chapter 5.Next, run the following command at the command prompt:c:\...\group\>makesis SimpleEx.pkgThis command creates the installation file SimpleEx.sis.Although it’s up to the manufacturer, you typically cannot installSymbian OS v9-based applications unless they are digitally signed bya certificate. For this example, we will self-sign the application with acertificate we generate ourselves.Run the following command to create a certificate:c:\...\group\> makekeys -cert -len 2048 -dname "CN=MyName OU=MyCompany"mycert.key mycert.cerYou will be prompted to ask if you want to define a password. Answerno.

You will then be asked to press random keys or move the mouse toBUILDING FOR THE SMARTPHONE61generate some random data, after which you will have your certificatefile (mycert.cer) and an associated private key (mycert.key).To sign your SIS file, enter the following command:c:\...\group\> signsis SimpleEx.sis SimpleEx.sisx mycert.cer mycert.keyThis command will sign your SimpleEx.sis with your newly createdcertificate files.

The signed copy is output as SimpleEx.sisx.Install SimpleEx.sisx to your smartphone through your PC suite(or any method your smartphone has of installing an application SIS file).The SIS file is the standard file for users to install applications to theirsmartphones, and the installation process should be well documented inthe smartphone’s user manual. The .sisx suffix indicates a signed SISfile.Because this application is not signed by a certificate that is certifiedand signed by a trusted CA, you will get a message indicating thatthe application is from a non-trusted source – ignore this and continueinstalling the application.Once you load the program on the smartphone you can run it as youdid from the emulator by locating it by name in the main menu andopening it.

Характеристики

Тип файла
PDF-файл
Размер
3,36 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6367
Авторов
на СтудИзбе
309
Средний доход
с одного платного файла
Обучение Подробнее