Getting Started/Using Project Neon to contribute to KDE: Difference between revisions

    From KDE TechBase
    (turns out sudo is needed since files are written to /opt)
    (instruction to run apt-get update)
    (53 intermediate revisions by 15 users not shown)
    Line 1: Line 1:
    {{Template:I18n/Language Navigation Bar|Getting_Started/Using_Project_Neon_to_contribute_to_KDE}}
    [https://launchpad.net/project-neon Project Neon] is a nightly build of the latest KDE trunk for Ubuntu. It is an easy way for new contributors to KDE to get started without having to download and build the entire KDE source code tree. 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 [[Getting_Started/Build|this page]].


    [https://edge.launchpad.net/project-neon 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 [[Getting_Started/Build/KDE4|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 source code as you become more involved in the project. The [[Getting_Started/Build/kdesrc-build|kdesrc-build]] script is an easy way to build all or parts of KDE from its source code repositories.
     
    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 [[Getting_Started/Build/KDE4/kdesvn-build|kdesvn-build]] script is an easy way to build all or parts of KDE SVN.


    == Requirements ==
    == 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]].
    Project Neon always requires either the latest stable Kubuntu release or the development release. Previous versions of Kubuntu are not supported.  


    == Installing Project Neon ==
    == Installing Project Neon ==


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


    <code bash>
    <syntaxhighlight lang="bash">
    sudo add-apt-repository ppa:neon/ppa
    </syntaxhighlight>
    or
    <pre>
    # Project neon nightly KDE4 build
    # Project neon nightly KDE4 build
    deb http://ppa.launchpad.net/project-neon/ubuntu intrepid main
    deb http://ppa.launchpad.net/neon/ppa/ubuntu maverick main
    </code>
     
    #above repository is PGP signed, refer to below link for getting PGP key
    https://launchpad.net/~neon/+archive/ppa
    </pre>
     
    Now you need to synchronize the package index files. Run


    After that, you can simply install the nightly package of whichever modules you want to work on. The following packages are available:
    <syntaxhighlight lang="bash">
    sudo apt-get update
    </syntaxhighlight>


    kde-nightly-kdebase
    After that, you can simply install the nightly package of whichever modules you want to work on. The packages are named project-neon-<git/svn module name>. The packages are installed in /opt/project-neon/ and won't affect your stable KDE install.
    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.
    You can install all of the packages or just the ones you are interested in, depending on what you want to use them for.


    <code bash>
    === Using Project Neon version of KDE Workspace ===
    sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons
     
    </code>
    To use Project Neon version of KDE Workspace, install the <tt>project-neon-base</tt> package. You can then log out, select the "Project Neon" session in KDM session list and log in.
     
    <syntaxhighlight lang="bash">
    sudo apt-get install project-neon-base
    </syntaxhighlight>
     
    You can also install other KDE Workspace goodies, such as extra plasmoids, with:
     
    <syntaxhighlight lang="bash">
    sudo apt-get install project-neon-kdeplasma-addons
    </syntaxhighlight>
     
    === Testing individual applications ===


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


    <code bash>
    First install <tt>project-neon-utils</tt>. This package contains a number of utilities among which <tt>neon-env</tt>, which is needed to run Project Neon applications:
    sudo aptitude install kde-nightly-kdepim
     
    </code>
    <syntaxhighlight lang="bash">
    sudo apt-get install project-neon-utils
    </syntaxhighlight>
     
    You can then install the package for the module you are interested in. For example to test the latest version of kdepim applications:
     
    <syntaxhighlight lang="bash">
    sudo apt-get install project-neon-kdepim
    </syntaxhighlight>


    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.
    That command will also install the <tt>kdelibs</tt>, <tt>kdepimlibs</tt> and other dependencies too. In your regular (stable) KDE session you can now set up Project Neon environment and run the nightly version of your chosen application.


    <code bash>
    <syntaxhighlight lang="bash">
    /opt/kde-nightly/bin/kmail
    neon-env
    </code>
    kmail
    </syntaxhighlight>


    <tt>neon-env</tt> will setup the environment and start a subshell from which you can work with your project neon installation.
    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.
    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.
    You'll need to close the terminal session for the settings to be undone.


    Alternatively, instead of using the full path to the executable, you could add the following to your .bashrc
    Note that settings for applications that you run from project neon do not conflict with your regular application settings and data. <tt>.project-neon-kde/</tt> is used instead of <tt>.kde/</tt>


    <code bash>
    === Installing everything ===
    _STABLE_PATH=$PATH
    function switchtonightly {
      export PATH=/opt/kde-nightly/bin:$_STABLE_PATH
    }


    function switchtostable {
    If you want to install all packages that are provided by Project Neon in one go, you can use the <tt>project-neon-all</tt> package which will install all provided packages. To install all debugging symbols (Warning: takes a lot of disk space) <tt>project-neon-all-dbg</tt> can be used.
      export PATH=$_STABLE_PATH
    }
    </code>


    This will allow you to optionally run unstable applications when you choose to in your session.
    == Using Project Neon for development ==


    <code bash>
    If you are joining one of the development teams in KDE, you will need a real SVN/GIT checkout in order to contribute your code back to the project and create patches easily. If you only code for KDE every now and then, Project Neon provides some extra tools for this purpose in the package <tt>project-neon-utils</tt>:
    # 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
    </code>


    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>
    NOTE: both neon-cmake and neonmake require neon-env to be run first!


    == Using Project Neon for development ==
    * <tt>neon-env</tt> - sets up the necessary environment settings for project neon builds and opens a subshell.
    * <tt>neon-cmake</tt> - cmake wrapper with neon environment settings for cmake, same synopsis as cmake and passes arguments to cmake
    * <tt>neonmake</tt> - convenience script which will create a build folder, configure the source, build it and install it in /opt/project-neon/ so you can test your changes.
    * <tt>neon-clean</tt> - script that resets any changes you made to /opt/project-neon after installing the packages. Since this script reinstalls the packages it might require a working internet connection.
    * <tt>neonbuild</tt> - pbuilder/pdebuild wrapper to rebuild a neon package in a chroot. Takes the same options as pbuilder. If no pbuilder action is given pdebuild is run instead.


    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.
    === Options for cmake/make ===
    You can change the cmake and make options used by setting these variables in ~/.neonrc:


    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.
    * <tt>NEON_CMAKE_OPTS=""</tt> - Here you can add additional cmake options that should be used together with the default neon options.
    * <tt>NEON_CMAKE_OVERRIDE=""</tt> - If you set this variable cmake will ignore the default neon options and only use the ones in NEON_CMAKE_OVERRIDE.
    * <tt>NEON_MAKE_OVERRIDE=""</tt> - If you set this variable make in neonmake will only use your options. By default make uses '-j CPUs+1'


    <code bash>
    === Debugging symbols ===
    sudo aptitude install amarok-nightly-tools
    The debugging symbols for every package are in its corresponding <code>-dbg</code> package, so to install the debugging symbols for kdelibs you can use
    </code>
    <syntaxhighlight lang="bash">
    sudo apt-get install project-neon-kdelibs-dbg
    </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:
    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:


    <code bash>
    <pre>
    # Remove the packaged nightly version
    # Remove the packaged nightly version
    sudo aptitude purge kde-nightly-kdepim  
    sudo apt-get purge project-neon-kdepim
     
    # Add below Project Neon source code repository to sources.list if you didn't use add-apt-repository
    deb-src http://ppa.launchpad.net/neon/ppa/ubuntu maverick main
     
    # Get the dependencies for building kdepim
    # Get the dependencies for building kdepim
    sudo apt-get build-dep kde-nightly-kdepim
    sudo apt-get build-dep project-neon-kdepim
    cd ~
    cd ~
    # You may choose to do your development in a different folder.
    # You may choose to do your development in a different folder.
    cd Development
    cd Development
    # Gets the latest version of the kdepim module.
    # Gets the latest version of the kdepim module.
    svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepim
    git clone git://anongit.kde.org/kdepim
    cd kdepim
    cd kdepim
    # Set up neon environment
    neon-env
    # Shortcut provided by Project Neon to make the module
    # Shortcut provided by Project Neon to make the module
    # and install it to the prefix /opt/kde-nightly/
    # and install it to the prefix /opt/project-neon/
    sudo neonmake
    neonmake
    </code>
    </pre>


    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.
    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 note that when using apt-get build-dep it will always get all build-depends, so watch out that it doesn't install a component you want to build yourself as that would overwrite your changes should you install the packages after installing your build.  


    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 <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 ==
    == Using Project Neon for translation ==
    Line 115: Line 138:
    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.
    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.


    <code bash>
    <syntaxhighlight lang="bash">
    cd ~
    cd ~
    cd Translations
    cd Translations
    Line 121: Line 144:
    svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
    svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4
    cd l10n-kde4
    cd l10n-kde4
    # scripts neccessary to build translations.
    # scripts necessary to build translations.
    svn up scripts
    svn up scripts
    # Get the german translations
    # Get the German translations
    svn up de
    svn up de
    # Generate the build files for the German language pack
    # Generate the build files for the German language pack - if you get a message
    # that revpath couldn't be found you need to install the xutils-dev package
    ./scripts/autogen.sh de
    ./scripts/autogen.sh de
    cd de
    cd de
    neon-env
    neonmake
    neonmake
    </code>
    </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 KDE_LANG.
    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>.


    <code bash>
    <syntaxhighlight lang="bash">
    switchtonightly
    switchtonightly # or neon-env
    KDE_LANG=de kmail
    KDE_LANG=de kmail
    switchtostable
    </syntaxhighlight>
    </code>
     
    Exit the shell to reset the settings.


    == Using Project Neon for documentation ==
    == Using Project Neon for documentation ==


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


    TODO: How to build user docs from svn.
    TODO: How to build user docs from SVN.


    == Using Project Neon for promotion ==
    == Using Project Neon for promotion ==
    Line 149: Line 175:
    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.
    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 offical 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.
    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:
    Here is a shortcut to get all available modules from the PPA:


    <code bash>
    <syntaxhighlight lang="bash">
    sudo aptitude install kde-nightly-kdebase kde-nightly-kdeplasma-addons \
    sudo apt-get install project-neon-all
    kde-nightly-kdepim kde-nightly-kdeedu kde-nightly-kdenetwork \
    </syntaxhighlight>
    kde-nightly-kdeutils kde-nightly-kdegraphics kde-nightly-kdemultimedia
     
    </code>
    The application [http://ariya.blogspot.com/2008/06/creating-fancy-screenshots-with.html screenie] is provided since Kubuntu 8.10 as <tt>screenie-qt</tt>.
     
    <syntaxhighlight lang="bash">
    sudo apt-get install screenie-qt
    </syntaxhighlight>
     
    == Contact the Team ==
     
    You can reach the Project Neon team on IRC in
    <syntaxhighlight lang="text">#project-neon on irc.freenode.net</syntaxhighlight>
    by mail at <syntaxhighlight lang="text">[email protected]</syntaxhighlight>
    or you can ask a question on [https://answers.launchpad.net/project-neon launchpad]


    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>.
    If you think there is a bug in our packaging of the provided software you can file a bug on [https://bugs.launchpad.net/project-neon launchpad]


    <code bash>
    [https://wiki.kubuntu.org/Kubuntu/ProjectNeon Team page in the Kubuntu Wiki]
    sudo aptitude install screenie-qt
    </code>

    Revision as of 08:54, 25 July 2013

    Project Neon is a nightly build of the latest KDE trunk for Ubuntu. It is an easy way for new contributors to KDE to get started without having to download and build the entire KDE source code tree. 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.

    However, for developers, it may at some point become necessary to build more components from source code as you become more involved in the project. The kdesrc-build script is an easy way to build all or parts of KDE from its source code repositories.

    Requirements

    Project Neon always requires either the latest stable Kubuntu release or the development release. Previous versions of Kubuntu are not supported.

    Installing Project Neon

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

    sudo add-apt-repository ppa:neon/ppa
    

    or

    # Project neon nightly KDE4 build
    deb http://ppa.launchpad.net/neon/ppa/ubuntu maverick main
    
    #above repository is PGP signed, refer to below link for getting PGP key
    https://launchpad.net/~neon/+archive/ppa
    

    Now you need to synchronize the package index files. Run

    sudo apt-get update
    

    After that, you can simply install the nightly package of whichever modules you want to work on. The packages are named project-neon-<git/svn module name>. The packages are installed in /opt/project-neon/ and won't affect your stable KDE install.

    You can install all of the packages or just the ones you are interested in, depending on what you want to use them for.

    Using Project Neon version of KDE Workspace

    To use Project Neon version of KDE Workspace, install the project-neon-base package. You can then log out, select the "Project Neon" session in KDM session list and log in.

    sudo apt-get install project-neon-base
    

    You can also install other KDE Workspace goodies, such as extra plasmoids, with:

    sudo apt-get install project-neon-kdeplasma-addons
    

    Testing individual applications

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

    First install project-neon-utils. This package contains a number of utilities among which neon-env, which is needed to run Project Neon applications:

    sudo apt-get install project-neon-utils
    

    You can then install the package for the module you are interested in. For example to test the latest version of kdepim applications:

    sudo apt-get install project-neon-kdepim
    

    That command will also install the kdelibs, kdepimlibs and other dependencies too. In your regular (stable) KDE session you can now set up Project Neon environment and run the nightly version of your chosen application.

    neon-env
    kmail
    

    neon-env will setup the environment and start a subshell from which you can work with your project neon installation. 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. You'll need to close the terminal session for the settings to be undone.

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

    Installing everything

    If you want to install all packages that are provided by Project Neon in one go, you can use the project-neon-all package which will install all provided packages. To install all debugging symbols (Warning: takes a lot of disk space) project-neon-all-dbg can be used.

    Using Project Neon for development

    If you are joining one of the development teams in KDE, you will need a real SVN/GIT checkout in order to contribute your code back to the project and create patches easily. If you only code for KDE every now and then, Project Neon provides some extra tools for this purpose in the package project-neon-utils:

    NOTE: both neon-cmake and neonmake require neon-env to be run first!

    • neon-env - sets up the necessary environment settings for project neon builds and opens a subshell.
    • neon-cmake - cmake wrapper with neon environment settings for cmake, same synopsis as cmake and passes arguments to cmake
    • neonmake - convenience script which will create a build folder, configure the source, build it and install it in /opt/project-neon/ so you can test your changes.
    • neon-clean - script that resets any changes you made to /opt/project-neon after installing the packages. Since this script reinstalls the packages it might require a working internet connection.
    • neonbuild - pbuilder/pdebuild wrapper to rebuild a neon package in a chroot. Takes the same options as pbuilder. If no pbuilder action is given pdebuild is run instead.

    Options for cmake/make

    You can change the cmake and make options used by setting these variables in ~/.neonrc:

    • NEON_CMAKE_OPTS="" - Here you can add additional cmake options that should be used together with the default neon options.
    • NEON_CMAKE_OVERRIDE="" - If you set this variable cmake will ignore the default neon options and only use the ones in NEON_CMAKE_OVERRIDE.
    • NEON_MAKE_OVERRIDE="" - If you set this variable make in neonmake will only use your options. By default make uses '-j CPUs+1'

    Debugging symbols

    The debugging symbols for every package are in its corresponding -dbg package, so to install the debugging symbols for kdelibs you can use

    sudo apt-get install project-neon-kdelibs-dbg
    

    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 apt-get purge project-neon-kdepim
    
    # Add below Project Neon source code repository to sources.list if you didn't use add-apt-repository
    deb-src http://ppa.launchpad.net/neon/ppa/ubuntu maverick main
    
    # Get the dependencies for building kdepim
    sudo apt-get build-dep project-neon-kdepim
    cd ~
    # You may choose to do your development in a different folder.
    cd Development
    # Gets the latest version of the kdepim module.
    git clone git://anongit.kde.org/kdepim
    cd kdepim
    # Set up neon environment
    neon-env
    # Shortcut provided by Project Neon to make the module
    # and install it to the prefix /opt/project-neon/
    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 note that when using apt-get build-dep it will always get all build-depends, so watch out that it doesn't install a component you want to build yourself as that would overwrite your changes should you install the packages after installing your build.


    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 - if you get a message
    # that revpath couldn't be found you need to install the xutils-dev package
    ./scripts/autogen.sh de
    cd de
    neon-env
    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 # or neon-env
    KDE_LANG=de kmail
    

    Exit the shell to reset the settings.

    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 apt-get install project-neon-all
    

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

    sudo apt-get install screenie-qt
    

    Contact the Team

    You can reach the Project Neon team on IRC in

    #project-neon on irc.freenode.net
    

    by mail at

    or you can ask a question on launchpad

    If you think there is a bug in our packaging of the provided software you can file a bug on launchpad

    Team page in the Kubuntu Wiki