Building Glimpse/Windows

From GlimpseWiki
< Building Glimpse
Revision as of 13:31, 22 September 2019 by TrechNex (talk | contribs) (Added initial build instructions for Windows)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Building with MSYS2

  1. Download MSYS2 from and then run the installer.
  2. Follow any other instructions presented on that download page to ensure key components managed by pacman are updated.
  3. Install the prerequisite build packages, selecting "default=all" when prompted. Replace x86-64 with i686 for each entry if you are running 32-bit Windows:
  4. pacman -S git base-devel \
    mingw-w64-x86_64-toolchain \
    mingw-w64-x86_64-asciidoc \
    mingw-w64-x86_64-drmingw \
    mingw-w64-x86_64-gexiv2 \
    mingw-w64-x86_64-ghostscript \
    mingw-w64-x86_64-glib-networking \
    mingw-w64-x86_64-graphviz \
    mingw-w64-x86_64-gtk2 \
    mingw-w64-x86_64-python2-pygtk \
    mingw-w64-x86_64-iso-codes \
    mingw-w64-x86_64-json-c \
    mingw-w64-x86_64-json-glib \
    mingw-w64-x86_64-lcms2 \
    mingw-w64-x86_64-lensfun \
    mingw-w64-x86_64-libheif \
    mingw-w64-x86_64-libraw \
    mingw-w64-x86_64-libspiro \
    mingw-w64-x86_64-libwebp \
    mingw-w64-x86_64-libwmf \
    mingw-w64-x86_64-openexr \
    mingw-w64-x86_64-poppler \
    mingw-w64-x86_64-SDL2 \
    mingw-w64-x86_64-suitesparse \
    mingw-w64-x86_64-vala \
    mingw-w64-x86_64-xpm-nox \
  5. Add the necessary environment variables in the C:\msys64\home\$USERNAME\.bash_profile file (omit ACLOCAL_FLAGS on 32-bit Windows):
  6. export PREFIX=`realpath ~/prefix`
    export PATH="$PREFIX/bin:$PATH"
    export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
    export PKG_CONFIG_PATH="$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
    export XDG_DATA_DIRS="$XDG_DATA_DIRS:$PREFIX/share:/usr/local/share/:/usr/share/"
    export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
  7. Reload your session with the environment variables you just set:
  8. source ~/.bash_profile
  9. Follow the build steps outlined in Building Glimpse, but append --prefix=$PREFIX to the end of each ./ and ./configure step.

Once the build is complete, you should be able to launch the application by typing glimpse-0.1 into the same MSYS2 MinGW window. Your settings will be saved in the C:\Users\$USERNAME\AppData\Roaming\Glimpse\0.1 folder by default.