Changes

Jump to: navigation, search

Run Gramps40 for Windows from source using Python 2.7.3

1,067 bytes added, 12:30, 22 October 2016
m
no edit summary
{{man warn| This is a work Work in progress... <br/>!!|Nobody guarantees anything at all!<br/>Any comments and help (e.g. on wiki pages) are welcome.<br><br>Last update: 19.01.2014<br><br>'''Work in progress!!'''}}
{{out of date}}
Last update: 19This page provides information how to run Gramps 4.010.2014 x to 4.1.x from source on a Microsoft Windows system with a 32 bit Python 2.7.6 (introducing the new PyGI3and Python 3.2 or greater).10The principles are still OK.For a time without an AIO package that was a good way to have a running Gramps for Windows using Phyton 2-.7.3. But the now available AIO ==> Work in progress!!package has a better usability. To prevent two different versions no further actions where done since the beginning of 2014.
This page provides information how to run {{man menu|Please note: Gramps 4.02.x from source on a Microsoft Windows system. After some trials there was the result to focus on 32 bit and newer only work with Python 2.7.3 (since July 2013 also 2.7.5 and since December 2013 also 2or greater.7.6) because of several issues related to Gtk and database connection. }}
There are some parts marked as :* "TODO ISSUE" because of known issues. There are some parts marked as * "TODO WORK" because it's not done yet done (work in progress).
==Windows operating system==
* WinXP, Win Vista: no information available* Win7.x: no special installations are known (all test done using Win7 Professional SP1 64bit German)* Win8.x: no information available* Win10.x: no information available* Win XP since April 8th 2014 is no longer supported by Microsoft and it is recommended you upgrade (How about upgrading to Linux :) )** If you would still like to use Win XP these additional installations are strongly required (all tests done using WinXP Home 32 bit German)*** SP3 (http://www.microsoft.com/de-de/download/confirmation.aspx?id=25129)*** "Microsoft Visual C++ 2008 Redistributable Package (x86)" (http://www.microsoft.com/de-de/download/details.aspx?id=29)*** "Microsoft Visual C++ 2010 Redistributable Package (x86)" (http://www.microsoft.com/de-de/download/details.aspx?id=5555)* Win 7: no special installations are known (all test done using Win7 Professional SP1 64bit German)* Win8.x: no information available
==Python==
Requirements from the Gramps [httphttps://sourceforgegithub.netcom/pgramps-project/gramps/source/ciblob/mastermaintenance/treegramps41/README README]:
* Python 2.7 or greater, Python 3.2 or greater (python version cannot be mixed)
**We use: Python 2.7.6 32 bit from https://www.python.org/downloads/ (python-2.7.6.msi) for all examples assumed to be installed into "C:\Python27".
The only missed things may be special myspell dictionaries (comment: Gramps uses myspell only!) . These can be found here:
* from http://extensions.openoffice.org/ download the language packages of your choice. Included in the there provided .oxt files one can extract by using a program like 7-Zip the necessary .aff and .dic files. * alternate [http://extensions.libreoffice.org/extension-center?getCategories=Dictionary&getCompatibility=any extensions.libreoffice.org/]* Or you may find these files (.aff and .dic) as part of any GrampsAOI GrampsAIO installation in "..\share\enchant\myspell"
For our example all files *.aff *.dic have to be stored into "C:\Python27\Lib\site-packages\gnome\share\enchant\myspell".
====ICU/PyICU====
This package is a "must be".Requirements from README (*STRONGLY RECOMMENDED*):
19.01.2014: Download http://dl.dropbox.com/u/81888101/Gramps/PYICU_py27_win32.zip(This zip provides ICU/PyICU version 1.5 (for current version information see https://pypi.python.org/pypi/PyICU )
* Copy all files from PYICU_py27_win32.zip\lib\site-packages to "C:\Python27\Lib\site-packages"
* Now we have to place the binaries from PYICU_py27_win32.zip\bin to a folder found by Python / Gramps:
To give Gramps the access to this software we have to add the directory of the related binaries to the PATH environment variable. But to prevent trouble with the used dll versions between GraphViz and Gramps it's strongly recommended to add this at the end of PATH
SET PATH=%PATH%;C:\Program Files (x86)\Graphviz2.30\bin\
{{man warn| Using "Graph View" GraphViz 2.34 or higher forces an error (#{{bug|7109}} Fixed in Gramps 4.2.0). At #{{bug|7109 }} you will find a patch to solve the issuefor older versions of Gramps.<br>
Without this patch and a still unsolved issue one should use graphviz-2.30.1.zip from http://www.graphviz.org/pub/graphviz/stable/windows/. The handling is the same as above}}
<br>
Comments: GraphViz will be used e. g. for any report in Reports --> Graphs. Without GraphViz there is only one output format "Graphvi File". If all is OK there are several output formats available (e. g. "PDF (Graphviz)", "JPEG image" etc.).
[https#{{bug|7109}} * alternate http://www.gramps-projectportableapps.orgcom/bugsnode/view.php?id=7109 #7109]38245 '''GVEdit (Graphviz) Portable'''
====pyexiv2====
Optional packages
* From http://www.ghostscript.com/download/gsdnld.html download the "Ghostscript GPL Release" for "Ghostscript 9.10 for Windows (32 bit)" and run the downloaded file gs910w32.exe. For the example we again use the default installation.
** Python / Gramps needs to know the folder where the binaries are stored (default: "C:\Program Files (x86)\gs\gs9.10\bin") by defining the environment variable PATH.<code>SET PATH=%PATH%;C:\Program Files (x86)\gs\gs9.10\bin\</code>
** As option it's possible to place the content of the binary folder (default: "C:\Program Files (x86)\gs\gs9.10\bin") into the same folder as python.exe to prevent any changes of the environment variable PATH.
* From http://pages.cs.wisc.edu/~ghost/gsview/get50.htm download and run gsv50w32.exe (e. g. into the default install folder: C:\Program Files (x86)\Ghostgum).
** Python / Gramps needs to know the folder where the binaries are stored (default: "C:\Program Files (x86)\Ghostgum\gsview") by defining the environment variable PATH.<br>Comment: This tool will be used to display .ps files as optional result of reports. So at least it's like e.g. any a .pdf viewer or .rtf viewer. It would be possible to include it into any Gramps package. But as normally nobody would include a .pdf viewer or .rtf viewer into a Gramps package I won't suggest to do that for a .ps viewer.
** alternate http://portableapps.com/apps/utilities/ghostscript_portable
====rcs====
Requirements from README (optional package):
* The [http://en.wikipedia.org/wiki/Revision_Control_System GNU Revision Control System (RCS) ] can be used to manage multiple revisions of your family trees. * See info at http://www.gramps-project.org/wiki/index.php?title=[[Gramps_4.0_Wiki_Manual_1_Wiki_Manual_-_Manage_Family_Trees#Archiving_a_Family_Tree]]
* Only rcs is needed, NO python bindings are required
From http://www.pythonware.com/products/pil/ download PIL-1.1.7.win32-py2.7.exe. Run this installation to add PIL to the used Python version.
 
* alternate: http://python-pillow.github.io/
====ttf-freefont====
==Start Gramps 4.0.x==
===Get Gramps sources===
For all examples it's assumed that the Gramps source (e.g. from the GIT repository httphttps://gitgithub.code.sf.netcom/pgramps-project/gramps/source/ or the .tar.gz from from http://sourceforge.net/projects/gramps/files/Stable/../) will be stored into "C:\Gramps4.0".
It's helpful to use a special client for Windows to get these sources. Also if one gets sources only such a tool provides the possibility of history search and or compare and also to mark differences between the current version on the computer and the repository.
[Changed 03.12.2013]
To run setup.py we need the translation tool msgfmt.exe having a proper version. The installer for poedit (http://sourceforge.net/projects/poedit/files/poedit/1.5/poedit-1.5.7-setup.exe/download) provides msgfmt.exe in version 0.18.1.0.
 
Latest version of poedit available from https://poedit.net/download
For all examples we assume poedit to be installed to: "C:\Program Files (x86)\Poedit" (The default path of the installer).
Here is an example batch file to run this:
<codepre> C: cd C:\Gramps4.0 set path=C:\Python27;C:\Program Files (x86)\Poedit\bin;C:\Program Files (x86)\Poedit\GettextTools\bin;%path% C:\Python27\python setup.py build pause </codepre
The result should look like this:
running build
Possible exception:<br> * setup.py stops because of a missing "intltool-merge". <br>* setup.py assumes for Windows to have either non installed "intltools" or complete installed "intltools". In some rare situations it could be possible to have an incomplete installation of these tools. But because we don't need these tools to run Gramps itself it's necessary to edit setup.py in such cases: Insert "return (0, 0, 0)" direct behind "if sys.platform == 'win32':" in "def intltool_version():".
...
cmd = ["perl", "-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
...
 
Comments:
* After running this it would be possible to run Gramps from "C:\Gramps4.0" or from some where "C:\Gramps4.0\build\...".
At this point we have a basically running Gramps.
Because we didn't add all packages suggested by the README we didn't have the full functionality. Especially some output formats and the geographic view are not available yet (TODO WORK: Add the missing packages having a usable version.)
For Gramps 4.0 1 development there are may still be issues etc (see bug tracker: http://www.gramps-project.org/bugs/view_all_bug_page.php). It's strongly recommended to use test data for validation only!
To run Gramps a batch seems to be helpful:
==Known Major Issues==
As known per 2013-12-16
* GraphViz 2.34 and later causes an error in Graph View:<strike>see http://www.gramps-project.org/bugs/view.php?id={{bug|7277 }} for more details</strike>('''It's solved with the AIO for Gramps 4.1.1''')
* no Django
* [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3#gtkspell |gtkspell]]:
** Opening the note editor having spell activated or activating the spell within the note editor blocks Python / the application for a while (as longer as larger the text). Therefore it's suggested to deactivate the spell checker in Preferences. But it's the same if one toggles this feature or changes the spell language interactive using the right mouse context menu in the Note Editor.
** The spell settings will not be stored.
* The [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3#osmgpsmap |Geographic view ]] and other gtk parts may generate warnings without any other known effect
* WinXP (26.12.13): see information [[Run_Gramps40_for_Windows_from_source_using_Python_2.7.3#Windows_operating_system |above]]
168
edits

Navigation menu