Building Shotwell on Windows

To build Shotwell on Windows, perform the following steps:

  1. Install Subversion (found at  http://www.collab.net/downloads/subversion/).
  2. Install wget ( http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe). Accept the default destination directory (c:\Program Files\GnuWin32).
  3. Install unzip ( http://gnuwin32.sourceforge.net/downlinks/unzip.php). Accept the default destination directory (c:\Program Files\GnuWin32).
  4. Add c:\Program Files\GnuWin32\bin to your PATH using Control Panel->System->Advanced system settings->Environment Variables.
  5. Install Vala for Windows ( http://valide.googlecode.com/files/vala-0.8.1.exe). When installing, be sure that all components are selected (Vala, MinGW, GTK+). Enter c:\MinGW as the destination folder.
  6. Install MSYS ( http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe). Accept the default destination directory (c:\msys\1.0).

    During the installation you might see the following error, which is especially common on Windows 7:
          0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
    AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x4E0000, State 0x10000
    C:\msys\1.0\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
    
    If this error occurs you'll need to run the post-install step manually after the installation is complete. To do this, open an MSYS prompt and type the following command:
    $ /postinstall/pi.sh
    
    During the post-install step, be sure to enter the name of the MinGW installation directory using a forward slash ("c:/MinGW"). If you use a backslash by mistake you'll end up with a non-working MSYS installation.
  7. From an MSYS prompt, check out Shotwell:
    $ svn co svn://yorba.org/shotwell/trunk shotwell
    $ cd shotwell
    
  8. Run the install-deps script, which will download and install all build dependencies:
    $ windows/install-deps
    
    This may take up to 30 minutes depending on your system.
  9. Build Shotwell:
    $ ./configure
    $ make
    
    Note that if you want Shotwell to display debugging information when SHOTWELL_LOG is defined, you must configure with --debug. (For an explanation, see the comment about -mwindows in the Makefile.)
  10. shotwell.exe should now exist in the shotwell directory

Building the Windows installer

To build the Windows installer, make sure that you have installed  Inno Setup and that its directory (typically c:\Program Files\Inno Setup) is in your PATH. Now run this command:

$ make winstaller

This will generate shotwell-setup-X.Y.Z.exe in the top directory of the Shotwell source tree.

When releasing a new version of Shotwell, be sure to test the Windows installer on a machine where MinGW is not available to make sure that all required dependencies will be installed! This is very easy to do, even on a development machine: simply rename c:\MinGW to c:\MinGW.bak for testing so the directory will not be found in the PATH. In the past we've been burned a couple of times by releases with missing dependencies.

Attachments