Changes

Jump to: navigation, search

Linux:Build from source

2,080 bytes added, 03:03, 17 January 2022
no edit summary
{{languages|Linux:Build from source}}{{stub}}How to build Gramps from source on Linux.
How to build Gramps from source on Linux. Building from source is appropriate for:
* Developers who need to be able to modify the source and have those modifications take effect.
* Packagers who need to be able to construct a package for installation by user.
See [[Installation alternatives]].
Should you just want to do a straightforward replacement instead, make sure that you remove the older version before you install the new version. '''Do not install over the top of the old version.''' As new versions of Gramps are developed, some functionality is occasionally rewritten in different ways. If you install over the top of an existing installation you run the risk that the old code left behind from the old version may be used instead of the new, sometimes with unintended consequences.  If you installed from source, the best way of removing the old Gramps 3.x or earlier version is to run<code>make uninstall</code> as root '''from where you installed the old version'''.  Or use your distribution's package manager to uninstall if your old Gramps version was installed as a package.
<code>make uninstall</code>= Gramps 4.2 and up=
as root '''{{man menu|Gramps 4.2 and beyond only work with Python 3.2 or greater.}} This should be handled automatically if Gramps is installed from where you installed the old version'''. Use your distributiondistro's package manager to uninstall if your old version was installed as a packagerepository.
= Gramps 4If installing using a tar or git source, you need to replace 'python' with 'python3' for the various setup and run commands below.2 =
The following packages are required, and should be installed automatically as dependencies with the Gramps package. (This list is for Gramps 4.2 and beyond only work with Python .0 on Kubuntu 15.10.) {{man note|For v5.0 add sqlite3.}} {|{{Prettytable}}|-!Debian /Ubuntu !Fedora /Redhat!Comment|-| gir1.2-atk-1.0| | |-| gir1.2-freedesktop| | |-| gir1.2-gdkpixbuf-2.0| | |-| gir1.2-gexiv2-0.10| | |-| gir1.2-gtk-3.0| | |-| gir1.2-osmgpsmap-1.0| | |-| gir1.2-pango-1.0|||-| graphviz|||-| libcdt5|||-| libcgraph6|||-| libgexiv2-2 |||-| libgvc6|||-| libgvpr2|||-| libosmgpsmap-1.0|||-| libpathplan4|||-| python3-bsddb3|||-| python3-cairo|||-| python3-gi-cairo|||-| python3-icu|||-| python3.5|||-| python3.5-minimal|||} With the standard dependencies, Gramps still gives some warnings about missing packages. The following packages address these warnings. {|{{Prettytable}}|-!Debian /Ubuntu !Fedora /Redhat!Comment|-| language-pack-gnome-en| | or greaterthe equivalent for your language and locale|-| gir1.2-goocanvas-2.0| | |-| python3-django| | |} = Gramps 4.0 to 4.1 =
== Obtain the source ==
 
There are two ways to get the source code: download a released version source, or clone the source from Git.
{{man note|Note|replace 42 with the latest branch {{last_branch}} if required.}}
== Install dependencies for Gramps 4.2 ==
{{stub}}
==== General requirements ====
{{stub}}
==== Linux package requirements ====
{{stub}}
 
