Allestire un ambiente di sviluppo

From SIMON

Jump to: navigation, search

Languages: Deutsch | English | Esperanto | Español | Italiano |

Se termini questo tutorial otterrai una versione di simon completamente funzionante e i sorgenti corrispondenti che puoi naturalmente modificare liberamente.

Per pubblicare i tuoi cambiamenti. perfavore tieniti in contatto con uno sviluppatore simon per ricevere accesso in scrittura al repository dei regali pubblici.

Contents

Windows

Il seguente tutorial descriverà come installa tutto quanto è necessario per iniziare a sviluppare in simon.

KDE

  1. Scarica gentilmente la versione più nuova del installer di KDE su windows da windows.kde.org. Hai bisogno del file kdewin-installer-gui-latest.exe.
  2. Installa il file eseguibile scaricato'kdewin-installer-gui-latest.exe'.
  3. Potresti ricevere un'allerta di sicurezza: "Il produttore non può essere verificato. Sei sicuro di voler avviare il software?" Premi il bottone 'Avvia'.
  4. Verrai guidato nel KDE for Windows installer. Premi il bottone 'Next >'.
  5. Seleziona il percorso dove installare le applicazioni KDE. Guesta guida darà per scontato che sia'C:\KDE'. Premi il bottone 'Next >'.
  6. Seleziona come 'Metodo di installazione' l'opzione 'Package Manager'. Il modo del compilatore deve essere 'MinGW4'. Premi il bottone 'Next >'.
  7. Seleziona il percorso dove verranno salvati i pacchetti per l'installazione. Premi il bottone 'Next >'.
  8. Seleziona l'opzione 'I have a direct connection to the Internet' (Ho una connessione diretta ad internet). Premi il bottone 'Next >'.
  9. Ora seleziona il server di download da dove scaricare i pacchetti KDE. Noi consigliamo il mirror winkde.org. Premi il bottone 'Next >'.
  10. Tra i rilasci disponibili, scegli quello stabile con il numero di versione più elevato. Al momento, questa è la versione 4.2.0. Premi il bottone 'Next >'.
  11. Seleziona i pacchetti che vuoi installare. Devi selezionare le check box dei seguenti pacchetti (nella colonna 'Bin/Devel/Doc' )
    1. aspell (bin)
    2. aspell-de (bin)
    3. aspell-en (bin)
    4. attica (bin/dev)
    5. automoc (bin)
    6. boost (bin)
    7. bzip2 (bin)
    8. cmake (bin)
    9. cyrus-sasl (bin)
    10. dbg_x86 (bin)
    11. dbus (bin)
    12. debugview (bin)
    13. exiv2 (bin)
    14. expat (bin)
    15. flex (bin / dev)
    16. gdb (bin)
    17. gettext (bin)
    18. gettext-tools (bin)
    19. giflib (bin)
    20. gzip (bin)
    21. iconv (bin)
    22. jasper (bin)
    23. jpeg (bin)
    24. kdebase-apps (bin)
    25. kdebase-runtime (bin)
    26. kdelibs (bin/dev)
    27. kdepimlibs (bin)
    28. kdewin (bin/dev)
    29. libbzip2 (bin)
    30. libical (bin)
    31. libpng (bin)
    32. libxml2 (bin)
    33. libxslt (bin)
    34. mingw-utils (bin)
    35. openssl (bin)
    36. oxygen-icons (bin)
    37. patch (bin)
    38. pcre (bin)
    39. phonon (bin/dev)
    40. phonon-backends (bin)
    41. qca (bin)
    42. qimjageblitz (bin)
    43. qt (bin/dev)
    44. runtime (bin)
    45. shared-mime-info (bin)
    46. soprano (bin)
    47. strigi (bin)
    48. taglib (bin)
    49. tiff (bin)
    50. upx (bin)
    51. zlib (bin/dev)
  12. Per far funzionare correttamente simon hai bisogno di QtMultimedia 4.6.3 che potrebbe essere necessario installare separatamente.
  13. Premi il bottone 'Next >' e l'installer mostrerà un'ulteriore lista di pacchetti che sono stati selezionati perchè necessari ai pacchetti seleionati manualmente. Premi il bottone 'Next >'.
  14. L'installer scaricherà ora i pacchetti.
  15. Dopo il download di tutti i pacchetti l'installazione inizierà automaticamente. Alcuni dei pacchetti necessitano di attenzione da parte dell'utente per essere installati:
    1. MinGW: Se l'installer chide se deve controllare per la versione più aggiornata, seleziona "No"! Durante la selezione dei componenti seleziona "MinGW Base Tools", "g++ compiler" e "MinGW Make". Tutti le altre impostazioni possono essere lasciate con i loro valori predefiniti. MinGW sarà ora caricato ed installato.
    2. Gli altri pacchetti saranno installati automaticamente.
  16. Scarica TortoiseGit (http://code.google.com/p/tortoisegit/downloads/list) e installalo in C:\program Files\TortoiseGit
  17. Scarica MSysGit (http://code.google.com/p/msysgit/downloads/list) ed installalo in C:\Git
  18. Ora apri le "Impotazioni di sistema" premendo e tenendo premuto il tasto "windows" e premendo contemporaneamente il tasto "Pause".
  19. Vai nella scheda "Advanced" e seleziona "Environment variables".
  20. Controlla il valore di "Path" nella lista "System variables" e clicca due volte su di esso.
  21. Ora puoi modificare il valore di questa variabile. Non sostituire il contenuto ma aggiungi quanto segue alla fine della riga: ";C:\KDE\bin;C:\MinGW\bin;C:\Git\bin" e premi "Ok".

-TRADUZIONE IN CORSO-

  1. Ora puoi chiudere le finestre.
  2. Scarica ed installa il Microsoft Visual C Runtime: http://www.microsoft.com/downloads/details.aspx?familyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
  3. Ora apri il file "C:\KDE\share\apps\cmake\modules\KDELibsDependencies.cmake" con un editor di testo (come notepad: "Blocco note").
  4. Premi e tieni premuo il tasto "Control" e contemporaneamente premi "H" per aprire la finestra cerca e sostituisci. Scrivi "C:/kde/kde-mingw4" nel campo di ricerca e "C:/KDE" nel campo "Sostituisci con". Ora seleziona "Sostituisci tutto" per sostituire tutte le occorrenza.
  5. Salva il file e chiudi l'editor.
  6. Ora fai lo stesso con il file "C:\KDE\share\apps\cmake\modules\KDELibs4LibraryTargets-release.cmake".
  7. Riavvia il computer

Questo termina l'installazione di KDE.

HTK

  1. Registrati su http://htk.eng.cam.ac.uk/register.shtml (gratis)
  2. Scarica l'ultima versione binaria per windows da "http://htk.eng.cam.ac.uk/ftp/software/". Il file si chiamerà "htk-3.x-windows-binary.zip". Attualmente l'ultimo rilascio binario per windows è la versione 3.3. Può essere trovato al seguente collegamento diretto: "http://htk.eng.cam.ac.uk/ftp/software/htk-3.3-windows-binary.zip"
  3. Questo archivio contiene una cartella "htk". Copia il contenuto di questa cartella in "C:\KDE\bin".
  4. Ora puoi cancellare l'archivio.
  5. Questo termina l'installazione.

Portaudio

Se non vuoi utilizzare sam o Julius direttamente, puoi saltare questo passaggio.
  1. Scarica la dll portaudio da "http://code.google.com/p/portaudiosharp/downloads/detail?name=PortAudio.dll&can=2&q=" e spostala nella cartella "C:\KDE\bin".
  2. Scarica portaudio_x86.dll da "http://code.google.com/p/jpab/downloads/detail?name=portaudio_x86.dll&can=2&q=" e spostala nella cartella "C:\KDE\bin".
  3. Quindi scarica l'ultima versione snapshot (NON la "stable version") da "http://www.portaudio.com/download.html". Link diretto: http://www.portaudio.com/archives/pa_snapshot.tar.gz
  4. Sposta questo file in "C:\".
  5. Scarica l'installer windows di 7-Zip da http://www.7-zip.org/download.html
  6. Installa 7-Zip usando il file di installazione scaricato.
  7. Apri la cartella "C:\" con esplora risorse di windows e fai click destro sul file scaricato "pa_snapshot.tar.gz" e seleziona "7-Zip" > "Extract Here" (Estrai qui).
  8. Questo creerà il file "pa_snapshot.tar". Fai click destro sul file "pa_snapshot.tar" e seleziona "7-Zip" > "Extract Here" (Estrai qui).
  9. Questo crera la cartella "C:\portaudio".
  10. Ora puoi cancellare i file "pa_snapshot.tar" e "pa_snapshot.tar.gz".
  11. Questo conclude l'installazione di portaudio.

--TRADUZIONE IN CORSO--

Bison

  1. Download the following DLLs and move them to the folder "C:\KDE\bin":
    1. "libintl3.dll" from "http://www.dsource.org/projects/dsss/browser/winbins/libintl3.dll?rev=45"(Direct link: "http://www.dsource.org/projects/dsss/browser/winbins/libintl3.dll?rev=45&format=raw")
    2. "libiconv2.dll" from "http://www.dsource.org/projects/dsss/browser/winbins/libiconv2.dll?rev=45" (Direct link: "http://www.dsource.org/projects/dsss/browser/winbins/libiconv2.dll?rev=45&format=raw")
    3. "libintl-2.dll" from "http://www.dsource.org/projects/dsss/browser/winbins/libintl-2.dll?rev=125" (Direct link: "http://www.dsource.org/projects/dsss/browser/winbins/libintl-2.dll?rev=125&format=raw")o:"
  2. Download regex2.dll from http://code.google.com/p/unwad/source/browse/trunk/dll/regex2.dll?spec=svn9&r=9 and copy it to the KDE binary folder (default: "C:\KDE\bin")
  3. Download the bison "Binaries" from "http://gnuwin32.sourceforge.net/packages/bison.htm" (Direct link: "http://downloads.sourceforge.net/gnuwin32/bison-2.4.1-bin.zip")
  4. Select the downloaded archive with the right mouse button and and choose "7-Zip" > "Extract files..."
  5. A dialog will be displayed. Change the "Extract to:" field to "C:\KDE" and select "Ok".
  6. This concludes the bison installation.

simon

The following section will describe how to install simon and simond. All paths should be correct if you followed the instructions above carefully.

Installation

  1. Open "C:\" and right-click at the background in order to get the context menu of the folder and select the option "Git Clone".
  2. Enter "git://speech2text.git.sourceforge.net/gitroot/speech2text/speech2text" for the checkout URL and "C:\simonsource" as "Checkout directory".
  3. Confirm that you want to create the folder "C:\simonsource".
  4. The current version of simon will now be downloaded. This can take a while.
  5. When Git has completed the checkout you can close the window.
  6. Now open a commando prompt by pressing and holding the "Windows"-key and pressing simultaniously pressing the "R" key. Enter "cmakesetup" in the resulting window and select "Ok".
  7. A dialog will be displayed. Enter "C:\simonsource" into the "Where is the source code:" field.
  8. Enter "C:\simonsource\build" into the field "Where to build the binaries:".
  9. Press "Configure".
  10. You will be prompted for the generator to use. Please select "MinGW Makefiles" from the list.
  11. simon will now be configured. This can take a few seconds.
  12. Change the value of "CMAKE_INSTALL_PREFIX" from "C:/simon" to "C:/KDE" and press "Enter" to apply the changes.
  13. Confirm by pressing "Ok".
  14. Open up a command prompt by pressing and holding the "Windows"-Key and simultaniously pressing the "R" key. In the resulting window enter "cmd" and confirm with "Ok".
  15. A black command prompt will open. Enter the following commands:
    1. cd C:\simonsource\build
    2. mingw32-make
    3. mingw32-make install
  16. You can now close the command prompt by entering "exit".
  17. simon is now compiled and installed to "C:\KDE". To start it just launch the program "C:\KDE\bin\simon.exe"

Update

  1. Open "C:\" with the windows explorer.
  2. Select the subfolder "simonsource" with your right mouse button. In the contextmenu select the option "Git Sync" and update your local repository copy.
  3. Open up a command prompt by pressing and holding the "Windows"-Key and simultaniously pressing the "R" key. In the resulting window enter "cmd" and confirm with "Ok".
  4. A black command prompt will open. Enter the following commands:
    1. cd C:\simonsource\build
    2. mingw32-make
    3. mingw32-make install
  5. You can now close the command prompt by entering "exit".
  6. This completes the update.

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.

This guide was tested on a clean, updated Ubuntu 8.10 Intrepid Ibex and Ubuntu 9.04 Jaunty Jackalope installation as well as a fresh OpenSUSE 11.1.

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 bison flex gettext gettext-kde kdeartwork \
kdelibs5-dev libxtst-dev libqt4-sql-sqlite qtmobility-dev libqt4-phonon-dev libattica-dev libattica0 zlib1g-dev \
portaudio19-dev
Note: You don't actually need kdeartwork to compile or run simon - it will just look ugly without it.
RPM based Systems:
sudo zypper in git-core gcc bison flex gettext-tools gettext-runtime libkde4-devel portaudio \
portaudio-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>

Compiling

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

git clone git://speech2text.git.sourceforge.net/gitroot/speech2text/speech2text 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.


Personal tools