Aula2. Conhecendo o SDK e compilando o programa HelloWorld



Documentos relacionados
Aula1. Preparando o ambiente de desenvolvimento

Métodos Formais em Engenharia de Software. VDMToolTutorial

Universidade da Beira Interior. Sistemas Distribuídos /2015 Curso: Engª Informática. Folha 11. JAX-RS: Java API for RESTful Web Services

Arquitectura de Sistemas Computacionais

Computação Móvel J2ME

Accessing the contents of the Moodle Acessando o conteúdo do Moodle

EA998/MC933 Guido Araujo e Sandro Rigo

Easy Linux! FUNAMBOL FOR IPBRICK MANUAL. IPortalMais: a «brainware» company Manual

User Guide Manual de Utilizador

Universidade Federal de Minas Gerais Escola de Engenharia Departamento de Engenharia Eletrônica

ÍNDICE PORTUGUÊS INDEX ENGLISH

Click the + sign to add new server details. Clique no sinal de "+" para adicionar novos detalhes do servidor. Enter a friendly name for your BI Server

Introdução ao Android SDK. Prof. Me. Hélio Esperidião

hdd enclosure caixa externa para disco rígido

Para iniciar um agente SNMP, usamos o comando snmpd. Por padrão, aceita requisições na porta 161 (UDP).

OBJETIVO Criação e execução de um projeto Android dentro da IDE IntelliJ.

Visão geral Estrutura do sistema Ferramentas de desenvolvimento Uma aplicação. Android. Universidade Federal de Santa Catarina. 17 de dezembro de 2008

Instalando o plugin CDT 4.0

Easy Linux! FUNAMBOL FOR IPBRICK MANUAL. IPortalMais: a «brainmoziware» company Manual Jose Lopes

Introdução ao Android

Manual de instalação e configuração da Ferramenta Android SDK

Tutorial 1.0. Instalação

Adotando OpenEdge Architect. Luciano Oliveira Sr. Instructor, Consultant Global Field Services

Instrução para Instalação de Certificados Digitais de Servidor Web

Orientação a Objetos Programação em C++

Este tutorial está publicado originalmente em

Para iniciar um agente SNMP, usamos o comando snmpd. Por padrão, aceita requisições na porta 161 (UDP).

HMI Caracteristicas e extensões utilizando FT View ME v6.1 e PanelView Plus 6

Nota de Aula: Utilização da IDE Code::Blocks

JADE Java Agent DEvelopment Framework

Aula 4: Montagem e Disponibilização Frameworks Genéricos

2. Execute o arquivo com o comando a seguir: sudo./alfresco-community-4.2.b-installer-linux-x64.bin

Laboratório 3. Base de Dados II 2008/2009

Desenvolvimento para Android Prá9ca 2. Prof. Markus Endler

UM FRAMEWORK PARA DESENVOLVIMENTO DE

2. O AMBIENTE DE PROGRAMAÇÃO EM C

julio lucio 2015 outono-inverno

Introdução ao Android. Prof. Fellipe Aleixo

NetBeans. Conhecendo um pouco da IDE

Desenvolvimento de Aplicativos com ASR para Android

Slides_Java_1 !"$ % & $ ' ' Output: Run java. Compile javac. Name of program. Must be the same as name of file. Java source code.

Completing your Participant Agreement Como preencher o Contrato de Participação

Paradigmas da Programação Netbeans UML

Criação de Servlets Name Directory Build WAR JSP/Servlet frameworks Launch URL Package Class name Generate header comments

Utilizando subversion como controle de versão

Criando sua primeira aplicação JAVA com o Eclipse

INSTALANDO E CONFIGURANDO O ACTIVE DIRECTORY NO WINDOWS SERVER 2008

Programação para Android

Delphi IDE. Jocélio Passos Delphi - IDE. Integrad Development Enviroment Ambiente de Desenvolvimento Integrado

ROTEIRO ILUSTRADO PARA SISTEMA COMPUTACIONAL INSANE

