Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12838957
  • 博文数量: 1293
  • 博客积分: 13501
  • 博客等级: 上将
  • 技术积分: 17974
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 18:11
文章分类

全部博文(1293)

文章存档

2019年(1)

2018年(1)

2016年(118)

2015年(257)

2014年(128)

2013年(222)

2012年(229)

2011年(337)

分类: LINUX

2013-04-12 23:12:39

Well folks, today Digia has made a very special announcement -  This is very exciting considering that it has been  since Qt 4.0 was released. So what's new in this release? goes into detail on the new features so I won't waste time pasting them here. Here are just a couple things to whet your appetite:

  • A brand new hardware accelerated graphics engine.
  • Native support for parsing and generating JSON.

Now, the next question becomes... how do we install this in Ubuntu since the latest version in the Quantal repositories is 4.8.3? I'm glad you asked.

Sadly, I have been unable to find a PPA with the final released version of Qt 5.0. So we will have to build it ourselves. Warning: you need a lot of disk space. Just the source code alone is about 650 MB before building.

Begin by opening a terminal and running these commands:

sudo apt-get install build-essential perl python "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev flex bison gperf libicu-dev libxslt-dev ruby libcups2-dev libgstreamer-plugins-base0.10-dev libssl-dev libpulse-dev libasound2-dev libgtk2.0-dev
wget 
tar -xf qt-everywhere-opensource-src-5.0.0.tar.gz
cd qt-everywhere-opensource-src-5.0.0

Just a quick note to explain what's happening here: basically we're installing the packages we need for building Qt and downloading / extracting the source archive. Feel free to prefix the commands above withcd /tmp if you don't want a bunch of temporary files cluttering up your hard drive when you're done.

Now for the fun part - actually compiling the library. This isn't really as bad as it sounds. The first step is to use the ./configure command to indicate exactly what we want built and how (this will take about one or two minutes):

./configure -opensource -confirm-license -release -nomake tests -nomake examples -nomake demos

There are quite a few options.  In this case, we are skipping debug information (since it uses up even more disk space) and we're not building the examples or demos.

The actual build takes place with this command:

make -j3

Now go make yourself a cup of coffee. This will take some time to complete (a couple of hours on a fast machine). Once the process completes successfully, you can install all of the newly compiled files by running:

sudo make install

That's it! That wasn't so bad, was it?

阅读(2996) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~