Installation

Ghini.desktop é um programa multi-plataforma e ele será executado em máquinas unix, como GNU/Linux e MacOSX, assim como no Windows.

one-liner for hurried users.

Linux users just download and run the installation script. You may read the documentation later.

Windows users in a real hurry don’t the instructions and use a recent Windows installer. You do not miss any functional feature, but you have less chances to contribute to development.

Mac users are never in a hurry, are they?

Ghini é mantida por algumas pessoas, que se concentram no reforço de suas partes funcionais, mais não tanto na escrita de instaladores chiques. Em vez de vários instaladores nativos oferecemos um procedimento de instalação único multi-plataforma. Isto tem algumas grandes vantagens que você vai aprender a apreciar a medida que vamos.

A instalação é baseada num script em execução.

  • The GNU/Linux script takes care of everything, from dependecies to installation for users in the ghini group.
  • O script do Windows precisa que primeiro instalar um par de coisas.
  • No MacOSX, usamos o mesmo script, como no GNU/Linux. Desde que o OSX não tem nenhum gestor de pacotes padrão, podemos instalar um e usá-lo antes de começar o script.

Nosso procedimento de instalação, você vai acabar com Ghini executando dentro de um ambiente virtual de Python, todas as dependências do Python instalado localmente, não entrar em conflito com qualquer outro programa Python, você pode ter em seu sistema.

São dependências que não se encaixam num ambiente virtual de Python: Python, virtualenv, GTK e PyGTK. A instalação deles varia por plataforma.

Se você mais tarde decidir remover Ghini, você simplesmente remover o ambiente virtual, que é um diretório, com todo o seu conteúdo.

Instalar no GNU/Linux

Open a shell terminal window, and follow the following instructions.

  1. Download the devinstall.sh script:

    devinstall.sh

  2. Invoke the script from a terminal window, starting at the directory where you downloaded it, like this:

    bash ./devinstall.sh
    

    The script will produce quite some output, which you can safely ignore.

    global installation

    When almost ready, the installation script will ask you for your password. This lets it create a ghini user group, initialise it to just yourself, make the just created ghini script available to the whole ghini user group.

    If feeling paranoid, you can safely not give your password and interrupt the script there.

    Possibly the main advantage of a global installation is being able to find Ghini in the application menus of your graphic environment.

  3. You can now start ghini by invoking the ghini script:

    ghini
    
    1. You use the same ghini script to update ghini to the latest released production patch:

      ~/bin/ghini -u
      

      This is what you would do when ghini shows you something like this:

      _images/new_version_available.png
    2. Users of the global installation will also type ghini to invoke the program, but they will get to a different script, located in /usr/local/bin. This globally available ghini script cannot be used to update a ghini installation.

    3. Again the same ghini script lets you install the optional database connectors: option -p is for PostgreSQL, option -m is for MySQL/MariaDB, but you can also install both at the same time:

      ~/bin/ghini -pm
      

      Please beware: you might need solve dependencies. How to do so, depends on which GNU/Linux flavour you are using. Check with your distribution documentation.

    4. You can also use the ghini script to switch to a different production line. At the moment 1.0 is the stable one, but you can select 1.1 if you want to help us with its development:

      ~/bin/ghini -s 1.1
      

beginner’s note

Para executar um script, primeiro certifique-se que você anote o nome do diretório para que você tenha baixado o script, em seguida, abrir uma janela de terminal e em que janela você digite “bash” seguido por um espaço e o nome completo do script incluindo o nome do diretório e bateu na tecla enter.

technical note

You can study the script to see what steps if runs for you.

In short it will install dependencies which can’t be satisfied in a virtual environment, then it will create a virtual environment named ghide, use git to download the sources to a directory named ~/Local/github/Ghini/ghini.desktop, and connect this git checkout to the ghini-1.0 branch (this you can consider a production line), it then builds ghini, downloading all remaining dependencies in the virtual environment, and finally it creates the ghini startup script.

If you have sudo permissions, it will be placed in /usr/local/bin, otherwise in your ~/bin folder.

Next…

Connecting to a database.

Instalação no MacOSX

Being macOS a unix environment, most things will work the same as on GNU/Linux (sort of).

Em primeiro lugar, precisa de coisas que são parte integrante de um ambiente unix, mas que faltam num mac de prateleira:

  1. ferramentas de desenvolvedores: xcode. Verifique a página da wikipedia para a versão suportada no seu mac.
  2. Gestor de pacotes: homebrew (tigerbrew para versões mais antigas do OSX).

Installation on older macOS.

Every time we tested, we could only solve all dependencies on the two or three most recent macOS versions. In April 2015 this excluded macOS 10.6 and older. In September 2017 this excluded macOS 10.8 and older. We never had a problem with the lastest macOS.

The problem lies with homebrew and some of the packages we rely on. The message you have to fear looks like this:

Do not report this issue to Homebrew/brew or Homebrew/core!

The only solution I can offer is: please update your system.

On the bright side, if at any time in the past you did install ghini.desktop on your older and now unsupported macOS, you will always be able to update ghini.desktop to the latest version.

With the above installed, open a terminal window and run:

brew doctor

Certifique-se de que você compreende os problemas que relata e corrigi-los. PyGTK precisará xquartz e cerveja não vai resolver a dependência automaticamente. Instale o xquartz usando poção ou a maneira que você prefere:

