1
How to build Qt for Symbian using the Linux makespec.
2
3
Prerequisites:
4
5
  - Working RVCT 2.2 native Linux compiler. The new publicly
6
    available RVCT 4.0 compiler may work, but it hasn't been tested
7
    yet.
8
9
  - A working GnuPoc environment. See this page for details:
10
    http://www.martin.st/symbian/
11
    Download the latest version, unpack it and run the 'install_eka2_tools' script as
12
    described in the last part under the EKA2 part. The part about the your own gcc
13
    are not needed as we use the rvct compiler.
14
    Make sure you do the part about Wine setup as well.
15
16
  - Anderson Lizardo's patches for GnuPoc. Look for the
17
    qt_s60_gnupoc_v10.patch on this page:
18
    http://lizardo.wordpress.com/2009/09/24/installing-qt-for-s60-daily-snapshots-on-linux/
19
    and carry out the instructions under point 8: Installing Open C.
20
21
Compiling:
22
23
 1. First a few environment variables need to be set:
24
25
        export RVCT22LIB=<rvct-dir>/lib/armlib
26
        export EPOCROOT=<s60-root>
27
        export PATH=$PATH:<s60-root>/epoc32/tools:<rvctInstallDir>/bin
28
        export PATH=$PATH:<qt-root>/bin
29
30
    Replace the s60-root with the installation directory of your SDK,
31
    and the qt-root with the root of your Qt repository.
32
    These are good candidates for putting in a script somewhere.
33
34
 2. Run configure. It needs a bit more switches than usual, so here's
35
    the full line:
36
37
        ./configure -developer-build -platform linux-g++ -xplatform \
38
            symbian/linux-armcc -little-endian -host-little-endian \
39
            -arch symbian
40
41
 3. Compile Qt
42
43
        cd src
44
        make
45
46
    and then wait for a while.
47
48
 4. Package and install Qt
49
50
        cd s60installs
51
52
    Edit Qt_template.pkg and change the first 0x2xxxxxxx to
53
    0xExxxxxxx. Then execute:
54
55
        makesis Qt_template.pkg
56
        signsis Qt_template.sis Qt_template.sisx selfsigned.cer selfsigned.key
57
58
    Then put Qt_template.sisx on a memory card and install it from
59
    the phone file manager.
60
61
    Alternatively, you can use the runonphone tool found in the tools
62
    directory of Qt. To build, this requires a separately configured
63
    Qt installation for Linux, unfortunately. To use it, you also
64
    need have App TRK running on the phone. At the time of writing,
65
    only bleeding edge Linux kernels are able to autodetect the USB
66
    serial port on the phone, but you can force detection by running:
67
68
        modprobe usbserial vendor=0xXXXX product=0xXXXX
69
70
    The XXXXs should be replaced with the two values listed for your
71
    device when executing "lsusb". In most distributions, this will
72
    lead to the creation of two devices: /dev/ttyUSB0 and
73
    /dev/ttyUSB1. The latter is usually the one that App TRK responds
74
    to. Then execute:
75
76
        runonphone -p /dev/ttyUSB1 -s Qt_template.sisx dummy.exe
77
78
    The dummy.exe argument is irrelevant, since we are not executing
79
    anything yet.
80
81
 5. Compile some helloworld application (I leave the details to you
82
    ;-)
83
84
        qmake
85
        make
86
87
 6. Package, install and run application.
88
89
        makesis helloworld_template.pkg
90
        signsis helloworld_template.sis helloworld_template.sisx \
91
            <QTDIR>/src/s60installs/selfsigned.cer \
92
            <QTDIR>/src/s60installs/selfsigned.key
93
94
    Then either install by memory card, or install and run like this:
95
96
        runonphone -p /dev/ttyUSB1 -s helloworld_template.sisx \
97
            helloworld.exe
98
99
 7. Enjoy "hello world" on the phone!