Manual de Instalação: Agente do OCS Inventory NG

Manual do usuário. Xperia P TV Dock DK21

Introdução a Computação Móvel

Guia ineocontrol. iphone e ipod Touch

Guia. PDA e SmartPhones. Windows Mobile, Pocket PC e CE.

CANape/vSignalyzer. Data Mining and Report Examples Offline Analysis V

Manual de Comandos Úteis OpenSSL para Certificados Digitais

Programação Palm OS. Roteiro da Apresentação. Motivação

Addition of Fields in Line Item Display Report Output for TCode FBL1N/FBL5N

5/10/10. Implementação. Building web Apps. Server vs. client side. How to create dynamic contents?" Client side" Server side"

Eclipse com c++11 e boost Etapa 1- Download da IDE Eclipse c++ e configuração do MinGW

Como instalar o sistema operacional pfsense no Citrix Xen Server

Este tutorial está publicado originalmente em

Desenvolvimento para Android Prá9ca 1. Prof. Markus Endler

Bases de Dados 2007/2008. Aula 1. Referências

O nome ANT é uma sigla para another neat tool (mais uma ferramenta organizada), segundo seu autor James Duncan Davidson.

Introdução ao IDE Netbeans (Programação Java)

MONTANDO UM SERVIDOR SHAREPOINT

OMT-G Design. Instalação por pacotes

- Esse ícone indica que o USB Phone GiConnect está conectado e funcionando corretamente, pronto para o uso.

BR localization: Hotfix 108. Technical documentation Documentação Técnica Version Oct 16, de outubro de 2018

Editor Eclipse para Programas F

SATA 3.5. hd:basic. hdd enclosure caixa externa para disco rígido

Passos para a configuração do ambiente de desenvolvimento:

Programação para Dispositivos Móveis

DCC 003 Algoritmos e Estruturas de Dados I Tutorial de instalação do GCC e do TextPad

:: COMO ESCOLHER UMA ESCOLA IDIOMAS PDF ::

Conteúdo O que é?... 4 Histórico... 4 Onde Baixar?... 4 Diferença entre Firebird e o Interbase... 4 Como instalar?... 4 Instalando o Ibexpert...

Uma solução possível para garantir, em ambiente APEX, a consistência duma estrutura ISA total e disjuntiva.

Instrução para Importação de Certificados Digitais de Servidor Web IIS 6 e IIS 7

FLISOL Criptografia é importante! Aprenda meios simples de proteger arquivos com ferramentas livres.

Welcome to Lesson A of Story Time for Portuguese

A interface do Microsoft Visual Studio 2005

NOVO SISTEMA DE CORREIO ELETRONICO PARA OS DOMINIOS ic.uff.br & dcc.ic.uff.br

ADMINISTRAÇÃO DE SISTEMAS OPERACIONAIS

HOW TO Como distribuir o Aker Client em

Sistemas Embarcados Android

DESENVOLVIMENTO PARA DISPOSITIVOS MÓVEIS. PROFª. M.Sc. JULIANA H Q BENACCHIO

A Tool to Evaluate Stuck-Open Faults in CMOS Logic Gates

ANDROID APPLICATION PROJECT

DESENVOLVIMENTO DE APLICATIVOS PARA CELULAR JAVA 2 MICRO EDITION

Desenvolvimento Android.

Instalação e utilização do Eclipse / Fortran em Windows

SmartDock for Xperia ion Manual do usuário

Este tutorial está publicado originalmente em

Java Básico. Aula 1 por Thalles Cezar

Programação de Computadores I. Conhecendo a IDE Code::Blocks

BR localization: Hotfix 002. Technical documentation Documentação Técnica Version Nov 27, de novembro de 2018

Transcrição:

