Building Natron on Windows from scratch

Hello,
I’m also trying to join the “build Natron on windows wagon”

when i try to clone the sources with GIT i have invalid path problems:
error: invalid path ‘tools/MacPorts/graphics/openimageio/Portfile.’

How do you avoid the problem ?

My understanding is I could add the problematic files to gitignore file but this may be a problem if i wan’t to submit my work on the main Natron branch.

Could you help me ?

Not able to replicate, I’m able to clone the source without any problems.

Thanks, I will look into this.

Hi, I’d like to keep on trying to make Natron building accessible.
the “git clone natron” fail it was solved by cloning directly from NatronGitHub. My Fork was probably broken.

As Saku did I followed:

qmake -r
(It worked with many warnings as you mentioned to be normal)

make
It worked but only created 3 files in Natron\App\Release
Natron.exe, Natron_res.o, NatronApp_main.o

When I launch Natron.exe it (not surprinsingly) complains about missing dlls.

During make many messages are of the like:

…/…/Natron/Engine/KnobTypes.h:39:1: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
GCC_ONLY_DIAG_OFF(class-memaccess)
^~~~~~

or

c:/msys64-20180531/mingw64/include/qt4/QtCore/qstring.h:1205:69: warning: optimization attribute on ‘bool operator==(const QString&, const QStringRef&)’ follows definition but the attribute doesn’t match [-Wattributes]
Q_CORE_EXPORT bool operator==(const QString &s1,const QStringRef &s2);
^
Could you help us ?

1 Like

I added a tutorial regarding Windows here.

1 Like

Thank you so much! I’m probably not the only one who hoped for this for a while.

It’s very clear. (As a newcomer I just needed some time to realize QTCreator was a different install I had to make :slight_smile: )

But… I’m still stuck. The result is again a Natron.exe with no dll in the same folder.

During The build QTCreator warned of:
:-1: warning: “C:\msys64-20180531\mingw64\bin\gcc.exe” is used by qmake, but “C:\msys64-20180531\mingw64\bin\cc.exe” is configured in the kit.
Please update your kit (Natron) or choose a mkspec for qmake that matches your target environment better.

When I build, I have all these warnings ( I already had the same with the make without QTCreator)
warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
GCC_ONLY_DIAG_OFF(class-memaccess)

When I launch Natron it just pops the error:
The code execution cannot proceed because libgcc_s_seh-1.dll was not found.
If I copy the dll from somewhere else … of course it asks for an other dll etc…

Maybe I’m not that far…If you still have a little time.

If you aim to package Natron then you will need to package it (see the CI environment). The build process will not copy any DLL’s, if you just want to develop Natron then you don’t need to bother with DLL’s as the environment is already setup up (MSYS2/Qt Creator).

Of course you’re right! My Natron.exe works well if I put it in the folder with all the needed files from a previous install.

Am I supposed to do this manually The build puts the Natron.exe in \App\Release\ folder whereas the normal installer puts it in \bin\ ?
I see in QTCreator some “run settings” that may be the place to ask to copy the Natron.exe to the right place before running it.

Have you tried running Natron.exe from the MSYS shell in your build folder? I run from my development environment like this:

Michael@zero MINGW64 /d/sandbox/natron/App
$ release/Natron.exe

The DLLs that are missing are probably part of MSYS, and will be in your PATH when you run from the MSYS shell.

You’ll also want to get Plugins and Resources from a 2.3.15 release build and put them in your Natron/App folder:

Michael@zero MINGW64 /d/sandbox/natron/App
$ ls -l
total 48
-rw-r--r-- 1 Michael None  2943 Sep 25 11:32 App.pro
drwxr-xr-x 1 Michael None     0 Sep 25 11:56 debug
-rw-r--r-- 1 Michael None  8051 Sep 25 11:56 Makefile
-rw-r--r-- 1 Michael None 10633 Sep 25 11:56 Makefile.Debug
-rw-r--r-- 1 Michael None 10931 Sep 25 11:56 Makefile.Release
-rw-r--r-- 1 Michael None  5263 Sep 25 11:32 NatronApp_main.cpp
-rw-r--r-- 1 Michael None  2165 Sep 25 11:32 NatronInfo.plist.in
drwxr-xr-x 1 Michael None     0 Sep 25 12:02 Plugins
drwxr-xr-x 1 Michael None     0 Sep 27 14:01 release
drwxr-xr-x 1 Michael None     0 Sep 25 12:04 Resources

I also ended up having to add the bin folder from my installed release build of 2.3.15 last in my PATH, to clear up a few other missing DLLs (most image libraries).

Maybe this will help?

Note that the FFmpeg/libRaw libraries will not be in PATH, as they are in /mingw64/ffmpeg-gpl2/bin and /mingw/libraw-gpl2/bin.

But that’s related to OpenFX-IO and not Natron.