Archive:Getting Started/Using Project Neon to contribute to KDE (zh TW): Difference between revisions

From KDE TechBase
(Created page with 'Project Neon指的是每晚建構的最新KDE的trunk。它提供了一個簡單的方法讓那些剛開始入門的KDE貢獻人員能快速上手而不必自己check-out整份...')
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Project Neon指的是每晚建構的最新KDE的trunk。它提供了一個簡單的方法讓那些剛開始入門的KDE貢獻人員能快速上手而不必自己check-out整份的KDE tree並且在local端維護。此外,那些額外的相依組件會自動被處理及更新。這非常適合剛入門的開發人員,寫文件的人員及易用性設計師
{{Template:I18n/Language Navigation Bar_(zh_TW)|Getting_Started/Using_Project_Neon_to_contribute_to_KDE}}


Project Neon is a nightly build of the latest KDE trunk. It is an easy way for new contributors to KDE to get started without having to build the entire KDE-SVN tree and maintain the checkout. Additionally, dependencies are automatically handled and updated. This is suitable for new developers, translators, usability designers, documenters, promoters, bug triagers etc. This process makes the steps detailed on this page, including changes to your .bashrc unnecessary.
[https://edge.launchpad.net/project-neon Project Neon] 指的是每晚建構的最新 KDE trunk。它提供了一個簡單的方法讓那些剛開始入門的KDE貢獻人員能快速上手而不必自己check-out整份的KDE tree並且在local端維護。此外,那些額外的相依組件會自動被處理及更新。這非常適合剛入門的開發人員,寫文件的人員及易用性設計師。This process makes the steps detailed on [[Getting_Started/Build/KDE4_(zh_TW)|this page]], including changes to your [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|.bashrc]] unnecessary.


However, for developers, it may at some point become necessary to build more components from SVN as you become more involved in the project. The kdesvn-build script is an easy way to build all or parts of KDE SVN.
然而對開發人員來說,隨著對專案的參與程度提高,手動建構SVN上的元件有時是必須的,[[Getting_Started/Build/kdesvn-build|kdesvn-build]] script提供了一個簡易的方法來建構在SVN上的KDE組件
 
== Requirements ==
 
Project neon always requires the latest stable Kubuntu release. As of January 2009, that is version 8.10. Previous versions of Kubuntu are not supported. It is possible to port Project Neon to other distributions, though there are currently no maintainers for other distributions working on the project. OpenSuse provides their own weekly build of KDE trunk. Find instructions on how to use it [[Getting Started/Using OpenSuse KDE unstable packages for development|here]].
 
== Installing Project Neon ==
 
To use Project Neon, add the following PPA (Personal Package Archive) to your <tt>sources.list</tt> using your preferred method:
 
<syntaxhighlight lang="bash">
# Project neon nightly KDE4 build
deb http://ppa.launchpad.net/project-neon/ubuntu jaunty main
 
#above repository is PGP signed, refer to below link for getting PGP key
https://launchpad.net/~project-neon/+archive/ppa
</syntaxhighlight>
 
After that, you can simply install the nightly package of whichever modules you want to work on. The following packages are available:
 
kde-nightly-kdebase
kde-nightly-kdeplasma-addons
kde-nightly-kdepim
kde-nightly-kdeedu
kde-nightly-kdenetwork
kde-nightly-kdeutils
kde-nightly-kdegraphics
kde-nightly-kdemultimedia
 
You can install all of the packages or just the ones you are interested in, depending on what you want to use them for. For example if you want to install the latest KDE Workspace (plasma, kwin etc), install the <tt>kde-nightly-kdebase</tt> package and <tt>kde-nightly-kdeplasma-addons</tt> package for extra plasmoids.
 
<syntaxhighlight lang="bash">
sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons
</syntaxhighlight>
 
If you are only interested in application development in another module, you can install just the module package.
 
<syntaxhighlight lang="bash">
sudo aptitude install kde-nightly-kdepim
</syntaxhighlight>
 
That command will also install the <tt>kdelibs</tt>, <tt>kdepimlibs</tt> and other dependencies too. In your regular (stable) KDE session you can then run the nightly version of your chosen application by using the full path from the command line.
 
<syntaxhighlight lang="bash">
/opt/kde-nightly/bin/kmail
</syntaxhighlight>
 
This will correctly use the nightly version of libraries instead of using the stable versions, so no other changes are necessary to your library path etc.
 
Alternatively, instead of using the full path to the executable, you could add the following to your <tt>.bashrc</tt>
 
<syntaxhighlight lang="bash">
_STABLE_PATH=$PATH
function switchtonightly {
  export PATH=/opt/kde-nightly/bin:$_STABLE_PATH
}
 
function switchtostable {
  export PATH=$_STABLE_PATH
}
</syntaxhighlight>
 
This will allow you to optionally run unstable applications when you choose to in your session.
 
<syntaxhighlight lang="bash">
# Runs the stable version of kmail
kmail
switchtonightly
# runs the nightly version of kmail
kmail
# runs the nightly version of knode
knode
switchtostable
# runs the stable version of kmail
kmail
</syntaxhighlight>
 
Note that settings for applications that you run from project neon do not conflict with your regular application settings and data. <tt>.kde-neon/</tt> is used instead of <tt>.kde/</tt>
 
== Using Project Neon for development ==
 
If you are joining one of the development teams in KDE, you will need a real SVN checkout in order to contribute your code back to the project and create patches easily.
 
Some extra tools (<tt>neonmake</tt>) are provided for this purpose in the package <tt>amarok-nightly-tools</tt>. The packages come with development headers and debugging symbols built in.
 
<syntaxhighlight lang="bash">
sudo aptitude install amarok-nightly-tools
</syntaxhighlight>
 
If you are already using a nightly package of the module you want to develop for, you should remove that, and checkout the development version. For example:
 
<syntaxhighlight lang="bash">
# Remove the packaged nightly version
sudo aptitude purge kde-nightly-kdepim
 
# Add below Project Neon source code repository to sources.list
deb-src http://ppa.launchpad.net/project-neon/ppa/ubuntu jaunty main
 
# Get the dependencies for building kdepim
sudo apt-get build-dep kde-nightly-kdepim
cd ~
# You may choose to do your development in a different folder.
cd Development
# Gets the latest version of the kdepim module.
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim
cd kdepim
# Shortcut provided by Project Neon to make the module
# and install it to the prefix /opt/kde-nightly/
sudo neonmake
</syntaxhighlight>
 
Note that you should usually checkout a module from KDE, not an application. Most modules contain libraries shared within the module and which are necessary to build the applications in the module.
 
Also of note is the <tt>neonmake</tt> command. This is a shortcut which temporarily sets some environment variables like the <tt>LD_LIBRARY_PATH</tt>, the install prefix etc, then runs the equivalent of <tt>cmake && make && make install</tt>. It also runs rpath to configure the executable file to use the nightly libraries.
 
== Using Project Neon for translation ==
 
The Project Neon nightly packages include English language strings only. Translated packages are not available. However, if you are translating KDE applications, you can install the translations from KDE SVN in your normal workflow.
 
<syntaxhighlight lang="bash">
cd ~
cd Translations
# The -N switch checks out only the top level directory from svn.
svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
cd l10n-kde4
# scripts necessary to build translations.
svn up scripts
# Get the German translations
svn up de
# Generate the build files for the German language pack
./scripts/autogen.sh de
cd de
neonmake
</syntaxhighlight>
 
After building the translations it is possible to either change the language in system settings, or run applications in another language using the environment variable <tt>KDE_LANG</tt>.
 
<syntaxhighlight lang="bash">
switchtonightly
KDE_LANG=de kmail
switchtostable
</syntaxhighlight>
 
== Using Project Neon for documentation ==
 
The Project Neon nightly source packages include the official KDE User Documentation in English.
 
TODO: How to build user docs from SVN.
 
== Using Project Neon for promotion ==
 
If you are creating screenshots or screencasts of the latest version of KDE, project Neon is a simple and fast way of getting a default KDE4 session.
 
The KDE Promotion team recommends using the default background, theme, icons etc when preparing official promotional materials (unless the feature you are showing is related to configuring KDE artwork). Project Neon uses the default artwork that comes with KDE4, so it is useful for creating promo materials.
 
Here is a shortcut to get all available modules from the PPA:
 
<syntaxhighlight lang="bash">
sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons \
kde-nightly-kdepim kde-nightly-kdeedu kde-nightly-kdenetwork \
kde-nightly-kdeutils kde-nightly-kdegraphics kde-nightly-kdemultimedia
</syntaxhighlight>
 
The application [http://ariya.blogspot.com/2008/06/creating-fancy-screenshots-with.html screenie] is provided in Kubuntu 8.10 as <tt>screenie-qt</tt>.
 
<syntaxhighlight lang="bash">
sudo aptitude install screenie-qt
</syntaxhighlight>

Latest revision as of 15:50, 23 June 2013

Template:I18n/Language Navigation Bar (zh TW)

Project Neon 指的是每晚建構的最新 KDE trunk。它提供了一個簡單的方法讓那些剛開始入門的KDE貢獻人員能快速上手而不必自己check-out整份的KDE tree並且在local端維護。此外,那些額外的相依組件會自動被處理及更新。這非常適合剛入門的開發人員,寫文件的人員及易用性設計師。This process makes the steps detailed on this page, including changes to your .bashrc unnecessary.

然而對開發人員來說,隨著對專案的參與程度提高,手動建構SVN上的元件有時是必須的,kdesvn-build script提供了一個簡易的方法來建構在SVN上的KDE組件

Requirements

Project neon always requires the latest stable Kubuntu release. As of January 2009, that is version 8.10. Previous versions of Kubuntu are not supported. It is possible to port Project Neon to other distributions, though there are currently no maintainers for other distributions working on the project. OpenSuse provides their own weekly build of KDE trunk. Find instructions on how to use it here.

Installing Project Neon

To use Project Neon, add the following PPA (Personal Package Archive) to your sources.list using your preferred method:

# Project neon nightly KDE4 build
deb http://ppa.launchpad.net/project-neon/ubuntu jaunty main

#above repository is PGP signed, refer to below link for getting PGP key
https://launchpad.net/~project-neon/+archive/ppa

After that, you can simply install the nightly package of whichever modules you want to work on. The following packages are available:

kde-nightly-kdebase
kde-nightly-kdeplasma-addons
kde-nightly-kdepim
kde-nightly-kdeedu
kde-nightly-kdenetwork
kde-nightly-kdeutils
kde-nightly-kdegraphics
kde-nightly-kdemultimedia

You can install all of the packages or just the ones you are interested in, depending on what you want to use them for. For example if you want to install the latest KDE Workspace (plasma, kwin etc), install the kde-nightly-kdebase package and kde-nightly-kdeplasma-addons package for extra plasmoids.

sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons

If you are only interested in application development in another module, you can install just the module package.

sudo aptitude install kde-nightly-kdepim

That command will also install the kdelibs, kdepimlibs and other dependencies too. In your regular (stable) KDE session you can then run the nightly version of your chosen application by using the full path from the command line.

/opt/kde-nightly/bin/kmail

This will correctly use the nightly version of libraries instead of using the stable versions, so no other changes are necessary to your library path etc.

Alternatively, instead of using the full path to the executable, you could add the following to your .bashrc

_STABLE_PATH=$PATH
function switchtonightly {
  export PATH=/opt/kde-nightly/bin:$_STABLE_PATH
}

function switchtostable {
  export PATH=$_STABLE_PATH
}

This will allow you to optionally run unstable applications when you choose to in your session.

# Runs the stable version of kmail
kmail
switchtonightly
# runs the nightly version of kmail
kmail
# runs the nightly version of knode
knode
switchtostable
# runs the stable version of kmail
kmail

Note that settings for applications that you run from project neon do not conflict with your regular application settings and data. .kde-neon/ is used instead of .kde/

Using Project Neon for development

If you are joining one of the development teams in KDE, you will need a real SVN checkout in order to contribute your code back to the project and create patches easily.

Some extra tools (neonmake) are provided for this purpose in the package amarok-nightly-tools. The packages come with development headers and debugging symbols built in.

sudo aptitude install amarok-nightly-tools

If you are already using a nightly package of the module you want to develop for, you should remove that, and checkout the development version. For example:

# Remove the packaged nightly version
sudo aptitude purge kde-nightly-kdepim

# Add below Project Neon source code repository to sources.list
deb-src http://ppa.launchpad.net/project-neon/ppa/ubuntu jaunty main

# Get the dependencies for building kdepim
sudo apt-get build-dep kde-nightly-kdepim
cd ~
# You may choose to do your development in a different folder.
cd Development
# Gets the latest version of the kdepim module.
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim
cd kdepim
# Shortcut provided by Project Neon to make the module
# and install it to the prefix /opt/kde-nightly/
sudo neonmake

Note that you should usually checkout a module from KDE, not an application. Most modules contain libraries shared within the module and which are necessary to build the applications in the module.

Also of note is the neonmake command. This is a shortcut which temporarily sets some environment variables like the LD_LIBRARY_PATH, the install prefix etc, then runs the equivalent of cmake && make && make install. It also runs rpath to configure the executable file to use the nightly libraries.

Using Project Neon for translation

The Project Neon nightly packages include English language strings only. Translated packages are not available. However, if you are translating KDE applications, you can install the translations from KDE SVN in your normal workflow.

cd ~
cd Translations
# The -N switch checks out only the top level directory from svn.
svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
cd l10n-kde4
# scripts necessary to build translations.
svn up scripts
# Get the German translations
svn up de
# Generate the build files for the German language pack
./scripts/autogen.sh de
cd de
neonmake

After building the translations it is possible to either change the language in system settings, or run applications in another language using the environment variable KDE_LANG.

switchtonightly
KDE_LANG=de kmail
switchtostable

Using Project Neon for documentation

The Project Neon nightly source packages include the official KDE User Documentation in English.

TODO: How to build user docs from SVN.

Using Project Neon for promotion

If you are creating screenshots or screencasts of the latest version of KDE, project Neon is a simple and fast way of getting a default KDE4 session.

The KDE Promotion team recommends using the default background, theme, icons etc when preparing official promotional materials (unless the feature you are showing is related to configuring KDE artwork). Project Neon uses the default artwork that comes with KDE4, so it is useful for creating promo materials.

Here is a shortcut to get all available modules from the PPA:

sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons \
kde-nightly-kdepim kde-nightly-kdeedu kde-nightly-kdenetwork \
kde-nightly-kdeutils kde-nightly-kdegraphics kde-nightly-kdemultimedia

The application screenie is provided in Kubuntu 8.10 as screenie-qt.

sudo aptitude install screenie-qt