特殊:Badtitle/NS100:DevelopingPreparation:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/DevelopingPreparation}} {{Languages|UbuntuHelp:DevelopingPreparation}} == Preparing your Ubuntu system for software development == A fresh Ubuntu... |
小无编辑摘要 |
||
第5行: | 第5行: | ||
A fresh Ubuntu install lacks most things to do any form of development. You can not even start building packages from source. So you will need a few packages installed to get started. | A fresh Ubuntu install lacks most things to do any form of development. You can not even start building packages from source. So you will need a few packages installed to get started. | ||
All of the primary development packages are in main, so no extra repositories are required (the exception was mono in Hoary, but this is no longer the case in Breezy). | All of the primary development packages are in main, so no extra repositories are required (the exception was mono in Hoary, but this is no longer the case in Breezy). | ||
Install the '''build-essential''' package which will install most of the tools that you will need to compile most packages, as well as write your own. | |||
will install most of the tools that you will need to compile most packages, as well as write your own. | |||
=== CVS === | === CVS === | ||
==== Installing CVS ==== | ==== Installing CVS ==== | ||
Much of the latest software can only be downloaded using CVS. | Much of the latest software can only be downloaded using CVS. Install the '''cvs''' package then to start working with it, create a build area | ||
<pre><nowiki> | <pre><nowiki> | ||
第36行: | 第26行: | ||
==== Using CVS ==== | ==== Using CVS ==== | ||
The initial checkout of the code from a CVS repository is fairly simple, and is made up of three commands. The first is used to tell CVS where the repository is situated, and how it should connect to it. This is generally done with | The initial checkout of the code from a CVS repository is fairly simple, and is made up of three commands. | ||
* The first is used to tell CVS where the repository is situated, and how it should connect to it. This is generally done with | |||
<pre><nowiki> | <pre><nowiki> | ||
第42行: | 第34行: | ||
</nowiki></pre> | </nowiki></pre> | ||
replacing <user> with the username (generally anonymous for read-only access), <server> with the name of the server, and <directory> with the directory of the repository on the server. | replacing <user> with the username (generally anonymous for read-only access), <server> with the name of the server, and | ||
<directory> with the directory of the repository on the server. | |||
Next, we log on to the server. When you are only reading the repository (ie. most of the time), you will log on as anonymous, generally with no password, although some projects may be different. The login is performed with the command <code><nowiki>cvs login</nowiki></code> and entering the password when prompted. | * Next, we log on to the server. When you are only reading the repository (ie. most of the time), you will log on as anonymous, generally with no password, although some projects may be different. The login is performed with the command <code><nowiki>cvs login</nowiki></code> and entering the password when prompted. | ||
You can now finally get the code! Change to the directory you want the code in, and issue {{[cvs -z3 co <somemodule></nowiki></pre>. The -z[n] parameter tells CVS to use compression, with 0 being no compression and 9 being the most. 3 is the most commonly used. 'co' means check-out, and <somemodule> needs to be replaced with the name of the module you wish to check-out. | * You can now finally get the code! Change to the directory you want the code in, and issue {{[cvs -z3 co <somemodule></nowiki></pre>. The -z[n] parameter tells CVS to use compression, with 0 being no compression and 9 being the most. 3 is the most commonly used. 'co' means check-out, and <somemodule> needs to be replaced with the name of the module you wish to check-out. | ||
When the repository changes, you are likely to want the latest version again. This can be achieved with <code><nowiki>cvs update -dP</nowiki></code> in the directory of the local copy. The d parameter creates new directories, and the P deletes the old ones. | * When the repository changes, you are likely to want the latest version again. This can be achieved with <code><nowiki>cvs update -dP</nowiki></code> in the directory of the local copy. The d parameter creates new directories, and the P deletes the old ones. | ||
More information on CVS usage can be found with <code><nowiki>man cvs</nowiki></code>. | More information on CVS usage can be found with <code><nowiki>man cvs</nowiki></code>. | ||
第54行: | 第47行: | ||
=== Subversion === | === Subversion === | ||
==== Installing Subversion ==== | ==== Installing Subversion ==== | ||
Subversion (often known as SVN), while not as widely known/used as CVS, is rapidly gaining use in the source code management field. Many major software projects use it, as it has many distinct advantages over the older CVS. It is much easier to use, and has features that make administering the 'repositories' of code much easier. | Subversion (often known as SVN), while not as widely known/used as CVS, is rapidly gaining use in the source code management field. Many major software projects use it, as it has many distinct advantages over the older CVS. It is much easier to use, and has features that make administering the 'repositories' of code much easier. Just install the '''subversion''' package. | ||
==== Using Subversion ==== | ==== Using Subversion ==== | ||
第84行: | 第71行: | ||
or at http://www.svnbook.org/. | or at http://www.svnbook.org/. | ||
[[category:CategoryDocumentation | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月22日 (四) 12:20的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/DevelopingPreparation }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/af | • {{#if: UbuntuHelp:DevelopingPreparation|Afrikaans| [[::DevelopingPreparation/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ar | • {{#if: UbuntuHelp:DevelopingPreparation|العربية| [[::DevelopingPreparation/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/az | • {{#if: UbuntuHelp:DevelopingPreparation|azərbaycanca| [[::DevelopingPreparation/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/bcc | • {{#if: UbuntuHelp:DevelopingPreparation|جهلسری بلوچی| [[::DevelopingPreparation/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/bg | • {{#if: UbuntuHelp:DevelopingPreparation|български| [[::DevelopingPreparation/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/br | • {{#if: UbuntuHelp:DevelopingPreparation|brezhoneg| [[::DevelopingPreparation/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ca | • {{#if: UbuntuHelp:DevelopingPreparation|català| [[::DevelopingPreparation/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/cs | • {{#if: UbuntuHelp:DevelopingPreparation|čeština| [[::DevelopingPreparation/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/de | • {{#if: UbuntuHelp:DevelopingPreparation|Deutsch| [[::DevelopingPreparation/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/el | • {{#if: UbuntuHelp:DevelopingPreparation|Ελληνικά| [[::DevelopingPreparation/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/es | • {{#if: UbuntuHelp:DevelopingPreparation|español| [[::DevelopingPreparation/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/fa | • {{#if: UbuntuHelp:DevelopingPreparation|فارسی| [[::DevelopingPreparation/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/fi | • {{#if: UbuntuHelp:DevelopingPreparation|suomi| [[::DevelopingPreparation/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/fr | • {{#if: UbuntuHelp:DevelopingPreparation|français| [[::DevelopingPreparation/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/gu | • {{#if: UbuntuHelp:DevelopingPreparation|ગુજરાતી| [[::DevelopingPreparation/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/he | • {{#if: UbuntuHelp:DevelopingPreparation|עברית| [[::DevelopingPreparation/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/hu | • {{#if: UbuntuHelp:DevelopingPreparation|magyar| [[::DevelopingPreparation/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/id | • {{#if: UbuntuHelp:DevelopingPreparation|Bahasa Indonesia| [[::DevelopingPreparation/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/it | • {{#if: UbuntuHelp:DevelopingPreparation|italiano| [[::DevelopingPreparation/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ja | • {{#if: UbuntuHelp:DevelopingPreparation|日本語| [[::DevelopingPreparation/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ko | • {{#if: UbuntuHelp:DevelopingPreparation|한국어| [[::DevelopingPreparation/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ksh | • {{#if: UbuntuHelp:DevelopingPreparation|Ripoarisch| [[::DevelopingPreparation/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/mr | • {{#if: UbuntuHelp:DevelopingPreparation|मराठी| [[::DevelopingPreparation/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ms | • {{#if: UbuntuHelp:DevelopingPreparation|Bahasa Melayu| [[::DevelopingPreparation/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/nl | • {{#if: UbuntuHelp:DevelopingPreparation|Nederlands| [[::DevelopingPreparation/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/no | • {{#if: UbuntuHelp:DevelopingPreparation|norsk| [[::DevelopingPreparation/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/oc | • {{#if: UbuntuHelp:DevelopingPreparation|occitan| [[::DevelopingPreparation/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/pl | • {{#if: UbuntuHelp:DevelopingPreparation|polski| [[::DevelopingPreparation/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/pt | • {{#if: UbuntuHelp:DevelopingPreparation|português| [[::DevelopingPreparation/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ro | • {{#if: UbuntuHelp:DevelopingPreparation|română| [[::DevelopingPreparation/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/ru | • {{#if: UbuntuHelp:DevelopingPreparation|русский| [[::DevelopingPreparation/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/si | • {{#if: UbuntuHelp:DevelopingPreparation|සිංහල| [[::DevelopingPreparation/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/sq | • {{#if: UbuntuHelp:DevelopingPreparation|shqip| [[::DevelopingPreparation/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/sr | • {{#if: UbuntuHelp:DevelopingPreparation|српски / srpski| [[::DevelopingPreparation/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/sv | • {{#if: UbuntuHelp:DevelopingPreparation|svenska| [[::DevelopingPreparation/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/th | • {{#if: UbuntuHelp:DevelopingPreparation|ไทย| [[::DevelopingPreparation/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/tr | • {{#if: UbuntuHelp:DevelopingPreparation|Türkçe| [[::DevelopingPreparation/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/vi | • {{#if: UbuntuHelp:DevelopingPreparation|Tiếng Việt| [[::DevelopingPreparation/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/yue | • {{#if: UbuntuHelp:DevelopingPreparation|粵語| [[::DevelopingPreparation/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/zh | • {{#if: UbuntuHelp:DevelopingPreparation|中文| [[::DevelopingPreparation/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/zh-hans | • {{#if: UbuntuHelp:DevelopingPreparation|中文(简体)| [[::DevelopingPreparation/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:DevelopingPreparation | UbuntuHelp:DevelopingPreparation | {{#if: | :}}DevelopingPreparation}}/zh-hant | • {{#if: UbuntuHelp:DevelopingPreparation|中文(繁體)| [[::DevelopingPreparation/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:DevelopingPreparation|:DevelopingPreparation|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :DevelopingPreparation/zh | | {{#ifexist: DevelopingPreparation/zh | | {{#ifeq: {{#titleparts:DevelopingPreparation|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:DevelopingPreparation|1|-1|}} | zh | | }}
Preparing your Ubuntu system for software development
A fresh Ubuntu install lacks most things to do any form of development. You can not even start building packages from source. So you will need a few packages installed to get started.
All of the primary development packages are in main, so no extra repositories are required (the exception was mono in Hoary, but this is no longer the case in Breezy).
Install the build-essential package which will install most of the tools that you will need to compile most packages, as well as write your own.
CVS
Installing CVS
Much of the latest software can only be downloaded using CVS. Install the cvs package then to start working with it, create a build area
mkdir cvs
This will give you a nice place to work
cd cvs
and that's all there's to it.
Using CVS
The initial checkout of the code from a CVS repository is fairly simple, and is made up of three commands.
- The first is used to tell CVS where the repository is situated, and how it should connect to it. This is generally done with
export CVSROOT=:pserver:<user>@<server>:<directory>
replacing <user> with the username (generally anonymous for read-only access), <server> with the name of the server, and <directory> with the directory of the repository on the server.
- Next, we log on to the server. When you are only reading the repository (ie. most of the time), you will log on as anonymous, generally with no password, although some projects may be different. The login is performed with the command
cvs login
and entering the password when prompted.
- You can now finally get the code! Change to the directory you want the code in, and issue {{[cvs -z3 co <somemodule></nowiki>. The -z[n] parameter tells CVS to use compression, with 0 being no compression and 9 being the most. 3 is the most commonly used. 'co' means check-out, and <somemodule> needs to be replaced with the name of the module you wish to check-out.
- When the repository changes, you are likely to want the latest version again. This can be achieved with
cvs update -dP
in the directory of the local copy. The d parameter creates new directories, and the P deletes the old ones.
More information on CVS usage can be found with man cvs
.
Subversion
Installing Subversion
Subversion (often known as SVN), while not as widely known/used as CVS, is rapidly gaining use in the source code management field. Many major software projects use it, as it has many distinct advantages over the older CVS. It is much easier to use, and has features that make administering the 'repositories' of code much easier. Just install the subversion package.
Using Subversion
Just as it is easy to install, Subversion is easy to use, with
cd someproject svn checkout http://<server>/<directory>
getting the latest source code (when <server> is replaced with the server of the repository, and <directory> with the directory on the server in which the repository is situated), and putting it in the current directory. Further updates can be retrieved with
svn update
making sure that you are in the directory that you checked it out to.
Further information on Subversion can be found at http://subversion.tigris.org/, and help can be got with
svn help
or at http://www.svnbook.org/.