Programando para Symbian OS S60 Platform SDKs for Symbian OS, for C++ (diego@drsolutions.com.br) 01 Setembro/2007 Aula2 Conhecendo o SDK e compilando o programa HelloWorld Objetivo da aula: Propiciar ao leitor uma visão geral do SDK (S60 Platform SDKs for Symbian OS, for C++) e demonstrar o processo de compilação do programa HelloWorld através da linha de comando e sua execução no emulador. Depois do programa testado no emulador, ainda será demonstrado como gerar um arquivo de instalação (.sis/.sisx) e como tranferir esse arquivo para um dispositivo (Nokia E61). Tópicos abordados: Conhecendo o SDK Ferramentas de desenvolvimento para Symbian OS Processo de compilação na linha de comando Conhecendo o Emulador e testando o HelloWorld Gerando arquivos de Instalação.SIS/.SISX

1. Symbian OS - Plataforma S60 x UIQ Symbian OS has a flexible architecture which allows different mobile phone platforms to run on top of the core operating system. The two most widely of used of these are S60 (formerly known as Series 60) and UIQ, which are both discussed in this tutorial. Platforms provides a graphical user interface (GUI) framework, applications which use it, such as messaging or calendar, and can supply additional application and middleware services. The platforms are said to be open because, in addition to these built-in applications, a user may additionally install others such as games, enterprise applications, like push e- mail, or utilities. This tutorial explains the process of creating such distributable applications. 1.1. Plataforma Series 60 (S60) The Nokia S60 platform is used in the majority of Symbian OS smartphones shipped to date. Although owned by Nokia, it is also licensed to other handset manufacturers such as Panasonic, Samsung and Siemens. S60 has been designed for easy one-handed use. It does not have a touch screen but instead has various input keys, including two soft keys, a five-way navigator pad (4 ways plus a centre selection button), the number keys and several dedicated keys such as the menu key. When programming for S60, since there is no touch screen, pointer events are not supported. Another consequence of having no touch screen input is that developer should consider the type of user input required. For example, in some situations it may be appropriate to replace a text entry box with a pre-filled list, from which a selection can be made. 1.2. Plataforma UIQ The UIQ Platform is owned by UIQ Technology AB a wholly-owned subsidiary of Symbian Ltd. The platform originates from a Symbian reference design and is licensed to several handset manufacturers, such as Sony Ericsson, Motorola, BenQ and Arima. UIQ supports both keypad and touchscreen input (through virtual keyboard, handwriting recognition or interaction with typical UI controls). It can be configured with respect to touch/non-touch screens, screen size, the use of a menu bar or the use of soft keys. 2. Conhecendo o SDK The key elements of an SDK are: 2/15

a Windows-based emulation of a phone. Programs are initially developed and tested on the emulator. header files and binary library files both for emulator development and for running the code on real ARM processor-based phones a GCC-based compiler for building for ARM-based targets additional tools for building and application deployment documentation (the Symbian OS Library) and examples 2.1. Estrutura de diretórios do SDK Asdsadasd Asds Sadas Asdd epoc32\: binaries and tools to support development, including emulator files, libraries, header files, and tools. The form of this directory is explained in detail in the following table. Documentation\: On UIQ SDKs, Symbian OS and UIQ documentation. 3/15

examples\: generic Symbian OS example code. On UIQ SDKs, UIQ specific examples are contained in examples\uiq. S60Doc: On S60 SDKs, S60 and Symbian OS documentation. S60Ex: On S60 SDKs, S60 example programs Directory BUILD data gcc include Description Intermediate build files (makefiles, object code, project browsing information). This directory is created when a project is built. Emulator configuration files. The files stored under the z subdirectory are combined with the \epoc32\release\winscw\udeb\z or \epoc32\release\winscw\urel\z directory to make up the ROM drive for the emulator. See \release\ for more information. GNU GCC toolchain required for various build utilities (this is not however the compiler now used for building application code). UIQ or S60 and Symbian OS C++ system include files. localisation Localisable files. release This is where the executables will be placed when you build your project - build output files such as.exe or.dll are 4/15

