Tizen SDK Development Guide Contents ======================================== 1 Introduction 2 Setup Build Environment 2.1 Linux(Ubuntu) 2.1.1 Install Tizen SDK 2.1.2 Install Ruby 2.1.3 Install Packages needed by DIBS 2.1.4 Install Pre-Requisite Packages 2.1.5 More 2.2 Windows 2.2.1 Install Tizen SDK 2.2.2 Install Ruby 2.2.3 Install Packages needed by DIBS 2.2.4 Install MSYS GIT 2.2.5 More 3 Simple Build and Test 3.1 Build Package 3.2 Install Package 3.3 Launch your own SDK 4 More DIBS commands 4.1 List Up Available Packages 4.2 Update Package List 4.3 Upgrade Packages 4.4 Install SDK 1 Introduction ======================================== Tizen SDK is composed of many separated packages which are has their own dependencies. And DIBS(Distributed Intelligent Build System) is the build system designed for building that kind of complexity. It provides various features. * Has own packaging system and packaging interface * Provides distributed package server/build Server * Provides Automatic dependency checker/resolver * Provides client/server tools which are easy to use This guides will show how to build Tize SDK packages using DIBS 2 Setup Build Environment ======================================== 2.1 Linux(Ubuntu) 2.1.1 Install Tizen SDK Install the SDK first 2.1.2 Install Ruby To use DIBS, you have to install Ruby 1.8.7 $ sudo apt-get install ruby Higher version of Ruby is not tested yet! 2.1.3 Install Packages needed by DIBS $ sudo apt-get install wget zip unzip 2.1.4 Install Pre-Requisite Packages To build or develop SDK , you have to install following packages * For emulator development bcc bison flex autoconf gcc libglu1-mesa-dev libsdl1.2-dev libgtk2.0-dev libsdl-image1.2-dev libsdl-gfx1.2-dev debhelper libxml2-dev libasound2-dev libx11-dev zlib1g-dev uuid-dev libv4l-dev * GDB 7.2 quilt libncurses5-dev libexpat1-dev libreadline-dev mingw32(only for building windows version) * GCC 4.5 quilt texinfo bison flex mingw32(only for building windows version) $ sudo apt-get install {pre-requisite packages} 2.1.5 More For your convenience, * Add DIBS path to $PATH. Edit shell configuration. ex) .bashrc $ export PATH={SDK Install dir}/dev-tools:$PATH 2.2 Windows 2.2.1 Install Tizen SDK Install the SDK first 2.2.2 Install Ruby * You can download Ruby binary at .. ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ruby-1.8.7-i386-mswin32.zip http://rubyforge.org/frs/download.php/75679/rubyinstaller-1.8.7-p357.exe 2.2.3 Install Packages needed by DIBS * Login MinGW provided by Tizen SDK. Execute following windows BAT file. {Tizen-Install Dir}/MinGW/msys/1.0/msys.bat * Execute the following commands on MinGW environment $ mingw-get.exe update $ mingw-get.exe install msys-wget $ mingw-get.exe install msys-zip $ mingw-get.exe install msys-unzip 2.2.4 Install MSYS GIT * Download the MSYS binary http://msysgit.googlecode.com/files/Git-1.7.9-preview20120201.exe * Install it 2.2.5 More For your convenience, * Add "/usr/bin/ruby" shell script #!/bin/sh {ruby install dir}/bin/ruby.exe $@ ex) #!/bin/sh /c/Ruby187/bin/ruby.exe $@ * Add "/usr/bin/git" shell script #!/bin/sh {MSYS GIT install dir}/bin/ruby.exe $@ ex) #!/bin/sh /c/Program\ Files/Git/bin/it.exe $@ * Add DIBS path to $PATH. Edit shell configuration. ex) /etc/profile $ export PATH={SDK Install dir}/dev-tools:$PATH 3 Simple Build and Test ======================================== If you downloaded a SDK package source and modified it, then you want to build it and apply it to Tizen SDK. Here is the simple process to do it. 3.1 Build Package Building a SDK package is very simple. Here is the command for buiding package. ## pkg-build [-u ] [-o ] [-c ] [-r ] ## -u : Package server URL which contains binary and development packages. ## If ommited, it will use previous server URL. ## -o : Target OS(ubuntu-32/ubuntu-64/windows-32/windows-64/macos-64) ## -c : Clean build"" ## If set, start build after downloading all dependent packages ## If not set, it will not download dependent packages if already downloaded ## -r : Check reverse-build-dependency ## This option will check that the packages which depend on me can be built And Here are simple steps 1. Move to source directory ex) $ cd ~/project/common-eplugin 2. Type the command ex) $ pkg-build -u http://172.21.17.55/dibs/unstable 3. Now you can see the package files( *.zip, *.tar.gz ) in your source directory 3.2 Install Package Installing a SDK package is also very simple. Here is the command for installing package files ## pkg-cli install-file -p [-l ] [-f] ## -p : Binary package file(*.zip) path which you want to install ## -l : Install root location of target SDK ## If omitted, current working directory path will be set ## -f : Install the package by force ## This option will allow installing the package that has lower or equal version compare to installed Now let's assume that you have just finished building and have a Tizen SDK installation on '~/tizen_sdk' 1. Just type the command ex) $ pkg-cli install-file -p common-eplugin_0.20.6_linux.zip -l ~/tizen_sdk 3.3 Launch your own SDK Now you can check your modifications. Lauch your SDK!! 1. type the following command or use the short-cut for launching Tizen SDK. ex) $ ~/tizen_sdk/IDE/startup.sh 4 More DIBS commands ======================================== There are more useful commands provided 4.1 List Up Available Packages You can list up available packages of server. ## pkg-cli list-rpkg [-o ] [-u ] ## -o : Target OS(ubuntu-32/ubuntu-64/windows-32/windows-64/macos-64) ## -u : Package server URL which contains binary and development packages. ## If ommited, it will use previous server URL. 1. List up packages ex) $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release ex) $ pkg-cli list-rpkg 2. List up packages with updating ex) $ pkg-cli list-rpkg -u http://172.21.17.55/dibs/unstable_release You can list up packages of your install directory ## pkg-cli list-lpkg [-l ] ## -l : Install root location of target SDK ## If omitted, current working directory path will be set 1. List up packages ex) $ pkg-cli list-lpkg -l ~/tizen_sdk 4.2 Update Package List You should have package list of server in your host before listing, installing and downloading packages. So, if you want to install the latest package, then you should update your package list before installing. ## pkg-cli update [-u ] ## -u : Package server URL which contains binary and development packages. ## If ommited, it will use previous server URL. 1. Update package list from server ex) $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release 2. Install / download packages from server ex) $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk ex) $ pkg-cli install -p unittest-eplugin -l ~/tizen_sdk ex) $ pkg-cli download -p base-ide-product -l ~/downloads 3. If package is updated on server and you want to use is, you should update your package list. If you do not set the server url, it will be set previous server URL. ex) $ pkg-cli update ex) $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk 4.3 Upgrade Packages You can upgrade your installed packages from server. ## pkg-cli upgrade -l -u ## -u : Package server URL which contains binary and development packages. ## If ommited, it will use previous server URL. ## -l : Install root location of target SDK ## If omitted, current working directory path will be set 1. Check package for upgrading ex) $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release $ pkg-cli check-upgrade -l ~/tizen_sdk 2. Upgrade packages ex) $ pkg-cli upgrade -l ~/tizen_sdk 3. Upgrade packages with updating ex) $ pkg-cli upgrade -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release 4. If you want to upgrade specific package, you can upgrade it as installing ex) $ pkg-cli install -p common-eplugin -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release 4.4 Install SDK You can also install new SDK using the network install command. Originally this command is used for installing packages by network. But you can set "TIZEN-SDK" as package name, all Tizen SDK packages will be installed. ## pkg-cli install -p [-u ] [-l ] [-t] [-f] ## -p : Binary package name which you want to install ## -u : Package server URL which contains binary and development packages. ## If ommited, it will use previous server URL. ## -l : Install root location of target SDK ## If omitted, current working directory path will be set ## -t : Install the package with all dependent packages ## -f : Install the package by force ## This option will allow installing the package that has lower or equal version compare to installed 1. Install "TIZEN-SDK" by network to new location("~/tizen_sdk2") ex) $ pkg-cli install -p TIZEN-SDK -l ~/tizen_sdk2 -t 2. Change Tizen SDK configuration ex) $ echo "TIZEN_SDK_INSTALLED_PATH=/home/{username}/tizen_sdk2" > ~/.TizenSDK/tizensdkpath 3. Launch your SDK! ex) $ ~/tizen_sdk2/IDE/startup.sh