Archive:Getting Started/Sources/Anonymous SVN (zh CN)

From KDE TechBase
Revision as of 04:04, 22 February 2009 by Hualiang.miao (talk | contribs)

Template:I18n/Language Navigation Bar (zh CN) Template:TutorialBrowser (zh CN)

摘要

For those of us that like to stay on the "bleeding edge" there's an easy way to keep a local copy of the KDE sources up-to-date - 匿名SVN.

Please note that several Linux distributions now already provide KDE SVN packages, so building Qt and KDE from source may well not be necessary for you at all! See Getting_Started/Distribution_Packages for instructions and information.

匿名SVN仓库

设置Subversion

First, install the subversion (svn) binary if it isn't already on your computer. Your operating system should have a package for it. Alternatively you can download and compile it yourself via the svn project download page. Please read the KDE Subversion tutorial if you are interested in how to use Subversion.

检出KDE代码

/trunk/ is where the Qt4-based KDE 4 is being developed. The following is the minimal set of modules you will need to check out to build KDE and KDE software:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase
Tip
用 "svn co" 做第一次/初始代码获取, 然后再用"svn up modulename" 或 "svn update modulename".更新你的本地代码。


Tip
如果本地防火墙不允许使用随意端口,把svn://anonsvn.kde.org/换成svn://websvn.kde.org:443/


qt-copy is a copy of the latest stable Qt release which works with KDE, put into SVN for convenience. It also contains patches by KDE developers that haven't found their way to Qt yet. They are recommended for those working with KDE from trunk. You can obtain qt-copy by doing:

svn co svn://anonsvn.kde.org/home/kde/trunk/qt-copy

If you wish to have a complete copy of the KDE distribution, you can simply check out the entire source tree with one command:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE
Note
It is smarter to first use The KDE Source Repository Web Viewer. Use it to choose which modules to download. This way KDE will be quicker to install and try out.


If you want additional software packages you can check out the following modules within trunk/ as well:

koffice
extragear
playground
kdereview

So, for example, if you want to check out koffice trunk, you can use

svn co svn://anonsvn.kde.org/home/kde/trunk/koffice

使用快照检出主干代码

If you are checking out modules from trunk/ you may be able to save time by using snapshots. Using Subversion trunk snapshots is described at the Subversion snapshots tutorial page.

检出KDE3代码

If you want to track KDE 3 rather than the bleeding edge, you may retrieve the KDE 3.5 sources using:

svn co svn://anonsvn.kde.org/home/kde/branches/arts/1.5/arts
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/

如果你想要匹配qt-copy:

svn co svn://anonsvn.kde.org/home/kde/branches/qt/3.3/qt-copy

检出特定版本代码

KDE modules are also tagged at each release so that it is possible to get a specific release of KDE. Most KDE modules have a tag name in the format tags/KDE/X.Y.Z (where X, Y and Z represent the exact version). The arts module (only needed for KDE 2 and KDE 3) has a different format of tag name, tags/arts/X.Y.Z. For instance to get kdelibs as it was shipped in KDE 3.5.0, do:

svn co svn://anonsvn.kde.org/home/kde/tags/KDE/3.5.0/kdelibs/

如果你要更新你的KDE 3.5.5,用下列命令:

svn switch svn://anonsvn.kde.org/home/kde/tags/KDE/3.5.5/kdelibs
Tip
如果你使用/branch//trunk/路径, 那就不必切换了,直接用svn update就可以了


Tip
WebSVN可以用来快速确定标签名。


检出翻译

If you are looking for translations and other localizations, check out the appropriate language from the l10n module.

Warning
l10n模块十分巨大。确保你的硬盘够大,带宽够足,然后再取出整个l10n模块。大多人只要特定语言就可以了,不必取整个l10n模块。


You are now ready to start building KDE! Visit this page for instructions on building trunk or 这里 for instruction on compiling the last stable release.

兴趣知识

  • anonsvn.kde.org 在德国图灵根, 由Dirk Mueller维护。 However, a more local mirror could be faster for you than anonsvn.kde.org itself. 当前镜像如下,按性能排序:
切换镜像时请注意,SVN会在工作备份中记录你的服务器;切换时你必须运行:
svn switch --relocate svn://anonsvn.kde.org/ svn://kde.mneisen.org/
这要对你所有的地方。

有意设立svn镜像,请联系Dirk Mueller.