Set up a GTK development environment under Archlinux-Linux general technology-Linux programming and kernel information. The following is a detailed description. I think most people like me have fallen in love with this tough Linux release since I first saw archlinux. I was the latest version of archlinux2008.06 installed on hard disks last month, despite a few small episodes, the installation was successful and gnome was installed. The simple and beautiful interface attracted my attention, so I decided to transfer my work platform from ubuntu to archlinux.
I did gtk development, so I wanted to build a gtk development environment under archlinux, But I found there was no reference to any prepared articles on the Internet, so when we set up the gtk development environment under ubuntu, we used pacman to download the corresponding package. I will give you a detailed description of the building process for your reference. I will give you some advice.
Because archlinux's pacman is very easy to use, I use pacman to download almost all the packages. Unless otherwise stated, the source I use is
Server = http://mirrors.lcuc.org.cn/archlinux/#repo/ OS /i686
The following is my setup process:
(1) install the pkg-config tool. In archlinux, the corresponding package is the pkgconfig-0.23-1-i686.pkg.tar.gz I used command:
Pacman-S pkgconfig
The current version is: pkgconfig-0.23-1.
(2) install gtk2.0. The command I used is:
Pacman-S gtk2
Libgnome library needs to be installed here, but this library seems to have been installed when gnome is installed, so you do not need to install it.
(3) install glade, a master of interface design. The command I used is:
Pacman-S glade
The current version in this source is glade-3.4.5-1.
(4) install gnome's document browser devhelp, which is an indispensable helper in programming. I rely on it to check the API. The command I use is:
Pacman-S devhelp
Now the version is devhelp-0.19.1-2.
(5) The default devhelp installation does not have any documentation, so you have to install it on your own. The following are some document packages. My command is:
Pacman-S atk-docs glade-docs gtk2-docs
With these packages, especially the gtk2-docs package has included GDK Reference Manual and GTK + Reference Manual so that you can cope with the usual gtk programming.
Now that our environment has been set up, you can enter the following command in the terminal to verify:
Pkg-config -- modversion gtk +-2.0
Pkg-config -- modversion libgnome-2.0
My results are 2.12.11 and 2.12.11.
Finally, I want to install a gtk2.0-examples, but I didn't find it in the source, and Google didn't find any useful information. I thought I had installed it in ubuntu, so I copied the/usr/bin/gtk-demo file under my ubuntu to/usr/bin/under my arch, restart the terminal and run gtk-demo.
Now that I have built a gtk development environment in archlinux, this environment can allow most developers to cope with simple development. I hope I can help you.
After posting the post, I always felt that there was something missing and I found that there were too few devhelp help documents. So I searched the internet last night to find some methods to add content to devhelp, I found a script program named devhelp-install, which is very depressing! My script ability is poor, research for a while I feel little pain, there is no way to download the latest reference manual on the http://www.gtk.org/documentation.html to see, unexpectedly, When I decompressed the package, I suddenly found that. if devhelp is a file with a suffix, do you think this is not a file in devhelp format, so I changed the directory glib-html-2.16.5.tar.gz I got from the decompressed glib-html-2.16.5 to glib and copied it to/usr/share/devhelp/books/my command is
Mv glib-html-2.16.5/usr/share/devhelp/books/glib
Open devhelp. Haha, the glib Reference Manual is already in it, which can be easily queried and is still up-to-date, however, I suggest you check the version installed in your system, such as the gtk version. Use the pkg-config -- modversion command to check the version of gtk, I downloaded gtk-html-2.12.11.tar.gz in 2.12.11, decompress it, and copy it to the/usr/share/devhelp/books/directory. Be sure to change the name here or devhelp is not recognized. Then we can see in devhelp that the reference manual version is also 2.12.11.
Haha! Now my development environment is exactly the same as that in ubuntu.
I put the devhelp-install script in the attachment for your research!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.