brew install Caskroom/cask/xquartz

em seguida, instale as dependências restantes:

brew install git
brew install pygtk  # takes time and installs all dependencies

Siga todas as instruções sobre como ativar o que você instalou.

In particular, make sure you read and understand all reports starting with If you need to have this software.

You will need at least the following four lines in your ~/.bash_profile:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PATH="/usr/local/opt/gettext/bin:$PATH"
export PATH="/usr/local/opt/python/libexec/bin:$PATH"

Activate the profile by sourcing it:

. ~/.bash_profile

Antes de correr “ devinstall.sh “ como no GNU/Linux, nós ainda precisamos instalar alguns pacotes python, globalmente. Fazer isso:

sudo -H pip install virtualenv lxml

O resto é como em uma máquina unix normal. Leia as instruções acima de GNU/Linux, segui-los, aproveite.

As an optional aesthetical step, consider packaging your ~/bin/ghini script in a platypus application bundle. The images directory contains a 128×128 icon.

Next…

Connecting to a database.

Instalação no Windows

As etapas descritas aqui instruem-lo sobre como instalar o Git, Gtk, Python, e conectores do banco de dados do python. Com este ambiente corretamente configurado, o procedimento de instalação Ghini corre como no GNU/Linux. As etapas finais são novamente Windows específicos.

Nota

Ghini has been tested with and is known to work on W-XP, W-7 up to W-10. Although it should work fine on other versions Windows it has not been thoroughly tested.

Os passos de instalação no Windows:

  1. download and install git (comes with a unix-like sh and includes vi). Grab it from the Git download area.

    todas as opções padrão estão bem, exceto que precisamos git ser executável no prompt de comando:

    _images/git3.png
  2. download and install Python 2.x (32bit). Grab it from the Python official site.

    When installing Python, do put Python in the PATH:

    _images/python3.png
  3. download pygtk from the official source. (this requires 32bit python). be sure you download the «all in one» version.

    Make a complete install, selecting everything:

    _images/pygtk1.png
  4. (Possibly necessary, maybe superfluous) install lxml, you can grab this from the pypi archives

    Lembre-se de que você precisa da versão de 32 bits, para o Python 2.7.

  5. (definitely optional) download and install a database connector other than sqlite3.

    If you plan using PostgreSQL, the best Windows binary library for Python is psycopg and is Made in Italy.

  6. REBOOT

    Ei, isso é Windows, você precisa reiniciar para que as alterações entrem em vigor!

  7. We’re done with the dependecies, now we can download and run the batch file:

    devinstall.bat

    Please don’t just follow the above link. Instead: right click, save link as…

    _images/windows-save_link_as.png

    Also make sure you don’t let Windows convert the script to a text document.

    _images/windows-save_as_type.png

    Now Open the script to run it. Please note: in the below image, we have saved the file twice, once letting Windows convert it to a text document, and again as a Windows Batch File. Opening the batch file will run the script. Opening the text document will show you the code of the batch file, which isn’t going to lead us anywhere.

    _images/windows-bat_vs_txt.png

    If you installed everything as described here, the first thing you should see when you start the installation script is a window like this, and your computer will be busy during a couple of minutes, showing you what it is doing.

    _images/sys32cmd-1.png

    Running devinstall.bat will pull the ghini.desktop repository from github to your home directory, under Local\github\Ghini, checkout the ghini-1.0 production line, create a virtual environment and install ghini into it.

    You can also run devinstall.bat passing it as argument the numerical part of the production line you want to follow.

    This is the last installation step that depends, heavily, on a working internet connection.

    The operation can take several minutes to complete, depending on the speed of your internet connection.

  8. a última etapa de instalação cria o grupo Ghini e atalhos no Menu Iniciar do Windows, para todos os utilizadores. Para fazer isso, você precisa executar um script com direitos administrativos. O script é chamado “ devinstall-finalize.bat “, ele está certo em sua pasta de início e foi criado na etapa anterior.

    _images/windows-run_as_administrator.png

    Clique com o botão direito do rato nele, selecione executar como administrador, confirme que deseja que ele faça alterações no seu computador. Essas alterações estão apenas no Menu Iniciar: crie o grupo Ghini, coloque o atalho Ghini.

  9. download the batch file, it will help you staying up-to-date:

    ghini-update.bat

    If you are on a recent Ghini installation, each time you start the program, Ghini will check on the development site and alert you of any newer ghini release within your chosen production line.

    Any time you want to update your installation, just run the ghini-update.bat script, it will hardly take one minute.

    How to save a batch file, and how to run it: check the the quite detailed instructions given for devinstall.bat.

If you need to generate PDF reports, you can use the XLS based report generator and you will need to download and install Apache FOP. After extracting the FOP archive you will need to include the directory you extracted to in your PATH.

If you choose for PostScript reports, you can use the Mako based report generator and there are no further dependencies.

Next…

Connecting to a database.

Installing on Android

ghini.desktop is a desktop program, obviously you don’t install it on a handheld device, but we do offer the option, for your Android phone or tablet, to install ghini.pocket.

ghini.pocket is a small data viewer, it comes handy if you want to have a quick idea of a plant species, its source, and date it entered the garden, just by scanning a plant label.

Installation is as easy as it can be: just look for it in Google Play, and install it.

Export the data from ghini.desktop to pocket format, copy it to your device, enjoy.