Thursday, July 29, 2010

Install x86-qtopia for Linux host PC

Hello Friends!!
Here i am posting the total steps for the installation of the x86-qtopia for the mini2440 , 3.5" Linux board
x86-qtopia provides tools and support for developing qt applications and running them on the host pc in a simulated embedded environment.


1. Extract the archive to: /opt/FriendlyARM/mini2440/
tar xfvz x86-qtopia-2.2.0_20100108.tgz -C /opt/FriendlyARM/mini2440

2. Extract the individual archives:
cd /opt/FriendlyARM/mini2440/x86-qtopia/
tar xfz qtopia-2.2.0.tar.gz
tar xfz konq.tar.gz
mkdir qtopia-2.2.0-FriendlyARM/qtopia/image
tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image

Some of the source code needs to be adjusted slightly in order to compile.

3. Edit the four files below as noted:
3.1
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/qmemoryfile_unix.cpp

remove this line
line 141: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
add this line
line 141: +++ f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));

3.2
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/tools/qmemoryfile_unix.cpp

remove this line
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
add this line
line 143: --- f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, (S_IRUSR|S_IWUSR));

3.3
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/libraries/qtopia/backend/vobject.cpp

remove this line
line 419: --- char *dot = strrchr(g,'.');
add this line
line 419: +++ char *dot = (char *) strrchr(g,'.');

3.4
gedit /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/src/plugins/codecs/wavplugin/wavplugin.cpp

remove this line
line 435: char *ext = strrchr( path.latin1(), '.' );
add this line
line 435: char *ext = (char *) strrchr( path.latin1(), '.' );


I edited the build scripts to remove the initial archive removal and extractions. This will prevent the source code changes above from being deleted and overwritten (which the scripts will do). Alternatively, you can simply run the configure statement by hand, then run make, make install, etc..

UPDATE: I've posted the build scripts I've reffered here.

4. Finally you can run the build...
./build-all

So finally your Qtopia for x86 version is build and you can try with one example even.

2 comments: