Install GNOME development environment on Ubuntu

http://www.openswc.com/forum.php?mod=viewthread&tid=308&extra=page%3D1

Install GNOME development environment on Ubuntu

https://live.gnome.org/DeveloperTools/Installation/Ubuntu
Contents
Install GNOME development environment on Ubuntu
        Minimal version requirements
        Install the developer-tools
        Install additional libraries needed for the GStreamer demos
        Install required packages for your favourite programming language
            C
            C++
            Python
            Vala
            JavaScript
        Keep this page up-to-date
Minimal version requirements

For setting up a decent GNOME development environment you should be on a fairly recent distribution to avoid fighting with old problems and dependencies. The following instructions assume that you have installed Ubuntu 11.10 "Oneiric Ocelot" (or higher) on your computer already.

Install the developer-tools

First you need to install the basic tools needed for GNOME development. To do so, install these packages either using Software Center or the apt-get command line utility:

    anjuta - Integrated development environment (or use your favorite IDE or text editor)

    glade - Interface designer

    devhelp - API Browser

Or alternatively,

$ sudo apt-get install anjuta glade devhelp

Install additional libraries needed for the GStreamer demos

If you want to follow the tutorials on http://developer.gnome.org you need to install some additional GStreamer packages:

    gstreamer0.10-plugins-bad
    gstreamer0.10-plugins-bad-multiverse

Or alternatively,

$ sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse

Install required packages for your favourite programming language

You can decide which programming language you are going to use and install the appropriate packages for one or more languages. The following subsections will the packages you have to install:

C

For C programming you need to install the development version of the important GNOME libraries. Those contain the header files and additional linker information:

    libgtk-3-dev
    libgstreamer0.10-dev
    libclutter-1.0-dev
    libwebkitgtk-3.0-dev
    libgda-5.0-dev

Or alternatively,

$ sudo apt-get install libgtk-3-dev libgstreamer0.10-dev libclutter-1.0-dev libwebkitgtk-3.0-dev libgda-5.0-dev

In addition, you will want to install the documentation packages of this libraries so you can view them in the API browser:

    libgtk-3-doc
    gstreamer0.10-doc
    libclutter-1.0-doc
    libwebkitgtk-3.0-doc (not available currently)
    libgda-5.0-doc

Or alternatively,

$ sudo apt-get install libgtk-3-doc gstreamer0.10-doc libclutter-1.0-doc libgda-5.0-doc

C++

Be sure to have the C++-Compiler installed:

    g++

Or alternatively,

$ sudo apt-get install g++

For C++ programming you need to install the development version of the important GNOME libraries. Those contain the header files and additional linker information:

    libgtkmm-3.0-dev
    libgstreamermm-0.10-dev
    libcluttermm-1.0-dev (not available yet)
    libgdamm5.0-dev

Or alternatively,

$ sudo apt-get install libgtkmm-3.0-dev libgstreamermm-0.10-dev libgdamm5.0-dev

In addition, you will want to install the documentation packages of this libraries so you can view them in the API browser:

    libgtkmm-3.0-doc
    libgstreamermm-0.10-doc
    libcluttermm-1.0-doc (not available currently)
    libgdamm5.0-doc

Or alternatively,

$ sudo apt-get install libgtkmm-3.0-doc libgstreamermm-0.10-doc libgdamm5.0-doc

Python

Python uses GObjectIntrospection which means you don't need to install additional development libraries but you should be sure to have a decent python environment and the introspection bindings installed:

    python
    python-gobject

Or alternatively,

$ sudo apt-get install python python-gobject

Vala

As the Vala compiler actually translates your code into C code you will have to install all the packages listed in the C section and in addition you need to install the vala compiler:

    valac
    vala-utils (Not available in Ubuntu 12.04)
    vala-doc

Or alternatively,

$ sudo apt-get install valac vala-doc

JavaScript

JavaScript uses GObjectIntrospection which means you don't need to install additional development libraries but you need to have the JavaScript intepreter installed though:

    gjs
    libgjs-dev

Or alternatively,

$ sudo apt-get install gjs libgjs-dev

Note there is also Seed which is another JavaScript implementation used in GNOME but the examples on developer.gnome.org are all done with gjs.

Keep this page up-to-date

Distribution information can change rather fast so please correct errors found on this page. If you are not able to figure out yourself, please drop a mail to gnome-doc-list@gnome.org. Thanks!

Note if there is  errors found on this file, please drop a mail to [url=mailto penswc@126.com]openswc@126.com[/url].
Thanks!
以下是openswc翻译的中文版本,如有错误,请帮忙指出和发邮件给[url=mailto penswc@126.com]openswc@126.com[/url]。

Chinese (simplified) 中文版本
在Ubuntu上安装GNOME开发环境
目录
1.在Ubuntu上安装GNOME开发环境
  1.最低版本要求
  2.安装开发工具
  3.安装GStreamer demos版本所需的额外库
  4.安装你所喜爱的编程语言的开发包
    1.C
    2.C++
    3.Python
    4.Vala
    5.JavaScript
  5.文档更新

最低版本要求
为了搭建一个良好的GNOME开发环,您需要一个最新的ubuntu发行版,这样可以避免遇到旧的问题和依赖旧库。以下步骤基于您在电脑上已经安装了Ubuntu 11.10 "Oneiric Ocelot"版本 (或者更高版本) 。

安装开发工具
首先您需要安装最基本的开发工具。这些工具包可以通过软件中心或者 apt-get 命令安装:
    anjuta - 集成开发环境IDE (或者使用您自己喜爱的其他IDE,或者使用文本编辑器)
    glade - 交互设计工具
    devhelp - API浏览器
用 apt-get 命令安装
$ sudo apt-get install anjuta glade devhelp

安装GStreamer demos版本所需的额外库
如果你想参考手册 http://developer.gnome.org,需要安装一些额外的GStreamer包:
   gstreamer0.10-plugins-bad
   gstreamer0.10-plugins-bad-multiverse
用 apt-get 命令安装
sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse

安装你所喜爱的编程语言的开发包
确定您想使用的编程语言,可以是一种或者多种,根据您所选择的语言安装相应的软件包。
您需要安装的软件包有一下这些:
C
对于C语言,您需要安装一些重要的GNOME库。以下软件包包含了所需要的头文件和链接信息:
    libgtk-3-dev
    libgstreamer0.10-dev
    libclutter-1.0-dev
    libwebkitgtk-3.0-dev
    libgda-5.0-dev
用 apt-get 命令安装
$ sudo apt-get install libgtk-3-dev libgstreamer0.10-dev libclutter-1.0-dev libwebkitgtk-3.0-dev libgda-5.0-dev
另外,您可以通过安装以上这些软件库对应的文档包,在API浏览器中阅读这些文档:
    libgtk-3-doc
    gstreamer0.10-doc
    libclutter-1.0-doc
    libwebkitgtk-3.0-doc (当前不可用)
    libgda-5.0-doc
用 apt-get 命令安装
$ sudo apt-get install libgtk-3-doc gstreamer0.10-doc libclutter-1.0-doc libgda-5.0-doc

C++
确保安装C++编译器:
    g++
用 apt-get 命令安装
$ sudo apt-get install g++

对于C++,您需要安装一些重要的GNOME库。以下软件包包含了所需要的头文件和链接信息:您:
    libgtkmm-3.0-dev
    libgstreamermm-0.10-dev
    libcluttermm-1.0-dev (not available yet)
    libgdamm5.0-dev
用 apt-get 命令安装
$ sudo apt-get install libgtkmm-3.0-dev libgstreamermm-0.10-dev libgdamm5.0-dev

另外,您可以通过安装以上这些软件库对应的文档包,在API浏览器中阅读这些文档:
    libgtkmm-3.0-doc
    libgstreamermm-0.10-doc
    libcluttermm-1.0-doc (not available currently)
    libgdamm5.0-doc
用 apt-get 命令安装
$ sudo apt-get install libgtkmm-3.0-doc libgstreamermm-0.10-doc libgdamm5.0-doc

Python
Python使用GObjectIntrospection,这样您就不需要安装额外的开发包,但是你需要保证有一个良好的python开发环境和安装introspection bindings:
    python
    python-gobject
用 apt-get 命令安装
$ sudo apt-get install python python-gobject

Vala
由于Vala 编译器实际上会把您的Vala源代码转换成C代码,这样您就需要安装C语言部分列出的所有软件包,另外,您还需安装Vala 编译器:
    valac
    vala-utils (Not available in Ubuntu 12.04)
    vala-doc
用 apt-get 命令安装
$ sudo apt-get install valac vala-doc

JavaScript
JavaScript使用GObjectIntrospection,,这样您就不需要安装额外的开发库,但是你需要通过以下开发包安装JavaScript intepreter:
    gjs
    libgjs-dev
用 apt-get 命令安装
$ sudo apt-get install gjs libgjs-dev
Note 还有另外一个JavaScript implementation Seed 在GNOME中使用,但是developer.gnome.org上的程序例子都是用gjs开发的.

文档更新
由于发行版信息改变得非常快,本页可能存在错误,请帮忙更正。如果您不清楚出现的问题,请发邮件给 gnome-doc-list@gnome.org.谢谢。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值