stored here. The directory has sub-directories for each build target. The armv5 and gcce directories contain files for ARM targets and winscw contains build output for the emulator. Each directory will have subdirectories for debug (udeb), and release (urel) builds. For emulator build targets, under udeb and urel there will be a subdirectory called z which contains the contents of the ROM drive for the emulator. For phone build targets, the release directory is used to store the executables before they are packaged into an install file for installation onto a phone. tools winscw Windows-based SDK tools such as batch files, perl scripts, Windows, DOS and Java executables. The emulated drives of the emulator (C:\ etc) are stored under here. 2.2. Ferramentas de desenvolvimento do SDK Asdsa The kits supply tools that allow projects to be built from the command line. This is not as easy as using the IDE to control a build, but it does allow for building from batch processes, such as automatic build and test scripts. The following table summarises the command line tools, most of which will be discussed further in the Building, debugging and deploying an application section of this tutorial. Tool abld bldmake bmconv cshlpcmp Description Build tool used to control all aspects of building a project. It is created in the current directory by the bldmake tool from a component description file bld.inf. For a command line reference, see the abld command syntax. abld invokes the resource compiler and bitmap converter, described below. Build tool that processes the component description file (bld.inf) in the current directory and generates the batch file abld and several build batch makefiles (.make). For command line reference, see the Bldmake command syntax. Bitmap converter that takes one or more Windows bitmap files (.bmp) and generates a single Symbian OS multi-bitmap file (.mbm). For command line syntax, see the Bitmap converter syntax. Context sensitive help compiler that builds.hlp help files using information defined in a project file,.rtf source file or files, and an optional customisation file. For command line reference, see the CS Help Compiler. cshlpcmp_gui is a GUI for this compiler (not used in S60). 5/15

epocrc Combines the actions of passing a resource file through the C++ preprocessor, and then compiling it with rcomp. For command line reference, see Resource builder tool: epocrc. createsis The createsis tool creates and signs software installation packages (SIS files). It provides a wrapper around lower level installation tools such as makesis and makekeys. makesis makekeys makmake petran rcomp Installation File Generator that creates software installation packages based on source PC/target Symbian OS file locations defined in a.pkg package file. For command line reference, see the Installation File Generator syntax. Certification Generator that creates a private/public key pair and issues certificate requests. For a command line reference, see the Certification Generator syntax. Build tool that takes a.mmp project file which lists the components of the project, and produces a makefile. Uses GNU cpp to evaluate dependencies. Generated headers from resource compilation and multibitmap compilation, etc., should be available before makmake is run. For a command line reference, see the makmake command syntax. For Portable Executable Translation. The petran tool converts executables from Portable Executable format (the standard format for executable and object files) to the Symbian OS executable format. It is invoked at the final stage of the build process for ARM targets. Resource compiler that compiles source (.rss) resource files into a resource data file (default extension.rsc) which can be used by applications, and a resource header file (.rsg). The operation of the resource compiler is usually wrapped in an abld batch file. For command line reference, see the Resource compiler syntax. Asdsad 3. Compilando o HelloWorld 3.1. Conceitos teóricos You can build for any target from the command line once you have a component definition file (bld.inf) and project definition file (mmp file). Firstly, run bldmake from the project directory (usually \group) where the bld.inf file is located: > bldmake bldfiles This creates a batch file, called abld.bat, which you use in the next step. 6/15

To build the project, you call abld build which will build the project for all default targets in both release and debug variants. To build for a particular target and variant, use abld build target-name variant, for example: > abld build winscw udeb builds the project for the debug variant of WINSCW only. ENTRADAS COMANDOS SAÍDAS bld.inf > bldmake bldfiles Arquivos Intermediários de compilação em: \epoc32\build\<dir_projeto> projectfile.mnp ABDL.BAT em: <DIR_PROJETO> Arquivos Fonte (.cpp) > abld build winscw udeb Arquivos Intermediários em: \epoc32\build\<dir_projeto> Arquivos Binários em: \epoc32\release\winscw\udeb\ 3.2. Compilando (aplicando a teoria) Abra o Prompt de comando do Windows no diretório: C:\Symbian\9.2\S60_3rd_FP1\S60Ex\HelloWorldBasic\group (espero que o leitor tenha instalado o Power Toy sugerido no final da Aula 1). 7/15

