Simon/Development Environment: Difference between revisions

    From KDE UserBase Wiki
    No edit summary
    Line 1: Line 1:
    If you finish this tutorial, you will get a fully functional simon version and the coresponding source files which you of course can modify freely.
    If you finish this tutorial, you will get a fully functional Simon version and the coresponding source files which you of course can modify freely.


    To publish your changes, please get in touch with a [https://sourceforge.net/sendmessage.php?touser=1737360 simon developer] to receive write access to the public git repository.
    To publish your changes, please get in touch with a [https://sourceforge.net/sendmessage.php?touser=1737360 Simon developer] to receive write access to the public git repository.


    = Windows =
    = Windows =


    The following tutorial will describe how to install everything needed to get started on developing on simon.
    The following tutorial will describe how to install everything needed to get started on developing on Simon.


    == KDE ==
    == KDE ==
    Line 18: Line 18:
    # This concludes the installation.
    # This concludes the installation.


    ==simon==
    ==Simon==


    In a KDE shell (see the KDE section above) simply run "emerge simon" to build and install simon.
    In a KDE shell (see the KDE section above) simply run "emerge simon" to build and install simon.
    Line 30: Line 30:
    This guide will assume that you are using Ubuntu Linux or OpenSUSE. If you use a different distribution you will have to look up the correct name of the packages yourself and install them on your own.
    This guide will assume that you are using Ubuntu Linux or OpenSUSE. If you use a different distribution you will have to look up the correct name of the packages yourself and install them on your own.


    If you already installed the binary version of simon, please remove it!
    If you already installed the binary version of Simon, please remove it!


      Debian based Systems:
      Debian based Systems:
    Line 42: Line 42:
      sudo apt-get install git-core build-essential cmake gettext gettext-kde kdeartwork \
      sudo apt-get install git-core build-essential cmake gettext gettext-kde kdeartwork \
      kdelibs5-dev libxtst-dev libqt4-sql-sqlite libphonon-dev libattica-dev libattica0 zlib1g-dev  
      kdelibs5-dev libxtst-dev libqt4-sql-sqlite libphonon-dev libattica-dev libattica0 zlib1g-dev  
      ''Note: You don't actually need kdeartwork to compile or run simon - it will just look ugly without it''
      ''Note: You don't actually need kdeartwork to compile or run Simon - it will just look ugly without it''
      ''Note on Ubuntu 10.04: You have to add the Kubuntu backports to your repository list before installing the packages:
      ''Note on Ubuntu 10.04: You have to add the Kubuntu backports to your repository list before installing the packages:
      ''deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu lucid main''
      ''deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu lucid main''
    Line 65: Line 65:
    == Compiling ==
    == Compiling ==


    Now check out a current copy of simon from Git using the following command:
    Now check out a current copy of Simon from Git using the following command:


      git clone git://anongit.kde.org/simon simonsource
      git clone git://anongit.kde.org/simon simonsource


    This will create a new directory called simonsource in your current working directory containing the simon source code.
    This will create a new directory called simonsource in your current working directory containing the Simon source code.


    You can now make your changes. If you want to compile and install your new simon version, just call the build-script in the simonsource directory:
    You can now make your changes. If you want to compile and install your new Simon version, just call the build-script in the simonsource directory:


      Ubuntu:
      Ubuntu:
    Line 79: Line 79:
      ./build.sh
      ./build.sh


    You now have compiled and installed simon. Please continue to install HTK on page [[Installation#HTK_installation_2|Installation > Linux > HTK installation]].
    You now have compiled and installed Simon. Please continue to install HTK on page [[Installation#HTK_installation_2|Installation > Linux > HTK installation]].


    === Building in a custom prefix ===
    === Building in a custom prefix ===
    Line 101: Line 101:
      cd build
      cd build
      cmake ../simonsource -DCMAKE_INSTALL_PREFIX=~/simon/install
      cmake ../simonsource -DCMAKE_INSTALL_PREFIX=~/simon/install
      make -j4
      make
      make install
      make install



    Revision as of 14:52, 12 July 2012

    If you finish this tutorial, you will get a fully functional Simon version and the coresponding source files which you of course can modify freely.

    To publish your changes, please get in touch with a Simon developer to receive write access to the public git repository.

    Windows

    The following tutorial will describe how to install everything needed to get started on developing on Simon.

    KDE

    Please set up the emerge environment by following the tutorial on techbase.

    HTK

    1. Register at http://htk.eng.cam.ac.uk/register.shtml (free)
    2. Download the latest windows binary version from "http://htk.eng.cam.ac.uk/ftp/software/%22. The file will be named "htk-3.x-windows-binary.zip". At the moment the latest binary release for windows is the version 3.3. It can be found at this direct link: "http://htk.eng.cam.ac.uk/ftp/software/htk-3.3-windows-binary.zip%22
    3. This archive contains a folder "htk". Copy the contents of this folder to "C:\KDE\bin".
    4. You can now delete the archive.
    5. This concludes the installation.

    Simon

    In a KDE shell (see the KDE section above) simply run "emerge simon" to build and install simon.

    Julius

    Download the latest version of Julius from their homepage and install it by copying the executables to the "bin" subfolder of your KDE installation folder.

    Linux

    This guide will assume that you are using Ubuntu Linux or OpenSUSE. If you use a different distribution you will have to look up the correct name of the packages yourself and install them on your own.

    If you already installed the binary version of Simon, please remove it!

    Debian based Systems:
    sudo dpkg -r simon
    

    Requirements

    You will need a couple of packages before getting to work. Install them using the following command:

    Debian based Systems:
    sudo apt-get install git-core build-essential cmake gettext gettext-kde kdeartwork \
    kdelibs5-dev libxtst-dev libqt4-sql-sqlite libphonon-dev libattica-dev libattica0 zlib1g-dev 
    Note: You don't actually need kdeartwork to compile or run Simon - it will just look ugly without it
    Note on Ubuntu 10.04: You have to add the Kubuntu backports to your repository list before installing the packages:
    deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu lucid main
    
    RPM based Systems:
    sudo zypper in git-core gcc gettext-tools gettext-runtime libkde4-devel \
    libqt4-sql-sqlite libqt4-multimedia libqt4-phonon-devel libattica-devel libattica0 zlib-devel
    

    If you use a different language than english we recommend installing the appropriate kde-l10n package. You can list all available translation using the following command:

    Debian based Systems:
    apt-cache search kde-l10n
    

    Choose your translation and install it.

    Debian based Systems:
    sudo apt-get install kde-l10n-<countrycode>
    

    You also need Qwt 6. Up do date distributions have packages ((K)Ubuntu since 11.10). Older versions of Qwt are not supported. You can find the latest version on the projects sourceforge site.

    Compiling

    Now check out a current copy of Simon from Git using the following command:

    git clone git://anongit.kde.org/simon simonsource
    

    This will create a new directory called simonsource in your current working directory containing the Simon source code.

    You can now make your changes. If you want to compile and install your new Simon version, just call the build-script in the simonsource directory:

    Ubuntu:
    ./build_ubuntu.sh
    
    Other distributions:
    ./build.sh
    

    You now have compiled and installed Simon. Please continue to install HTK on page Installation > Linux > HTK installation.

    Building in a custom prefix

    This is how Frederik thinks kde applications should be built (works for me TM). Your milage may vary.

    Needed: the packages as listed above.

    Goal: install Simon in a custom directory and make it run from there without interfering with the rest of the system.

    I have a directory "~/simon". There I have:

    ~/simon/simonsource
    ~/simon/build
    ~/simon/install
    

    Howto (copy and paste this in a shell):

    mkdir ~/simon
    cd ~/simon
    git clone git://anongit.kde.org/simon simonsource
    mkdir build
    cd build
    cmake ../simonsource -DCMAKE_INSTALL_PREFIX=~/simon/install
    make
    make install
    

    Script to set up the environment (put this in a file "simonenv" and in a shell run "source simonenv"):

    echo "Setting up Simon env..."
    export SIMONPATH=~/simon/install    #adjust to the path you want to use
    export PATH=$SIMONPATH/bin:$PATH
    export LD_LIBRARY_PATH=$SIMONPATH/lib64:/usr/lib/x86_64-linux-gnu   # this is on a 64 bit kubuntu
    export KDEDIR=$SIMONPATH
    export KDEDIRS=$KDEDIR
    export QT_PLUGIN_PATH=$KDEDIR/lib/kde4:$KDEDIR/lib64
    export XDG_DATA_DIRS=$SIMONPATH/share:XDG_DATA_DIRS
    kbuildsycoca4
    


    Julius

    Download the latest version of Julius from their homepage and install it.