1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Source and build environment setup

From gramps4win

Revision as of 05:18, 27 April 2009 by Fuzzyfonzy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This solution is closest to the current installation steps. However, with a binary installation available this solution should only be reserved for developers and advanced users which want to run bleeding edge code. While this solution may eventually include an installer to ease setup, the source should be gotten from SVN. Multiple source versions should be taken into account.

Note that for the sake of clarification, simplicity, and keeping source away from installation these steps will favor putting everything in c:\Projects\gramps. Of course developers can put things wherever they want just keep in mind that the paths listed (and maybe even some code) may have to be adjusted. Currently the gramps4win code should work on relative paths and will just want to be in the same directory that the ./autogen step puts things. For example:

 c:\Projects\gramps\gramps4win (from gramps4win svn)
 c:\Projects\gramps\gramps-3.1.1-src (from gramps svn)
 c:\Projects\gramps\share\gramps (share is output by the make install step)


Dependencies Installation

One of the benefits of distributing a compiled GRAMPS is being able to control the tech stack for users. Therefore developers should be running the latest dependencies known to work. Especially if they plan to build releases. For users only interested in running from code or older versions of GRAMPS not compatible with the latest dependencies check out Python 2.5 based dependencies.

Confirmed Python 2.6 dependency builds

  1. Close any gtk-based applications that are running, such as the GIMP or Pidgin.
  1. Install the packages in the following order:
    1. Python 2.6 => Python downloads (GRAMPS is not yet compatible with Python 3.X)
    2. GTK+ from gladewin32, includes glade, see note
    3. pygtk from www.acc.umu.se (Download page)
    4. pygobject from www.gnome.org (Download page)
    5. pycairo from www.acc.umu.se (Download page)
  2. Re-boot the computer after installing the above dependencies, prior to installing GRAMPS.


  1. Use SVN to get gramps source.
    • Example svn: https://gramps.svn.sourceforge.net/svnroot/gramps/tags/gramps-3.1.1/
    • Note that trunk is current development, tags are code as released, and branches is working code for patches to current versions.
    • Example svn install path: c:\Projects\gramps\gramps-3.1.1
    • For installer development purposes we are working on /tags/gramps-3.1.1 from GRAMPS svn repository.
  2. Open a cmd prompt and run GRAMPS. c:\python26\python "c:\projects\gramps\gramps-3.1.1\src\gramps.py"
  3. Verify that gramps runs. If it doesn't, troubleshoot.

This is the bare minimum required to get GRAMPS code running.

autogen, autoconf, and make

The above steps will get GRAMPS running. However, additional steps are necessary to setup the code for packaging. These tools set configuration and separates out the code intended for release. They are not Windows tools so Cygwin is necessary.

Be aware of the EOF issues between linux and windows. Hopefully this wont be a gotcha but just in case we make note of it here. Your svn should handle conversion without any problems. The tools we use on Cygwin should handle windows eof OK so we should be OK. But it's something to be aware of.

  • Use SVN to get gramps4win source.
    • Example svn: https://gramps4win.svn.sourceforge.net/svnroot/gramps4win/trunk to something like C:\Projects\gramps\gramps4win
    • Note that if you are doing active development on the main GRAMPS code to not commit gramps4win code to the GRAMPS repository. Our code is not ready for production and may set off the main devs. It is probably best to keep the gramps4win svn code in a separate directory.
  • Dowload and install Cygwin.
    • During install pick "Default Text File Type" of "Dos / text"
    • In addition to the default packages also install.
      • autocof2.5
      • automake 1.9
      • diffutils: A GNU collection of diff utilities
      • gcc-g++: C++ compiler
      • gettext
      • gettext-devel
      • glib2-devel
      • intltool 0.40.3 (do not install 0.40.5 there is a bug Note that you will have to reselect 0.40.3 every time cygwin's setup is run because it will always try to auto update.)
      • make
      • shared-mime-info
    • Make certain not to install the following. Your windows install already installed python and cygwin doesn't have the necessary versions for some packages. If you don't install python in cygwin then autogen will pickup your other install. Which has the correct package dependencies in it.
      • python 2.5
      • pygtk2 (unfortunately GRAMPS needs 2.10.0 but cygwin only has 2.6.3-1 so it still barks on autogen. Since were not actually running from cygwin and our windows install does have the dependency it's probably a none issue.) (confirm this)
  • Restart your computer. (This may not be strictly necessary but it seemed to help me).
  • Put C:\cygwin\bin on your path to run cygwin's commands from a dos prompt.
  • Run build.bat. build.bat is a little dos menu for running many of the common commands a windows developer of gramps would have to run. if you prefer to type each command manually just open it up and see what's being done. It's nothing fancy.
    • adjust build.bat paths. if you installed to the paths listed here you probably don't have to do anything if not than adjust.
    • run b1 to copy over patches
    • run b2, b3, and b4 to build the source
    • t3 to test the built source.

Steps for Binary Building

  1. Install py2exe for python 2.6 => py2exe-0.6.9.win32-py2.6.exe (180 KB, from py2exe.org)
  2. Install NSIS 2.44 => nsis-2.44-setup.exe (1.51 MB, from nsis.sourceforge.net)
  3. Run build.bat
    • p1 and p2 use py2exe on the build dir.
    • i1 and i2 compile and test the nsis installer.
  4. Congratulations you should now have an installer located at C:\Projects\gramps\gramps4win\!

Common Problems

Installer complains pygtk is missing

This is a very common error to see when all dependencies are not installed or installed correctly. Please make sure that each of the packages required have installed correctly, and re-boot the computer prior to running the GRAMPS installer. We often see users attempting to use other packages to satisfy these requirements that omit something necessary (e.g., glade) which produce this error.

In rare occasions, the installer will complain that pygtk is not installed even though everything is correct. Canceling and re-running the installer seems to fix this problem, although if it happens repeatedly, the error is the more severe situation discussed above. (Anyone know why? Please tell us on the gramps-windows email list.)

GTK+ Installer Error

If you already have GTK+ installed, perhaps because you have installed The GIMP, Pidgin, or Gnu Cash, the GTK+ installer will not be able to write to some files if one of those applications is running. If you see errors with the GTK+ installer, select Cancel, shut down the other GTK+ applications and run the installer again. (This issue has been reported as GTK+ Installer doesn't handle locked files well to the kind people who make the GTK+ installer for windows.)

Personal tools