Compare commits

...

22 Commits

Author SHA1 Message Date
0d5724262f gtk+3 3.22.7 2017-01-19 05:05:12 +00:00
e4c1944e2d gtk+3 3.22.6 2017-01-18 11:03:22 +00:00
cc82f4c746 fix gtk2 installer 2016-11-29 17:33:29 +00:00
939e50d7c7 Adding missing 2 files 2016-09-18 21:13:03 +02:00
5f5fbc5a12 Fixing wrong directoy copy script 2016-09-07 07:22:41 +02:00
fb293f2b79 More changes to have a complete MSYS2 version
Extended the copy script, did a deep dependency research and modified installed libraries
2016-09-06 23:03:14 +02:00
eb4d5b4717 Modified the binary files to use MSYS2 environment of GTK (mingw64 folder)
Also added a script which copies all necessary files from the appropriate MSYS2/mingw64 folders to the bin folder of the install environment
Updated GTK3 NSI script
2016-09-05 21:21:51 +02:00
9ee00261c1 gtk2 2.24.30 and gtk3 3.20.2
next time: write a script that copies all required files from /usr/local to the git repo...
2016-04-12 07:27:26 +02:00
1c9141a50b new packages created gtk-2.24.29 and gtk-3.18.6
all dependencies have been updated
patches were necessary for cairo and cairomm
libepoxy added: new gtk3 dependency
2016-01-10 14:00:34 +01:00
d55963d2a7 README.md: link to xmimsim.iss fixed 2015-08-10 09:49:53 +01:00
7e9191ba33 switched to TDM-GCC 5.1.0
recompiled all C++ code as the new compiler appears to have default C++11 support. This will break backwards compatibility!
2015-07-04 14:42:17 +02:00
9adcfe1399 new package: gtk-2.24.28 and gtk-3.14.13
Closes #1 -> NSIS installer with long PATH names
Closes #2 -> libxml++ added

New packages added: json-glib, libxml++ and libxslt
Several packages saw a version bump.
For now I am sticking with gtk-3.14, since gtk-3.16 introduces a mandatory dependency on OpenGL through libepoxy which I still need to figure out...
2015-06-23 17:03:35 +02:00
5ccd4e14ef typo fixed in readme 2015-01-28 10:14:32 +01:00
842e785b0a Readme.md updated with new packages 2015-01-27 14:26:54 +01:00
a8d71d9e8f filechooser bug fixed and gnome icon theme added 2015-01-27 13:36:35 +01:00
ed9543055c Update README.md after creating new packages 2015-01-22 14:43:46 +01:00
beb82a20c4 gtkmm3 installer added
license modified
2015-01-22 14:03:13 +01:00
6913ebb81a gtk2 installer fixed now
registry problem in uninstaller led to bad uninstalls
2015-01-22 10:51:11 +01:00
9099de89b6 first working version of gtkmm2 package
uninstaller acting weird though
need to check XMI-MSIM version too
2015-01-21 18:30:05 +01:00
684f71904c new gtk2 installer produced, testing now 2015-01-21 10:47:06 +01:00
97c43bccc7 some deletes
libharfbuzz is utterly redundant since only libpangoft2 depends on it but
gtk doesnt use it unless x11 is found
2015-01-20 18:09:18 +01:00
61163067dd compiled gtkmm2 and gtkmm3 and all their dependencies 2015-01-20 18:06:16 +01:00
7152 changed files with 26163 additions and 2773 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*~ *~
gtk2-runtime*-ts-win64*exe gtk2-runtime*-ts-win64*exe
gtk3-runtime*-ts-win64*exe
*.swp *.swp
/.vscode

View File

