Maemo SDK 4.0 설치방법

2008.03.18 14:43 from Etc

Ubuntu 기준으로 작성됨.

Scratchbox 설치

다음 경로에서버전은 달라질 수 있음)를 다운로드

$ wget

$ sudo chmod a+x ./

$ sudo ./

설치후 다음과 같은 화면이 출력됨.

Installation was successful!


You now have Scratchbox 1.0.8 'apophis' release installed.

Scratchbox cannot be run as user root. Instead, use your normal login

user account. Add additional scratchbox users and sandboxes with the

following command (outside scratchbox with root permissions):

        # /scratchbox/sbin/sbox_adduser USER yes

Running this command will create sandbox environment for that user and

add user to the 'sbox' scratchbox user group.

You will need to start a new login terminal after being added to the

'sbox' group for group membership to be effective.

Login to scratchbox session using the following command (as user):

        $ /scratchbox/login

Refer to documentation for more information re scratchbox:

scratchbox 접근권한 추가

$ sudo /scratchbox/sbin/sbox_adduser [user_id] yes

Maemo SDK 설치

설치 스크립트 다운로드 및 실행

$ wget

$ chmod +x

$ ./

실행시 설치옵션은 필요에 의해서 선택함.

xserver-xephyr 설치 후 실행

실행시 빈 화면만 나타나게 됨.

$ sudo apt-get install xserver-xephyr
$  Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite

scratchbox 실행

$ /scratchbox/login

[sbox-CHINOOK_ARMEL: ~] > fakeroot apt-get install maemo-explicit

[sbox-CHINOOK_ARMEL: ~] > export DISPLAY=:2

[sbox-CHINOOK_ARMEL: ~] > start

HelloWorld 빌드

maemo_hello.c 파일 생성

#include <hildon/hildon-program.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkbutton.h>

int main(int argc, char *argv[])
    /* Create needed variables */
    HildonProgram *program;
    HildonWindow *window;
    GtkWidget *button;

    /* Initialize the GTK. */
    gtk_init(&argc, &argv);

    /* Create the hildon program and setup the title */
    program = HILDON_PROGRAM(hildon_program_get_instance());
    g_set_application_name("Hello maemo!");

    /* Create HildonWindow and set it to HildonProgram */
    window = HILDON_WINDOW(hildon_window_new());
    hildon_program_add_window(program, window);

    /* Create button and add it to main view */
    button = gtk_button_new_with_label("Hello!");
    gtk_container_add(GTK_CONTAINER(window), button);

    /* Connect signal to X in the upper corner */
    g_signal_connect(G_OBJECT(window), "delete_event",
      G_CALLBACK(gtk_main_quit), NULL);

    /* Begin the main application */

    /* Exit */
    return 0;

scratchbox에서 빌드후 실행

[sbox-CHINOOK_ARMEL: ~] > gcc -o maemo_hello maemo_hello.c `pkg-config --cflags gtk+-2.0 hildon-1` -ansi -Wall `pkg-config --libs gtk+-2.0 hildon-1`

[sbox-CHINOOK_ARMEL: ~] > ./maemo_hello

사용자 삽입 이미지




Posted by NOP 트랙백 0 : 댓글 0

댓글을 달아 주세요