Compile under Windows

Question:

Please, can you tell me the time of the day?

Answer:

Yes

@TooWaBoo

And can you do that?

@sguyader

If I donā€™t include cursors and Gdk-pixbuf, I get warning at run time

 Andre@C1 MINGW64 /d/RAWTHERAPEE/5.3-482-gf644d41f
 $ ./rawtherapee
 
 (rawtherapee.exe:23432): Gdk-WARNING **: Failed to load cursor theme Adwaita
 
 (rawtherapee.exe:23432): Gtk-WARNING **: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg.
 This may indicate that pixbuf loaders or the mime database could not be found.

So I think it is better keep those items included.

The list of dependencies should be as follows (until cursors are shiped with RT):

gtk2 files
    delete them
dlls
    The list in rawpedia is ok except the error in libbz2-1 name

Adwaita icons
    icons/Adwaita/16x16/actions/*
    icons/Adwaita/16x16/devices/*
    icons/Adwaita/16x16/mimetypes/*
    icons/Adwaita/16x16/places/*
    icons/Adwaita/16x16/status/*
    icons/Adwaita/48x48/devices/*
    icons/Adwaita/24x24/status/image-missing.png

    from prefix/share -> .share

Adwaita cursors
    plus.cur
    sb_h_double_arrow.cur
    sb_left_arrow.cur
    sb_right_arrow.cur
    sb_v_double_arrow.cur

    from prefix/share/icons/Adwaita/cursors
    -> ./share/icons/Adwaita.cursors

adwaita files
    icon-theme.cache
    index.theme

    from prefix/share/icons/Adwaita
    -> ./share/icons/Adwaita

Schemas
    prefix/share/glib-2.0/schemasgschemas.compiled -> ./share/glib-2.0/schemas

gdk pixbuf
    prefix/lib/gdk-pixbuf-2.0/* -> ./lib/gdk-pixbuf-2.0

@sguyader can you modify rawpedia?

For those interested, This is the simplest way I found to create subdirectories and copy the files

# Icons
  listedirs=" icons/Adwaita/16x16/actions
      icons/Adwaita/16x16/devices icons/Adwaita/16x16/mimetypes
      icons/Adwaita/16x16/places icons/Adwaita/16x16/status 
      icons/Adwaita/48x48/devices  "

    for v in $listedirs
    do
        robocopy $prefix/share/$v $destination/share/$v -s 1>/dev/null
    done
    robocopy $prefix/share/icons/adwaita/24x24/status $destination/share/icons/adwaita/24x24/status image-missing.png 1>/dev/null
#cursors
    robocopy $prefix/share/icons/Adwaita/cursors    $destination/share/icons/Adwaita/cursors plus.cur \
       sb_h_double_arrow.cur sb_left_arrow.cur sb_right_arrow.cur sb_v_double_arrow.cur 1>/dev/null
#schemas
    robocopy $prefix/share/glib-2.0/schemas  $destination/share/glib-2.0/schemas     gschemas.compiled 1>/dev/null

#Adwaita files
    robocopy  $prefix/share/icons/Adwaita    $destination/share/icons/Adwaita \
       icon-theme.cache index.theme 1>/dev/null
#gdk-pixbuf     
    robocopy $prefix/lib/gdk-pixbuf-2.0 $destination/lib/gdk-pixbuf-2.0 -s 1>/dev/null

I donā€™t know how to include the cursors into the repository of RawTherapee.

To @gaaned92, @TooWaBoo and all, I updated Rawpedia, please review my changes.

@TooWaBoo Thank you for the corrections. your changes are ok

Reading the windows page, I still have some corrections to propose:

  • in second Ā§ replace

RawTherapee can be built using GTK+ versions 2 or 3. To build using GTK2 use the gtk2 branch; to build using GTK3 use the dev branch
by
Rawtherapee is built using GTK+ version 3.

  • suppress the paragraph ā€œDownload and build Clearlooksā€ as it will no longer be used

  • at the end of ā€œClone and build RawTherapeeā€, delete all text from

if you are building for 32-bit Windows XP until end of Ā§

  • in ā€œCreating a distributable packageā€ suppress:
The current WindowsInnoSetup.iss script is designed for the gtk2 branch
until
so that icons and schemas will be copied into the package. 
  • in same Ā§ delete

The gdb.exe 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 WindowsInnoSetup.iss script should be edited by uncommenting (removing the semicolon from the front of) the following around line 114 of the script:

;Source: ā€œ{#MyBuildBasePath}\gdb.exeā€; DestDir: ā€œ{app}ā€; Flags: ignoreversion

  • replace

    RawTherapee_<WinXP|WinVista><32|64>_.zip

     "WinXP" means that the build is only for Windows XP. "WinVista" means it can run on any version of Windows from Vista upwards, including 10.
      The "version" will either look like 5.2 if you checkout the 5.2 tag, or 5.2-dev-g1a2b3c4d if you checkout the dev branch after 5.2 was tagged.
      If you are shipping more than one build type in an installer, include the names of all build types, e.g. release_debug.
    

    For example:

      RawTherapee_WinVista_64_5.2_release.zip
      RawTherapee_WinVista_64_5.2_release_debug.zip
      RawTherapee_WinVista_64_5.2-dev-g1a2b3c4d_release_debug.zip
    

by

RawTherapee_<version>_<WinVista>_<64>.zip
. "WinVista" means it can run on any version of Windows from Vista upwards, including 10.
    The "version" will either look like 5.2 if you checkout the 5.2 tag, or 5.2-xxx-g1a2b3c4d if you checkout the dev branch after 5.2 was tagged.
    

For example:

    RawTherapee_5.2_WinVista_64.zip
    RawTherapee_5.2-128-g1a2b3c4d_WinVista_64.zip

The gtk2, gtk3 and master branches are deleted. To build the GTK2 version checkout the 5.0-r1-gtk2 tag.

Itā€™s fine to mention GTK2 but the guide should focus on building the dev branch using GTK3 and not confuse the user with info about building obsolete and unsupported versions.

And please try to avoid duplicating info since that makes maintenance more difficult. For example when describing branches you could just refer to Linux#Choose_a_branch, same for CMake options and any other information which does not significantly change between OSes.

Hello!

Iā€™ve been using O/S specific dev builds from @gaaned92. I go to Google drive for these. It appears that the latest files available are dated in Oct 2023. Iā€™m not sure if new releases will be available anytime soon.

Iā€™ve also been using this script for darktable.

#!/bin/bash
lensfun-update-data
cd ~/darktable/
rm -rf build
git pull origin master
git submodule update
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable -DCUSTOM_CFLAGS=ON -DCMAKE_CXX_FLAGS=ā€œ-O3 -march=nativeā€ -DCMAKE_C_FLAGS=ā€œ-O3 -march=nativeā€ -DBINARY_PACKAGE_BUILD=OFF ā€¦/.
cmake --build . --target package

Can RawTherapee be compiled similarly?

You can try following the process of the nightly build: RawTherapee/.github/workflows/windows.yml at dev Ā· Beep6581/RawTherapee Ā· GitHub

Thanks,but thatā€™s way too complex for me to comprehend. I thought there might have been a simple script like the one I use for darktable to get the latest dev release.

The link in the original post has instructions on how to clone and build RawTherapee for the first time. Thereā€™s only a few commands you need to run. For rebuilding, use your darktable script, but replace the darktable-specific stuff: cd into the RawTherapee directory, replace the git commands with git pull origin dev, and replace the cmake commands with the ones shown in the link.