@ -3,7 +3,7 @@ GTK+ for Windows Runtime Environment Installer: 64-bit
This repository is a fork of the [GTK+ for Windows Runtime Environment Installer](http://gtk-win.sourceforge.net) that was originally created This repository is a fork of the [GTK+ for Windows Runtime Environment Installer](http://gtk-win.sourceforge.net) that was originally created
by Alexander Shaduri. by Alexander Shaduri.
My efforts here will focus on creating a **64-bit version** of the runtime that he has been providing so far, using up to date versions of GTK+ and its dependencies. My efforts here will focus on creating a **64-bit version** of the GTK+-2 runtime that he has been providing so far, using up to date versions of GTK+ and its dependencies. Recently I have also created a 64-bit **GTK+-3 runtime package**. All packages now contain **Gtkmm** and its dependencies too. Since the GTK+ developers recently dropped support for stock icons (a mistake of epic proportions IMHO...), I added the Adwaita icon theme to the GTK+-3 runtime, so you can still enjoy pretty filechooserdialogs etc! I have also added a couple of commonly used libraries such as libxml++, libxslt and gtksourceview.
The installers can be found [here](http://lvserver.ugent.be/gtk-win64/). The installers can be found [here](http://lvserver.ugent.be/gtk-win64/).
@ -11,29 +11,54 @@ The installers can be found [here](http://lvserver.ugent.be/gtk-win64/).
Both for convencience as well as for increased reliability across installations, it is recommended for developers to compile and link against the GTK+ SDK that I used to create the installers. This SDK can also be obtained at the aforementioned url. Both for convencience as well as for increased reliability across installations, it is recommended for developers to compile and link against the GTK+ SDK that I used to create the installers. This SDK can also be obtained at the aforementioned url.
The current release (gtk2-runtime-2.24.24-2014-09-28-ts-win64.exe) has been compiled using GCC 4.8.1 (MinGW-w64 installed from TDM-GCC). The current releases ([gtk2-runtime-2.24.30-2016-04-09-ts-win64.exe](http://lvserver.ugent.be/gtk-win64/gtk2-runtime/gtk2-runtime-2.24.30-2016-04-09-ts-win64.exe) and [gtk3-runtime-3.20.2-2016-04-09-ts-win64.exe](http://lvserver.ugent.be/gtk-win64/gtk3-runtime/gtk3-runtime-3.20.2-2016-04-09-ts-win64.exe)) have been compiled using GCC 5.1.0 (MinGW-w64 installed from TDM-GCC).
The included GTK+ dependencies were selected according to the flowchart used by [Hexchat](http://hexchat.github.io/gtk-win32/). The source tarballs can be obtained by clicking on the names of the dependencies in the following list: The included GTK+ dependencies were selected according to the flowchart used by [Hexchat](http://hexchat.github.io/gtk-win32/). The source tarballs can be obtained by clicking on the names of the dependencies in the following list:
* [atk](http://ftp.gnome.org/pub/GNOME/sources/atk/) (2.14.0) * [adwaita icon theme](http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/) (3.20)
* [cairo](http://cairographics.org/releases/) (1.12.16) * [atk](http://ftp.gnome.org/pub/GNOME/sources/atk/) (2.20.0)
* [atkmm](http://ftp.gnome.org/pub/GNOME/sources/atkmm/) (2.24.2)
* [cairo](http://cairographics.org/releases/) (1.14.6)
* [cairomm](http://cairographics.org/releases/) (1.12.0)
* [fontconfig](http://www.freedesktop.org/software/fontconfig/release/) (2.11.1) * [fontconfig](http://www.freedesktop.org/software/fontconfig/release/) (2.11.1)
* [freetype](http://www.freetype.org/download.html) (2.5.3) * [freetype](http://www.freetype.org/download.html) (2.6.3)
* [gdk-pixbuf](http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/) (2.31.1) * [gdk-pixbuf](http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/) (2.34.0)
* [gettext](http://ftp.gnu.org/pub/gnu/gettext/) (0.19.2) * [gettext](http://ftp.gnu.org/pub/gnu/gettext/) (0.19.7)
* [glib](http://ftp.gnome.org/pub/GNOME/sources/glib/) (2.42.0) * [glib](http://ftp.gnome.org/pub/GNOME/sources/glib/) (2.48.0)
* [gtk](http://ftp.gnome.org/pub/GNOME/sources/gtk+/) (2.24.24) * [glibmm](http://ftp.gnome.org/pub/GNOME/sources/glibmm/) (2.48.1)
* [harfbuzz](http://www.freedesktop.org/software/harfbuzz/release/) (0.9.35) * [gtk2](http://ftp.gnome.org/pub/GNOME/sources/gtk+/) (2.24.30)
* [libffi](http://sourceware.org/libffi/) (3.1) * [gtk3](http://ftp.gnome.org/pub/GNOME/sources/gtk+/) (3.20.2)
* [libpng](http://sourceforge.net/project/showfiles.php?group_id=5624) (1.6.13) * [gtkmm2](http://ftp.gnome.org/pub/GNOME/sources/gtkmm) (2.24.4)
* [libxml2](http://xmlsoft.org/sources/) (2.9.1) * [gtkmm3](http://ftp.gnome.org/pub/GNOME/sources/gtkmm) (3.20.0)
* [pango](http://ftp.gnome.org/pub/GNOME/sources/pango/) (1.36.8) * [gtksourceview2](http://ftp.gnome.org/pub/GNOME/sources/gtksourceview/) (2.10.5)
* [pixman](http://cairographics.org/releases/) (0.32.6) * [gtksourceview3](http://ftp.gnome.org/pub/GNOME/sources/gtksourceview/) (3.20.1)
* [win-iconv](http://code.google.com/p/win-iconv/downloads/list) (0.0.6) * [gtksourceviewmm2](http://ftp.gnome.org/pub/GNOME/sources/gtksourceviewmm/) (2.10.3)
* [gtksourceviewmm3](http://ftp.gnome.org/pub/GNOME/sources/gtksourceviewmm/) (3.18.0)
* [harfbuzz](http://www.freedesktop.org/software/harfbuzz/release/) (1.1.4)
* [hicolor-icon-theme](http://icon-theme.freedesktop.org/releases/) (0.15)
* [icon-naming-utils](http://tango.freedesktop.org/releases/) (0.8.90)
* [intltool](http://ftp.gnome.org/pub/gnome/sources/intltool/) (0.51.0)
* [json-glib](http://ftp.gnome.org/pub/gnome/sources/json-glib/) (1.2.0)
* [libepoxy](https://github.com/anholt/libepoxy) (1.3.1)
* [libffi](http://sourceware.org/libffi/) (3.2.1)
* [libpng](http://sourceforge.net/project/showfiles.php?group_id=5624) (1.6.21)
* [libsigc++](http://ftp.gnome.org/pub/GNOME/sources/libsigc++/) (2.8.0)
* [libxml2](http://xmlsoft.org/sources/) (2.9.3)
* [libxml++2](http://ftp.gnome.org/pub/GNOME/sources/libxml++/) (2.40.1)
* [libxml++3](http://ftp.gnome.org/pub/GNOME/sources/libxml++/) (3.0.0)
* [libxslt](http://xmlsoft.org/sources/) (1.1.28)
* [mm-common](http://ftp.gnome.org/pub/GNOME/sources/mm-common/) (0.9.9)
* [pango](http://ftp.gnome.org/pub/GNOME/sources/pango/) (1.40.0)
* [pangomm](http://ftp.gnome.org/pub/GNOME/sources/pangomm/) (2.40.0)
* [pcre](ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/) (8.38)
* [pixman](http://cairographics.org/releases/) (0.34.0)
* [pkg-config](http://pkgconfig.freedesktop.org/releases/) (0.29.1)
* [win-iconv](https://github.com/win-iconv/win-iconv) (0.0.8)
* [zlib](http://www.zlib.net) (1.2.8) * [zlib](http://www.zlib.net) (1.2.8)
For all other information regarding how to use the installer, the reader is kindly referred to the [Alexander Shaduri's website](http://gtk-win.sourceforge.net) of the GTK for Windows runtime environment installer. The only difference with the installers found at this website is that mine DO NOT have the `compatdlls` option, but this should present no problems to any user. For all other information regarding how to use the installer, the reader is kindly referred to [Alexander Shaduri's website](http://gtk-win.sourceforge.net) of the GTK for Windows runtime environment installer. The only difference with the installers found at his website is that mine DO NOT have the `compatdlls` option, but this should present no problems to any user.
Personally I use this installer in my [XMI-MSIM project](http://github.com/xmimsim). You may want to have a look at my Inno Setup ([new](https://github.com/tschoonj/xmimsim/blob/master/nsis/xmimsim.iss)) and NSIS ([old](https://github.com/tschoonj/xmimsim/blob/XMI-MSIM-4.0/nsis/xmimsim-win64.nsi.in)) based installers. Personally I use this installer in my [XMI-MSIM project](http://github.com/xmimsim). You may want to have a look at my Inno Setup ([new](https://github.com/tschoonj/xmimsim/blob/master/windows/xmimsim.iss)) and NSIS ([old](https://github.com/tschoonj/xmimsim/blob/XMI-MSIM-4.0/nsis/xmimsim-win64.nsi.in)) based installers.
Those interested in scientific plotting using Gtkmm3 may want to have a look at my project [Gtkmm-PLplot](https://github.com/tschoonj/gtkmm-plplot). Documentation and examples can be found [here](http://tschoonj.github.io/gtkmm-plplot)
Tom Schoonjans Tom Schoonjans

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
gtk-nsis-pack/bin/zlib1.dll Normal file

Binary file not shown.

View File

@ -0,0 +1,159 @@
#!/bin/bash
# ---------------------------------------------------------------------------
# Set default values to option vars
# ---------------------------------------------------------------------------
set -e
INSTALL_SRC_DIR=$(dirname "$0")
INSTALL_SRC_MSYS2="/mingw64/"
_DATE=$(date +'%Y-%m-%d')
_VERSION="3.20.2"
_ARCH="win64"
# ---------------------------------------------------------------------------
# Check source directory and prepare binary and lib destination directory
# in the NSIS source tree
# ---------------------------------------------------------------------------
test "${INSTALL_SRC_DIR}" = "." && INSTALL_SRC_DIR=${PWD}
INSTALL_SRC_BIN="${INSTALL_SRC_DIR}"/bin
INSTALL_SRC_LIB="${INSTALL_SRC_DIR}"/lib
INSTALL_SRC_MSYS2_BIN=${INSTALL_SRC_MSYS2}/bin
INSTALL_SRC_MSYS2_LIB=${INSTALL_SRC_MSYS2}/lib
# Create installer file name
INSTALLER_FILENAME=gtk3-runtime-${_VERSION}-${_DATE}-${_ARCH}.msi
echo $INSTALLER_FILENAME
# ---------------------------------------------------------------------------
# Copy relevant GTK files to the binary destination directory
# ---------------------------------------------------------------------------
echo "Copying all GTK files from : " $INSTALL_SRC_MSYS2
echo " to NSIS source directory: " $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libatk-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libatkmm-1.6-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libcairo-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libcairo-gobject-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libcairo-script-interpreter-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libcairomm-1.0-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libepoxy-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libexslt-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libffi-6.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libfontconfig-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libfreetype-6.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgailutil-3-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgailutil-18.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgdk_pixbuf-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/liblzma-5.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libcroco-0.6-3.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgdk-win32-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgdk-3-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgdkmm-3.0-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgdkmm-2.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgio-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libglib-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libglibmm-2.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgiomm-2.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libsigc-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libglibmm_generate_extra_defs-2.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgmodule-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgobject-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgthread-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtk-3-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtk-win32-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtksourceview-3.0-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtksourceview-2.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtksourceviewmm-3.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtkmm-3.0-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgtkmm-2.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libharfbuzz-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libintl-8.dll $INSTALL_SRC_BIN
# I'm not sure that this is needed...:
cp $INSTALL_SRC_MSYS2_BIN/libiconv-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libjson-glib-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpango-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpangocairo-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpangowin32-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpangoft2-1.0-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpangomm-1.4-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpixman-1-0.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpng16-16.dll $INSTALL_SRC_BIN
# No need for this IMHO, at least fontconfig is not dependent on these
cp $INSTALL_SRC_MSYS2_BIN/libxml++-2.6-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libxml++-3.0-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libxml2-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libxslt-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libpcre-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/zlib1.dll $INSTALL_SRC_BIN
# These six additional one seems to me that is needed for my test GTK app,
# as I see mainly needed for fontconfig package and dlls
cp $INSTALL_SRC_MSYS2_BIN/libexpat-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libbz2-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgraphite2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/librsvg-2-2.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libtiff-5.dll $INSTALL_SRC_BIN
# Standrard MSYS2 libraries
cp $INSTALL_SRC_MSYS2_BIN/libstdc++-6.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libgcc_s_seh-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/libwinpthread-1.dll $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-cache.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-cat.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-list.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-match.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-pattern.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-query.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-scan.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/fc-validate.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gdk-pixbuf-query-loaders.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gspawn-win64-helper.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gspawn-win64-helper-console.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gtk-query-immodules-2.0.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gtk-query-immodules-3.0.exe $INSTALL_SRC_BIN
cp $INSTALL_SRC_MSYS2_BIN/gtk-update-icon-cache.exe $INSTALL_SRC_BIN
# Copy lib/gtk-2.0 folder
cd $INSTALL_SRC_MSYS2_LIB/gtk-2.0
cp -r ./ $INSTALL_SRC_LIB/gtk-2.0
# Delete static libraries
find $INSTALL_SRC_LIB/gtk-2.0 -name *.dll.a -type f -delete
# Copy lib/gdk-pixbuf-2.0 folder
cd $INSTALL_SRC_MSYS2_LIB/gdk-pixbuf-2.0
cp -r ./ $INSTALL_SRC_LIB/gdk-pixbuf-2.0
# Delete static libraries
find $INSTALL_SRC_LIB/gdk-pixbuf-2.0 -name *.a -type f -delete
# Copy /share/locale/locale.alias
cp $INSTALL_SRC_MSYS2/share/locale/locale.alias $INSTALL_SRC_DIR/share/locale
# Copy /share/themes/default
cp -r $INSTALL_SRC_MSYS2/share/themes/default/gtk-3.0 $INSTALL_SRC_DIR/share/themes/default/
# Copy /share/themes/emacs
cp -r $INSTALL_SRC_MSYS2/share/themes/emacs/gtk-3.0 $INSTALL_SRC_DIR/share/themes/emacs/
# Copy /share/glib-2.0/schemas
cp -r $INSTALL_SRC_MSYS2/share/glib-2.0/schemas $INSTALL_SRC_DIR/share/glib-2.0/
# Copy /share/icons
cp -r $INSTALL_SRC_MSYS2/share/icons $INSTALL_SRC_DIR/share/
# librsvg depends on:
# gdk-pixbuf2 pango libcroco
# gdk-pixbuf2 package depends on the following:
# glib2>=2.37.2 jasper libjpeg-turbo libpng libtiff
echo "Done with copying all binary relevant GTK files to the binary destination directory"
echo "Now you can initiate the creation of the installer package with NSIS"

View File

@ -0,0 +1,22 @@
# Example configuration file for the GTK+ Multipress Input Method
# Authored by Openismus GmbH, 2009.
#
# This file follows the GKeyFile format. On the left of the equal sign goes
# the key that you press repeatedly to iterate through the text items listed
# on the right-hand side. The list items are separated by semicolons ";" and
# consist of one or more characters each. The backslash "\" is used to escape
# characters; for instance "\;" for a literal semicolon.
#
# The example configuration below imitates the behavior of a standard mobile
# phone by a major manufacturer, with German language setting.
[keys]
KP_1 = .;,;?;!;';";1;-;(;);@;/;:;_
KP_2 = a;b;c;2;ä;à;á;ã;â;å;æ;ç
KP_3 = d;e;f;3;è;é;ë;ê;ð
KP_4 = g;h;i;4;ì;í;î;ï
KP_5 = j;k;l;5;£
KP_6 = m;n;o;6;ö;ò;ó;ô;õ;ø;ñ
KP_7 = p;q;r;s;7;ß;$
KP_8 = t;u;v;8;ü;ù;ú;û
KP_9 = w;x;y;z;9;ý;þ
KP_0 = \s;0

View File

@ -0,0 +1,7 @@
[Settings]
gtk-theme-name = win32
gtk-icon-theme-name = Adwaita
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,954 @@
; NSIS2 Script for GTK2-Runtime
; by Alexander Shaduri <ashaduri 'at' gmail.com>.
; modified by Tom Schoonjans <Tom.Schoonjans 'at' gmail.com>
; Compatible with NSIS Unicode 2.45.
; Public Domain
; The naming convention is:
; Product: GTK2-Runtime;
; Directory and package names: gtk2-runtime.
; The reason for this is that when gtk3 comes out, it
; should be installable side by side with this package.
!define GTK_VERSION "2.24.31"
!define GTK_BIN_VERSION "2.10.0"
!define PRODUCT_VERSION "${GTK_VERSION}-2017-01-19-ts-win64"
!define PRODUCT_NAME "GTK2-Runtime Win64"
!define PRODUCT_PUBLISHER "Tom Schoonjans"
!define PRODUCT_WEB_SITE "https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer"
!define INSTALLER_OUTPUT_FILE "gtk2-runtime-${PRODUCT_VERSION}.exe"
;!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AppMainExe.exe"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define REGISTRY_APP_PATHS "Software\Microsoft\Windows\CurrentVersion\App Paths"
; AddToPath and friends should work with all users
!define ALL_USERS
!include nsi_env_var_update.nsh ; EnvVar* functions
!include "FileFunc.nsh" ; GetOptions
!include "x64.nsh"
!include "LogicLib.nsh"
; --------------- General Settings
; this is needed for proper start menu item manipulation (for all users) in vista
RequestExecutionLevel admin
; This compressor gives us the best results
SetCompressor /SOLID lzma
; Do a CRC check before installing
CRCCheck On
; This is used in titles
Name "${PRODUCT_NAME}" ; ${PRODUCT_VERSION}
; Output File Name
OutFile "${INSTALLER_OUTPUT_FILE}"
; The Default Installation Directory
InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
;InstallDir "$WINDIR"
; Detect the old installation
InstallDirRegKey HKLM "SOFTWARE\${PRODUCT_NAME}" ""
;InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
; --------------------- MUI INTERFACE
; MUI 2.0 compatible install
!include "MUI2.nsh"
!include "InstallOptions.nsh"
; Icon "gtk.ico"
; UninstallIcon "gtk.ico"
; MUI Settings
!define MUI_ABORTWARNING
;!define MUI_ICON "nsi_install.ico"
!define MUI_ICON "gtk.ico"
;!define MUI_UNICON "nsi_uninstall.ico"
!define MUI_UNICON "gtk.ico"
; Things that need to be extracted on first (keep these lines before any File command!)
; Only useful for BZIP2 compression
ReserveFile "nsi_pathpage.ini"
ReserveFile "nsi_configpage.ini"
ReserveFile "${NSISDIR}\Plugins\x86-unicode\InstallOptions.dll"
; Pages to show during installation
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
Page custom PathPage PathPageExit ; Custom page
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryPageExit
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
;!define MUI_FINISHPAGE_RUN "$INSTDIR\gtk2-runtime\gtk2_prefs.exe"
;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Example.file"
;!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_NOAUTOCLOSE
;!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_PAGE_FINISH
; Uninstaller page
!insertmacro MUI_UNPAGE_CONFIRM
UninstPage custom un.DeleteConfig ;Custom page
!insertmacro MUI_UNPAGE_INSTFILES
Function PathPage
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro INSTALLOPTIONS_DISPLAY "nsi_pathpage.ini"
FunctionEnd
; Note: These options are unsupported unless the installer is launched in silent mode (/S).
; e.g. /setpath=no /dllpath=root /sideeffects=no
var install_option_setpath ; set PATH: yes (default), no
var install_option_dllpath ; bin (default), lib, root
var install_option_sideeffects ; yes (default), no. no = don't write to registry, PATH or start menu.
var install_option_translations ; install translations: yes, no (default)
var install_option_removeold ; uninstall the old version first (if present): yes (default), no.
var LIB_INSTDIR
var DLL_DIR_NAME
var DLL_TMP
; Executed when leaving PathPage page.
; Sets DLL_DIR_NAME to dll directory name.
Function PathPageExit
IfSilent dllpath_silent
; if not silent, show a page with radiobuttons
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 3" "State"
StrCmp $DLL_TMP "1" goto_dll_bin
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 4" "State"
StrCmp $DLL_TMP "1" goto_dll_lib
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 5" "State"
StrCmp $DLL_TMP "1" goto_dll_none
goto dllpath_exit
dllpath_silent:
; if silent, use the /dllpath= option
StrCmp $install_option_dllpath "bin" goto_dll_bin
StrCmp $install_option_dllpath "lib" goto_dll_lib
StrCmp $install_option_dllpath "root" goto_dll_none goto_dll_bin ; default to bin if not matched
dllpath_exit:
goto_dll_none:
StrCpy $DLL_DIR_NAME ""
goto goto_dll_exit
goto_dll_lib:
StrCpy $DLL_DIR_NAME "lib"
goto goto_dll_exit
goto_dll_bin:
StrCpy $DLL_DIR_NAME "bin"
goto goto_dll_exit
goto_dll_exit:
FunctionEnd
; Set $LIB_INSTDIR to <instpath>\bin, <instpath>\lib or <instpath>\ .
; Must be after the directory selection page.
Function DirectoryPageExit
StrCpy $LIB_INSTDIR "$INSTDIR"
StrCmp $DLL_DIR_NAME "" no_dll_append
StrCpy $LIB_INSTDIR "$INSTDIR\$DLL_DIR_NAME"
no_dll_append:
FunctionEnd
Function un.DeleteConfig
; !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro INSTALLOPTIONS_DISPLAY "nsi_configpage.ini"
FunctionEnd
; Language files
!insertmacro MUI_LANGUAGE "English"
; --------------- END MUI
;Description
LangString DESC_SecCopyUI ${LANG_ENGLISH} "GTK2 Runtime 64-bit"
LangString TEXT_IO_TITLE ${LANG_ENGLISH} "GTK2 Runtime 64-bit"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Additional options"
;License page Introduction
;LicenseText "You must agree to this license before installing."
;License text
;LicenseData /LANG=${LANG_ENGLISH} "license.txt"
; ----------------- INSTALLATION TYPES
InstType "Recommended" ; 1
InstType "Full" ; 2
var SEC_TRANSLATIONS_INSTALLED
Section "GTK+ libraries (required)" SecGTK
SectionIn 1 2 RO
SetShellVarContext all ; use all user variables as opposed to current user
SetOverwrite On
SetOutPath "$LIB_INSTDIR"
; NOTE: If you add or remove any of these,
; be sure to do the same in the uninstall section.
File bin\libatk-1.0-0.dll ; atk
File bin\libatkmm-1.6-1.dll ; atk
File bin\libcairo-2.dll ; cairo, needed by gtk
File bin\libcairo-gobject-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
File bin\libcairo-script-interpreter-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
File bin\libcairomm-1.0-1.dll
File bin\libexslt-0.dll
File bin\libffi-6.dll ; libffi is required by glib
File bin\libfontconfig-1.dll ; fontconfig is needed for ft2 pango backend
File bin\libfreetype-6.dll ; freetype is needed for ft2 pango backend
File bin\libgailutil-18.dll ; from gtk
File bin\libgdk_pixbuf-2.0-0.dll ; from gtk
File bin\libgdk-win32-2.0-0.dll ; from gtk
File bin\libgdkmm-2.4-1.dll
File bin\libgio-2.0-0.dll ; from glib
File bin\libglib-2.0-0.dll ; glib
File bin\libglibmm-2.4-1.dll ; glib
File bin\libgiomm-2.4-1.dll ; glib
File bin\libsigc-2.0-0.dll
File bin\libglibmm_generate_extra_defs-2.4-1.dll ; glib
File bin\libgmodule-2.0-0.dll ; from glib
File bin\libgobject-2.0-0.dll ; from glib
File bin\libgthread-2.0-0.dll ; from glib
File bin\libgtk-win32-2.0-0.dll ; gtk
File bin\libgtksourceview-2.0-0.dll
File bin\libgtkmm-2.4-1.dll
;File bin\libgtksourceviewmm-2.0-2.dll
File bin\libharfbuzz-0.dll
File bin\libintl-8.dll ; gettext, needed by all i18n libs
File bin\libiconv-2.dll
File bin\libjson-glib-1.0-0.dll ; gettext, needed by all i18n libs
File bin\libpango-1.0-0.dll ; pango, needed by gtk
File bin\libpangocairo-1.0-0.dll ; pango, needed by gtk
File bin\libpangowin32-1.0-0.dll ; pango, needed by gtk
File bin\libpangoft2-1.0-0.dll ; pango, needed by gtk
File bin\libpangomm-1.4-1.dll
File bin\libpixman-1-0.dll ; libpixman, needed by cairo
File bin\libpng16-16.dll ; for gdk_pixbuf loader.
File bin\libxml++-2.6-2.dll ; fontconfig needs this
File bin\libxml++-3.0-1.dll
File bin\libpcre-1.dll
File bin\libxml2-2.dll ; fontconfig needs this
File bin\libxslt-1.dll ; fontconfig needs this
File bin\zlib1.dll ; png and many others need this
File bin\libexpat-1.dll ; required by fontconfig
File bin\libbz2-1.dll ; required by fontconfig
File bin\libgraphite2.dll ; required by harfbuzz
File bin\librsvg-2-2.dll ; required by adwaita-icon-theme
File bin\libtiff-5.dll ; required by gdk-pixbuf2
File bin\libstdc++-6.dll
File bin\libgcc_s_seh-1.dll
File bin\libwinpthread-1.dll
; We install this into the same place as the DLLs to avoid any PATH manipulation.
SetOutPath "$LIB_INSTDIR"
File bin\fc-cache.exe
File bin\fc-cat.exe
File bin\fc-list.exe
File bin\fc-match.exe
File bin\fc-pattern.exe
File bin\fc-query.exe
File bin\fc-scan.exe
File bin\fc-validate.exe
File bin\gdk-pixbuf-query-loaders.exe ; from gdk_pixbuf
File bin\gspawn-win64-helper.exe
File bin\gspawn-win64-helper-console.exe
File bin\gtk-query-immodules-2.0.exe
File bin\gtk-update-icon-cache.exe
SetOutPath "$INSTDIR\etc"
SetOverwrite off
File /r etc\gtk-2.0
SetOverwrite On
SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}"
File lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}\loaders.cache
SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}\loaders"
File /r lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}\loaders
SetOutPath "$INSTDIR\lib\gtk-2.0\modules"
File /r lib\gtk-2.0\modules
SetOutPath "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}"
; no longer in gtk as of 2.14.5.
; File /r lib\gtk-2.0\${GTK_BIN_VERSION}\immodules
; gone as of gtk 2.16.6-2.
; File /r lib\gtk-2.0\${GTK_BIN_VERSION}\loaders
; wimp
SetOutPath "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines"
File lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libwimp*.dll
; We install this, but other installers may not have it.
File lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libpixmap*.dll
SetOutPath "$INSTDIR\share\locale"
File share\locale\locale.alias ; from gettext
SetOutPath "$INSTDIR\share\themes\Emacs"
File /r share\themes\Emacs\gtk-2.0-key
SetOutPath "$INSTDIR\share\themes"
File /r share\themes\MS-Windows
File /r share\themes\Raleigh
SetOutPath "$INSTDIR\gtk2-runtime"
; File gtk-postinstall.bat ; this file is generated now
File license.txt
File gtk.ico ; needed for "add/remove programs"
; this script updates some config files, but it's unsafe
; (gtk or pango may not work afterwards), so don't call it.
;Push $INSTDIR\gtk2-runtime\gtk-postinstall.bat
;Call WritePostInstall
; update pango.modules, not working for now
; Exec '$INSTDIR\gtk2-runtime\gtk-postinstall.bat'
SectionEnd ; end of gtk section
Section "Translations" SecTranslations
SectionIn 2
SetShellVarContext all ; use all user variables as opposed to current user
StrCpy $SEC_TRANSLATIONS_INSTALLED "1"
SetOutPath "$INSTDIR"
SetOverwrite On
; SetOutPath "$INSTDIR\lib"
; File /r lib\locale
; gtk (beginning with 2.12.3) uses share\locale
SetOutPath "$INSTDIR\share"
File /r share\locale
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecGTK} "GTK+ 64-bit Runtime Libraries"
!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} "Additional translations (some are incomplete)"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
; Executed on installer run
Function .onInit
SetShellVarContext all ; use all user variables as opposed to current user
${IfNot} ${RunningX64}
MessageBox MB_OK|MB_ICONEXCLAMATION "This installation requires a 64-bit Windows system" /SD IDOK
Abort
${EndIf}
SetRegView 64
!insertmacro INSTALLOPTIONS_EXTRACT "nsi_pathpage.ini"
StrCpy $SEC_TRANSLATIONS_INSTALLED "0" ; set to 1 in appropriate section
${GetOptions} "$CMDLINE" "/setpath=" $install_option_setpath
${GetOptions} "$CMDLINE" "/dllpath=" $install_option_dllpath
${GetOptions} "$CMDLINE" "/sideeffects=" $install_option_sideeffects
${GetOptions} "$CMDLINE" "/translations=" $install_option_translations
${GetOptions} "$CMDLINE" "/removeold=" $install_option_removeold
; Debug stuff
; MessageBox MB_ICONINFORMATION|MB_OK "/setpath=$install_option_setpath \
; /dllpath=$install_option_dllpath /sideeffects=$install_option_sideeffects \
; INSTDIR: $INSTDIR" /SD IDOK
; if we're using /sideeffects=no, set /setpath=no, because we can't
; revert it during uninstall (there's no dllpath in registry).
StrCmp $install_option_sideeffects "no" "" init_sideeffects
StrCpy $install_option_setpath "no" ; set /setpath=no
goto init_sideeffects_exit
init_sideeffects:
Call PreventMultipleInstances ; in no-sideeffects mode this has no purpose
Call DetectPrevInstallation ; we don't want local installations to interfere with global ones.
init_sideeffects_exit:
; enable translations if requested through command line
StrCmp $install_option_translations "yes" "" no_translations
push $R0
SectionGetFlags ${SecTranslations} $R0
IntOp $R0 $R0 | ${SF_SELECTED}
SectionSetFlags ${SecTranslations} $R0
pop $R0
no_translations:
; Page callbacks are not called if in silent mode, so call these manually
IfSilent "" +3
Call PathPageExit
Call DirectoryPageExit
FunctionEnd
; ------------------ POST INSTALL
var ADD_TO_PATH
Section -post
SetShellVarContext all ; use all user variables as opposed to current user
IfSilent PATH_silent
; Read a value from an InstallOptions INI File
!insertmacro INSTALLOPTIONS_READ $ADD_TO_PATH "nsi_pathpage.ini" "Field 1" "State"
StrCmp $ADD_TO_PATH "1" goto_set_path_yes goto_set_path_no
goto PATH_exit
PATH_silent:
; if silent, use the /setpath= option
StrCmp $install_option_setpath "no" goto_set_path_no goto_set_path_yes
PATH_exit:
goto_set_path_yes:
; The user requested to add the libdir to $PATH.
StrCpy $ADD_TO_PATH "1"
; Push $LIB_INSTDIR
; Call AddToPath ; add $LIB_INSTDIR to system $PATH
Push $0 ; result PATH
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$LIB_INSTDIR" ; Append
Pop $0
; MessageBox MB_ICONINFORMATION|MB_OK "$LIB_INSTDIR added to path"
goto goto_set_path_exit
goto_set_path_no:
StrCpy $ADD_TO_PATH "0"
goto goto_set_path_exit
goto_set_path_exit:
; write out uninstaller
WriteUninstaller "$INSTDIR\gtk2_runtime_uninst.exe"
StrCmp $install_option_sideeffects "no" no_sideeffects
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "DllPath" "$LIB_INSTDIR"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Vendor" "${PRODUCT_PUBLISHER}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "PackageVersion" "${PRODUCT_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Version" "${GTK_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "BinVersion" "${GTK_BIN_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "DllDirName" "$DLL_DIR_NAME" ; lib, bin, or ""
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "UsingSystemPath" $ADD_TO_PATH
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "TranslationsInstalled" $SEC_TRANSLATIONS_INSTALLED
; compat with installer from http://gimp-win.sourceforge.net/
WriteRegStr HKLM "SOFTWARE\GTK\2.0" "Path" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\GTK\2.0" "Version" "${GTK_VERSION}"
; compat with Dropline's GTK
WriteRegStr HKLM "SOFTWARE\GTK\2.0" "DllPath" "$LIB_INSTDIR"
; Information for the uninstall component in "add/remove programs"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\gtk2_runtime_uninst.exe"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\gtk2-runtime\gtk.ico"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoModify" 1
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoRepair" 1
; uninstall shortcut
CreateDirectory "$SMPROGRAMS\GTK2 Runtime 64-bit"
CreateShortCut "$SMPROGRAMS\GTK2 Runtime 64-bit\Uninstall GTK2 Runtime.lnk" "$INSTDIR\gtk2_runtime_uninst.exe" "" ""
WriteIniStr "$SMPROGRAMS\GTK2 Runtime 64-bit\Go to the website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
; Write $INSTDIR\gtk2-runtime\gtk2r-env.bat
; This script sets the GTK environment variables
DetailPrint "Generating $INSTDIR\gtk2-runtime\gtk2r-env.bat"
Push $INSTDIR\gtk2-runtime\gtk2r-env.bat
Call WriteEnvBat
DetailPrint "Done"
no_sideeffects:
SectionEnd ; post
; ---------------- UNINSTALL
; Note: These options are unsupported unless the uninstaller is launched in silent mode (/S).
var uninstall_option_remove_config ; yes, no (default).
var uninstall_option_sideeffects ; yes (default), no. Use if it was installed with this option.
; These are used only if /sideffects=no :
var uninstall_option_dllpath ; uninstall dlls from: bin (default), lib, root.
var uninstall_option_translations ; uninstall translations: yes, no (default)
Function un.onInit
SetRegView 64
${GetOptions} "$CMDLINE" "/remove_config=" $uninstall_option_remove_config
${GetOptions} "$CMDLINE" "/sideeffects=" $uninstall_option_sideeffects
${GetOptions} "$CMDLINE" "/dllpath=" $uninstall_option_dllpath
${GetOptions} "$CMDLINE" "/translations=" $uninstall_option_translations
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
FunctionEnd
var leave_config ; don't remove global gtk config (uninstall page option)
;var INST_DIR_REG ; installation dir from registry (uninstall stage)
; This is a separate function to allow multiple calls to it
Function un.DeleteDlls
SetShellVarContext all ; use all user variables as opposed to current user
StrCpy $LIB_INSTDIR "$INSTDIR"
StrCmp $DLL_DIR_NAME "" un_no_dll_append
StrCpy $LIB_INSTDIR "$INSTDIR\$DLL_DIR_NAME"
un_no_dll_append:
; bin stuff (they are in the same directory)
Delete $LIB_INSTDIR\fc-cache.exe
Delete $LIB_INSTDIR\fc-cat.exe
Delete $LIB_INSTDIR\fc-list.exe
Delete $LIB_INSTDIR\fc-match.exe
Delete $LIB_INSTDIR\fc-pattern.exe
Delete $LIB_INSTDIR\fc-query.exe
Delete $LIB_INSTDIR\fc-scan.exe
Delete $LIB_INSTDIR\fc-validate.exe
Delete $LIB_INSTDIR\gdk-pixbuf-query-loaders.exe
Delete $LIB_INSTDIR\gspawn-win64-helper.exe
Delete $LIB_INSTDIR\gspawn-win64-helper-console.exe
Delete $LIB_INSTDIR\gtk-query-immodules-2.0.exe
Delete $LIB_INSTDIR\gtk-update-icon-cache.exe
; dlls
Delete $LIB_INSTDIR\libatk-1.0-0.dll ; atk
Delete $LIB_INSTDIR\libatkmm-1.6-1.dll ; atk
Delete $LIB_INSTDIR\libcairo-2.dll ; cairo, needed by gtk
Delete $LIB_INSTDIR\libcairo-gobject-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
Delete $LIB_INSTDIR\libcairo-script-interpreter-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
Delete $LIB_INSTDIR\libcairomm-1.0-1.dll
Delete $LIB_INSTDIR\libexslt-0.dll
Delete $LIB_INSTDIR\libffi-6.dll ; libffi is required by glib
Delete $LIB_INSTDIR\libfontconfig-1.dll ; fontconfig is needed for ft2 pango backend
Delete $LIB_INSTDIR\libfreetype-6.dll ; freetype is needed for ft2 pango backend
Delete $LIB_INSTDIR\libgailutil-18.dll ; from gtk
Delete $LIB_INSTDIR\libgdk_pixbuf-2.0-0.dll ; from gtk
Delete $LIB_INSTDIR\libgdk-win32-2.0-0.dll ; from gtk
Delete $LIB_INSTDIR\libgdkmm-2.4-1.dll
Delete $LIB_INSTDIR\libgio-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libglib-2.0-0.dll ; glib
Delete $LIB_INSTDIR\libglibmm-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libgiomm-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libsigc-2.0-0.dll ; glib
Delete $LIB_INSTDIR\libglibmm_generate_extra_defs-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libgmodule-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgobject-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgthread-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgtk-win32-2.0-0.dll ; gtk
Delete $LIB_INSTDIR\libgtksourceview-2.0-0.dll
;Delete $LIB_INSTDIR\libgtksourceviewmm-2.0-2.dll
Delete $LIB_INSTDIR\libgtkmm-2.4-1.dll
Delete $LIB_INSTDIR\libharfbuzz-0.dll
Delete $LIB_INSTDIR\libintl-8.dll ; gettext, needed by all i18n libs
Delete $LIB_INSTDIR\libiconv-2.dll
Delete $LIB_INSTDIR\libjson-glib-1.0-0.dll
Delete $LIB_INSTDIR\libpango-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangocairo-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangowin32-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangoft2-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangomm-1.4-1.dll
Delete $LIB_INSTDIR\libpixman-1-0.dll ; libpixman, needed by cairo
Delete $LIB_INSTDIR\libpng16-16.dll ; for gdk_pixbuf loader.
Delete $LIB_INSTDIR\libxml2-2.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxslt-1.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxml++-2.6-2.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxml++-3.0-1.dll
Delete $LIB_INSTDIR\libpcre-1.dll
Delete $LIB_INSTDIR\zlib1.dll ; png and many others need this
Delete $LIB_INSTDIR\libexpat-1.dll
Delete $LIB_INSTDIR\libbz2-1.dll
Delete $LIB_INSTDIR\libgraphite2.dll
Delete $LIB_INSTDIR\librsvg-2-2.dll
Delete $LIB_INSTDIR\libtiff-5.dll
Delete $LIB_INSTDIR\libstdc++-6.dll
Delete $LIB_INSTDIR\libgcc_s_seh-1.dll
Delete $LIB_INSTDIR\libwinpthread-1.dll
FunctionEnd
var found_dir
var find_handle_lang_dir
Section Uninstall
SetShellVarContext all ; use all user variables as opposed to current user
SetAutoClose false
; Note: Checking if there is a registry key present, and using it to determine
; if this is a private installation will not work, as it will break if a parallel
; shared installation is present.
; ReadRegStr $INST_DIR_REG HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory"
; StrCmp $INST_DIR_REG "" uninst_no_sideeffects
StrCmp $uninstall_option_sideeffects "no" uninst_no_sideeffects
; For PATH removal
ReadRegStr $LIB_INSTDIR HKLM "SOFTWARE\${PRODUCT_NAME}" "DllPath"
ReadRegStr $DLL_DIR_NAME HKLM "SOFTWARE\${PRODUCT_NAME}" "DllDirName"
ReadRegStr $ADD_TO_PATH HKLM "SOFTWARE\${PRODUCT_NAME}" "UsingSystemPath"
ReadRegStr $SEC_TRANSLATIONS_INSTALLED HKLM "SOFTWARE\${PRODUCT_NAME}" "TranslationsInstalled"
DeleteRegKey HKLM "SOFTWARE\GTK\2.0" ; dropline, etc...
DeleteRegKey /ifempty HKLM "SOFTWARE\GTK" ; don't damage other installations
DeleteRegKey HKLM "SOFTWARE\${PRODUCT_NAME}"
DeleteRegKey HKLM "${PRODUCT_UNINST_KEY}"
; FIXME: Do we have this registry key?
; DeleteRegKey HKCU "Software\${PRODUCT_NAME}"
Delete "$SMPROGRAMS\GTK2 Runtime 64-bit\Uninstall GTK2 Runtime.lnk"
Delete "$SMPROGRAMS\GTK2 Runtime 64-bit\Go to the website.url"
RMDir "$SMPROGRAMS\GTK2 Runtime 64-bit" ; only if empty, theme selector may still be there
; Remove GTK from $PATH
StrCmp $ADD_TO_PATH "0" un_nopath ; Setting $PATH was not requested during installation
; Push $LIB_INSTDIR
; Call un.RemoveFromPath
Push $0 ; result PATH
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$LIB_INSTDIR" ; remove
Pop $0
; MessageBox MB_OK "$LIB_INSTDIR removed from PATH" /SD IDOK
un_nopath:
; $DLL_DIR_NAME is from the registry here
Call un.DeleteDlls
goto delete_dlls_exit
uninst_no_sideeffects:
Strcpy $SEC_TRANSLATIONS_INSTALLED "0"
StrCmp $uninstall_option_translations "yes" "" nodelete_translations
Strcpy $SEC_TRANSLATIONS_INSTALLED "1"
nodelete_translations:
; All dll files. We delete them before /bin and /lib, so that
; the directories are empty afterwards.
; Since we have no registry, we have to remove dlls from all possible locations
; StrCpy $DLL_DIR_NAME ""
; Call un.DeleteDlls
; StrCpy $DLL_DIR_NAME "bin"
; Call un.DeleteDlls
; StrCpy $DLL_DIR_NAME "lib"
; Call un.DeleteDlls
; Force users to use the command-line argument instead:
; if silent, use the /dllpath= option
StrCmp $uninstall_option_dllpath "bin" goto_undll_bin
StrCmp $uninstall_option_dllpath "lib" goto_undll_lib
StrCmp $uninstall_option_dllpath "root" goto_undll_none goto_undll_bin ; default to bin if not matched
goto_undll_none:
StrCpy $DLL_DIR_NAME ""
goto goto_undll_exit
goto_undll_lib:
StrCpy $DLL_DIR_NAME "lib"
goto goto_undll_exit
goto_undll_bin:
StrCpy $DLL_DIR_NAME "bin"
goto goto_undll_exit
goto_undll_exit:
Call un.DeleteDlls
delete_dlls_exit:
; Delete config file?
IfSilent "" read_config_page
StrCmp $uninstall_option_remove_config "yes" delete_config skip_config
read_config_page:
!insertmacro INSTALLOPTIONS_READ $leave_config "nsi_configpage.ini" "Field 1" "State"
StrCmp $leave_config "1" skip_config
delete_config:
Delete "$INSTDIR\etc\gtk-2.0\gtkrc"
skip_config:
;Delete "$INSTDIR\etc\fonts\fonts.conf"
;RMDir "$INSTDIR\etc\fonts" ; only if empty
;Delete "$INSTDIR\etc\pango\pango.modules"
;RMDir "$INSTDIR\etc\pango" ; only if empty
; Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders"
;Delete "$INSTDIR\etc\gtk-2.0\gtk.immodules"
Delete "$INSTDIR\etc\gtk-2.0\gtkrc.default"
;Delete "$INSTDIR\etc\gtk-2.0\im-multipress.conf"
RMDir "$INSTDIR\etc\gtk-2.0" ; only if empty
RMDir "$INSTDIR\etc" ; only if empty
; some helper files here
RMDir /r "$INSTDIR\gtk2-runtime"
RMDir "$INSTDIR\bin" ; only if empty
; RMDir /r "$INSTDIR\lib"
; pango modules are gone as of gtk 2.10
; RMDir /r "$INSTDIR\lib\pango"
Delete "$INSTDIR\lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}\loaders.cache"
RMDir /r "$INSTDIR\lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}\loaders" ; not forced
RMDir "$INSTDIR\lib\gdk-pixbuf-2.0\${GTK_BIN_VERSION}" ; not forced
RMDir "$INSTDIR\lib\gdk-pixbuf-2.0" ; not forced
RMDir /r "$INSTDIR\lib\gtk-2.0\modules"
; no longer in gtk as of 2.14.5
; RMDir /r "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\immodules"
; gone as of gtk 2.16.6-2
;RMDir /r "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\loaders"
Delete "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libwimp*.dll"
; there should be no problem deleting this
Delete "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libpixmap*.dll"
RMDir "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines" ; not forced
RMDir "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}" ; not forced
RMDir "$INSTDIR\lib\gtk-2.0" ; not forced
RMDir "$INSTDIR\lib" ; not forced
Delete "$INSTDIR\share\locale\locale.alias" ; gettext
; Remove our translations only
StrCmp $SEC_TRANSLATIONS_INSTALLED "1" "" un_notranslations
FindFirst $find_handle_lang_dir $found_dir "$INSTDIR\share\locale\*"
find_lang_dir_next:
; DetailPrint "LOC: $found_dir"
StrCmp $found_dir "" find_lang_dir_done
; check if it's a directory
IfFileExists "$INSTDIR\share\locale\$found_dir\*.*" "" find_lang_dir_continue
IfFileExists "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\*.*" "" find_lang_dir_continue
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\atk10.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gdk-pixbuf.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\glib20.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk20.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk20-properties.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk30.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\json-glib-1.0.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk30-properties.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gettext-runtime.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gettext-tools.mo"
RmDir "$INSTDIR\share\locale\$found_dir\LC_MESSAGES" ; only if empty
RmDir "$INSTDIR\share\locale\$found_dir"
find_lang_dir_continue:
FindNext $find_handle_lang_dir $found_dir
goto find_lang_dir_next
find_lang_dir_done:
FindClose $find_handle_lang_dir
un_notranslations:
RMDir "$INSTDIR\share\locale" ; only if empty, not to remove the other programs' translations
RMDir /r "$INSTDIR\share\themes\Raleigh"
RMDir /r "$INSTDIR\share\themes\MS-Windows"
RMDir /r "$INSTDIR\share\themes\Emacs"
RMDir "$INSTDIR\share\themes" ; not forced
RMDir "$INSTDIR\share" ; not forced
Delete "$INSTDIR\gtk2_runtime_uninst.exe"
RMDir "$INSTDIR" ; delete only if empty
SectionEnd ; end of uninstall section
; --------------- Helpers
; WriteEnvBat
Function WriteEnvBat
Pop $R0 ; Output file
Push $R9
FileOpen $R9 $R0 w
FileWrite $R9 "@set GTK2R_PREFIX=$LIB_INSTDIR$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo Setting environment variables for GTK2-Runtime.$\r$\n"
FileWrite $R9 "@echo.$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo set PATH=%GTK2R_PREFIX%;%%PATH%%$\r$\n"
FileWrite $R9 "@set PATH=%GTK2R_PREFIX%;%PATH%$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo.$\r$\n"
FileClose $R9
Pop $R9
FunctionEnd
; WritePostInstall
Function WritePostInstall
SetShellVarContext all ; use all user variables as opposed to current user
Pop $R0 ; Output file
Push $R9
FileOpen $R9 $R0 w
FileWrite $R9 "@echo off$\r$\n"
FileWrite $R9 "rem $\"$INSTDIR\bin\gdk-pixbuf-query-loaders.exe$\" > $\"$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders$\"$\r$\n"
FileWrite $R9 "$\"$INSTDIR\bin\gtk-query-immodules-2.0.exe$\" > $\"$INSTDIR\etc\gtk-2.0\gtk.immodules$\"$\r$\n"
FileWrite $R9 "rem $\"$INSTDIR\bin\gtk-update-icon-cache.exe$\"$\r$\n"
FileClose $R9
Pop $R9
FunctionEnd
; Detect previous installation
Function DetectPrevInstallation
; if /removeold=no option is given, don't check anything.
StrCmp $install_option_removeold "no" old_detect_done
SetShellVarContext all ; use all user variables as opposed to current user
push $R0
; detect previous installation
ReadRegStr $R0 HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
StrCmp $R0 "" old_detect_done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to continue anyway." \
/SD IDOK IDOK old_uninst
; Abort
goto old_detect_done
; Run the old uninstaller
old_uninst:
ClearErrors
IfSilent old_silent_uninst old_nosilent_uninst
old_nosilent_uninst:
ExecWait '$R0'
goto old_uninst_continue
old_silent_uninst:
; We assume it's an NSIS-generated uninstaller.
ExecWait '$R0 /S _?=$INSTDIR'
old_uninst_continue:
IfErrors old_no_remove_uninstaller
; You can either use Delete /REBOOTOK in the uninstaller or add some code
; here to remove to remove the uninstaller. Use a registry key to check
; whether the user has chosen to uninstall. If you are using an uninstaller
; components page, make sure all sections are uninstalled.
old_no_remove_uninstaller:
old_detect_done: ; old installation not found, all ok
pop $R0
FunctionEnd
; Prevent running multiple instances of the installer
Function PreventMultipleInstances
Push $R0
System::Call 'kernel32::CreateMutexA(i 0, i 0, t ${PRODUCT_NAME}) ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK
Abort
Pop $R0
FunctionEnd
; eof

View File

@ -0,0 +1,962 @@
; NSIS2 Script for GTK3-Runtime
; based on the Gtk2-Runtime script
; by Alexander Shaduri <ashaduri 'at' gmail.com>.
; modified by Tom Schoonjans <Tom.Schoonjans 'at' gmail.com>
; Compatible with NSIS Unicode 2.45.
; Public Domain
; The naming convention is:
; Product: GTK3-Runtime;
; Directory and package names: gtk3-runtime.
!define GTK_VERSION "3.22.7"
!define GTK_BIN_VERSION "3.0.0"
!define PRODUCT_VERSION "${GTK_VERSION}-2017-01-19-ts-win64"
!define PRODUCT_NAME "GTK3-Runtime Win64"
!define PRODUCT_PUBLISHER "Tom Schoonjans"
!define PRODUCT_WEB_SITE "https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer"
!define INSTALLER_OUTPUT_FILE "gtk3-runtime-${PRODUCT_VERSION}.exe"
;!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AppMainExe.exe"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define REGISTRY_APP_PATHS "Software\Microsoft\Windows\CurrentVersion\App Paths"
; AddToPath and friends should work with all users
!define ALL_USERS
!include nsi_env_var_update.nsh ; EnvVar* functions
!include "FileFunc.nsh" ; GetOptions
!include "x64.nsh"
!include "LogicLib.nsh"
; --------------- General Settings
; this is needed for proper start menu item manipulation (for all users) in vista
RequestExecutionLevel admin
; This compressor gives us the best results
SetCompressor /SOLID lzma
; Do a CRC check before installing
CRCCheck On
; This is used in titles
Name "${PRODUCT_NAME}" ; ${PRODUCT_VERSION}
; Output File Name
OutFile "${INSTALLER_OUTPUT_FILE}"
; The Default Installation Directory
InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
;InstallDir "$WINDIR"
; Detect the old installation
InstallDirRegKey HKLM "SOFTWARE\${PRODUCT_NAME}" ""
;InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
; --------------------- MUI INTERFACE
; MUI 2.0 compatible install
!include "MUI2.nsh"
!include "InstallOptions.nsh"
; Icon "gtk.ico"
; UninstallIcon "gtk.ico"
; MUI Settings
!define MUI_ABORTWARNING
;!define MUI_ICON "nsi_install.ico"
!define MUI_ICON "gtk.ico"
;!define MUI_UNICON "nsi_uninstall.ico"
!define MUI_UNICON "gtk.ico"
; Things that need to be extracted on first (keep these lines before any File command!)
; Only useful for BZIP2 compression
ReserveFile "nsi_pathpage.ini"
ReserveFile "nsi_configpage.ini"
ReserveFile "${NSISDIR}\Plugins\x86-unicode\InstallOptions.dll"
; Pages to show during installation
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
Page custom PathPage PathPageExit ; Custom page
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryPageExit
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
;!define MUI_FINISHPAGE_RUN "$INSTDIR\gtk2-runtime\gtk2_prefs.exe"
;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Example.file"
;!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_NOAUTOCLOSE
;!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_PAGE_FINISH
; Uninstaller page
!insertmacro MUI_UNPAGE_CONFIRM
UninstPage custom un.DeleteConfig ;Custom page
!insertmacro MUI_UNPAGE_INSTFILES
Function PathPage
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro INSTALLOPTIONS_DISPLAY "nsi_pathpage.ini"
FunctionEnd
; Note: These options are unsupported unless the installer is launched in silent mode (/S).
; e.g. /setpath=no /dllpath=root /sideeffects=no
var install_option_setpath ; set PATH: yes (default), no
var install_option_dllpath ; bin (default), lib, root
var install_option_sideeffects ; yes (default), no. no = don't write to registry, PATH or start menu.
var install_option_translations ; install translations: yes, no (default)
var install_option_removeold ; uninstall the old version first (if present): yes (default), no.
var LIB_INSTDIR
var DLL_DIR_NAME
var DLL_TMP
; Executed when leaving PathPage page.
; Sets DLL_DIR_NAME to dll directory name.
Function PathPageExit
IfSilent dllpath_silent
; if not silent, show a page with radiobuttons
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 3" "State"
StrCmp $DLL_TMP "1" goto_dll_bin
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 4" "State"
StrCmp $DLL_TMP "1" goto_dll_lib
!insertmacro INSTALLOPTIONS_READ $DLL_TMP "nsi_pathpage.ini" "Field 5" "State"
StrCmp $DLL_TMP "1" goto_dll_none
goto dllpath_exit
dllpath_silent:
; if silent, use the /dllpath= option
StrCmp $install_option_dllpath "bin" goto_dll_bin
StrCmp $install_option_dllpath "lib" goto_dll_lib
StrCmp $install_option_dllpath "root" goto_dll_none goto_dll_bin ; default to bin if not matched
dllpath_exit:
goto_dll_none:
StrCpy $DLL_DIR_NAME ""
goto goto_dll_exit
goto_dll_lib:
StrCpy $DLL_DIR_NAME "lib"
goto goto_dll_exit
goto_dll_bin:
StrCpy $DLL_DIR_NAME "bin"
goto goto_dll_exit
goto_dll_exit:
FunctionEnd
; Set $LIB_INSTDIR to <instpath>\bin, <instpath>\lib or <instpath>\ .
; Must be after the directory selection page.
Function DirectoryPageExit
StrCpy $LIB_INSTDIR "$INSTDIR"
StrCmp $DLL_DIR_NAME "" no_dll_append
StrCpy $LIB_INSTDIR "$INSTDIR\$DLL_DIR_NAME"
no_dll_append:
FunctionEnd
Function un.DeleteConfig
; !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro INSTALLOPTIONS_DISPLAY "nsi_configpage.ini"
FunctionEnd
; Language files
!insertmacro MUI_LANGUAGE "English"
; --------------- END MUI
;Description
LangString DESC_SecCopyUI ${LANG_ENGLISH} "GTK3 Runtime 64-bit"
LangString TEXT_IO_TITLE ${LANG_ENGLISH} "GTK3 Runtime 64-bit"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Additional options"
;License page Introduction
;LicenseText "You must agree to this license before installing."
;License text
;LicenseData /LANG=${LANG_ENGLISH} "license.txt"
; ----------------- INSTALLATION TYPES
InstType "Recommended" ; 1
InstType "Full" ; 2
var SEC_TRANSLATIONS_INSTALLED
Section "GTK+ libraries (required)" SecGTK
SectionIn 1 2 RO
SetShellVarContext all ; use all user variables as opposed to current user
SetOverwrite On
SetOutPath "$LIB_INSTDIR"
; NOTE: If you add or remove any of these,
; be sure to do the same in the uninstall section.
File bin\libatk-1.0-0.dll ; atk
File bin\libatkmm-1.6-1.dll ; atk
File bin\libcairo-2.dll ; cairo, needed by gtk
File bin\libcairo-gobject-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
File bin\libcairo-script-interpreter-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
File bin\libcairomm-1.0-1.dll
File bin\libepoxy-0.dll
File bin\libexslt-0.dll
File bin\libffi-6.dll ; libffi is required by glib2
File bin\libfontconfig-1.dll ; fontconfig is needed for ft2 pango backend
File bin\libfreetype-6.dll ; freetype is needed for ft2 pango backend
File bin\libgailutil-3-0.dll ; from gtk
File bin\libgdk_pixbuf-2.0-0.dll ; from gtk
File bin\liblzma-5.dll ; from gtk
File bin\libcroco-0.6-3.dll ; from gtk
File bin\libgdk-3-0.dll ; from gtk
File bin\libgdkmm-3.0-1.dll
File bin\libgio-2.0-0.dll ; from glib
File bin\libglib-2.0-0.dll ; glib
File bin\libglibmm-2.4-1.dll ; glib
File bin\libgiomm-2.4-1.dll ; glib
File bin\libsigc-2.0-0.dll
File bin\libglibmm_generate_extra_defs-2.4-1.dll ; glib
File bin\libgmodule-2.0-0.dll ; from glib
File bin\libgobject-2.0-0.dll ; from glib
File bin\libgthread-2.0-0.dll ; from glib
File bin\libgtk-3-0.dll ; gtk
File bin\libgtksourceview-3.0-1.dll
File bin\libgtksourceviewmm-3.0-0.dll
File bin\libgtkmm-3.0-1.dll
File bin\libharfbuzz-0.dll ; required by pango
File bin\libintl-8.dll ; gettext, needed by all i18n libs
File bin\libiconv-2.dll ; required by fontconfig
File bin\libjson-glib-1.0-0.dll ; gettext, needed by all i18n libs
File bin\libpango-1.0-0.dll ; pango, needed by gtk
File bin\libpangocairo-1.0-0.dll ; pango, needed by gtk
File bin\libpangowin32-1.0-0.dll ; pango, needed by gtk
File bin\libpangoft2-1.0-0.dll ; pango, needed by gtk
File bin\libpangomm-1.4-1.dll
File bin\libpixman-1-0.dll ; libpixman, needed by cairo
File bin\libpng16-16.dll ; required by gdk-pixbuf2
File bin\libxml++-2.6-2.dll ; fontconfig needs this
File bin\libxml++-3.0-1.dll
File bin\libxml2-2.dll ; fontconfig needs this
File bin\libxslt-1.dll ; fontconfig needs this
File bin\libpcre-1.dll ; fontconfig needs this
File bin\zlib1.dll ; png and many others need this
File bin\libexpat-1.dll ; required by fontconfig
File bin\libbz2-1.dll ; required by fontconfig
File bin\libgraphite2.dll ; required by harfbuzz
File bin\librsvg-2-2.dll ; required by adwaita-icon-theme
File bin\libtiff-5.dll ; required by gdk-pixbuf2
File bin\libstdc++-6.dll ; standard MSYS2 library
File bin\libgcc_s_seh-1.dll ; standard MSYS2 library
File bin\libwinpthread-1.dll ; standard MSYS2 library
; We install this into the same place as the DLLs to avoid any PATH manipulation.
SetOutPath "$LIB_INSTDIR"
File bin\fc-cache.exe
File bin\fc-cat.exe
File bin\fc-list.exe
File bin\fc-match.exe
File bin\fc-pattern.exe
File bin\fc-query.exe
File bin\fc-scan.exe
File bin\fc-validate.exe
File bin\gdk-pixbuf-query-loaders.exe ; from gdk_pixbuf
File bin\gspawn-win64-helper.exe
File bin\gspawn-win64-helper-console.exe
File bin\gtk-query-immodules-3.0.exe
File bin\gtk-update-icon-cache.exe
SetOutPath "$INSTDIR\etc"
SetOverwrite off
File /r etc\gtk-3.0
SetOverwrite On
SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0"
File lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
SetOutPath "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\"
File /r lib\gdk-pixbuf-2.0\2.10.0\loaders
;SetOutPath "$INSTDIR\lib\gtk-3.0\${GTK_BIN_VERSION}"
; no longer in gtk as of 2.14.5.
; File /r lib\gtk-2.0\${GTK_BIN_VERSION}\immodules
; gone as of gtk 2.16.6-2.
; File /r lib\gtk-2.0\${GTK_BIN_VERSION}\loaders
; wimp
; SetOutPath "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines"
; File lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libwimp*.dll
; We install this, but other installers may not have it.
; File lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libpixmap*.dll
SetOutPath "$INSTDIR\share\locale"
File share\locale\locale.alias ; from gettext
SetOutPath "$INSTDIR\share\themes\Emacs"
File /r share\themes\Emacs\gtk-3.0
SetOutPath "$INSTDIR\share\themes\Default"
File /r share\themes\Default\gtk-3.0
SetOutPath "$INSTDIR\share\glib-2.0"
File /r share\glib-2.0\schemas
SetOutPath "$INSTDIR\share"
File /r share\icons
SetOutPath "$INSTDIR\gtk3-runtime"
; File gtk-postinstall.bat ; this file is generated now
File license.txt
File gtk.ico ; needed for "add/remove programs"
; this script updates some config files, but it's unsafe
; (gtk or pango may not work afterwards), so don't call it.
; Push $INSTDIR\gtk3-runtime\gtk-postinstall.bat
; Call WritePostInstall
; update pango.modules, not working for now
; Exec '$INSTDIR\gtk2-runtime\gtk-postinstall.bat'
SectionEnd ; end of gtk section
Section "Translations" SecTranslations
SectionIn 2
SetShellVarContext all ; use all user variables as opposed to current user
StrCpy $SEC_TRANSLATIONS_INSTALLED "1"
SetOutPath "$INSTDIR"
SetOverwrite On
; SetOutPath "$INSTDIR\lib"
; File /r lib\locale
; gtk (beginning with 2.12.3) uses share\locale
SetOutPath "$INSTDIR\share"
File /r share\locale
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecGTK} "GTK+ 64-bit Runtime Libraries"
!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} "Additional translations (some are incomplete)"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
; Executed on installer run
Function .onInit
SetShellVarContext all ; use all user variables as opposed to current user
${IfNot} ${RunningX64}
MessageBox MB_OK|MB_ICONEXCLAMATION "This installation requires a 64-bit Windows system" /SD IDOK
Abort
${EndIf}
SetRegView 64
!insertmacro INSTALLOPTIONS_EXTRACT "nsi_pathpage.ini"
StrCpy $SEC_TRANSLATIONS_INSTALLED "0" ; set to 1 in appropriate section
${GetOptions} "$CMDLINE" "/setpath=" $install_option_setpath
${GetOptions} "$CMDLINE" "/dllpath=" $install_option_dllpath
${GetOptions} "$CMDLINE" "/sideeffects=" $install_option_sideeffects
${GetOptions} "$CMDLINE" "/translations=" $install_option_translations
${GetOptions} "$CMDLINE" "/removeold=" $install_option_removeold
; Debug stuff
; MessageBox MB_ICONINFORMATION|MB_OK "/setpath=$install_option_setpath \
; /dllpath=$install_option_dllpath /sideeffects=$install_option_sideeffects \
; INSTDIR: $INSTDIR" /SD IDOK
; if we're using /sideeffects=no, set /setpath=no, because we can't
; revert it during uninstall (there's no dllpath in registry).
StrCmp $install_option_sideeffects "no" "" init_sideeffects
StrCpy $install_option_setpath "no" ; set /setpath=no
goto init_sideeffects_exit
init_sideeffects:
Call PreventMultipleInstances ; in no-sideeffects mode this has no purpose
Call DetectPrevInstallation ; we don't want local installations to interfere with global ones.
init_sideeffects_exit:
; enable translations if requested through command line
StrCmp $install_option_translations "yes" "" no_translations
push $R0
SectionGetFlags ${SecTranslations} $R0
IntOp $R0 $R0 | ${SF_SELECTED}
SectionSetFlags ${SecTranslations} $R0
pop $R0
no_translations:
; Page callbacks are not called if in silent mode, so call these manually
IfSilent "" +3
Call PathPageExit
Call DirectoryPageExit
FunctionEnd
; ------------------ POST INSTALL
var ADD_TO_PATH
Section -post
SetShellVarContext all ; use all user variables as opposed to current user
IfSilent PATH_silent
; Read a value from an InstallOptions INI File
!insertmacro INSTALLOPTIONS_READ $ADD_TO_PATH "nsi_pathpage.ini" "Field 1" "State"
StrCmp $ADD_TO_PATH "1" goto_set_path_yes goto_set_path_no
goto PATH_exit
PATH_silent:
; if silent, use the /setpath= option
StrCmp $install_option_setpath "no" goto_set_path_no goto_set_path_yes
PATH_exit:
goto_set_path_yes:
; The user requested to add the libdir to $PATH.
StrCpy $ADD_TO_PATH "1"
; Push $LIB_INSTDIR
; Call AddToPath ; add $LIB_INSTDIR to system $PATH
Push $0 ; result PATH
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$LIB_INSTDIR" ; Append
Pop $0
; MessageBox MB_ICONINFORMATION|MB_OK "$LIB_INSTDIR added to path"
goto goto_set_path_exit
goto_set_path_no:
StrCpy $ADD_TO_PATH "0"
goto goto_set_path_exit
goto_set_path_exit:
; write out uninstaller
WriteUninstaller "$INSTDIR\gtk3_runtime_uninst.exe"
StrCmp $install_option_sideeffects "no" no_sideeffects
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "DllPath" "$LIB_INSTDIR"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Vendor" "${PRODUCT_PUBLISHER}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "PackageVersion" "${PRODUCT_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "Version" "${GTK_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "BinVersion" "${GTK_BIN_VERSION}"
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "DllDirName" "$DLL_DIR_NAME" ; lib, bin, or ""
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "UsingSystemPath" $ADD_TO_PATH
WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "TranslationsInstalled" $SEC_TRANSLATIONS_INSTALLED
; compat with installer from http://gimp-win.sourceforge.net/
WriteRegStr HKLM "SOFTWARE\GTK\3.0" "Path" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\GTK\3.0" "Version" "${GTK_VERSION}"
; compat with Dropline's GTK
WriteRegStr HKLM "SOFTWARE\GTK\3.0" "DllPath" "$LIB_INSTDIR"
; Information for the uninstall component in "add/remove programs"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\gtk3_runtime_uninst.exe"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\gtk3-runtime\gtk.ico"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoModify" 1
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoRepair" 1
; uninstall shortcut
CreateDirectory "$SMPROGRAMS\GTK3 Runtime 64-bit"
CreateShortCut "$SMPROGRAMS\GTK3 Runtime 64-bit\Uninstall GTK3 Runtime.lnk" "$INSTDIR\gtk3_runtime_uninst.exe" "" ""
WriteIniStr "$SMPROGRAMS\GTK3 Runtime 64-bit\Go to the website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
; Write $INSTDIR\gtk2-runtime\gtk2r-env.bat
; This script sets the GTK environment variables
DetailPrint "Generating $INSTDIR\gtk3-runtime\gtk3r-env.bat"
Push $INSTDIR\gtk3-runtime\gtk3r-env.bat
Call WriteEnvBat
DetailPrint "Done"
no_sideeffects:
SectionEnd ; post
; ---------------- UNINSTALL
; Note: These options are unsupported unless the uninstaller is launched in silent mode (/S).
var uninstall_option_remove_config ; yes, no (default).
var uninstall_option_sideeffects ; yes (default), no. Use if it was installed with this option.
; These are used only if /sideffects=no :
var uninstall_option_dllpath ; uninstall dlls from: bin (default), lib, root.
var uninstall_option_translations ; uninstall translations: yes, no (default)
Function un.onInit
SetRegView 64
${GetOptions} "$CMDLINE" "/remove_config=" $uninstall_option_remove_config
${GetOptions} "$CMDLINE" "/sideeffects=" $uninstall_option_sideeffects
${GetOptions} "$CMDLINE" "/dllpath=" $uninstall_option_dllpath
${GetOptions} "$CMDLINE" "/translations=" $uninstall_option_translations
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
FunctionEnd
var leave_config ; don't remove global gtk config (uninstall page option)
;var INST_DIR_REG ; installation dir from registry (uninstall stage)
; This is a separate function to allow multiple calls to it
Function un.DeleteDlls
SetShellVarContext all ; use all user variables as opposed to current user
StrCpy $LIB_INSTDIR "$INSTDIR"
StrCmp $DLL_DIR_NAME "" un_no_dll_append
StrCpy $LIB_INSTDIR "$INSTDIR\$DLL_DIR_NAME"
un_no_dll_append:
; bin stuff (they are in the same directory)
Delete $LIB_INSTDIR\fc-cache.exe
Delete $LIB_INSTDIR\fc-cat.exe
Delete $LIB_INSTDIR\fc-list.exe
Delete $LIB_INSTDIR\fc-match.exe
Delete $LIB_INSTDIR\fc-pattern.exe
Delete $LIB_INSTDIR\fc-query.exe
Delete $LIB_INSTDIR\fc-scan.exe
Delete $LIB_INSTDIR\fc-validate.exe
Delete $LIB_INSTDIR\gdk-pixbuf-query-loaders.exe
Delete $LIB_INSTDIR\gspawn-win64-helper.exe
Delete $LIB_INSTDIR\gspawn-win64-helper-console.exe
Delete $LIB_INSTDIR\gtk-query-immodules-3.0.exe
Delete $LIB_INSTDIR\gtk-update-icon-cache.exe
; dlls
Delete $LIB_INSTDIR\libatk-1.0-0.dll ; atk
Delete $LIB_INSTDIR\libatkmm-1.6-1.dll ; atk
Delete $LIB_INSTDIR\libcairo-2.dll ; cairo, needed by gtk
Delete $LIB_INSTDIR\libcairo-gobject-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
Delete $LIB_INSTDIR\libcairo-script-interpreter-2.dll ; cairo. Doesn't seem to be required, but since we're distributing cairo...
Delete $LIB_INSTDIR\libcairomm-1.0-1.dll
Delete $LIB_INSTDIR\libepoxy-0.dll
Delete $LIB_INSTDIR\libexslt-0.dll
Delete $LIB_INSTDIR\libffi-6.dll ; libffi is required by glib
Delete $LIB_INSTDIR\libfontconfig-1.dll ; fontconfig is needed for ft2 pango backend
Delete $LIB_INSTDIR\libfreetype-6.dll ; freetype is needed for ft2 pango backend
Delete $LIB_INSTDIR\libgailutil-3-0.dll ; from gtk
Delete $LIB_INSTDIR\libgdk_pixbuf-2.0-0.dll ; from gtk
Delete $LIB_INSTDIR\liblzma-5.dll ; from gtk
Delete $LIB_INSTDIR\libcroco-0.6-3.dll ; from gtk
Delete $LIB_INSTDIR\libgdk-3-0.dll ; from gtk
Delete $LIB_INSTDIR\libgdkmm-3.0-1.dll
Delete $LIB_INSTDIR\libgio-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libglib-2.0-0.dll ; glib
Delete $LIB_INSTDIR\libglibmm-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libgiomm-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libsigc-2.0-0.dll ; glib
Delete $LIB_INSTDIR\libglibmm_generate_extra_defs-2.4-1.dll ; glib
Delete $LIB_INSTDIR\libgmodule-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgobject-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgthread-2.0-0.dll ; from glib
Delete $LIB_INSTDIR\libgtk-3-0.dll ; gtk
Delete $LIB_INSTDIR\libgtksourceview-3.0-1.dll ; gtk
Delete $LIB_INSTDIR\libgtksourceviewmm-3.0-0.dll ; gtk
Delete $LIB_INSTDIR\libgtkmm-3.0-1.dll
Delete $LIB_INSTDIR\libharfbuzz-0.dll
Delete $LIB_INSTDIR\libintl-8.dll ; gettext, needed by all i18n libs
Delete $LIB_INSTDIR\libiconv-2.dll
Delete $LIB_INSTDIR\libjson-glib-1.0-0.dll
Delete $LIB_INSTDIR\libpango-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangocairo-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangowin32-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangoft2-1.0-0.dll ; pango, needed by gtk
Delete $LIB_INSTDIR\libpangomm-1.4-1.dll
Delete $LIB_INSTDIR\libpixman-1-0.dll ; libpixman, needed by cairo
Delete $LIB_INSTDIR\libpng16-16.dll ; for gdk_pixbuf loader.
Delete $LIB_INSTDIR\libxslt-1.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libpcre-1.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxml2-2.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxml++-2.6-2.dll ; fontconfig needs this
Delete $LIB_INSTDIR\libxml++-3.0-1.dll
Delete $LIB_INSTDIR\zlib1.dll ; png and many others need this
Delete $LIB_INSTDIR\libexpat-1.dll
Delete $LIB_INSTDIR\libbz2-1.dll
Delete $LIB_INSTDIR\libgraphite2.dll
Delete $LIB_INSTDIR\librsvg-2-2.dll
Delete $LIB_INSTDIR\libtiff-5.dll
Delete $LIB_INSTDIR\libstdc++-6.dll
Delete $LIB_INSTDIR\libgcc_s_seh-1.dll
Delete $LIB_INSTDIR\libwinpthread-1.dll
FunctionEnd
var found_dir
var find_handle_lang_dir
Section Uninstall
SetShellVarContext all ; use all user variables as opposed to current user
SetAutoClose false
; Note: Checking if there is a registry key present, and using it to determine
; if this is a private installation will not work, as it will break if a parallel
; shared installation is present.
; ReadRegStr $INST_DIR_REG HKLM "SOFTWARE\${PRODUCT_NAME}" "InstallationDirectory"
; StrCmp $INST_DIR_REG "" uninst_no_sideeffects
StrCmp $uninstall_option_sideeffects "no" uninst_no_sideeffects
; For PATH removal
ReadRegStr $LIB_INSTDIR HKLM "SOFTWARE\${PRODUCT_NAME}" "DllPath"
ReadRegStr $DLL_DIR_NAME HKLM "SOFTWARE\${PRODUCT_NAME}" "DllDirName"
ReadRegStr $ADD_TO_PATH HKLM "SOFTWARE\${PRODUCT_NAME}" "UsingSystemPath"
ReadRegStr $SEC_TRANSLATIONS_INSTALLED HKLM "SOFTWARE\${PRODUCT_NAME}" "TranslationsInstalled"
DeleteRegKey HKLM "SOFTWARE\GTK\3.0" ; dropline, etc...
DeleteRegKey /ifempty HKLM "SOFTWARE\GTK" ; don't damage other installations
DeleteRegKey HKLM "SOFTWARE\${PRODUCT_NAME}"
DeleteRegKey HKLM "${PRODUCT_UNINST_KEY}"
; FIXME: Do we have this registry key?
; DeleteRegKey HKCU "Software\${PRODUCT_NAME}"
Delete "$SMPROGRAMS\GTK3 Runtime 64-bit\Uninstall GTK3 Runtime.lnk"
Delete "$SMPROGRAMS\GTK3 Runtime 64-bit\Go to the website.url"
RMDir "$SMPROGRAMS\GTK3 Runtime 64-bit" ; only if empty, theme selector may still be there
; Remove GTK from $PATH
StrCmp $ADD_TO_PATH "0" un_nopath ; Setting $PATH was not requested during installation
; Push $LIB_INSTDIR
; Call un.RemoveFromPath
Push $0 ; result PATH
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$LIB_INSTDIR" ; remove
Pop $0
; MessageBox MB_OK "$LIB_INSTDIR removed from PATH" /SD IDOK
un_nopath:
; $DLL_DIR_NAME is from the registry here
Call un.DeleteDlls
goto delete_dlls_exit
uninst_no_sideeffects:
Strcpy $SEC_TRANSLATIONS_INSTALLED "0"
StrCmp $uninstall_option_translations "yes" "" nodelete_translations
Strcpy $SEC_TRANSLATIONS_INSTALLED "1"
nodelete_translations:
; All dll files. We delete them before /bin and /lib, so that
; the directories are empty afterwards.
; Since we have no registry, we have to remove dlls from all possible locations
; StrCpy $DLL_DIR_NAME ""
; Call un.DeleteDlls
; StrCpy $DLL_DIR_NAME "bin"
; Call un.DeleteDlls
; StrCpy $DLL_DIR_NAME "lib"
; Call un.DeleteDlls
; Force users to use the command-line argument instead:
; if silent, use the /dllpath= option
StrCmp $uninstall_option_dllpath "bin" goto_undll_bin
StrCmp $uninstall_option_dllpath "lib" goto_undll_lib
StrCmp $uninstall_option_dllpath "root" goto_undll_none goto_undll_bin ; default to bin if not matched
goto_undll_none:
StrCpy $DLL_DIR_NAME ""
goto goto_undll_exit
goto_undll_lib:
StrCpy $DLL_DIR_NAME "lib"
goto goto_undll_exit
goto_undll_bin:
StrCpy $DLL_DIR_NAME "bin"
goto goto_undll_exit
goto_undll_exit:
Call un.DeleteDlls
delete_dlls_exit:
; Delete config file?
IfSilent "" read_config_page
StrCmp $uninstall_option_remove_config "yes" delete_config skip_config
read_config_page:
!insertmacro INSTALLOPTIONS_READ $leave_config "nsi_configpage.ini" "Field 1" "State"
StrCmp $leave_config "1" skip_config
delete_config:
;Delete "$INSTDIR\etc\gtk-2.0\gtkrc"
skip_config:
;Delete "$INSTDIR\etc\fonts\fonts.conf"
;RMDir "$INSTDIR\etc\fonts" ; only if empty
;Delete "$INSTDIR\etc\pango\pango.modules"
;RMDir "$INSTDIR\etc\pango" ; only if empty
; Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders"
;Delete "$INSTDIR\etc\gtk-2.0\gtk.immodules"
;Delete "$INSTDIR\etc\gtk-2.0\gtkrc.default"
Delete "$INSTDIR\etc\gtk-3.0\im-multipress.conf"
Delete "$INSTDIR\etc\gtk-3.0\settings.ini"
RMDir "$INSTDIR\etc\gtk-3.0" ; only if empty
RMDir "$INSTDIR\etc" ; only if empty
; some helper files here
RMDir /r "$INSTDIR\gtk3-runtime"
RMDir "$INSTDIR\bin" ; only if empty
; RMDir /r "$INSTDIR\lib"
; pango modules are gone as of gtk 2.10
; RMDir /r "$INSTDIR\lib\pango"
Delete "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache"
RMDir /r "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders" ; not forced
RMDir "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0" ; not forced
RMDir "$INSTDIR\lib\gdk-pixbuf-2.0" ; not forced
;RMDir /r "$INSTDIR\lib\gtk-2.0\modules"
; no longer in gtk as of 2.14.5
;RMDir /r "$INSTDIR\lib\gtk-3.0\${GTK_BIN_VERSION}\immodules"
; gone as of gtk 2.16.6-2
;RMDir /r "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\loaders"
;Delete "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libwimp*.dll"
; there should be no problem deleting this
;Delete "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines\libpixmap*.dll"
;RMDir "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}\engines" ; not forced
;RMDir "$INSTDIR\lib\gtk-2.0\${GTK_BIN_VERSION}" ; not forced
;RMDir "$INSTDIR\lib\gtk-2.0" ; not forced
RMDir "$INSTDIR\lib" ; not forced
Delete "$INSTDIR\share\locale\locale.alias" ; gettext
; Remove our translations only
StrCmp $SEC_TRANSLATIONS_INSTALLED "1" "" un_notranslations
FindFirst $find_handle_lang_dir $found_dir "$INSTDIR\share\locale\*"
find_lang_dir_next:
; DetailPrint "LOC: $found_dir"
StrCmp $found_dir "" find_lang_dir_done
; check if it's a directory
IfFileExists "$INSTDIR\share\locale\$found_dir\*.*" "" find_lang_dir_continue
IfFileExists "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\*.*" "" find_lang_dir_continue
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\atk10.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gdk-pixbuf.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\glib20.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk20.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk20-properties.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk30.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gtk30-properties.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\json-glib-1.0.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gettext-runtime.mo"
Delete "$INSTDIR\share\locale\$found_dir\LC_MESSAGES\gettext-tools.mo"
RmDir "$INSTDIR\share\locale\$found_dir\LC_MESSAGES" ; only if empty
RmDir "$INSTDIR\share\locale\$found_dir"
find_lang_dir_continue:
FindNext $find_handle_lang_dir $found_dir
goto find_lang_dir_next
find_lang_dir_done:
FindClose $find_handle_lang_dir
un_notranslations:
RMDir "$INSTDIR\share\locale" ; only if empty, not to remove the other programs' translations
RMDir /r "$INSTDIR\share\themes\Default"
RMDir /r "$INSTDIR\share\themes\Emacs"
RMDir /r "$INSTDIR\share\glib-2.0"
RMDir /r "$INSTDIR\share\icons"
RMDir "$INSTDIR\share\themes" ; not forced
RMDir "$INSTDIR\share" ; not forced
Delete "$INSTDIR\gtk3_runtime_uninst.exe"
RMDir "$INSTDIR" ; delete only if empty
SectionEnd ; end of uninstall section
; --------------- Helpers
; WriteEnvBat
Function WriteEnvBat
Pop $R0 ; Output file
Push $R9
FileOpen $R9 $R0 w
FileWrite $R9 "@set GTK3R_PREFIX=$LIB_INSTDIR$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo Setting environment variables for GTK3-Runtime.$\r$\n"
FileWrite $R9 "@echo.$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo set PATH=%GTK3R_PREFIX%;%%PATH%%$\r$\n"
FileWrite $R9 "@set PATH=%GTK3R_PREFIX%;%PATH%$\r$\n"
FileWrite $R9 "$\r$\n"
FileWrite $R9 "@echo.$\r$\n"
FileClose $R9
Pop $R9
FunctionEnd
; WritePostInstall
Function WritePostInstall
SetShellVarContext all ; use all user variables as opposed to current user
Pop $R0 ; Output file
Push $R9
FileOpen $R9 $R0 w
FileWrite $R9 "@echo off$\r$\n"
FileWrite $R9 "rem $\"$INSTDIR\bin\gdk-pixbuf-query-loaders.exe$\" > $\"$INSTDIR\etc\gtk-3.0\gdk-pixbuf.loaders$\"$\r$\n"
FileWrite $R9 "$\"$INSTDIR\bin\gtk-query-immodules-3.0.exe$\" > $\"$INSTDIR\etc\gtk-3.0\gtk.immodules$\"$\r$\n"
FileWrite $R9 "rem $\"$INSTDIR\bin\gtk-update-icon-cache.exe$\"$\r$\n"
FileClose $R9
Pop $R9
FunctionEnd
; Detect previous installation
Function DetectPrevInstallation
; if /removeold=no option is given, don't check anything.
StrCmp $install_option_removeold "no" old_detect_done
SetShellVarContext all ; use all user variables as opposed to current user
push $R0
; detect previous installation
ReadRegStr $R0 HKLM "${PRODUCT_UNINST_KEY}" "UninstallString"
StrCmp $R0 "" old_detect_done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to continue anyway." \
/SD IDOK IDOK old_uninst
; Abort
goto old_detect_done
; Run the old uninstaller
old_uninst:
ClearErrors
IfSilent old_silent_uninst old_nosilent_uninst
old_nosilent_uninst:
ExecWait '$R0'
goto old_uninst_continue
old_silent_uninst:
; We assume it's an NSIS-generated uninstaller.
ExecWait '$R0 /S _?=$INSTDIR'
old_uninst_continue:
IfErrors old_no_remove_uninstaller
; You can either use Delete /REBOOTOK in the uninstaller or add some code
; here to remove to remove the uninstaller. Use a registry key to check
; whether the user has chosen to uninstall. If you are using an uninstaller
; components page, make sure all sections are uninstalled.
old_no_remove_uninstaller:
old_detect_done: ; old installation not found, all ok
pop $R0
FunctionEnd
; Prevent running multiple instances of the installer
Function PreventMultipleInstances
Push $R0
System::Call 'kernel32::CreateMutexA(i 0, i 0, t ${PRODUCT_NAME}) ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK
Abort
Pop $R0
FunctionEnd
; eof

View File

@ -0,0 +1,100 @@
# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.36.4
#
# LoaderDir = C:\msys64\mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders
#
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-ani.dll"
"ani" 4 "gdk-pixbuf" "Windows animated cursor" "LGPL"
"application/x-navi-animation" ""
"ani" ""
"RIFF ACON" " xxxx " 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-bmp.dll"
"bmp" 5 "gdk-pixbuf" "BMP" "LGPL"
"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
"bmp" ""
"BM" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-gif.dll"
"gif" 4 "gdk-pixbuf" "GIF" "LGPL"
"image/gif" ""
"gif" ""
"GIF8" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-icns.dll"
"icns" 4 "gdk-pixbuf" "MacOS X icon" "GPL"
"image/x-icns" ""
"icns" ""
"icns" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-ico.dll"
"ico" 5 "gdk-pixbuf" "Windows icon" "LGPL"
"image/x-icon" "image/x-ico" "image/x-win-bitmap" "image/vnd.microsoft.icon" "application/ico" "image/ico" "image/icon" "text/ico" ""
"ico" "cur" ""
" \001 " "zz znz" 100
" \002 " "zz znz" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-jpeg.dll"
"jpeg" 5 "gdk-pixbuf" "JPEG" "LGPL"
"image/jpeg" ""
"jpeg" "jpe" "jpg" ""
"\377\330" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-pnm.dll"
"pnm" 4 "gdk-pixbuf" "PNM/PBM/PGM/PPM" "LGPL"
"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" ""
"pnm" "pbm" "pgm" "ppm" ""
"P1" "" 100
"P2" "" 100
"P3" "" 100
"P4" "" 100
"P5" "" 100
"P6" "" 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-qtif.dll"
"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL"
"image/x-quicktime" "image/qtif" ""
"qtif" "qif" ""
"abcdidsc" "xxxx " 100
"abcdidat" "xxxx " 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-svg.dll"
"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
"svg" "svgz" "svg.gz" ""
" <svg" "* " 100
" <!DOCTYPE svg" "* " 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-tga.dll"
"tga" 4 "gdk-pixbuf" "Targa" "LGPL"
"image/x-tga" ""
"tga" "targa" ""
" \001\001" "x " 100
" \001\t" "x " 100
" \002" "xz " 99
" \003" "xz " 100
" \n" "xz " 100
" \v" "xz " 100
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-tiff.dll"
"tiff" 5 "gdk-pixbuf" "TIFF" "LGPL"
"image/tiff" ""
"tiff" "tif" ""
"MM *" " z " 100
"II* " " z" 100
"II* \020 CR\002 " " z zzz z" 0
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-xbm.dll"
"xbm" 4 "gdk-pixbuf" "XBM" "LGPL"
"image/x-xbitmap" ""
"xbm" ""
"#define " "" 100
"/*" "" 50
"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-xpm.dll"
"xpm" 4 "gdk-pixbuf" "XPM" "LGPL"
"image/x-xpixmap" ""
"xpm" ""
"/* XPM */" "" 100

Some files were not shown because too many files have changed in this diff Show More