Update Tizen 2.0 SDK source code
[sdk/tools/sdk-build.git] / README
1 Tizen SDK Development Guide
2
3
4 Contents
5 ========================================
6
7 1 Introduction
8 2 Setup Build Environment
9 2.1 Linux(Ubuntu)
10 2.1.1 Install Tizen SDK
11 2.1.2 Install Ruby
12 2.1.3 Install Packages needed by DIBS
13 2.1.4 Install Pre-Requisite Packages
14 2.1.5 More
15 2.2 Windows
16 2.2.1 Install Tizen SDK
17 2.2.2 Install Ruby
18 2.2.3 Install Packages needed by DIBS
19 2.2.4 Install MSYS GIT
20 2.2.5 More
21 3 Simple Build and Test
22 3.1 Build Package
23 3.2 Install Package
24 3.3 Launch your own SDK
25 4 More DIBS commands
26 4.1 List Up Available Packages
27 4.2 Update Package List
28 4.3 Upgrade Packages
29 4.4 Install SDK
30
31
32 1 Introduction
33 ========================================
34
35 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.
36 * Has own packaging system and packaging interface
37 * Provides distributed package server/build Server
38 * Provides Automatic dependency checker/resolver
39 * Provides client/server tools which are easy to use
40 This guides will show how to build Tize SDK packages using DIBS
41
42
43 2 Setup Build Environment
44 ========================================
45
46 2.1 Linux(Ubuntu)
47
48 2.1.1 Install Tizen SDK
49 Install the SDK first
50
51 2.1.2 Install Ruby
52 To use DIBS, you have to install Ruby 1.8.7
53
54     $ sudo apt-get install ruby
55
56 Higher version of Ruby is not tested yet!
57
58 2.1.3 Install Packages needed by DIBS
59
60     $ sudo apt-get install wget zip unzip
61
62 2.1.4 Install Pre-Requisite Packages
63 To build or develop SDK , you have to install following packages
64 * For emulator development
65     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
66 * GDB 7.2
67     quilt libncurses5-dev libexpat1-dev libreadline-dev mingw32(only for building windows version)
68 * GCC 4.5
69     quilt texinfo bison flex mingw32(only for building windows version)
70
71     $ sudo apt-get install {pre-requisite packages}
72     
73 2.1.5 More
74 For your convenience,
75 * Add DIBS path to $PATH. Edit shell configuration. ex) .bashrc
76
77     $ export PATH={SDK Install dir}/dev-tools:$PATH
78
79 2.2 Windows
80
81 2.2.1 Install Tizen SDK
82 Install the SDK first
83
84 2.2.2 Install Ruby
85 * You can download Ruby binary at ..
86     ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ruby-1.8.7-i386-mswin32.zip 
87     http://rubyforge.org/frs/download.php/75679/rubyinstaller-1.8.7-p357.exe 
88
89 2.2.3 Install Packages needed by DIBS
90 * Login MinGW provided by Tizen SDK. Execute following windows BAT file.
91
92     {Tizen-Install Dir}/MinGW/msys/1.0/msys.bat
93
94 * Execute the following commands on MinGW environment
95
96     $ mingw-get.exe update
97     $ mingw-get.exe install msys-wget
98     $ mingw-get.exe install msys-zip
99     $ mingw-get.exe install msys-unzip
100
101 2.2.4 Install MSYS GIT
102 * Download the MSYS binary
103     http://msysgit.googlecode.com/files/Git-1.7.9-preview20120201.exe
104
105 * Install it
106
107 2.2.5 More
108 For your convenience,
109 * Add "/usr/bin/ruby" shell script
110
111     #!/bin/sh
112     {ruby install dir}/bin/ruby.exe $@
113
114     ex)
115
116         #!/bin/sh
117         /c/Ruby187/bin/ruby.exe $@
118
119 * Add "/usr/bin/git" shell script
120
121     #!/bin/sh
122     {MSYS GIT install dir}/bin/ruby.exe $@
123
124     ex)
125
126         #!/bin/sh
127         /c/Program\ Files/Git/bin/it.exe $@
128
129 * Add DIBS path to $PATH. Edit shell configuration. ex) /etc/profile
130
131     $ export PATH={SDK Install dir}/dev-tools:$PATH
132
133
134 3 Simple Build and Test
135 ========================================
136
137 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.
138
139 3.1 Build Package
140 Building a SDK package is very simple. Here is the command for buiding package.
141
142     ## pkg-build [-u <package server url>] [-o <os>] [-c <clean>] [-r <reverse build dependency check>]
143     ## -u : Package server URL which contains binary and development packages.
144     ##      If ommited, it will use previous server URL.
145     ## -o : Target OS(ubuntu-32/ubuntu-64/windows-32/windows-64/macos-64)
146     ## -c : Clean build""
147     ##      If set, start build after downloading all dependent packages
148     ##      If not set, it will not download dependent packages if already downloaded
149     ## -r : Check reverse-build-dependency
150     ##      This option will check that the packages which depend on me can be built
151
152 And Here are simple steps
153     1. Move to source directory
154         ex) 
155         
156             $ cd ~/project/common-eplugin
157
158     2. Type the command
159         ex) 
160             
161             $ pkg-build -u http://172.21.17.55/dibs/unstable
162
163     3. Now you can see the package files( *.zip, *.tar.gz ) in your source directory
164
165 3.2 Install Package
166 Installing a SDK package is also very simple. Here is the command for installing package files
167
168     ## pkg-cli install-file -p <package file path> [-l <location>] [-f]
169     ## -p : Binary package file(*.zip) path which you want to install
170     ## -l : Install root location of target SDK
171     ##      If omitted, current working directory path will be set
172     ## -f : Install the package by force
173     ##      This option will allow installing the package that has lower or equal version compare to installed 
174
175 Now let's assume that you have just finished building and have a Tizen SDK installation on '~/tizen_sdk'
176     1. Just type the command
177         ex) 
178     
179             $ pkg-cli install-file -p common-eplugin_0.20.6_linux.zip -l ~/tizen_sdk
180
181 3.3 Launch your own SDK
182 Now you can check your modifications. Lauch your SDK!!
183     1. type the following command or use the short-cut for launching Tizen SDK.
184         ex) 
185         
186             $ ~/tizen_sdk/IDE/startup.sh
187
188
189 4 More DIBS commands
190 ========================================
191
192 There are more useful commands provided
193
194 4.1 List Up Available Packages
195 You can list up available packages of server.
196
197     ## pkg-cli list-rpkg [-o <os>] [-u <package server url>] 
198     ## -o : Target OS(ubuntu-32/ubuntu-64/windows-32/windows-64/macos-64)
199     ## -u : Package server URL which contains binary and development packages.
200     ##      If ommited, it will use previous server URL.
201
202     1. List up packages
203         ex) 
204             
205             $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
206
207         ex) 
208             
209             $ pkg-cli list-rpkg
210
211     2. List up packages with updating
212         ex) 
213         
214             $ pkg-cli list-rpkg -u http://172.21.17.55/dibs/unstable_release
215
216 You can list up packages of your install directory
217
218     ## pkg-cli list-lpkg [-l <locatio>] 
219     ## -l : Install root location of target SDK
220     ##      If omitted, current working directory path will be set
221
222     1. List up packages
223         ex) 
224         
225             $ pkg-cli list-lpkg -l ~/tizen_sdk
226
227 4.2 Update Package List
228 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.
229
230     ## pkg-cli update [-u <package server url>] 
231     ## -u : Package server URL which contains binary and development packages.
232     ##      If ommited, it will use previous server URL.
233
234     1. Update package list from server
235         ex) 
236
237             $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
238
239     2. Install / download packages from server
240         ex) 
241
242             $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk
243
244         ex) 
245
246             $ pkg-cli install -p unittest-eplugin -l ~/tizen_sdk
247
248         ex) 
249
250             $ pkg-cli download -p base-ide-product -l ~/downloads
251
252     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.
253         ex) 
254
255             $ pkg-cli update
256
257         ex) 
258
259             $ pkg-cli install -p nativeapp-eplugin -l ~/tizen_sdk
260         
261 4.3 Upgrade Packages
262 You can upgrade your installed packages from server.
263
264     ## pkg-cli upgrade -l <location> -u <package server url>
265     ## -u : Package server URL which contains binary and development packages.
266     ##      If ommited, it will use previous server URL.
267     ## -l : Install root location of target SDK
268     ##      If omitted, current working directory path will be set
269
270     1. Check package for upgrading
271         ex)
272
273             $ pkg-cli update -u http://172.21.17.55/dibs/unstable_release
274             $ pkg-cli check-upgrade -l ~/tizen_sdk
275
276     2. Upgrade packages
277         ex)
278
279             $ pkg-cli upgrade -l ~/tizen_sdk
280
281     3. Upgrade packages with updating
282         ex)
283         
284             $ pkg-cli upgrade -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release
285
286     4. If you want to upgrade specific package, you can upgrade it as installing
287         ex)
288
289             $ pkg-cli install -p common-eplugin -l ~/tizen_sdk -u http://172.21.17.55/dibs/unstable_release
290
291 4.4 Install SDK
292 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.
293
294     ## pkg-cli install -p <package name> [-u <package server url>] [-l <location>] [-t] [-f]
295     ## -p : Binary package name which you want to install
296     ## -u : Package server URL which contains binary and development packages.
297     ##      If ommited, it will use previous server URL.
298     ## -l : Install root location of target SDK
299     ##      If omitted, current working directory path will be set
300     ## -t : Install the package with all dependent packages 
301     ## -f : Install the package by force
302     ##      This option will allow installing the package that has lower or equal version compare to installed 
303
304     1. Install "TIZEN-SDK" by network to new location("~/tizen_sdk2")
305         ex) 
306
307             $ pkg-cli install -p TIZEN-SDK -l ~/tizen_sdk2 -t
308
309     2. Change Tizen SDK configuration
310         ex) 
311
312             $ echo "TIZEN_SDK_INSTALLED_PATH=/home/{username}/tizen_sdk2" > ~/.TizenSDK/tizensdkpath
313
314     3. Launch your SDK!
315         ex) 
316
317             $ ~/tizen_sdk2/IDE/startup.sh
318