= Gramps 4.0 to 4.1 =
== Install dependencies for Gramps 4.x ==
==== Linux package requirements ====
The full list of requirements is given in the [https://github.com/gramps-project/gramps/blob/master/README .md README] file.
Required
| [http://docs.python.org/library/bsddb.html BSDDB]
| [http://docs.python.org/library/bsddb.html BSDDB]
| Current backend, <code>python3-bsddb3 </code> for python 3!
|-
| xdg-utils
| python-pygoocanvas gir1.2-goocanvas-2.0-9
| goocanvas pygoocanvas
| Required for [[Addon:Graph View]]
|-
|python3-django
| Django
| Required for http://gramps-connect.org [[Gramps-Connect: Introduction|Gramps-Connect]]
Local installation without root privileges is possible, instructions are available on the INSTALL file.
== Build, Install and Run Gramps 4.0 to Gramps 45.1 x ==Note that the 'python' commands below need to be 'python3' for Gramps 4.2 and later.
python setup.py build
The way you run Gramps depends on whether you downloaded a release or downloaded from the Git repository.
==== Running from a tarball release ====
See [http://gramps.1791082.n4.nabble.com/No-joy-building-Gramps-4-0-1-from-source-tp4661381p4661443.html]
With a tarbaltarball, gramps should be run from the build directory, or from installed version (which can be installed locally).
python setup.py build
go to where the scripts are installed:
* For python 2 look in: <code>cd build/scripts-2.7</code> * For python 3 look in: <code>cd build/scripts-3.4</code> ({{man menu|Note the number 3.4 depends on your version of python and in most cases where you see the number 2.7replace it with your version number in the example commands below}})
in build GRAMPS_RESOURCES must also be set to actually run it:
If you now run
* <code>python Gramps.py -v</code>or* <code>python3 Gramps.py -v</code>
you should see Gramps will show the version information summary and if all required packages are found, if not install the missing requirements. You can now start Gramps locally with the command
Then you can start Gramps locally with the command* <code>python Gramps.py</code>or* <code>python3 Gramps.py</code>
== Full install walkthrough Gramps 4 Ubuntu derivatives ==
Following walkthrough was done on a clean install of Kubuntu 13.04 which did have the GTK applications firefox, inkscape and gimp installed. Equal Equivalent steps should be done on other platforms.
sudo apt-get install git
then use the gnome-tweak-tool to switch to that. For KDE you need to go also to Settings->Appearance->GTK and set the GTK 3 theme there to the one you installed.
==== Full install walkthrough walk-through Windows ====On The native windows, you support for Gramps 4.x takes a bit more effort. You can install follow the walk-through for* [[https://wwwRun Gramps40 for Windows from source using Python 2.virtualbox7.org/ virtualbox3] and then install K/X/Ubuntu as indicated above]* Run Gramps40 for Windows from source using Python 3.4 ('''Not available, which will give but you linux in windowsshould be able to follow the instructions for the Python 2.7. 3 version and modify accordingly''')
The native An alternative on windows support for Gramps 4.0 is being worked on. You find the current walkthrough to install [[Run_Gramps40_for_Windows_from_source_using_Python_2https://www.7virtualbox.3|on the dedicated page]org/ virtualbox]and then install K/X/Ubuntu as indicated above, which will give you Linux in windows.
= Gramps 3.4.x =
| python-pygoocanvas
| goocanvas pygoocanvas
| Required for [[Addon:Graph View]]
|-
| graphviz
Local installation without root privileges is possible, instructions are available on the INSTALL file, most importantly one needs to supply a <code>--prefix=</code> and a <code>--with-mime-dir=</code> argument to <code>autogen.sh</code>.
Starting Gramps - '''TBD'''??
= See also =
* [[Gramps_4.2_Wiki_Manual_Gramps_{{Version manual}}_Wiki_Manual_-_Command_Line#GRAMPSHOME |$GRAMPSHOME]]
* [[Translating_Gramps#.24GRAMPSI18N_.28for_your_locale.29| $GRAMPSI18N (for your locale) ]]
* [[Installation_alternatives]]
* [[Translating_Gramps#Installing_your_translation|Installing your translation (Gramps 3.x and earlier)]] or [[Translation_environment4|Gramps 4.x and later]]
* [[Howto:Change_the_language_of_reports#Run_Gramps_in_a_different_language|Howto:Change the language of reports - Run Gramps in a different language]]
* [[Fedora rpmRPM]]
[[Category:Documentation]]
[[Category:Developers/Installation]]
[[Category:Developers/Packaging]]
1,965
edits

Navigation menu