Agora você deve gerar o arquivo abld.bat. Esse procedimento é automatizado com o comando bldmake bldfiles. 8/15

Agora o leitor gerou o ABLD.BAT, já é possível compilar o programa para ser testado no emulador. Nesse caso dizemos que o alvo do programa é o WINSCW, que nada mais é que a pasta raiz do sistema de arquivos do emulador. Para gerar o arquivo binário que pode ser executado no emulador, execute o comando abld build winscw udeb. Muita coisa deve aparecer na sua tela. Se o resultado final for algo como mostrado na figura abaixo, parabéns! Você compilou o seu primeiro programa para Symbian! 9/15

Os arquivos intermediários resultantes do processo de compilação foram armazenados dentro do diretório: C:\Symbian\9.2\S60_3rd_FP1\Epoc32\BUILD\Symbian\9.2\S60_3rd_FP1\S60Ex\Hell oworldbasic\ O arquivo binário resultado da compilação (HelloWorldBasic.exe) foi automaticamente colocado dentro da pasta C:\Symbian\9.2\S60_3rd_FP1\Epoc32\release\winscw\udeb para que possa ser executado no emulador. 10/15

Asdsad Sadsad ENTRADAS COMANDOS SAÍDAS group\ bld.inf group\ helloworldbasic.mmp > bldmake bldfiles Arqs. Interm. de compilação em: C:\Symbian\9.2\S60_3rd_FP1\Epo c32\build\symbian\9.2\s60_3rd_ FP1\S60Ex\HelloWorldBasic\ ABDL.BAT em: C:\Symbian\9.2\S60_3rd_FP1\S60 Ex\HelloWorldBasic\group Arquivos Fonte: src\ helloworldbasic.cpp. helloworldbasicquerydialog.cpp inc\ helloworldbasic.h. helloworldbasicquerydialog.h. > abld build winscw udeb Arquivos Intermediários em: C:\Symbian\9.2\S60_3rd_FP1\Epo c32\build\symbian\9.2\s60_3rd_ FP1\S60Ex\HelloWorldBasic\ Arquivos Binários em: C:\Symbian\9.2\S60_3rd_FP1\Epo c32\release\winscw\udeb Asdmnsakd Sadçksadç Saçldkçsa 11/15

4. Rodando o HelloWorld no Emulador Existem várias maneiras de usarmos o emulador. A mais trivial delas é através do menu Iniciar do windows, seguindo a seqüência Inciar Todos os Programas S60 Developer Tools 3rd Edition FP1 SDK 1.0 Emulator Observação: O emulador demora vários segundos para inicializar! 12/15

Você pode também abrir o emulador digitando epoc na linha de comando: 4.1. Acessando o HelloWorld através dos controles do emulador Todas as aplicações instaladas no emulador ficam dentro da pasta Instaled. Para navegar pelo emulador use os botões da interface! 13/15

Finalmente, o HelloWorld! m sistema operacional criado para rodar embarcado em dispositivos móveis "multimídia" com suporte à câmeras fotográficas, MMS, wireless, bluetooth, Wi-Fi dentre outras funções. Este sistema operacional é predominantemente baseado em um ambiente gráfico bastante simples. Atualmente ele é utilizado na maioria dos recentes modelos de telefones celulares dos grandes fabricantes. A grande preocupação do Symbian OS é evitar ao máximo o desperdício de recursos do celular, como bateria e memória. Para isso ele conta com diversos mecanismos que são eficientes ao tratar desses problemas. Em sua versão mais nova 9.5, foi reduzido o consumo de memória em 30% em relação à versão anterior. Atualmente o Symbian lidera como sendo o SO mais utilizado em smartphones, a frente do Linux, Windows Mobile e outros concorrentes. 14/15

Correções e atualizações desse documento estarão disponíveis em: http://www.drsolutions.com.br/programando_symbian 15/15