<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://rawpedia.rawtherapee.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gaaned92</id>
	<title>RawPedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://rawpedia.rawtherapee.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gaaned92"/>
	<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/Special:Contributions/Gaaned92"/>
	<updated>2026-04-19T02:56:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows/fr&amp;diff=7907</id>
		<title>Windows/fr</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows/fr&amp;diff=7907"/>
		<updated>2021-02-04T14:34:10Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cette page détaille les instructions pour la compilation de RawTherapee sur les systèmes &amp;quot;Windows&amp;quot;.  Il y a aussi des pages séparées avec des instructions pour la compilation sur [[Linux]] et [[macOS]]. Ce guide détaille le &amp;quot;quoi&amp;quot; et le &amp;quot;comment&amp;quot; de la compilation. Concernant le &amp;quot;pourquoi&amp;quot; et les explications des commandes, pour obtenir la liste des dépendances, pour les options de CMake et d'autres informations, veuillez vous référer à l'article détaillé pour [[Linux]].&lt;br /&gt;
&lt;br /&gt;
Concernant les instructions sur le clonage de la source, le choix de la branche, la configuration de CMake et la réalisation de la compilation à proprement parler, voir ces instructions dans le guide [[Linux]]. Les informations ci-dessous sont un complément à cela.&lt;br /&gt;
&lt;br /&gt;
RawTherapee exige GTK+ 3.22.24 ou plus récent car c'est la [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 première version à supporter les fenêtres natives], sans quoi la fenêtre de RawTherapee pourrait présenter [https://github.com/Beep6581/RawTherapee/issues/4125 un étrange comportement] comme de s'agrandir sous la barre des tâches dans Windows 10.&lt;br /&gt;
&lt;br /&gt;
La dernière version de RawTherapee à supporter GTK2 et compatible avec Windows XP est 5.0-r1-gtk2 éditée le 02-02.2017.&lt;br /&gt;
&lt;br /&gt;
== Installation de MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
=== Installation du système MSYS2 de base ===&lt;br /&gt;
&lt;br /&gt;
Commencez par installer et mettre à jour MSYS2 en suivant soigneusement les instructions du [https://msys2.github.io/ MSYS2 site web].&lt;br /&gt;
&lt;br /&gt;
Mettre à jour le système MSYS2 de base jusqu'à ce que plus aucune mise à jour ne soit disponible en utilisant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A la fin de l'installation, vous obtenez trois shells :&lt;br /&gt;
*MSYS2 shell : utilisé pour développer le cœur du système et gérer l'application MSYS2 (principalement la mise à jour des paquetages MSYS2)&lt;br /&gt;
&lt;br /&gt;
* MINGW64 shell : Il fournit l'environnement pour compiler les applications 64 bits.&lt;br /&gt;
&lt;br /&gt;
* MINGW32 shell : Il fournit l'environnement pour compiler les applications 32 bits.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note : dans le texte qui suit, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; désigne le répertoire d'installation de MSYS2.&lt;br /&gt;
 &lt;br /&gt;
=== Installation des outils et des bibliothèques ===&lt;br /&gt;
&lt;br /&gt;
Le gestionnaire de paquetages de MSYS2 est pacman. Vous pouvez vous référer au [https://wiki.archlinux.org/index.php/pacman manuel de pacman] pour plus de détails.&lt;br /&gt;
&lt;br /&gt;
Dans le shell MSYS2 :&lt;br /&gt;
&lt;br /&gt;
Premièrement, installer quelques outils divers :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Puis installer les outils de développement nécessaires :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
et les bibliothèques requises :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtenir les versions applicables des paquetages ===&lt;br /&gt;
&lt;br /&gt;
Ce paragraphe doit être ignoré pour l'instant.&lt;br /&gt;
Comme MSYS2 fournit des rolling releases de ses paquetages, il peut arriver que de nouvelles versions de certains paquetages soient incompatibles avec la version présente de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Voici une liste de tous les paquetages qui doivent rétrograder de version :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Liste vide&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
S'ils ne sont pas présents dans &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, ces fichiers peuvent être téléchargés à &lt;br /&gt;
http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Puis, dans le shell MSYS2, pour chaque fichier :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ajouter ce qui suit au fichier &amp;lt;MSYS2&amp;gt;\etc\pacman.conf pour empêcher pacman de mettre les paquetages à jour.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Pacman ne mettra pas à jour les paquetages listés dans IgnorePkg et membres du IgnoreGroup&lt;br /&gt;
&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-&amp;lt;paquetageAIgnorer&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si des paquetages sont interdépendants vous devez les installer avec la même commande:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package1&amp;gt; &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package2&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pour compiler des applications 32 bits, faites ce qui suit en remplaçant '''x86_64''' par '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Mise à jour du système de base MSYS2 et des paquetages applicatifs ===&lt;br /&gt;
&lt;br /&gt;
Dans le shell MSYS2 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mise à jour de la base de données Lensfun ===&lt;br /&gt;
&lt;br /&gt;
Dans le shell Mingw32 ou Mingw64 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Télécharger et compiler libiptcdata ==&lt;br /&gt;
&lt;br /&gt;
Utiliser soit &amp;quot;''MinGW32 Shell''&amp;quot; pour compiler une version 32 bits, ou &amp;quot;''MinGW64 Shell''&amp;quot; pour compiler une version 64 bits.&lt;br /&gt;
&lt;br /&gt;
La bibliothèque libiptcdata n'est pas fournie par MSYS2, cependant, elle est téléchargeable et configurable en utilisant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rester dans le même répertoire&lt;br /&gt;
Le &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; situé dans ce répertoire doit être ouvert avec un éditeur de texte pour retirer &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt;  et &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; des listes nommées &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, sinon, la compilation ou l'installation échouera.&lt;br /&gt;
Vous pouvez utiliser n'importe quel éditeur de texte, par exemple Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#edition avec nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# Rechercher (commande ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# et remplacer par&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# Rechercher&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# et remplacer par&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# Enregistrer&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# Quitter&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enfin, compiler et installer la bibliothèque :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloner et compiler RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Utiliser soit &amp;quot;'''MinGW32 Shell'''&amp;quot; pour compiler une version 32 bits, ou &amp;quot;'''MinGW64 Shell'''&amp;quot; pour compiler une version 64 bits. &lt;br /&gt;
&lt;br /&gt;
=== Cloner le dépôt Git de RawTherapee ===&lt;br /&gt;
&lt;br /&gt;
Le processus de compilation va échouer s'il existe un espace dans le chemin de votre répertoire &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt;. Par exemple si votre nom d'utilisateur sous Windows est &amp;quot;Zank Frappa&amp;quot; alors le nom du chemin sera &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; et si vous clonez RawTherapee dedans alors la compilation échouera. Clonez dans un répertoire dont ni lui-même ni ses répertoires parents n'ont d'espace dans leur nom, par exemple &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lors du clonage du dépôt, vous allez automatiquement vous retrouver dans la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt;. Pour basculer manuellement dans la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt;, faites ceci :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Créer une répertoire séparé pour la compilation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notez que si vous changez de branche, alors vous devez effacer et re-créer le répertoire &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; afin que la compilation parte depuis le début dans un répertoire vide, sinon la compilation risque d'échouer. Cependant si vous faites une simple mise à jour sans changer de branche, alors vous n'avez pas besoin de démarrer dans un répertoire build vide, vous pouvez utiliser celui qui existe et la compilation sera plus rapide car tout n'a pas besoin d'être re-compilé.&lt;br /&gt;
&lt;br /&gt;
=== Exécuter CMake et Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
L' option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; va générer une compilation optimisée pour votre l'architecture de votre PC (c'est à dire -march=native)&lt;br /&gt;
&lt;br /&gt;
Vous pouvez trouver des explications au sujet de différentes options de CMake dans la [[Linux/fr#CMake|page Linux]], y compris une explication des diverses options de &amp;quot;BUILD_TYPE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Si vous réalisez une compilation pour Windows 32 bits et utilisez le &amp;quot;BUILD_TYPE&amp;quot; &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; ou &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt;, vous aurez besoin d'ajouter le drapeau de compilation &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; avant les deux derniers points &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; de la commande CMake ci-dessus :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Démarrer RawTherapee ===&lt;br /&gt;
RawTherapee peut maintenant être démarré depuis la ligne de commande de MINGW64 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# pour les compilations debug&lt;br /&gt;
$ cd debug&lt;br /&gt;
# pour les compilations release&lt;br /&gt;
$ cd release&lt;br /&gt;
# pour les compilations relwithdebinfo&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copier RawTherapee et les DLL requises ==&lt;br /&gt;
&lt;br /&gt;
Vous pouvez réaliser les copies soit avec le gestionnaire de fichiers de Windows ou, plus recommandé, avec [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] à l'intérieur du script shell &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; en utilisant pour les options &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; à la place de &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Définition des répertoires :&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; est &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; est le dossier d'installation de MSYS2,&lt;br /&gt;
*et &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; est le dossier d'installation de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Copier le contenu de &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; dans &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copier les DLL et exe nécessaires de &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; dans &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Voici une liste des DLL et exe requis :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
lilibfribidi-0.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (ou libgcc_s_dw2-1.dll pour W32) &lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copier la liste suivante des fichiers et rèpertoires du thème Adwaita doivent être copiés de  &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; vers &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copier les fichiers suivants :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dans .\share\gtk-3.0 créer un fichier &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt;  contenant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Création d'un paquetage distribuable ==&lt;br /&gt;
&lt;br /&gt;
Si vous avez l'intention de distribuer des paquetages de RawTherapee pour la plateforme Windows, vous devez tout d'abord vous assurer que RawTherapee sera compilé avec pour cible le processeur &amp;quot;générique&amp;quot;. Pour cela, indiquer &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; dans la commande CMake.&lt;br /&gt;
&lt;br /&gt;
Pendant la compilation, un script nommé &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; est créé dans le répertoire d'installation de RawTherapee. Ce script est utilisé par Inno Setup [http://www.jrsoftware.org/isinfo.php], un programme qui est utilisé pour générer des installateurs pour les programmes Windows. Il est conseillé de télécharger la version Unicode [http://www.jrsoftware.org/download.php/is-unicode.exe] pour éviter les problèmes avec certaines langues.&lt;br /&gt;
&lt;br /&gt;
Pour aider les utilisateurs [[How_to_write_useful_bug_reports/fr| à écrire de bons rapports de bogues]], les mainteneurs de paquetages sont encouragés à produire des compilations qui contiennent à la fois un exécutable &amp;quot;release&amp;quot; et un &amp;quot;debug&amp;quot;, et de les rassembler avec l'exécutable GDB debugger. &lt;br /&gt;
&lt;br /&gt;
En d'autres termes, mettre ensemble le fichier &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release), le fichier &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) et le fichier &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; dans le même installeur ou la même archive. Une autre méthode est de réaliser des compilations &amp;quot;relwithdebinfo&amp;quot;, elles sont beaucoup plus rapides que &amp;quot;debug&amp;quot;, mais pas autant optimisées que &amp;quot;release&amp;quot;, et fournissent a peu près autant d'informations utiles que &amp;quot;debug&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Lors de la réalisation de compilations &amp;quot;relwithdebinfo&amp;quot; ou &amp;quot;debug&amp;quot;, vous devez fournir l'exécutable du debugger GDB. Les binaires Windows du debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; peuvent être téléchargés depuis [http://www.equation.com/servlet/equation.cmd?fa=gdb ici] dans les versions 32 et 64 bits et seront copiés dans le répertoire d'installation de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Maintenant que tout est en place, pour créer le paquetage cliquer droit sur le script &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; et choisir &lt;br /&gt;
''Compile'' dans le menu contextuel. Il va générer l'installeur automatiquement et le placer dans le répertoireparent.&lt;br /&gt;
&lt;br /&gt;
Pour rendre votre paquetage compatible avec le panneau de télévezrsement du site web de RawTherapee, créer une archive zip dans laquelle vous placerez ensemble l'installeur nouvellement créé et les  fichiers ''AboutThisBuild.txt'' correspondants qui se trouvent à le même place. Nommer l'archive zip résultante selon ce modèle :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si vous compilez et distribuez des &amp;quot;nightly builds&amp;quot; (compilations de dernière minute), suivez ce modéle :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot; signifie qu'il peut s'exécuter sur toute version de Windows depuis Vista et après, y compris 10.&lt;br /&gt;
&lt;br /&gt;
* la &amp;quot;version&amp;quot; ressemblera soit à &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; si vous utilisez la balise &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt;, ou à &amp;lt;code&amp;gt;5.2-dev-g1a2b3c4d&amp;lt;/code&amp;gt; si vous utilisez la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; après avoir balisé 5.2.&lt;br /&gt;
&lt;br /&gt;
* Si vous fournissez plus d'un type de compilation dans l'installeur, ne pas inclure &amp;lt;buildtype&amp;gt; dans le nom.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=7906</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=7906"/>
		<updated>2021-02-04T14:33:10Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Downgrading to applicable versions of packages ===&lt;br /&gt;
&lt;br /&gt;
this paragraph is to be ignored  at the moment.&lt;br /&gt;
&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible either with present build process or contain some bugs.&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The list is empty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = &amp;lt;packageToIgnore&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If some packages are interdependant, you have to downgrade them on the same command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package1&amp;gt; &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package2&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to build 32bits applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Starting RawTherapee ===&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Option: Pre-load a script to populate the CMake cache ===&lt;br /&gt;
As described in the [https://cmake.org/cmake/help/v3.7/manual/cmake.1.html CMake manual]&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-C &amp;lt;initial-cache&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Pre-load a script to populate the cache.&lt;br /&gt;
&lt;br /&gt;
    When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a file from which to load cache entries before the first pass through the project’s cmake listfiles. The loaded entries take priority over the project’s default values. The given file should be a CMake script containing SET commands that use the CACHE option, not a cache-format file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To simplify the invocation of CMake and be able to easily define Windows specific options, a &amp;lt;code&amp;gt;win.cmake&amp;lt;/code&amp;gt; template script is provided with the sources.&lt;br /&gt;
Copy it out of RawTherapee source to avoid overwriting by update for instance in &amp;lt;code&amp;gt;mywin.cmake&amp;lt;/code&amp;gt;.&lt;br /&gt;
Edit it to define or modify options.&lt;br /&gt;
To preload the cache, in the CMake command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; -C &amp;lt;path/to/mywin.cmake&amp;gt; ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Making a bundled build ==&lt;br /&gt;
&lt;br /&gt;
It is applicable if you want to run RawTherapee outside the MINGW shell or distribute it.&lt;br /&gt;
&lt;br /&gt;
''You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
''&lt;br /&gt;
=== Definition of folders ===&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Copy RawTherapee executable and generated files ===&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Copy the  dependencies ===&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=7537</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=7537"/>
		<updated>2020-11-17T22:43:13Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: update of downgrading applicable packages and lensfun update.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Downgrading to applicable versions of packages ===&lt;br /&gt;
&lt;br /&gt;
this paragraph is to be ignored  at the moment.&lt;br /&gt;
&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible either with present build process or contain some bugs.&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The list is empty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = &amp;lt;packageToIgnore&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If some packages are interdependant, you have to downgrade them on the same command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package1&amp;gt; &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package2&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Starting RawTherapee ===&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Option: Pre-load a script to populate the CMake cache ===&lt;br /&gt;
As described in the [https://cmake.org/cmake/help/v3.7/manual/cmake.1.html CMake manual]&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-C &amp;lt;initial-cache&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Pre-load a script to populate the cache.&lt;br /&gt;
&lt;br /&gt;
    When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a file from which to load cache entries before the first pass through the project’s cmake listfiles. The loaded entries take priority over the project’s default values. The given file should be a CMake script containing SET commands that use the CACHE option, not a cache-format file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To simplify the invocation of CMake and be able to easily define Windows specific options, a &amp;lt;code&amp;gt;win.cmake&amp;lt;/code&amp;gt; template script is provided with the sources.&lt;br /&gt;
Copy it out of RawTherapee source to avoid overwriting by update for instance in &amp;lt;code&amp;gt;mywin.cmake&amp;lt;/code&amp;gt;.&lt;br /&gt;
Edit it to define or modify options.&lt;br /&gt;
To preload the cache, in the CMake command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; -C &amp;lt;path/to/mywin.cmake&amp;gt; ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Making a bundled build ==&lt;br /&gt;
&lt;br /&gt;
It is applicable if you want to run RawTherapee outside the MINGW shell or distribute it.&lt;br /&gt;
&lt;br /&gt;
''You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
''&lt;br /&gt;
=== Definition of folders ===&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Copy RawTherapee executable and generated files ===&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Copy the  dependencies ===&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6815</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6815"/>
		<updated>2020-05-30T16:05:45Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Downgrading to applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible either with present build process or contain some bugs.&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If some packages are interdependant, you have to downgrade them on the same command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package1&amp;gt; &amp;lt;path-to&amp;gt;/&amp;lt;mingw-w64-x86_64-package2&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Pre-load a script to populate the CMake cache ===&lt;br /&gt;
As described in the [https://cmake.org/cmake/help/v3.7/manual/cmake.1.html CMake manual]&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-C &amp;lt;initial-cache&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Pre-load a script to populate the cache.&lt;br /&gt;
&lt;br /&gt;
    When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a file from which to load cache entries before the first pass through the project’s cmake listfiles. The loaded entries take priority over the project’s default values. The given file should be a CMake script containing SET commands that use the CACHE option, not a cache-format file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To simplify the invocation of CMake and be able to easily define Windows specific options, a &amp;lt;code&amp;gt;win.cmake&amp;lt;/code&amp;gt; template script is provided with the sources.&lt;br /&gt;
Copy it out of RawTherapee source to avoid overwriting by update. Edit it to define or modify options.&lt;br /&gt;
To preload the cache, in the CMake command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; -C &amp;lt;path/to/preloadscript&amp;gt; ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6656</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6656"/>
		<updated>2020-05-20T07:21:54Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: Add Pre-load a script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Pre-load a script to populate the CMake cache ===&lt;br /&gt;
As described in the [https://cmake.org/cmake/help/v3.7/manual/cmake.1.html CMake manual]&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-C &amp;lt;initial-cache&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Pre-load a script to populate the cache.&lt;br /&gt;
&lt;br /&gt;
    When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates it with customizable settings for the project. This option may be used to specify a file from which to load cache entries before the first pass through the project’s cmake listfiles. The loaded entries take priority over the project’s default values. The given file should be a CMake script containing SET commands that use the CACHE option, not a cache-format file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To simplify the invocation of CMake and be able to easily define Windows specific options, a &amp;lt;code&amp;gt;win.cmake&amp;lt;/code&amp;gt; template script is provided with the sources.&lt;br /&gt;
Copy it out of RawTherapee source to avoid overwriting by update. Edit it to define or modify options.&lt;br /&gt;
To preload the cache, in the CMake command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; -C &amp;lt;path/to/preloadscript&amp;gt; ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows/fr&amp;diff=6620</id>
		<title>Windows/fr</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows/fr&amp;diff=6620"/>
		<updated>2020-05-04T20:34:25Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: gdbus.exe ajouté&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cette page détaille les instructions pour la compilation de RawTherapee sur les systèmes &amp;quot;Windows&amp;quot;.  Il y a aussi des pages séparées avec des instructions pour la compilation sur [[Linux]] et [[macOS]]. Ce guide détaille le &amp;quot;quoi&amp;quot; et le &amp;quot;comment&amp;quot; de la compilation. Concernant le &amp;quot;pourquoi&amp;quot; et les explications des commandes, pour obtenir la liste des dépendances, pour les options de CMake et d'autres informations, veuillez vous référer à l'article détaillé pour [[Linux]].&lt;br /&gt;
&lt;br /&gt;
Concernant les instructions sur le clonage de la source, le chopix de la branche, la configuration de CMake et la réalisation de la compilation à proprement parler, voir ces instructions dans le guide [[Linux]]. Les informations ci-dessous sont un complément à cela.&lt;br /&gt;
&lt;br /&gt;
RawTherapee exige GTK+ 3.22.24 ou plus récent car c'est la [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 première version à supporter les fenêtres natives], sans quoi la fenêtre de RawTherapee pourrait présenter [https://github.com/Beep6581/RawTherapee/issues/4125 un étrange comportement] comme de s'agrandir sous la barre des tâches dans Windows 10.&lt;br /&gt;
&lt;br /&gt;
La dernière version de RawTherapee à supporter GTK2 et compatible avec Windows XP est 5.0-r1-gtk2 éditée le 02-02.2017.&lt;br /&gt;
&lt;br /&gt;
== Installation de MSYS2 ==&lt;br /&gt;
&lt;br /&gt;
=== Installation du système MSYS2 de base ===&lt;br /&gt;
&lt;br /&gt;
Commencez par installer et mettre à jour MSYS2 en suivant soigneusement les instructions du [https://msys2.github.io/ MSYS2 site web].&lt;br /&gt;
&lt;br /&gt;
Mettre à jour le système MSYS2 de base jusqu'à ce que plus aucune mise à jour ne soit disponible en utilisant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A la fin de l'installation, vous obtenez trois shells :&lt;br /&gt;
*MSYS2 shell : utilisé pour développer le cœur du système et gérer l'application MSYS2 (principalement la mise à jour des paquetages MSYS2)&lt;br /&gt;
&lt;br /&gt;
* MINGW64 shell : Il fournit l'environnement pour compiler les applications 64 bits.&lt;br /&gt;
&lt;br /&gt;
* MINGW32 shell : Il fournit l'environnement pour compiler les applications 32 bits.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note : dans le texte qui suit, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; désigne le répertoire d'installation de MSYS2.&lt;br /&gt;
 &lt;br /&gt;
=== Installation des outils et des bibliothèques ===&lt;br /&gt;
&lt;br /&gt;
Le gestionnaire de paquetages de MSYS2 est pacman. Vous pouvez vous référer au [https://wiki.archlinux.org/index.php/pacman manuel de pacman] pour plus de détails.&lt;br /&gt;
&lt;br /&gt;
Dans le shell MSYS2 :&lt;br /&gt;
&lt;br /&gt;
Premièrement, installer quelques outils divers :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Puis installer les outils de développement nécessaires :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
et les bibliothèques requises :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Obtenir les versions applicables des paquetages ===&lt;br /&gt;
&lt;br /&gt;
Comme MSYS2 fournit des rolling releases de ses paquetages, il peut arriver que de nouvelles versions de certains paquetages soient incompatibles avec la version présente de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Voici une liste de tous les paquetages qui doivent rétrograder de version :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
S'ils ne sont pas présents dans &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, ces fichiers peuvent être téléchargés à &lt;br /&gt;
http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Puis, dans le shell MSYS2, pour chaque fichier :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ajouter ce qui suit au fichier &amp;lt;MSYS2&amp;gt;\etc\pacman.conf pour empêcher pacman de mettre les paquetages à jour.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Pacman ne mettra pas à jour les paquetages listés dans IgnorePkg et membres du IgnoreGroup&lt;br /&gt;
&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pour compiler des applications 32 bits, faites ce qui suit en remplaçant '''x86_64''' par '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Mise à jour du système de base MSYS2 et des paquetages applicatifs ===&lt;br /&gt;
&lt;br /&gt;
Dans le shell MSYS2 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mise à jour de la base de données Lensfun ===&lt;br /&gt;
&lt;br /&gt;
Copier le répertoire &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; et le fichier &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; depuis &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; vers &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Où  &amp;lt;vesion&amp;gt; est la version du Python3 installé.&lt;br /&gt;
&lt;br /&gt;
Puis dans le shell Mingw32 ou Mingw64 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Télécharger et compiler libiptcdata ==&lt;br /&gt;
&lt;br /&gt;
Utiliser soit &amp;quot;''MinGW32 Shell''&amp;quot; pour compiler une version 32 bits, ou &amp;quot;''MinGW64 Shell''&amp;quot; pour compiler une version 64 bits.&lt;br /&gt;
&lt;br /&gt;
La bibliothèque libiptcdata n'est pas fournie par MSYS2, cependant, elle est téléchargeable et configurable en utilisant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rester dans le même répertoire&lt;br /&gt;
Le &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; situé dans ce répertoire doit être ouvert avec un éditeur de texte pour retirer &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt;  et &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; des listes nommées &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, sinon, la compilation ou l'installation échouera.&lt;br /&gt;
Vous pouvez utiliser n'importe quel éditeur de texte, par exemple Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#edition avec nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# Rechercher (commande ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# et remplacer par&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# Rechercher&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# et remplacer par&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# Enregistrer&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# Quitter&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enfin, compiler et installer la bibliothèque :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloner et compiler RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Utiliser soit &amp;quot;'''MinGW32 Shell'''&amp;quot; pour compiler une version 32 bits, ou &amp;quot;'''MinGW64 Shell'''&amp;quot; pour compiler une version 64 bits. &lt;br /&gt;
&lt;br /&gt;
=== Cloner le dépôt Git de RawTherapee ===&lt;br /&gt;
&lt;br /&gt;
Le processus de compilation va échouer s'il existe un espace dans le chemin de votre répertoire &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt;. Par exemple si votre nom d'utilisateur sous Windows est &amp;quot;Zank Frappa&amp;quot; alors le nom du chemin sera &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; et si vous clonez RawTherapee dedans alors la compilation échouera. Clonez dans un répertoire dont ni lui-même ni ses répertoires parents n'ont d'espace dans leur nom, par exemple &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lors du clonage du dépôt, vous allez automatiquement vous retrouver dans la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt;. Pour basculer manuellement dans la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt;, faites ceci :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Créer une répertoire séparé pour la compilation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notez que si vous changez de branche, alors vous devez effacer et re-créer le répertoire &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; afin que la compilation parte depuis le début dans un répertoire vide, sinon la compilation risque d'échouer. Cependant si vous faites une simple mise à jour sans changer de branche, alors vous n'avez pas besoin de démarrer dans un répertoire build vide, vous pouvez utiliser celui qui existe et la compilation sera plus rapide car tout n'a pas besoin d'être re-compilé.&lt;br /&gt;
&lt;br /&gt;
=== Exécuter CMake et Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
L' option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; va générer une compilation optimisée pour votre l'architecture de votre PC (c'est à dire -march=native)&lt;br /&gt;
&lt;br /&gt;
Vous pouvez trouver des explications au sujet de différentes options de CMake dans la [[Linux/fr#CMake|page Linux]], y compris une explication des diverses options de &amp;quot;BUILD_TYPE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Si vous réalisez une compilation pour Windows 32 bits et utilisez le &amp;quot;BUILD_TYPE&amp;quot; &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; ou &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt;, vous aurez besoin d'ajouter le drapeau de compilation &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; avant les deux derniers points &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; de la commande CMake ci-dessus :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RawTherapee peut maintenant être démarré depuis la ligne de commande de MINGW64 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# pour les compilations debug&lt;br /&gt;
$ cd debug&lt;br /&gt;
# pour les compilations release&lt;br /&gt;
$ cd release&lt;br /&gt;
# pour les compilations relwithdebinfo&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copier RawTherapee et les DLL requises ==&lt;br /&gt;
&lt;br /&gt;
Vous pouvez réaliser les copies soit avec le gestionnaire de fichiers de Windows ou, plus recommandé, avec [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] à l'intérieur du script shell &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; en utilisant pour les options &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; à la place de &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Définition des répertoires :&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; est &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; est le dossier d'installation de MSYS2,&lt;br /&gt;
*et &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; est le dossier d'installation de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Copier le contenu de &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; dans &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copier les DLL et exe nécessaires de &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; dans &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Voici une liste des DLL et exe requis :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
lilibfribidi-0.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (ou libgcc_s_dw2-1.dll pour W32) &lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copier la liste suivante des fichiers et rèpertoires du thème Adwaita doivent être copiés de  &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; vers &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copier les fichiers suivants :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dans .\share\gtk-3.0 créer un fichier &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt;  contenant :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Création d'un paquetage distribuable ==&lt;br /&gt;
&lt;br /&gt;
Si vous avez l'intention de distribuer des paquetages de RawTherapee pour la plateforme Windows, vous devez tout d'abord vous assurer que RawTherapee sera compilé avec pour cible le processeur &amp;quot;générique&amp;quot;. Pour cela, indiquer &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; dans la commande CMake.&lt;br /&gt;
&lt;br /&gt;
Pendant la compilation, un script nommé &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; est créé dans le répertoire d'installation de RawTherapee. Ce script est utilisé par Inno Setup [http://www.jrsoftware.org/isinfo.php], un programme qui est utilisé pour générer des installateurs pour les programmes Windows. Il est conseillé de télécharger la version Unicode [http://www.jrsoftware.org/download.php/is-unicode.exe] pour éviter les problèmes avec certaines langues.&lt;br /&gt;
&lt;br /&gt;
Pour aider les utilisateurs [[How_to_write_useful_bug_reports/fr| à écrire de bons rapports de bogues]], les mainteneurs de paquetages sont encouragés à produire des compilations qui contiennent à la fois un exécutable &amp;quot;release&amp;quot; et un &amp;quot;debug&amp;quot;, et de les rassembler avec l'exécutable GDB debugger. &lt;br /&gt;
&lt;br /&gt;
En d'autres termes, mettre ensemble le fichier &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release), le fichier &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) et le fichier &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; dans le même installeur ou la même archive. Une autre méthode est de réaliser des compilations &amp;quot;relwithdebinfo&amp;quot;, elles sont beaucoup plus rapides que &amp;quot;debug&amp;quot;, mais pas autant optimisées que &amp;quot;release&amp;quot;, et fournissent a peu près autant d'informations utiles que &amp;quot;debug&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Lors de la réalisation de compilations &amp;quot;relwithdebinfo&amp;quot; ou &amp;quot;debug&amp;quot;, vous devez fournir l'exécutable du debugger GDB. Les binaires Windows du debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; peuvent être téléchargés depuis [http://www.equation.com/servlet/equation.cmd?fa=gdb ici] dans les versions 32 et 64 bits et seront copiés dans le répertoire d'installation de RawTherapee.&lt;br /&gt;
&lt;br /&gt;
Maintenant que tout est en place, pour créer le paquetage cliquer droit sur le script &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; et choisir &lt;br /&gt;
''Compile'' dans le menu contextuel. Il va générer l'installeur automatiquement et le placer dans le répertoireparent.&lt;br /&gt;
&lt;br /&gt;
Pour rendre votre paquetage compatible avec le panneau de télévezrsement du site web de RawTherapee, créer une archive zip dans laquelle vous placerez ensemble l'installeur nouvellement créé et les  fichiers ''AboutThisBuild.txt'' correspondants qui se trouvent à le même place. Nommer l'archive zip résultante selon ce modèle :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si vous compilez et distribuez des &amp;quot;nightly builds&amp;quot; (compilations de dernière minute), suivez ce modéle :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot; signifie qu'il peut s'exécuter sur toute version de Windows depuis Vista et après, y compris 10.&lt;br /&gt;
&lt;br /&gt;
* la &amp;quot;version&amp;quot; ressemblera soit à &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; si vous utilisez la balise &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt;, ou à &amp;lt;code&amp;gt;5.2-dev-g1a2b3c4d&amp;lt;/code&amp;gt; si vous utilisez la branche &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; après avoir balisé 5.2.&lt;br /&gt;
&lt;br /&gt;
* Si vous fournissez plus d'un type de compilation dans l'installeur, ne pas inclure &amp;lt;buildtype&amp;gt; dans le nom.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6619</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=6619"/>
		<updated>2020-05-04T20:29:21Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: added gdbus.exe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;pagetitle&amp;quot;&amp;gt;Windows&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
gdbus.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5333</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5333"/>
		<updated>2019-07-23T09:19:51Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor for instance Notepad++. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5332</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5332"/>
		<updated>2019-07-23T08:36:25Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stay in the same directory&lt;br /&gt;
The &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; located in this directory needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise.&lt;br /&gt;
You can use any text editor. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
#editing with nano&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5331</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5331"/>
		<updated>2019-07-23T08:24:11Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The option -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; will generate a build optimized to your machine architecture  (i.e. -march=native)&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Noise_Reduction/fr&amp;diff=5253</id>
		<title>Noise Reduction/fr</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Noise_Reduction/fr&amp;diff=5253"/>
		<updated>2019-06-19T17:16:59Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 2.0em; font-family: Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;&amp;quot;&amp;gt;Réduction du bruit&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{1:1/fr}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[[File:Noise-cactus-0-ba.png|thumb|600px|Avant et après le traitement de réduction du bruit.]]&lt;br /&gt;
&lt;br /&gt;
La photographie est basée sur l'enregistrement de la lumière qui frappe un récepteur pendant une exposition. Le récepteur est typiquement un film ou un capteur numérique. Le signal lumineux &amp;quot;enregistré&amp;quot; par le récepteur n'est pas une représentation idéale du signal qui vient frapper ce récepteur, cette différence constitue le bruit. Les photos sur film ou numériques sont de la même façon sensibles au bruit (appelé &amp;quot;grain&amp;quot; sur le film), cependant il existe différentes sortes de bruit provenant des différentes sources spécifiques à chaque type de récepteur.&lt;br /&gt;
&lt;br /&gt;
Dans le but de traiter efficacement l'atténuation du bruit il est nécessaire de comprendre les différentes sortes de bruit qui existent et d'où elles proviennent. Le sujet du bruit est bien expliqué dans ce papier écrit par l'un des développeurs de RawTherapee et professeur de physique à l'Institut Fermi, Emil J. Martinec :&lt;br /&gt;
&lt;br /&gt;
[http://theory.uchicago.edu/%7Eejm/pix/20d/tests/noise/index.html Noise, Dynamic Range and Bit Depth in Digital SLRs]&lt;br /&gt;
&lt;br /&gt;
La lumière est constituée de paquets d'énergie appelés photons. Un [https://fr.wikipedia.org/wiki/Capteur_photographique capteur photographique] est comprend des millions d'éléments sensibles à la lumière appelés ''photosites''. Chaque photosite est capable d'enregistrer un signal d'une certaine quantité de photons, pas assez, et le photosite ne va rien enregistrer, de trop, et le photosite va saturer dans le blanc (complètement surexposé). Pensez à un seau qui collecte de l'eau, bien qu'il y ait de l'humidité dans l'air, s'il ne pleut pas, le seau reste vide, mais s'il pleut de trop, le seau va déborder.&lt;br /&gt;
Notez que le concept de &amp;quot;pixel&amp;quot; n'existe pas encore à ce niveau, l'information en provenance de plusieurs photosites est plus tard combinée en un pixel pendant le processus appelé [[Demosaicing/fr|dématriçage]]. Notez aussi que certaines sources écrivent à tort &amp;quot;pixel&amp;quot; pour désigner les &amp;quot;photosites&amp;quot;&lt;br /&gt;
&lt;br /&gt;
La sensibilité physique du capteur est constante, cependant le photographe peut amplifier le signal reçu en agissant sur un paramètre que vous connaissez sous le nom d'ISO (voir l'article [https://fr.wikipedia.org/wiki/Sensibilit%C3%A9_ISO Sensibilité ISO] dans Wikipedia). Puisque le signal enregistré par le capteur n'est pas parfait, augmenter les ISO n'amplifie pas seulement le signal désiré, mais aussi le bruit. Les capteurs sont susceptibles de générer du bruit à tout niveau ISO, cependant, plus le niveau ISO est élevé et plus le bruit est apparent.  &lt;br /&gt;
&lt;br /&gt;
Il existe différents outils pour traiter les différents types de bruit :&lt;br /&gt;
* l'outil Réduction du bruit est le plus efficace pour traiter le bruit de grenaille (bruit [https://en.wikipedia.org/wiki/Gaussian_noise Gaussien] et de [https://fr.wikipedia.org/wiki/Bruit_de_grenaille Poisson]) et le grain du film, ainsi que certains bruits de lecture.&lt;br /&gt;
* Le bruit de lecture et le bruit thermique sont le mieux gérés par l'outil [[Dark_Frame/fr|Trame Noire]].&lt;br /&gt;
* Le bruit poivre et sel (pixels soudainement blancs ou noirs) est le mieux géré avec l'outil [[Impulse_Noise_Reduction/fr|Réduction du bruit d'impulsion]].&lt;br /&gt;
* Les pixels chauds ou morts sont le mieux traités avec [[Preprocessing/fr#Filtrer les pixels chauds/morts |Filtrer les pixels chauds/morts]].&lt;br /&gt;
* Bruit en motifs (périodique, anisotropique) est le mieux géré avec [[Preprocessing/fr#Filtre de bruit de ligne|Filtre de bruit de ligne]]. Vous pouvez aussi corriger le bruit en motifs derrière RawTherapee dans GIMP, en utilisant la transformée de Fourier dans G'MIC.&lt;br /&gt;
Indépendamment de la source, le bruit se manifeste par des taches de couleurs différentes, &amp;quot;bruit de chrominance&amp;quot;, ou de luminosités différentes, &amp;quot;bruit de luminance&amp;quot;.&lt;br /&gt;
# Le bruit de chrominance est spécifique aux images numériques, il est généralement inesthétique et constitue toujours quelque chose que vous souhaiterez enlever. &lt;br /&gt;
# Le bruit de luminance, d'un autre côté, ressemble au grain du film et peut être apprécié, il n'est donc pas rare de désirer retirer le bruit de chrominance mais de conserver le bruit de luminance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Observation du bruit&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
File:noise-wall.png|Une photo de test bruitée prise à 6400 ISO.&lt;br /&gt;
File:Noise-wall-demosaic-amaze.png|le dématriçage AMaZE apporte des petits motifs en forme de labyrinthe.&lt;br /&gt;
File:Noise-wall-demosaic-lmmse.png|le dématriçage LMMSE évite les petits motifs en forme de labyrinthe tout en préservant le détail.&lt;br /&gt;
File:Noise-wall-luminance100-chrominance-off.png|Le bruit de chrominance ressemble à cela. Le détail de luminance est masqué pour faire mieux ressortir le bruit de chrominance. Notez les tâches de couleur dans le mur qui devrait être uni.&lt;br /&gt;
File:Noise-wall-luminance100-chrominance-on.png|Activer la réduction du bruit de chrominance élimine les tâches colorées.&lt;br /&gt;
File:Noise-wall-chrominance.png|Le bruit de luminance ressemble à cela. Le bruit de chrominance est masqué pour faire mieux ressortir le bruit de luminance.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-median-off.png|A la fois le bruit de chrominance et le bruit de luminance sont retirés.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-zoom-median-off.png| De minuscules artefacts de la taille d'un pixel sont laissés par la réduction du bruit.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-zoom-median-on.png|Ces artefacts peuvent être retirés en utilisant le filtre médian.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tout le monde n'attend pas la même chose d'une bonne réduction de bruit. Certains préfèrent un résultat très propre et doux, alors que d'autres préfèrent qu'il reste du grain pour donner à la photo une qualité ressemblant au film. Le puissant outil ''Réduction du bruit'' de RawTherapee pourvoit à tous vos besoins, il vous permet d'éliminer le bruit tout en préservant les détails. Il utilise les [http://fr.wikipedia.org/wiki/Ondelette ondelettes], une [https://fr.wikipedia.org/wiki/Transformation_de_Fourier transformée de Fourier], ainsi que des filtres médians,  pour exercer sa magie. Il vous revient de les peaufiner comme bon vous semble, et d'apprendre comment le faire efficacement, bonne lecture !&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Ce chapitre détaille l'ordre des opérations pour retirer le bruit.&lt;br /&gt;
&lt;br /&gt;
# Commencez par vous assurer que vous employez l'algorithme de dématriçage optimal. AMaZE est recommandé pour l'utilisation générale de RawTherapee, cependant, en cas d'images très bruitées, aux ISO élevés, il et recommandé d'utiliser les méthodes de dématriçage LMMSE ou IGV. AMaZE peut apporter des petits artefacts en forme de labyrinthe qui apparaissent dans les images très bruitées alors que LMMSE et IGV sont conçus pour empêcher que cela arrive&lt;br /&gt;
# Vérifier dans les outils de netteté que vous n'êtes pas en train de les appliquer sur de fins détails, car votre photo bruitée n'a pas de fins détails ! Si vous utilisez  [[Contrast_by_Detail_Levels/fr|Contraste par niveaux de détail]] or [[Wavelets/fr|Ondelettes]], assurez vous que les un ou deux premiers curseurs de contraste par niveaux de détail sont à 0 pour éviter que ces outils n'amplifient le bruit&lt;br /&gt;
# Zoomer la photo à 100 % ou plus et trouver une région qui possède à la fois des parties nettes dans le plan de mise au point et à la fois de larges parties unies hors plan de mise au point, de telle façon à obtenir une bonne vision générale des effets de l'outil&lt;br /&gt;
# Activer [[Preprocessing/fr#Filtrer les pixels chauds/morts |Filtrer les pixels chauds/morts]] si vous remarquez un bruit poivre et sel (pixels noirs et/ou blancs).&lt;br /&gt;
# Activer l'outil de réduction du bruit. Le bruit de chrominance est automatiquement retiré et se passe habituellement de tout réglage fin. A ce moment, le bruit restant ressemble au grain d'un film. Si vous désirez le garder, alors vous avez terminé, sinon continuez la lecture.&lt;br /&gt;
# Pour retirer le bruit de luminance, mettre le curseur &amp;quot;Niveaux de détail de luminance&amp;quot; à 0 et augmenter le curseur &amp;quot;Luminance&amp;quot; jusqu'à ce que le bruit soit évaporé.&lt;br /&gt;
# Accroitre le curseur &amp;quot;Niveaux de détail de luminance&amp;quot; jusqu'à retrouver un niveau satisfaisant de détail.&lt;br /&gt;
# Vous pouvez remarquer quelques petits artefacts résiduels après le processus de réduction du bruit. Les enlever avec l'outil Filtre Médian&lt;br /&gt;
# Bien qu'il ne soit généralement pas conseillé de combiner la netteté avec la réduction du bruit, RawTherapee 5.5 présente un réglage de &amp;quot;seuil de contraste&amp;quot; dans l'outil [[Sharpening/fr|Netteté]], grâce auquel vous pouvez agir sur la netteté des détails tout en préservant la douceur des zones plates et uniformes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Réduction du bruit étape par étape&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File:Noise-cactus-1-amaze.png|L'image bruitée.&lt;br /&gt;
File:Noise-cactus-2-lmmse.png|Changement de la méthode de dématriçage pour LMMSE qui élimine les petits artefacts en forme de labyrinthe et rend le bruit poivre et sel plus clair.&lt;br /&gt;
File:Noise-cactus-3-pixelfilter.png|Activer [[Preprocessing/fr#Filtrer les pixels chauds/morts |Filtrer les pixels chauds/morts]] élimine le bruit poivre et sel.&lt;br /&gt;
File:Noise-cactus-4-nr-chroma.png|Activer la réduction de bruit chromatique automatique procure une plaisante image grainée.&lt;br /&gt;
File:Noise-cactus-5-nr-luminance.png|Le bruit de luminance est écarté en douceur avec le curseur ''Luminance''.&lt;br /&gt;
File:Noise-cactus-6-nr-detailrecovery.png|Restauration des détails avec le curseur &amp;quot;niveau de détails de Luminance&amp;quot;.&lt;br /&gt;
File:Noise-cactus-7-nr-median.png|Le filtre médian est utilisé pour éliminer les artefacts résiduels.&lt;br /&gt;
File:Noise-cactus-8-sharpen.png|La netteté est restaurée grâce à un masque flou avec un seuil de contraste pour éviter de rendre trop nettes des zones qui doivent rester douces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interface ==&lt;br /&gt;
=== Généralités ===&lt;br /&gt;
Examen rapproché de grandes zones fortement saturées avec de fins détails, telles que le motif d'une chemise colorée ou une pétale de fleur, basculement entre les espaces colorimétriques RVB et L*a*b*. &lt;br /&gt;
&lt;br /&gt;
Les images suivantes montrent les effets des différents types de réduction de bruit, exagérés pour plus de clarté. Alors que l'image source ne contient pas de &amp;quot;bruit&amp;quot; à très basse fréquence, elle a été choisie car elle expose très bien les effets (et les effets collatéraux) que l'on souhaite présenter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Comparaison des méthodes de réduction du bruit&amp;quot; - Espaces colorimétriques&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-1-off.png|L'image bruitée. &amp;quot;Niveau de détails de Luminance&amp;quot; est intentionnellement laissé sur 0, et le niveau de chromaticité est intentionnellement laissé sur un niveau très haut, pour amplifier les effets.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-2-luminance-lab-conservative.png|Réduction du bruit de luminance dans l'espace L*a*b*, mode &amp;quot;Conservatif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-3-luminance-lab-aggressive.png|Réduction du bruit de luminance dans l'espace L*a*b*, mode &amp;quot;Agressif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-4-luminance-rgb-conservative.png|Réduction du bruit de luminance dans l'espace RVB, mode &amp;quot;Conservatif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-5-luminance-rgb-aggressive.png|Réduction du bruit de luminance dans l'espace RVB, mode &amp;quot;Agressif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-6-chrominance-lab-conservative.png|Réduction du bruit de chrominance dans l'espace L*a*b*, mode &amp;quot;Conservatif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-7-chrominance-lab-aggressive.png|Réduction du bruit de chrominance dans l'espace L*a*b*, mode &amp;quot;Agressif&amp;quot;. Remarquez comme les couleurs déteignent les unes sur les autres dans les endroits où les teintes se touchent, le bleu marine déteint sur le cyan, le vert sur le rouge et le rouge sur le pourpre, etc.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-8-chrominance-rgb-conservative.png|Réduction du bruit de chrominance dans l'espace RVB, mode &amp;quot;Conservatif&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
File:Noise-handkerchief-9-chrominance-rgb-aggressive.png|Réduction du bruit de chrominance dans l'espace RVB, mode &amp;quot;Agressif&amp;quot;. Les détails basse fréquence sont perdus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Espace colorimétrique ====&lt;br /&gt;
La réduction de bruit peut être réalisée dans les espaces colorimétriques L*a*b* ou RGB.&lt;br /&gt;
&lt;br /&gt;
Dans l'espace L*a*b*, le canal L* est utilisé pour la luminance et les canaux a* et b* pour la chromaticité.&lt;br /&gt;
&lt;br /&gt;
Dans l'espace RVB, le Y de l'espace colorimétrique XYZ du CIE est utilisé pour la luminance et (X-Y) et (Y-Z) pour la chromaticité.&lt;br /&gt;
&lt;br /&gt;
==== Mode ====&lt;br /&gt;
Il existe deux modes généraux de réduction du bruit qui contrôlent si le bruit de haute fréquence seul est retiré ou bien si le bruit de basse fréquence l'est aussi. Le bruit de &amp;quot;basse fréquence&amp;quot; est le bruit dont les tâches couvrent une large étendue, inversement le bruit de &amp;quot;haute fréquence&amp;quot; a de plus petites taches qui ne couvrent que quelques pixels.&lt;br /&gt;
# Conservatif, enlève tout excepté le bruit de très basse fréquence, ainsi le détail des couleurs est mieux préservé au dépend du maintien des grandes taches. Utilisé la plupart du temps.&lt;br /&gt;
# Agressif, enlève aussi le bruit de très basse fréquence, au prix d'une plus grande agressivité avec le bruit de plus haute fréquence. A n'utiliser que sur les photos très bruitées.&lt;br /&gt;
&lt;br /&gt;
==== Gamma ====&lt;br /&gt;
Le gamma varie la force de la réduction de bruit au travers de l'étendue des tons. Les petites valeurs de gamma laissent agir la réduction du bruit sur tous les tons, mettant en évidence l'action sur les ombres, alors que les hautes valeurs limitent l'action aux seuls tons les plus clairs.&lt;br /&gt;
&lt;br /&gt;
=== Luminance ===&lt;br /&gt;
[[File:Rt nr luminancecurve books.jpg|thumb|600px|La courbe Luminance de RawTherapee 4.1 était utilisée pour enlever complètement le bruit dans les zones sombres tout en préservant totalement la structure des zones les plus claires]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Contrôle de luminance&amp;quot; vous permet de choisir entre un curseur ou une courbe pour manipuler la réduction du bruit de luminance.&lt;br /&gt;
&lt;br /&gt;
Ajuster le curseur &amp;quot;Luminance&amp;quot; revient à manipuler l'amplitude de la courbe, les deux agissent sur la force de la réduction du bruit. La courbe présente en plus l'avantage de vous permettre de contrôler la force de la réduction du bruit en fonction de la luminance des pixels, par exemple, elle permet une forte réduction du bruit de luminance dans les ombres et aucune dans les hautes lumières.&lt;br /&gt;
&lt;br /&gt;
Le curseur &amp;quot;Niveau de détails de Luminance&amp;quot; permet de récupérer la structure sans ré-introduire le bruit, a moins que vous ne lui attribuiez une valeur trop haute.&lt;br /&gt;
&lt;br /&gt;
=== Chrominance ===&lt;br /&gt;
; Méthodes&lt;br /&gt;
La réduction du bruit de chrominance peut se réaliser selon une des trois méthodes, &lt;br /&gt;
&lt;br /&gt;
* Manuel&lt;br /&gt;
* Global Automatique &lt;br /&gt;
* Aperçu&lt;br /&gt;
&lt;br /&gt;
; Bruit de l'aperçu&lt;br /&gt;
L'indicateur &amp;quot;Bruit de l'aperçu&amp;quot;, donne les valeurs estimées du bruit chromatique, après le traitement &amp;quot;Chrominance&amp;quot;&lt;br /&gt;
* Moyenne : estime la valeur moyenne du bruit tous canaux considérés.&lt;br /&gt;
* Élevée : estime la valeur maximale du bruit tous canaux considérés.&lt;br /&gt;
&lt;br /&gt;
==== Manuel ====&lt;br /&gt;
&lt;br /&gt;
*Les 3 curseurs et la courbe - agissent sur l'ensemble de l'image. Vous contrôlez manuellement les réglages de l'image&lt;br /&gt;
&lt;br /&gt;
; Maître&lt;br /&gt;
Contrôle la force de la réduction de bruit de chrominance. Agit en décalage (offset) et indépendamment des valeurs rouge-vert et bleu-jaune. Par exemple, si maître = 50, rouge-vert = -50 et bleu-jaune = -50, le résultat final est nul, aucun effet.&lt;br /&gt;
&lt;br /&gt;
; Rouge-Vert&lt;br /&gt;
Réduit / amplifie les effets de la réduction du bruit dans le canal rouge-vert (a* dans L*a*b*).&lt;br /&gt;
&lt;br /&gt;
; Bleu-Jaune&lt;br /&gt;
Réduit / amplifie les effets de la réduction du bruit dans le canal bleu-jaune (b* dans L*a*b*).&lt;br /&gt;
&lt;br /&gt;
; Courbe de chrominance &lt;br /&gt;
La courbe de chrominance permet le contrôle du bruit de chrominance en fonction de la chrominance des pixels, elle permet par exemple d'avoir une forte réduction du bruit de chrominance dans les zones de basse saturation et une faible réduction du bruit dans les zones de haute saturation. Cette courbe module l'action des curseurs &amp;quot;Maître&amp;quot;, &amp;quot;Rouge-Vert&amp;quot; et &amp;quot;Bleu-Jaune&amp;quot; en multipliant leur valeur par l'ordonnée de la courbe. Par exemple si le curseur Maître est réglé sur 30 et que la courbe est à mi-hauteur, cela équivaut à environ 45. Il peut s'avérer utile de renforcer la réduction du bruit dans les zones grises ou ternes car nous distinguons mieux le bruit dans les zones de faible saturation que nous ne le faisons dans les zones de haute saturation. Lors de l'utilisation de la méthode de réduction du bruit &amp;quot;Global Automatique&amp;quot;, les paramètres calculés automatiquement sont une moyenne pour toute l'image et peuvent être insuffisants pour enlever le bruit dans ces zones de basse saturation, la courbe de chrominance peut aider.&lt;br /&gt;
&lt;br /&gt;
==== Global Automatique ====&lt;br /&gt;
&lt;br /&gt;
L'algorithme découpe l'image en de nombreuses cellules. Pour chaque cellule, sont calculés :&lt;br /&gt;
* Un niveau de bruit moyen pour les canaux rouge-vert et bleu-jaune.&lt;br /&gt;
* Un niveau de bruit maximum pour les mêmes canaux.&lt;br /&gt;
&lt;br /&gt;
==== Aperçu ====&lt;br /&gt;
&lt;br /&gt;
Cette méthode n'est opérationnel qu'en zoom 100% et plus. Il analyse les zones actuellement affichées dans l'aperçu (si le zoom est à 100% ou plus) et calcule :&lt;br /&gt;
* Un niveau de bruit moyen pour les canaux rouge-vert et bleu-jaune.&lt;br /&gt;
* Un niveau de bruit maximum pour les mêmes canaux.&lt;br /&gt;
&lt;br /&gt;
La valeur des trois curseurs Maître, Rouge-Vert et Bleu-Jaune ainsi que celle du &amp;quot;Bruit de l'aperçu&amp;quot; est mise à jour en conséquence.&lt;br /&gt;
&lt;br /&gt;
Si vous voulez garder les valeurs actuellement calculées, alors vous devez retourner dans la méthode &amp;quot;manuel&amp;quot;, sinon les valeurs seront re-calculées lors d'un panoramique ou si vous copiez le profile pour d'autres images.&lt;br /&gt;
&lt;br /&gt;
=== Médian ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rt nr median books.jpg|600px|thumb|Utilisation de Filtre Médian avec RawTherapee-4.1 pour éliminer des artéfacts, contenus dans une fenêtre 3x3, non traités par le processus de réduction du bruit.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rt nr median zoom books.jpg|thumb|600px|Comparaison de réduction de bruit sans et avec le filtre médian, zoomé à 200%. Alors que l'image filtrée à droite peut apparaître moins nette,  remarquez que l'image non filtrée sur la gauche ne contient pas vraiment de détails supplémentaires, le bruit donne l'illusion de netteté. En même temps l'image filtrée, enregistrée au format JPEG/92/standard, était presque 40% plus petite que celle non filtrée (350ko vs 215ko). RawTherapee-4.1.]].&lt;br /&gt;
&lt;br /&gt;
Utiliser ce filtre pour enlever les artéfacts minuscules, au piqué vif, restés après la réduction du bruit. &lt;br /&gt;
&lt;br /&gt;
; Type de médiane&lt;br /&gt;
&lt;br /&gt;
Le [https://en.wikipedia.org/wiki/Median_filter filtre médian] remplace chaque pixel par la valeur médiane des pixels voisins. La matrice des pixels voisins est appelée &amp;quot;fenêtre&amp;quot;, laquelle glisse pixel par pixel sur toute l'image. Vous pouvez choisir la taille de cette fenêtre en utilisant la liste déroulante &amp;quot;Type de médiane&amp;quot;. Plus elle est grande, plus long sera le traitement.&lt;br /&gt;
&lt;br /&gt;
Tailles de fenêtres disponibles :&lt;br /&gt;
* 3x3 doux: traite 5 pixels dans une fenêtre de 3x3 pixels.&lt;br /&gt;
: ○●○&lt;br /&gt;
: ●●●&lt;br /&gt;
: ○●○&lt;br /&gt;
* 3x3 : traite 9 pixels dans une fenêtre de 3x3 pixels.&lt;br /&gt;
: ●●●&lt;br /&gt;
: ●●●&lt;br /&gt;
: ●●●&lt;br /&gt;
* 5x5 doux: traite 13 pixels dans une fenêtre de 5x5 pixels.&lt;br /&gt;
: ○○●○○&lt;br /&gt;
: ○●●●○&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ○●●●○&lt;br /&gt;
: ○○●○○&lt;br /&gt;
* 5x5 : traite 25 pixels dans une fenêtre de 5x5 pixels.&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
* 7x7 : traite 49 pixels dans une fenêtre de 7x7 pixels.&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
* 9x9 : traite 81 pixels dans une fenêtre de 9x9 pixels.&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
Il est quelquefois possible d'atteindre de meilleurs résultats en exécutant plusieurs itérations avec une petite fenêtre plutôt qu'une seule itération avec une grande fenêtre. &lt;br /&gt;
&lt;br /&gt;
: Méthode médiane&lt;br /&gt;
&lt;br /&gt;
Vous disposez de cinq méthodes:&lt;br /&gt;
* Luminance seulement : travaille dans l'espace L*a*b*, mais n'affecte que le canal L*.&lt;br /&gt;
* Chroma uniquement : travaille dans l'espace L*a*b*, mais n'affecte que les canaux a* et b*.&lt;br /&gt;
* L* Pondéré  (faiblement) + a*b* (normal) : affecte tous les canaux dans l'espace L*a*b*, mais agit plus faiblement sur le canal L*.&lt;br /&gt;
* L*a*b* : affecte tous les canaux avec égalité d'action.&lt;br /&gt;
* RVB : travaille dans l'espace RVB et vous ne pouvez choisir que les valeurs 3x3 doux, 3x3 et 5x5&lt;br /&gt;
&lt;br /&gt;
Lorsqu'on utilise les méthodes &amp;quot;Luminance seulement&amp;quot; et &amp;quot;L*a*b*&amp;quot;, le filtre Médian sera exécuté après l’étape des ondelettes dans le processus de réduction du bruit. Si on utilise dans l'espace RVB, il sera exécuté à la toute fin du processus de réduction du bruit.&lt;br /&gt;
&lt;br /&gt;
Vous pouvez vous demander quelle utilisation Filtre Médian a d'autre que pour des raisons esthétiques l'élimination de pixels qui diffèrent fortement de leurs voisins. L'un des bénéfices est la réduction de la taille de l'image lors de l'enregistrement dans un format compressé tel que JPEG ou PNG. Filtre Médian enlève des variations qui seront de toutes façons perdues si vous réduisez la taille de l’image. Vous ne verrez pas non plus ces variations si vous imprimez l'image. Les enlever grâce au Filtre Médian peut réduire la taille du fichier jusqu'à 40% (testé en utilisant la compression JPEG, force 92 avec &amp;quot;qualité équilibrée&amp;quot; [https://fr.wikipedia.org/wiki/Sous-%C3%A9chantillonnage_de_la_chrominance échantillonnage de la chrominance]), aussi, testez le si la taille du fichier de sortie est critique.&lt;br /&gt;
&lt;br /&gt;
Enfin, la méthode de filtre médian &amp;quot;Chroma uniquement&amp;quot; peut s'utiliser en complément du calcul automatique de réduction du bruit de chrominance, en réduisant les valeurs atypiques vives, elle peut adoucir les valeurs calculées, et éviter ainsi de trop faire pâlir les détails de couleur.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Noise_Reduction&amp;diff=5252</id>
		<title>Noise Reduction</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Noise_Reduction&amp;diff=5252"/>
		<updated>2019-06-19T09:16:14Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: change link to Emil Martinec paper&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{1:1}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[[File:Noise-cactus-0-ba.png|thumb|600px|Before and after noise reduction.]]&lt;br /&gt;
&lt;br /&gt;
Photography is based on recording light which falls on a medium during an exposure. The medium is typically film or a digital sensor. The light signal ''recorded'' on the medium is not an ideal representation of the signal which ''fell upon'' that medium - these differences constitute noise. Film and digital photographs alike are susceptible to noise (called &amp;quot;grain&amp;quot; in film), however there are various types of noise from various sources specific to each medium.&lt;br /&gt;
&lt;br /&gt;
In order to effectively deal with mitigating noise it is useful to understand what types of noise exist and where they come from. The topic of noise is well explained in this paper by one of RawTherapee's developers and physics professor at the Enrico Fermi Institute, Emil J. Martinec:&lt;br /&gt;
[http://theory.uchicago.edu/%7Eejm/pix/20d/tests/noise/index.html Noise, Dynamic Range and Bit Depth in Digital SLRs]&lt;br /&gt;
&lt;br /&gt;
Light consists of packets of energy called photons. A [https://en.wikipedia.org/wiki/Image_sensor digital sensor] comprises of millions of light-sensitive elements called ''photosites'' (also known as ''sensels'' - sensor elements). Each photosite is capable of recording a signal from a certain range of photons - too few and the photosite will not register anything; too many, and the photosite will &amp;quot;clip&amp;quot; to pure white (completely overexposed). Think of it as a bucket collecting water - despite there being moisture in the air, if it doesn't rain then the bucket is empty, but if it rains too much then it overflows.&lt;br /&gt;
&lt;br /&gt;
Note that the idea of &amp;quot;pixel&amp;quot; does not exist at this point yet - information from several photosites will later be combined into one pixel during a process called [[demosaicing]]. Also note that some sources do write &amp;quot;pixels&amp;quot; when they mean &amp;quot;photosites&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The physical sensitivity of the sensor is constant, however the photographer can amplify the recorded signal by modifying a setting you know as ISO (see the [https://en.wikipedia.org/wiki/Film_speed Film Speed] article on Wikipedia). Since the signals recorded by the sensor are not perfect, using a higher ISO amplifies not only the desired signal, but also the noise. Sensors are susceptible to noise at every ISO level, however the higher the ISO the more apparent the noise.&lt;br /&gt;
&lt;br /&gt;
There are different tools for dealing with different types of noise:&lt;br /&gt;
* The Noise Reduction tool is best at dealing with photon shot noise ([https://en.wikipedia.org/wiki/Gaussian_noise Gaussian] and [https://en.wikipedia.org/wiki/Shot_noise Poisson] noise) and film grain, and some sensor read noise.&lt;br /&gt;
* Sensor read noise and thermal noise are best handled by the [[Dark-Frame]] tool.&lt;br /&gt;
* Salt and pepper noise (sudden white or black pixels) is best handled by the [[Impulse Noise Reduction]] tool.&lt;br /&gt;
* Hot and dead pixels are best dealt with using the [[Preprocessing#Hot.2FDead_Pixel_Filter|Hot/Dead Pixel Filter]].&lt;br /&gt;
* Pattern noise (periodic, anisotropic) is best handled by the [[Preprocessing#Line_Noise_Filter|Line Noise Filter]]. You can also fix pattern noise (de-screen) after RawTherapee in GIMP, using the Fourier transform in G'MIC.&lt;br /&gt;
&lt;br /&gt;
Regardless the source, noise will manifest itself as blotches of deviating color - &amp;quot;chrominance noise&amp;quot;, and deviating brightness - &amp;quot;luminance noise&amp;quot;.&lt;br /&gt;
# Chrominance noise is endemic to digital images, it is generally unattractive and something you will always want to remove.&lt;br /&gt;
# Luminance noise, on the other hand, looks like film grain and can be attractive, so it's not uncommon to want to remove chrominance noise but keep luminance noise.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Examining Noise&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
File:noise-wall.png|A noisy test photo taken at ISO 6400.&lt;br /&gt;
File:Noise-wall-demosaic-amaze.png|AMaZE demosaicing leads to small maze-like patterns.&lt;br /&gt;
File:Noise-wall-demosaic-lmmse.png|LMMSE demosaicing avoids maze-like patterns while preserving detail.&lt;br /&gt;
File:Noise-wall-luminance100-chrominance-off.png|This is what chrominance noise looks like. Luminance detail was obliterated to make the chrominance noise more clear. Notice the color blotches in what should be a smooth wall.&lt;br /&gt;
File:Noise-wall-luminance100-chrominance-on.png|Enabling chrominance noise reduction eliminates the colored blotches.&lt;br /&gt;
File:Noise-wall-chrominance.png|This is what luminance noise looks like. Chrominance noise was removed to make the luminance noise more clear.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-median-off.png|Both chrominance and luminance noise were removed.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-zoom-median-off.png|Tiny pixel-sized artifacts are left-over from noise reduction.&lt;br /&gt;
File:Noise-wall-luminance-tweaked-chrominance-on-zoom-median-on.png|These artifacts can be removed using the median filter.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not everyone's requirement for good noise reduction is the same. Some like a completely clean, smooth result, while others prefer to have some grain left over to give the photo a more film-like quality. RawTherapee's powerful ''Noise Reduction'' tool caters to all your needs - it lets you eliminate noise while retaining detail. It uses [http://en.wikipedia.org/wiki/Wavelet wavelets], a [https://en.wikipedia.org/wiki/Fourier_transform Fourier transform] and a [https://en.wikipedia.org/wiki/Median_filter median filter] to work its magic. Read on to learn how to use it efficiently.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
This section details the order of operations for removing noise.&lt;br /&gt;
&lt;br /&gt;
# Start by ensuring you're using the optimal demosaicing algorithm. AMaZE is recommended for general RawTherapee use, however, when working with very noisy, high-ISO images, it is recommended to use the LMMSE or IGV demosaicing methods instead. AMaZE can lead to tiny maze-like artifacts appearing in very noisy images, whereas LMMSE and IGV are designed to prevent that from happening.&lt;br /&gt;
# Check the sharpening tools to make sure that you're not sharpening any fine detail, because your noisy photo has no fine detail! If you're using [[Contrast by Detail Levels]] or [[Wavelets]], make sure that the first one or two fine-detail contrast sliders are at 0 to prevent these tools from amplifying noise.&lt;br /&gt;
# Zoom into the photo to 100% or more and find an area that has both sharp, in-focus parts as well as large, plain or out-of-focus ones, so that you have a good overview of the effects of the tool.&lt;br /&gt;
# Enable the [[Preprocessing#Hot.2FDead_Pixel_Filter|Hot/Dead Pixel Filter]] if you notice salt-and-pepper noise (black and/or white pixels).&lt;br /&gt;
# Enable the Noise Reduction tool. Chrominance noise is automatically removed and usually does not require any tweaking. At this point the remaining noise looks more like film grain. If you are happy with keeping it then you are done, else keep reading.&lt;br /&gt;
# To remove luminance noise, set the ''Detail recovery'' slider to 0, and increase the ''Luminance'' slider until the noise has been smoothed-away.&lt;br /&gt;
# Increase the ''Detail recovery'' slider until you regain a satisfactory level of detail.&lt;br /&gt;
# You may notice some small artifacts remain from the noise reduction process. Use the Median filter to remove them.&lt;br /&gt;
# While it is generally not recommended to combine sharpening with noise reduction, RawTherapee-5.5 has a &amp;quot;contrast threshold&amp;quot; adjuster in the [[Sharpening]] tool, thanks to which you can sharpen details while preserving the smoothness of uniform, flat areas.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Noise Reduction Step by Step&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
File:Noise-cactus-1-amaze.png|The noisy image.&lt;br /&gt;
File:Noise-cactus-2-lmmse.png|Changing the demosaicing method to LMMSE eliminates the small maze-like patterns and makes the salt-and-pepper noise more clear.&lt;br /&gt;
File:Noise-cactus-3-pixelfilter.png|Enabling the [[Preprocessing#Hot.2FDead_Pixel_Filter|Hot/Dead Pixel Filter]] eliminates the salt-and-pepper noise.&lt;br /&gt;
File:Noise-cactus-4-nr-chroma.png|Enabling automatic chromaticity noise reduction renders a pleasantly-grainy image.&lt;br /&gt;
File:Noise-cactus-5-nr-luminance.png|Luminance noise was smoothed-away using the ''Luminance'' slider.&lt;br /&gt;
File:Noise-cactus-6-nr-detailrecovery.png|Detail was restored using the ''Detail recovery'' slider.&lt;br /&gt;
File:Noise-cactus-7-nr-median.png|The median filter was used to eliminate left-over artifacts.&lt;br /&gt;
File:Noise-cactus-8-sharpen.png|Sharpness was restored using an unsharp-mask with a contrast threshold to prevent sharpening areas which should be smooth.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interface ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
Closely examine large areas of strong saturation with fine detail - such as the pattern on a colored shirt or the petal of a flower - as you switch between the RGB and L*a*b* spaces.&lt;br /&gt;
&lt;br /&gt;
The following images demonstrate the effects of various types of noise reduction, exaggerated for clarity. While the source image does not contain any very-low-frequency ''noise'', it was chosen because it does display the effects (and side-effects) very well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Comparison of Noise Reduction - Color Spaces&amp;quot; mode=nolines widths=600px heights=450px&amp;gt;&lt;br /&gt;
File:Noise-handkerchief-1-off.png|The noisy image. Detail recovery will be intentionally left at 0, and chromaticity strength will be intentionally set very high, to emphasize effect.&lt;br /&gt;
File:Noise-handkerchief-2-luminance-lab-conservative.png|Luminance noise reduction in L*a*b* space, conservative.&lt;br /&gt;
File:Noise-handkerchief-3-luminance-lab-aggressive.png|Luminance noise reduction in L*a*b* space, aggressive.&lt;br /&gt;
File:Noise-handkerchief-4-luminance-rgb-conservative.png|Luminance noise reduction in RGB space, conservative.&lt;br /&gt;
File:Noise-handkerchief-5-luminance-rgb-aggressive.png|Luminance noise reduction in RGB space, aggressive.&lt;br /&gt;
File:Noise-handkerchief-6-chrominance-lab-conservative.png|Chrominance noise reduction in L*a*b* space, conservative.&lt;br /&gt;
File:Noise-handkerchief-7-chrominance-lab-aggressive.png|Chrominance noise reduction in L*a*b* space, aggressive. Notice how colors bleed one into another in areas where one hue meets the other - navy blue bleeds into cyan, green bleeds into dull-red, dull-red bleeds into crimson-red, etc.&lt;br /&gt;
File:Noise-handkerchief-8-chrominance-rgb-conservative.png|Chrominance noise reduction in RGB space, conservative.&lt;br /&gt;
File:Noise-handkerchief-9-chrominance-rgb-aggressive.png|Chrominance noise reduction in RGB space, aggressive. Low-frequency detail is lost.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Color Space ====&lt;br /&gt;
&lt;br /&gt;
Noise reduction can be performed in the L*a*b* and RGB color spaces.&lt;br /&gt;
&lt;br /&gt;
When working in the L*a*b* space, the L* channel is used for luminance and the a* and b* channels are used for chromaticity.&lt;br /&gt;
&lt;br /&gt;
When working in the RGB space, the Y from the CIE XYZ color space is used for luminance and (X-Y) and (Y-Z) are used for chromaticity.&lt;br /&gt;
&lt;br /&gt;
==== Mode ====&lt;br /&gt;
&lt;br /&gt;
There are two general noise reduction modes which control whether only high frequency or also low frequency noise is removed. ''Low frequency'' noise is noise whose blotches cover a large area; conversely, ''high frequency'' noise has smaller blotches which cover fewer pixels.&lt;br /&gt;
# Conservative - removes all except very low-frequency noise, so color detail is better preserved at the expense of not removing very large blotches. Use in most cases.&lt;br /&gt;
# Aggressive - removes also very low-frequency noise at the expense of being more aggressive with higher frequency noise. Use only on extremely noisy photos.&lt;br /&gt;
&lt;br /&gt;
==== Gamma ====&lt;br /&gt;
&lt;br /&gt;
Gamma varies noise reduction strength across the range of tones. Smaller gamma values let noise reduction affect all tones emphasizing the action on shadows, while higher gamma values limit the effect to brighter tones only.&lt;br /&gt;
&lt;br /&gt;
=== Luminance ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rt nr luminancecurve books.jpg|thumb|600px|The Luminance Curve in RawTherapee-4.1 was used to completely remove noise in dark areas while fully retaining structure of lighter areas.]]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Luminance control&amp;quot; lets you choose whether you want to manipulate the luminance noise reduction via sliders or a curve.&lt;br /&gt;
&lt;br /&gt;
Adjusting the &amp;quot;Luminance&amp;quot; slider is equivalent to manipulating the amplitude of the luminance curve - both affect how strong the noise reduction effect is. The curve has the additional advantage of letting you control noise reduction strength as a function of the pixels' luminance - e.g. it allows you to have strong luminance noise reduction in the shadows and none in the highlights.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Detail recovery&amp;quot; slider allows you to recover structure while not reintroducing noise, unless you set this value too high.&lt;br /&gt;
&lt;br /&gt;
=== Chrominance ===&lt;br /&gt;
&lt;br /&gt;
; Method&lt;br /&gt;
Chrominance noise reduction can be performed using one of three methods:&lt;br /&gt;
* Manual&lt;br /&gt;
* Automatic global&lt;br /&gt;
* Preview&lt;br /&gt;
&lt;br /&gt;
; Preview noise&lt;br /&gt;
The &amp;quot;Preview noise&amp;quot; indicator gives the estimated chromatic noise values after &amp;quot;Chrominance&amp;quot; processing:&lt;br /&gt;
* Mean: estimates the average noise value across all channels.&lt;br /&gt;
* High: estimate the highest noise value across all channels.&lt;br /&gt;
&lt;br /&gt;
==== Manual ====&lt;br /&gt;
&lt;br /&gt;
The three sliders and the curve act on the full image. You control the settings manually.&lt;br /&gt;
&lt;br /&gt;
; Master&lt;br /&gt;
Controls the strength of chrominance noise reduction. Functions as an offset independently to the red-green and blue-yellow values. For example if master=50, red-green=-50 and blue-yellow=-50, the end result is 0; no effect.&lt;br /&gt;
 &lt;br /&gt;
; Red-Green&lt;br /&gt;
Reduce/boost noise reduction in the red-green channel (a* in L*a*b*).&lt;br /&gt;
&lt;br /&gt;
; Blue-Yellow&lt;br /&gt;
Reduce/boost noise reduction in the blue-yellow channel (b* in L*a*b*).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Chrominance curve&lt;br /&gt;
The chrominance curve lets you control chrominance noise as a function of the pixels' chrominance - e.g. it allows you to have strong chrominance noise reduction in areas of low saturation and weak noise reduction in areas of high saturation. This curve modulates the &amp;quot;Master&amp;quot;, &amp;quot;Red-Green&amp;quot; and &amp;quot;Blue-Yellow&amp;quot; sliders' action by multiplying their values by the curve ordinate. For example, if the master slider is set to 30 and the curve is at mid-height, the equivalent result will be about 45. It can be useful to boost noise reduction in grey or drab areas, as we distinguish noise more easily in areas of low saturation than we do in areas of high saturation. When using the &amp;quot;automatic global&amp;quot; noise reduction method, the automatically-calculated parameters are an average for the whole image, and they might be insufficient to remove noise in these low-saturation areas - the chrominance curve can help.&lt;br /&gt;
&lt;br /&gt;
==== Automatic Global ====&lt;br /&gt;
&lt;br /&gt;
The algorithm splits the image into multiple cells. For each cell the following are calculated:&lt;br /&gt;
* An average noise level for the red-green channel and the blue-yellow channel.&lt;br /&gt;
* A maximum noise level for the same channels.&lt;br /&gt;
&lt;br /&gt;
==== Preview ====&lt;br /&gt;
&lt;br /&gt;
This method is only operational when zoomed to 100% or more. It analyzes the areas currently visible in the preview (if you are zoomed to 100% or more) and calculates:&lt;br /&gt;
* An average noise level for the red-green channel and the blue-yellow channel.&lt;br /&gt;
* A maximum noise level for the same channels.&lt;br /&gt;
&lt;br /&gt;
The three sliders - Master, Red-Green and Blue-Yellow - as well as the &amp;quot;Preview noise&amp;quot; values, are updated accordingly.&lt;br /&gt;
&lt;br /&gt;
If you would like to keep the currently calculated values then you should switch back to &amp;quot;manual&amp;quot; method, else the values will be re-calculated when you pan or when you copy the profile to other images.&lt;br /&gt;
&lt;br /&gt;
=== Median ===&lt;br /&gt;
&lt;br /&gt;
[[File:Rt nr median books.jpg|600px|thumb|The Median filter in RawTherapee-4.1 was used to eliminate artifacts which fit in a 3x3 window left over from the noise reduction process.]]&lt;br /&gt;
[[File:Rt nr median zoom books.jpg|thumb|600px|Comparison of noise reduction without and with median filtering, zoomed to 200%. While the filtered image on the right may appear less sharp, notice that the unfiltered image on the left does not really contain any more detail - the noise gives the illusion of sharpness. At the same time, the filtered image when saved to JPEG/92/standard was almost 40% smaller than the unfiltered one (350kB vs 215kB). RawTherapee-4.1.]]&lt;br /&gt;
&lt;br /&gt;
Use this filter to remove tiny, sharp-looking artifacts left-over from noise reduction.&lt;br /&gt;
&lt;br /&gt;
; Median Type&lt;br /&gt;
The [https://en.wikipedia.org/wiki/Median_filter median filter] replaces each pixel with the median value of its neighboring pixels. The contiguous group of pixels being sampled is called the &amp;quot;windows&amp;quot;. This window slides pixel by pixel over the entire image. You can choose the size of this window using the &amp;quot;Median type&amp;quot; drop-down. The larger the size, the longer it takes.&lt;br /&gt;
&lt;br /&gt;
Available window sizes:&lt;br /&gt;
* 3x3 soft: treats 5 pixels in a 3x3 pixel window.&lt;br /&gt;
: ○●○&lt;br /&gt;
: ●●●&lt;br /&gt;
: ○●○&lt;br /&gt;
* 3x3: treats 9 pixels in a 3x3 pixel window.&lt;br /&gt;
: ●●●&lt;br /&gt;
: ●●●&lt;br /&gt;
: ●●●&lt;br /&gt;
* 5x5 soft: treats 13 pixels in a 5x5 pixel window.&lt;br /&gt;
: ○○●○○&lt;br /&gt;
: ○●●●○&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ○●●●○&lt;br /&gt;
: ○○●○○&lt;br /&gt;
* 5x5: treats 25 pixels in a 5x5 pixel window.&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
: ●●●●●&lt;br /&gt;
* 7x7: treats 49 pixels in a 7x7 pixel window.&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
: ●●●●●●●&lt;br /&gt;
* 9x9: treats 81 pixels in a 9x9 pixel window.&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
: ●●●●●●●●●&lt;br /&gt;
&lt;br /&gt;
Sometimes it is possible to achieve higher quality running several iterations with a small window size than one iteration with a large window size.&lt;br /&gt;
&lt;br /&gt;
;Median Method&lt;br /&gt;
You have five methods at your disposal:&lt;br /&gt;
* Luminance only: works in the L*a*b* space, but only affects the L* channel.&lt;br /&gt;
* Chroma only: works in the L*a*b* space, but only affects the a* and b* channels.&lt;br /&gt;
* Weighted L* (little) + a*b* (normal): affects all channels in the L*a*b* space, but acts more weakly on the L* channel.&lt;br /&gt;
* L*a*b*: affects all channels equally.&lt;br /&gt;
* RGB: works in the RGB space, and the window size choice is limited to 3x3 soft, 3x3 and 5x5.&lt;br /&gt;
&lt;br /&gt;
When using the &amp;quot;Luminance only&amp;quot; and &amp;quot;L*a*b*&amp;quot; methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline. When using the RGB color space, it will be performed at the very end of the noise reduction pipeline.&lt;br /&gt;
&lt;br /&gt;
You may wonder what other uses median filtering has apart from the elimination of pixels which strongly differ from their surrounding neighbors for aesthetic reasons. One of these benefits is a reduction in file size when saving to compressed formats such as JPEG and PNG. Median filtering removes variations which you will lose anyway if you downscale the image. You are also likely not to see these variations if you print the image. Removing them using median filtering can reduce the file size by even 40% (tested using JPEG compression strength 92 with &amp;quot;balanced quality&amp;quot; [https://en.wikipedia.org/wiki/Chroma_subsampling chroma subsampling]), so give it a try if output file size is a factor.&lt;br /&gt;
&lt;br /&gt;
Finally, the &amp;quot;chroma only&amp;quot; median filter method can be used as a complement to automatic chrominance noise reduction calculation - by reducing sharp outliers it can soften the calculated values, thereby avoiding fading out color detail too much.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5237</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5237"/>
		<updated>2019-05-27T15:35:38Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details instructions for compiling RawTherapee on '''Windows''' systems. There are also separate pages with instructions for compiling on [[Linux]] and [[macOS]]. This guide details the '''what''' and '''how''' parts of compilation. For the '''why''' and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed [[Linux]] article.&lt;br /&gt;
&lt;br /&gt;
For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the [[Linux]] guide. The information below is in addition to that.&lt;br /&gt;
&lt;br /&gt;
RawTherapee requires GTK+ 3.22.24 or newer, as this is the [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 first version to support native windows], without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior], such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02.&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\gtk-3.0 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5128</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=5128"/>
		<updated>2019-04-21T20:17:25Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: added scalable\ui&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
scalable\ui&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4564</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4564"/>
		<updated>2018-12-22T10:07:32Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4552</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4552"/>
		<updated>2018-12-21T14:48:40Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_seh-1.dll (or libgcc_s_dw2-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4460</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4460"/>
		<updated>2018-12-15T21:55:51Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4402</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4402"/>
		<updated>2018-12-05T18:31:22Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or, recommended, with [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy robocopy] inside the &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt; shell script using &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; for the options.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4396</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4396"/>
		<updated>2018-12-04T09:34:43Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman. You can refer to the [https://wiki.archlinux.org/index.php/pacman pacman manual] for details.&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file &amp;lt;code&amp;gt;settings.ini&amp;lt;/code&amp;gt; containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4395</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4395"/>
		<updated>2018-12-04T09:26:43Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is pacman [https://wiki.archlinux.org/index.php/pacman pacman manual].&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4394</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4394"/>
		<updated>2018-12-04T09:21:49Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is [https://wiki.archlinux.org/index.php/ pacman].&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4393</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4393"/>
		<updated>2018-12-04T09:19:47Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version [https://gitlab.gnome.org/GNOME/gtk/issues/760#note_110809 patched] to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4392</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4392"/>
		<updated>2018-12-04T09:11:40Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: Rewriting of Windows page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4221</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4221"/>
		<updated>2018-11-19T22:00:39Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS2 shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS2 shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS2 shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS2 shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4220</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4220"/>
		<updated>2018-11-19T21:58:19Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4218</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4218"/>
		<updated>2018-11-19T10:02:23Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
[[File:MSYS2 Shell.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=File:MSYS2_Shell.jpg&amp;diff=4217</id>
		<title>File:MSYS2 Shell.jpg</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=File:MSYS2_Shell.jpg&amp;diff=4217"/>
		<updated>2018-11-19T10:00:55Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: MSYS2 icons on desktop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MSYS2 icons on desktop&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4216</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4216"/>
		<updated>2018-11-19T09:59:18Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4215</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4215"/>
		<updated>2018-11-19T09:49:31Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this page is being updated by Gaaned92 in [[User:Gaaned92]]. After review, it will be copied back here.&lt;br /&gt;
&lt;br /&gt;
This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MinGW-w64 runtime. Begin by installing and updating MSYS2 using the instructions from the [https://msys2.github.io/ MSYS2 website]. Then run the following commands using either &amp;quot;''MinGW-w64 Win32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW-w64 Win64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. We recommend using GTK+ 3.22.24 or newer as this is the first version to support native windows, without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gtkmm mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gtkmm mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not yet provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano Makefile&lt;br /&gt;
&lt;br /&gt;
# Replace&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# And replace&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build Clearlooks ==&lt;br /&gt;
&lt;br /&gt;
If you are building RawTherapee using GTK2 then you need the Clearlooks theme engine. You do not need it if you are building using GTK3.&lt;br /&gt;
&lt;br /&gt;
Download and build it:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://sources.archlinux.org/other/gtk-engines/gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ tar xzf gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ cd gtk-engines-2.21.0&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32 --disable-all --enable-clearlooks&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64 --disable-all --enable-clearlooks&lt;br /&gt;
&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Clone RawTherapee's Git repository. The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a separate directory for the build:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
Run CMake and Make:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows XP and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libgcc_s_seh-1.dll&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
16x16\actions\*&lt;br /&gt;
16x16\devices\*&lt;br /&gt;
16x16\mimetypes\*&lt;br /&gt;
16x16\places\*&lt;br /&gt;
16x16\status\*&lt;br /&gt;
48x48\devices\*&lt;br /&gt;
24x24\status\image-missing.png&lt;br /&gt;
&lt;br /&gt;
icon-theme.cache&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe -&amp;gt; .&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe -&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
The current &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script is designed for the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch. If you want to create a package for a GTK3 build (&amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;releases&amp;lt;/code&amp;gt; branches) you will need to edit the script and replace the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\lib\*&amp;quot;; DestDir: &amp;quot;{app}\lib\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\share\*&amp;quot;; DestDir: &amp;quot;{app}\share\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so that icons and schemas will be copied into the package.&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder and, if using Inno Setup to generate the package, the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script should be edited by uncommenting (removing the semicolon from the front of) the following around line 114 of the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
;Source: &amp;quot;{#MyBuildBasePath}\gdb.exe&amp;quot;; DestDir: &amp;quot;{app}&amp;quot;; Flags: ignoreversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;WinXP|WinVista&amp;gt;_&amp;lt;32|64&amp;gt;_&amp;lt;version&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinXP&amp;quot; means that the build is only for Windows XP. &amp;quot;WinVista&amp;quot; means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-dev-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, include the names of all build types, e.g. &amp;lt;code&amp;gt;release_debug&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release_debug.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2-dev-g1a2b3c4d_release_debug.zip&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4214</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4214"/>
		<updated>2018-11-19T09:43:59Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this page is being updated by Gaaned92. Please review it in his User page before it is copied back here&lt;br /&gt;
&lt;br /&gt;
This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MinGW-w64 runtime. Begin by installing and updating MSYS2 using the instructions from the [https://msys2.github.io/ MSYS2 website]. Then run the following commands using either &amp;quot;''MinGW-w64 Win32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW-w64 Win64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. We recommend using GTK+ 3.22.24 or newer as this is the first version to support native windows, without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gtkmm mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gtkmm mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not yet provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano Makefile&lt;br /&gt;
&lt;br /&gt;
# Replace&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# And replace&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build Clearlooks ==&lt;br /&gt;
&lt;br /&gt;
If you are building RawTherapee using GTK2 then you need the Clearlooks theme engine. You do not need it if you are building using GTK3.&lt;br /&gt;
&lt;br /&gt;
Download and build it:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://sources.archlinux.org/other/gtk-engines/gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ tar xzf gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ cd gtk-engines-2.21.0&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32 --disable-all --enable-clearlooks&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64 --disable-all --enable-clearlooks&lt;br /&gt;
&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Clone RawTherapee's Git repository. The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a separate directory for the build:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
Run CMake and Make:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows XP and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libgcc_s_seh-1.dll&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
16x16\actions\*&lt;br /&gt;
16x16\devices\*&lt;br /&gt;
16x16\mimetypes\*&lt;br /&gt;
16x16\places\*&lt;br /&gt;
16x16\status\*&lt;br /&gt;
48x48\devices\*&lt;br /&gt;
24x24\status\image-missing.png&lt;br /&gt;
&lt;br /&gt;
icon-theme.cache&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe -&amp;gt; .&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe -&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
The current &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script is designed for the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch. If you want to create a package for a GTK3 build (&amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;releases&amp;lt;/code&amp;gt; branches) you will need to edit the script and replace the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\lib\*&amp;quot;; DestDir: &amp;quot;{app}\lib\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\share\*&amp;quot;; DestDir: &amp;quot;{app}\share\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so that icons and schemas will be copied into the package.&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder and, if using Inno Setup to generate the package, the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script should be edited by uncommenting (removing the semicolon from the front of) the following around line 114 of the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
;Source: &amp;quot;{#MyBuildBasePath}\gdb.exe&amp;quot;; DestDir: &amp;quot;{app}&amp;quot;; Flags: ignoreversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;WinXP|WinVista&amp;gt;_&amp;lt;32|64&amp;gt;_&amp;lt;version&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinXP&amp;quot; means that the build is only for Windows XP. &amp;quot;WinVista&amp;quot; means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-dev-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, include the names of all build types, e.g. &amp;lt;code&amp;gt;release_debug&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release_debug.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2-dev-g1a2b3c4d_release_debug.zip&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4213</id>
		<title>Windows</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=Windows&amp;diff=4213"/>
		<updated>2018-11-19T09:43:32Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: this page is being updated by Gaaned92. Please review it in his User page before copying back here&lt;br /&gt;
&lt;br /&gt;
This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MinGW-w64 runtime. Begin by installing and updating MSYS2 using the instructions from the [https://msys2.github.io/ MSYS2 website]. Then run the following commands using either &amp;quot;''MinGW-w64 Win32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW-w64 Win64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. We recommend using GTK+ 3.22.24 or newer as this is the first version to support native windows, without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gtkmm mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gtkmm mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not yet provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano Makefile&lt;br /&gt;
&lt;br /&gt;
# Replace&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# And replace&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build Clearlooks ==&lt;br /&gt;
&lt;br /&gt;
If you are building RawTherapee using GTK2 then you need the Clearlooks theme engine. You do not need it if you are building using GTK3.&lt;br /&gt;
&lt;br /&gt;
Download and build it:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://sources.archlinux.org/other/gtk-engines/gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ tar xzf gtk-engines-2.21.0.tar.gz&lt;br /&gt;
$ cd gtk-engines-2.21.0&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32 --disable-all --enable-clearlooks&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64 --disable-all --enable-clearlooks&lt;br /&gt;
&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Clone RawTherapee's Git repository. The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch; to build using GTK3 use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. The last version of RawTherapee to support GTK2 is 5.0-r1-gtk2 released on 2017-02-02. Use the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch for the latest code - it requires GTK+ &amp;gt;=3.16. When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a separate directory for the build:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
Run CMake and Make:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows XP and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libgcc_s_seh-1.dll&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
16x16\actions\*&lt;br /&gt;
16x16\devices\*&lt;br /&gt;
16x16\mimetypes\*&lt;br /&gt;
16x16\places\*&lt;br /&gt;
16x16\status\*&lt;br /&gt;
48x48\devices\*&lt;br /&gt;
24x24\status\image-missing.png&lt;br /&gt;
&lt;br /&gt;
icon-theme.cache&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe -&amp;gt; .&lt;br /&gt;
&amp;lt;prefix&amp;gt;\bin\gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe -&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
The current &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script is designed for the &amp;lt;code&amp;gt;gtk2&amp;lt;/code&amp;gt; branch. If you want to create a package for a GTK3 build (&amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;releases&amp;lt;/code&amp;gt; branches) you will need to edit the script and replace the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\lib\*&amp;quot;; DestDir: &amp;quot;{app}\lib\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Source: &amp;quot;{#MyBuildBasePath}\share\*&amp;quot;; DestDir: &amp;quot;{app}\share\&amp;quot;; Flags: ignoreversion recursesubdirs createallsubdirs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
so that icons and schemas will be copied into the package.&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder and, if using Inno Setup to generate the package, the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script should be edited by uncommenting (removing the semicolon from the front of) the following around line 114 of the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
;Source: &amp;quot;{#MyBuildBasePath}\gdb.exe&amp;quot;; DestDir: &amp;quot;{app}&amp;quot;; Flags: ignoreversion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;WinXP|WinVista&amp;gt;_&amp;lt;32|64&amp;gt;_&amp;lt;version&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinXP&amp;quot; means that the build is only for Windows XP. &amp;quot;WinVista&amp;quot; means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-dev-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, include the names of all build types, e.g. &amp;lt;code&amp;gt;release_debug&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2_release_debug.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;RawTherapee_WinVista_64_5.2-dev-g1a2b3c4d_release_debug.zip&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4194</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4194"/>
		<updated>2018-11-18T16:32:28Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
libzstd.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4147</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4147"/>
		<updated>2018-11-09T22:00:42Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun &lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4146</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4146"/>
		<updated>2018-11-09T21:27:33Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/W)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4145</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4145"/>
		<updated>2018-11-09T21:01:20Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtkmm3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
Copy the &amp;lt;code&amp;gt;lensfun&amp;lt;/code&amp;gt; folder and &amp;lt;code&amp;gt;lensfun-0.3.2-py3.6.egg-info&amp;lt;/code&amp;gt; file from &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.6\site-packages&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;mingw32|mingw64&amp;gt;\lib\python3.&amp;lt;version&amp;gt;\site-packages&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;vesion&amp;gt; is the version of installed Python3.&lt;br /&gt;
&lt;br /&gt;
Then in Mingw32 or Mingw64 shell: &lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4138</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4138"/>
		<updated>2018-11-09T10:06:37Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Copy the content of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy the necessary DLLs and exe from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4137</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4137"/>
		<updated>2018-11-09T09:50:02Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
You can copy either with the Windows file manager or with &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt; inside a MSYS2 shell script.&lt;br /&gt;
Definition of folders:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Copy the following list of Adwaita theme files and directories  from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Copy following files :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4136</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4136"/>
		<updated>2018-11-09T07:44:03Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
If you do the copy with a MSYS2 shell script, the easiest way is to use &amp;lt;code&amp;gt;robocopy&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4135</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4135"/>
		<updated>2018-11-09T07:42:19Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
If you do the copy in a shell, the easiest way is to use robocopy.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable.&lt;br /&gt;
&lt;br /&gt;
 In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. &lt;br /&gt;
&lt;br /&gt;
When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions and will be copied into Rawtherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4134</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4134"/>
		<updated>2018-11-08T23:01:00Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install MSYS2 base system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell, for each file:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MINGW64 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
If you do the copy in a shell, the easiest way is to use robocopy.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4133</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4133"/>
		<updated>2018-11-08T22:49:19Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install base MSYS2 system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
Update the base MSYS2 system until no further updates are available using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 base system and application packages ===&lt;br /&gt;
&lt;br /&gt;
in MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ lensfun-update-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4132</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4132"/>
		<updated>2018-11-08T22:38:47Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install core system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Updating MSYS2 packages ===&lt;br /&gt;
&lt;br /&gt;
To update MSYS2 core system and application packages, in MSYS shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -Syuu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating Lensfun data base ===&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4131</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4131"/>
		<updated>2018-11-08T22:32:27Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
&lt;br /&gt;
=== Install core system ===&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
=== Install tools and libraries ===&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get applicable versions of packages ===&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
=== Update MSYS2 ===&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4130</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4130"/>
		<updated>2018-11-08T22:28:10Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to build 32B applications, do the above, replacing '''x86_64''' by '''i386'''.&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4129</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4129"/>
		<updated>2018-11-08T22:23:18Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-files&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;\etc\pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4128</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4128"/>
		<updated>2018-11-08T22:21:46Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2&amp;gt;\var\cache\pacman\pkg, these files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Then in the MSYS shell:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
Pacman -U &amp;lt;path-to-&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;/etc/pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4127</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4127"/>
		<updated>2018-11-08T22:13:18Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
note: in following text, &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder.&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not present in &amp;lt;MSYS2These files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
Then in the MSYS shell Pacman -U &amp;lt;path-to-&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add following to the file &amp;lt;MSYS2&amp;gt;/etc/pacman.conf to prevent pacman from updating the packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4126</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4126"/>
		<updated>2018-11-07T12:50:04Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-cairo-1.15.12-2-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&lt;br /&gt;
e.g. pacman -U &amp;lt;path&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&lt;br /&gt;
The files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Add following to the file .../etc/pacman.conf to prevent MSYS from updating the packages.&lt;br /&gt;
&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-cairo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4125</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4125"/>
		<updated>2018-11-07T12:48:31Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman])&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
This is a list of all packages which have to be downgraded to:&lt;br /&gt;
&lt;br /&gt;
mingw-w64-x86_64-cairo-1.15.12-2-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz&lt;br /&gt;
mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz&lt;br /&gt;
&lt;br /&gt;
e.g. pacman -U &amp;lt;path&amp;gt;/mingw-w64-x86_64-...&lt;br /&gt;
&lt;br /&gt;
The files can be downloaded from: http://repo.msys2.org/mingw/x86_64/&lt;br /&gt;
&lt;br /&gt;
Add following to the file .../etc/pacman.conf to prevent MSYS from updating the packages.&lt;br /&gt;
&lt;br /&gt;
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-cairo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-libjpeg-turbo&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-lensfun&lt;br /&gt;
IgnorePkg = mingw-w64-x86_64-gtk3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
	<entry>
		<id>http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4124</id>
		<title>User:Gaaned92</title>
		<link rel="alternate" type="text/html" href="http://rawpedia.rawtherapee.com/index.php?title=User:Gaaned92&amp;diff=4124"/>
		<updated>2018-11-07T12:40:43Z</updated>

		<summary type="html">&lt;p&gt;Gaaned92: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide documents how to build RawTherapee for 32-bit or 64-bit versions of Windows using the MSYS2 application.&lt;br /&gt;
&lt;br /&gt;
RawTherapee is built using GTK+ version 3.  GTK+ 3.22.24 or newer is required as this is the first version to support native windows , without which the RawTherapee window could exhibit [https://github.com/Beep6581/RawTherapee/issues/4125 strange behavior] such as maximizing under the taskbar in Windows 10.&lt;br /&gt;
&lt;br /&gt;
The last version of RawTherapee to support GTK2 and compatible with Windows XP is 5.0-r1-gtk2 released on 2017-02-02. &lt;br /&gt;
&lt;br /&gt;
== MSYS2 Installation==&lt;br /&gt;
 &lt;br /&gt;
Begin by installing and updating MSYS2 carefully following the instructions from the [https://msys2.github.io/ MSYS2 website].&lt;br /&gt;
&lt;br /&gt;
At the end of this installation, you get three shells:&lt;br /&gt;
* MSYS shell: used to developp the core system and manage the MSYS2 application( mainly updating MSYS2 packages)&lt;br /&gt;
* MINGW64 shell: it provides environment to build  64B applications.&lt;br /&gt;
* MINGW32 shell: it provides environment to build  32B applications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Install tools and libraries ==&lt;br /&gt;
&lt;br /&gt;
The MSYS2 package manager is &amp;quot;''pacman''&amp;quot; (see [https://wiki.archlinux.org/index.php/ https://wiki.archlinux.org/index.php/pacman]&lt;br /&gt;
 &lt;br /&gt;
In the MSYS shell:&lt;br /&gt;
&lt;br /&gt;
First, install a few miscellaneous tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ pacman -S tar gzip nano make diffutils intltool git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install the necessary development tools:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S mingw-w64-i686-gcc mingw-w64-i686-gdb mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-cmake&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the required libraries:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# win32&lt;br /&gt;
$ pacman -S  mingw-w64-i686-gtkmm3 mingw-w64-i686-lcms2 mingw-w64-i686-fftw mingw-w64-i686-lensfun&lt;br /&gt;
# win64&lt;br /&gt;
$ pacman -S  mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-lcms2 mingw-w64-x86_64-fftw mingw-w64-x86_64-lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Get applicable versions of packages ==&lt;br /&gt;
As MSYS2 provides rolling releases of packages, it can happen that new versions of some packages are incompatible with present rawtherapee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download and build libiptcdata ==&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
The libiptcdata library is not provided by MSYS2, therefore it should be downloaded and configured using:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ curl -LO http://downloads.sourceforge.net/project/libiptcdata/libiptcdata/1.0.4/libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ tar xzf libiptcdata-1.0.4.tar.gz&lt;br /&gt;
$ cd libiptcdata-1.0.4&lt;br /&gt;
&lt;br /&gt;
# win32&lt;br /&gt;
$ ./configure --prefix=/mingw32&lt;br /&gt;
# win64&lt;br /&gt;
$ ./configure --prefix=/mingw64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; needs to be opened using a text editor to remove &amp;lt;code&amp;gt;iptc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docs&amp;lt;/code&amp;gt; from the lists named &amp;lt;code&amp;gt;SUBDIRS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DIST_SUBDIRS&amp;lt;/code&amp;gt;, as building or installing will fail otherwise:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ nano -m Makefile&lt;br /&gt;
&lt;br /&gt;
# search (command ctrl/G)&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po iptc docs win python&lt;br /&gt;
# and replace with&lt;br /&gt;
DIST_SUBDIRS = m4 libiptcdata po win python&lt;br /&gt;
&lt;br /&gt;
# search&lt;br /&gt;
SUBDIRS = m4 libiptcdata po iptc docs win $(MAYBE_PYTHONLIB)&lt;br /&gt;
# and replace with&lt;br /&gt;
SUBDIRS = m4 libiptcdata po win $(MAYBE_PYTHONLIB)&lt;br /&gt;
&lt;br /&gt;
# save&lt;br /&gt;
ctrl/O&lt;br /&gt;
&lt;br /&gt;
# quit&lt;br /&gt;
ctrl/X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally build and install the library:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
$ make install&lt;br /&gt;
$ cd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Clone and build RawTherapee ==&lt;br /&gt;
&lt;br /&gt;
Use either &amp;quot;''MinGW32 Shell''&amp;quot; if you want to build a 32-bit version, or &amp;quot;''MinGW64 Shell''&amp;quot; if you want to build a 64-bit version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Clone RawTherapee's Git repository. ===&lt;br /&gt;
 The build process will fail if there is a space character anywhere in your &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder path. For example if your Windows username is &amp;quot;Zank Frappa&amp;quot; then your home path will be &amp;lt;code&amp;gt;C:\Users\Zank Frappa\&amp;lt;/code&amp;gt; and if you clone RawTherapee inside there then the build will fail during compilation. Simply clone to a folder where neither it nor its parent folders have a space in their name, for example &amp;lt;code&amp;gt;C:\code\repo-rt&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone http://github.com/Beep6581/RawTherapee.git /c/code/repo-rt&lt;br /&gt;
$ cd /c/code/repo-rt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you clone the repository you will automatically find yourself in the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch. To switch to the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch manually, do the following:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a separate directory for the build ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir build&lt;br /&gt;
$ cd build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you switch branches then you must delete and recreate the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; folder so that compilation starts from scratch in an empty folder, otherwise compilation is likely to fail. However if you are just updating without changing branches then you do not have to start with an empty build folder - you can just go into the existing one, and compilation will be faster because not everything will need to be recompiled.&lt;br /&gt;
&lt;br /&gt;
=== Run CMake and Make ===&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
$ cmake -G &amp;quot;MSYS Makefiles&amp;quot; -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE=&amp;quot;release&amp;quot; -DPROC_TARGET_NUMBER=&amp;quot;2&amp;quot; -DCACHE_NAME_SUFFIX=&amp;quot;5-dev&amp;quot; ..&lt;br /&gt;
$ make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find an explanation of the various CMake options in the [[Linux#CMake|Linux article]], including an explanation of the various &amp;quot;BUILD_TYPE&amp;quot; options.&lt;br /&gt;
&lt;br /&gt;
If you are building for 32-bit Windows  and are using the &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;relwithdebinfo&amp;lt;/code&amp;gt; &amp;quot;BUILD_TYPE&amp;quot;, you will need to add the &amp;lt;code&amp;gt;-mstackrealign&amp;lt;/code&amp;gt; compiler flag before the last two dots &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; of the CMake command above:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
-DCMAKE_C_FLAGS=&amp;quot;-mstackrealign&amp;quot; -DCMAKE_CXX_FLAGS=&amp;quot;-mstackrealign&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RawTherapee can now be started from the MSYS2 command line:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
# for debug builds&lt;br /&gt;
$ cd debug&lt;br /&gt;
# for release builds&lt;br /&gt;
$ cd release&lt;br /&gt;
# for relwithdebinfo builds&lt;br /&gt;
$ cd relwithdebinfo&lt;br /&gt;
$ ./rawtherapee.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copy RawTherapee and required DLLs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file manager can be used to copy the contents of &amp;lt;code&amp;gt;c:\code\repo-rt\build\&amp;lt;debug|release|relwithdebinfo&amp;gt;&amp;lt;/code&amp;gt; together with the necessary DLLs from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\bin&amp;lt;/code&amp;gt; into &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;, where:&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;\&amp;lt;mingw32|mingw64&amp;gt;&amp;lt;/code&amp;gt;,&lt;br /&gt;
*&amp;lt;code&amp;gt;&amp;lt;MSYS2&amp;gt;&amp;lt;/code&amp;gt; is the MSYS2 installation folder,&lt;br /&gt;
*and &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; is the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
The current list of required DLLs and EXE is:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper.exe&lt;br /&gt;
gspawn-&amp;lt;win32|win64&amp;gt;-helper-console.exe&lt;br /&gt;
libatk-1.0-0.dll&lt;br /&gt;
libatkmm-1.6-1.dll&lt;br /&gt;
libbz2-1.dll&lt;br /&gt;
libcairo-2.dll&lt;br /&gt;
libcairo-gobject-2.dll&lt;br /&gt;
libcairomm-1.0-1.dll&lt;br /&gt;
libcroco-0.6-3.dll&lt;br /&gt;
libdatrie-1.dll&lt;br /&gt;
libepoxy-0.dll&lt;br /&gt;
libexpat-1.dll&lt;br /&gt;
libfﬁ-6.dll&lt;br /&gt;
libfftw3f-3.dll&lt;br /&gt;
libfontconﬁg-1.dll&lt;br /&gt;
libfreetype-6.dll&lt;br /&gt;
libfribidi-0.dll&lt;br /&gt;
libgcc_s_dw2-1.dll (or libgcc_s_seh-1.dll for W32)&lt;br /&gt;
libgdk_pixbuf-2.0-0.dll&lt;br /&gt;
libgdk-3-0.dll&lt;br /&gt;
libgdkmm-3.0-1.dll&lt;br /&gt;
libgio-2.0-0.dll&lt;br /&gt;
libgiomm-2.4-1.dll&lt;br /&gt;
libglib-2.0-0.dll&lt;br /&gt;
libglibmm-2.4-1.dll&lt;br /&gt;
libgmodule-2.0-0.dll&lt;br /&gt;
libgobject-2.0-0.dll&lt;br /&gt;
libgomp-1.dll&lt;br /&gt;
libgraphite2.dll&lt;br /&gt;
libgtk-3-0.dll&lt;br /&gt;
libgtkmm-3.0-1.dll&lt;br /&gt;
libharfbuzz-0.dll&lt;br /&gt;
libiconv-2.dll&lt;br /&gt;
libintl-8.dll&lt;br /&gt;
libjpeg-8.dll&lt;br /&gt;
liblcms2-2.dll&lt;br /&gt;
liblensfun.dll&lt;br /&gt;
liblzma-5.dll&lt;br /&gt;
libpango-1.0-0.dll&lt;br /&gt;
libpangocairo-1.0-0.dll&lt;br /&gt;
libpangoft2-1.0-0.dll&lt;br /&gt;
libpangomm-1.4-1.dll&lt;br /&gt;
libpangowin32-1.0-0.dll&lt;br /&gt;
libpcre-1.dll&lt;br /&gt;
libpixman-1-0.dll&lt;br /&gt;
libpng16-16.dll&lt;br /&gt;
librsvg-2-2.dll&lt;br /&gt;
libsigc-2.0-0.dll&lt;br /&gt;
libstdc++-6.dll&lt;br /&gt;
libsystre-0.dll&lt;br /&gt;
libthai-0.dll&lt;br /&gt;
libtiff-5.dll&lt;br /&gt;
libtre-5.dll&lt;br /&gt;
libwinpthread-1.dll&lt;br /&gt;
libxml2-2.dll&lt;br /&gt;
zlib1.dll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following list of Adwaita theme files and directories should be copied from &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;\share\icons\Adwaita\&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;.\share\icons\Adwaita\&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
scalable\actions&lt;br /&gt;
scalable\devices&lt;br /&gt;
scalable\mimetypes&lt;br /&gt;
scalable\places&lt;br /&gt;
scalable\status&lt;br /&gt;
&lt;br /&gt;
index.theme&lt;br /&gt;
&lt;br /&gt;
cursors\plus.cur&lt;br /&gt;
cursors\sb_h_double_arrow.cur&lt;br /&gt;
cursors\sb_left_arrow.cur&lt;br /&gt;
cursors\sb_right_arrow.cur&lt;br /&gt;
cursors\sb_v_double_arrow.cur&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following files also need to be copied:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;prefix&amp;gt;\lib\gdk-pixbuf-2.0 -&amp;gt; .\lib\gdk-pixbuf-2.0&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\glib-2.0\schemas\gschemas.compiled -&amp;gt; .\share\glib-2.0\schemas&lt;br /&gt;
&amp;lt;prefix&amp;gt;\share\lensfun\version_1\* -&amp;gt; .\share\lensfun&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create in .\share\GTK3 a file settings.ini containing :&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
[Settings] gtk-button-images=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a distributable package ==&lt;br /&gt;
&lt;br /&gt;
If you plan to distribute RawTherapee packages for the Windows platform, as a first step you need to make sure that RawTherapee will be built for the &amp;quot;generic&amp;quot; processor target. To do so, use &amp;lt;code&amp;gt;-DPROC_TARGET_NUMBER=&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; in the CMake command.&lt;br /&gt;
&lt;br /&gt;
During compilation, a script named &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; is created in the RawTherapee installation folder. This script is used by Inno Setup [http://www.jrsoftware.org/isinfo.php], a program which is used to generate installers for Windows programs. It is advised to download the Unicode version [http://www.jrsoftware.org/download.php/is-unicode.exe] to avoid problems with some languages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To help users [[How_to_write_useful_bug_reports|write useful bug reports]], package maintainers are encouraged to produce builds which include both a &amp;quot;release&amp;quot; and a &amp;quot;debug&amp;quot; executable, and to bundle them together with the GDB debugger executable. In other words, put the &amp;lt;code&amp;gt;rawtherapee.exe&amp;lt;/code&amp;gt; (release) file together with the &amp;lt;code&amp;gt;rawtherapee-debug.exe&amp;lt;/code&amp;gt; (debug) file and the &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; file together into the same installer or the same archive. An alternative is to produce &amp;quot;relwithdebinfo&amp;quot; builds - these are much faster than &amp;quot;debug&amp;quot; but not as optimized as &amp;quot;release&amp;quot; builds, yet they provide just about as much useful information as &amp;quot;debug&amp;quot; builds. When making &amp;quot;relwithdebinfo&amp;quot; or &amp;quot;debug&amp;quot; builds you must provide the GDB debugger executable. Windows binaries of the debugger &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; can be downloaded from [http://www.equation.com/servlet/equation.cmd?fa=gdb here] in 32- and 64-bit versions.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gdb.exe&amp;lt;/code&amp;gt; binary, available from http://www.gnu.org/software/gdb/, should be copied into the RawTherapee installation folder.&lt;br /&gt;
&lt;br /&gt;
Now that everything is set up, to create the package right-click on the &amp;lt;code&amp;gt;WindowsInnoSetup.iss&amp;lt;/code&amp;gt; script and choose ''Compile'' from the context menu. It will automatically generate the installer and place it in the parent folder.&lt;br /&gt;
&lt;br /&gt;
To make your new package compatible with the RawTherapee website's upload panel, create a zip archive in which you will place both the newly created installer and the corresponding ''AboutThisBuild.txt'' file which can be found at the same place. Name the resulting zip archive following this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are building and distributing nightly builds, follow this template:&lt;br /&gt;
&amp;lt;code&amp;gt;RawTherapee_&amp;lt;branch&amp;gt;_&amp;lt;version&amp;gt;_WinVista_&amp;lt;32|64&amp;gt;_&amp;lt;buildtype&amp;gt;.zip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;WinVista&amp;quot;  means it can run on any version of Windows from Vista upwards, including 10.&lt;br /&gt;
* The &amp;quot;version&amp;quot; will either look like &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;5.2&amp;lt;/code&amp;gt; tag, or &amp;lt;code&amp;gt;5.2-g1a2b3c4d&amp;lt;/code&amp;gt; if you checkout the &amp;lt;code&amp;gt;dev&amp;lt;/code&amp;gt; branch after 5.2 was tagged.&lt;br /&gt;
* If you are shipping more than one build type in an installer, don't include &amp;lt;buildtype&amp;gt; in the name.&lt;/div&gt;</summary>
		<author><name>Gaaned92</name></author>
	</entry>
</feed>