linux下常用一些开发环境的搭建

 

Install qt in the scratchbox based on X11

  Note:if you want to make your qt sppporting opengl ,you need to install opengl library before you install the opengl

1:install opengl library(getting Mesa)

$ git clone git://anongit.freedesktop.org/git/mesa/mesa

2:Building libdrm

      The Mesa drivers now require libdrm to be installed. Do the following to build libdrm

$cd drm

$./autogen.sh

Note: libdrm installs to /usr/local/lib by default. To install in /usr/lib

 

$../configure --prefix=/usr       (this step is not necessary.you may do it or don’t do it)

$make

$mkde install

 

3:insall Qt in scratbox

Down the qt-embedded-linux-opensource-src-4.4.0.tar.gz pakage

$ tar jxvf qt-embedded-linux-opensource-src-4.4.0.tar.gz

Or

$gunzip qt-embedded-linux-opensource-src-4.4.0.tar.gz

$tar xvf qt-embedded-linux-opensource-src-4.4.0.tar

 

4: patch

To make QTopia build work, you need to patch one file. Copy the diff below to the some text file e.f. patch_file.diff.txt. (There might be another way to go around this problem: try to install newer qemu. See the How-to: installing qtopia to the standard scratchbox)

--- qt-x11-opensource-src-4.3.1-orig/src/corelib/io/qfsfileengine_iterator_unix.cpp    

+++ qt-x11-opensource-src-4.3.1/src/corelib/io/qfsfileengine_iterator_unix.cpp

@@ -118,6 +118,7 @@

 #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN)

             if (that->platform->mt_file)

                 delete [] that->platform->mt_file;

+               maxPathName=34240;

             that->platform->mt_file = (dirent *)new char[maxPathName];

 #endif

 

  • I assume that now you have QT Embedded source code in

$cd qt-embedded-linux-opensource-src-4.4.0

$patch -p1 < ../patch_file.diff.txt

5:Install Qt

 

If you want to let Qt support opengl.You should do like this

$./configure –opengl –no-webkit –x11 –platform linux_g++

If you don’t want to let Qt support,do like this

$./configure –no-webkit –x11 –platform linux_g++

$make

$make install

 

Install QFrameBuffer

NOTE:the step from 1 to 4 is same to above.only the fifth step is different form above

Because we don’t have the OPengl Es package,so we don’t make the Qt support the opengl

$./configure

$make

$make install

 

 

                                           安装maemo sdk 和scratchbox 在Debin下

在以下网址下载安装角本各安装说明档

两个角本

1:maemo-sdk的

2:scratchbox的

http://maemo.org/development/sdks/maemo-4-1-diablo-sdk/

   这是下载它们的网址

 

先装scratchbox,将一个用户加到scratchbox 中,再装maemo-sdk

此时两个默认的目标平台已经搭建好了

 

你只需要在相应的目标平台下装你需要的东西就可以了

 

 

请参考文章 :Maemo Linux手机平台系列分析 scratchboxp安装

一起来搭建环境

 

$ sudo /scratchbox/sbin/sbox_adduser  zp
注意, 被添加的用户只能是本地主机上已有的用户(这里是zp)!

 

1.下载安装文件。在
scratchbox网站

载scratchbox-core-1.0.8-i386.tar.gz,scratchbox-libs-1.0.8-
i386.tar.gz,scratchbox-devkit-cputransp-1.0.2-i386.tar.gz,scratchbox-
toolchain-arm-linux-ct401-2.3-1.0.4-i386.tar.gz,scratchbox-toolchain-
cs2005q3.2-glibc-arm-1.0.5-i386.tar.gz这5个压缩包。
2.解压缩文件。Scratchbox要求一定要
安装在根目录下的scratchbox下面(/scratchbox)。如果根目录下没有空间,则可以将文件先解压缩到其他目录如~/project
/sb/scratchbox,然后再建立链接sudo ln -s ~/project/sb/scratchbox /scratchbox。
按此方法解压缩5个压缩包到同一目录下sudo tar zxvf scratchbox-core-1.0.8-i386.tar.gz -C /home/zhf/project/sb/。
3.安装scratchbox。运行$sudo /scratchbox/run_me_first.sh,安装时全部默认即可。
4.为scratchbox添加用户。$ sudo /scratchbox/sbin/sbox_adduser user 注意此次的user用户必须是已经在此pc机上注册的非root用户。
5.启动scratchbox。$ /scratchbox/login
  启动时可能会遇到Inconsistency detected by ld.so: rtld.c: 1192:错误,此时可运行下列命令解决:
  # su -
  # echo 0 > /proc/sys/vm/vdso_enabled
6.卸载scratchbox。
  $sudo /scratchbox/sbin/sbox_ctrl stop
  $sudo rm -rf ~/project/sb/scratchbox
  $sudo rm -rf /scratchbox
                

 

      

 

 

 

 

 

你可能感兴趣的:(gained,knowledge,and,summary)