Just sharing my findings, if it is useful to anyone.

I was looking for an easy way to sort my path setting up some version of MinGW 
to build fossil trunk (for 32 bits) on Windows.  I needed it to get a 32 bits 
build suitable for tests on Windows XP.  The build environment is Server 2016, 
which for this purpose is Windows 10 alike.  I could not use my Visual Studio 
2017, because that requires installing an optionally toolset pack (which I 
can't for obscure internal policies reasons).  That optional toolset 
specifically targets Windows XP compatibility (the default up-to-date toolset 
of Visual Studio 2017 produces executables that cannot run on Windows XP).

There are MinGW and MinGW-w64 which are two distinct projects.
Apparently the first one is older and limited to 32 bits (I may be wrong on 
this).
The other one is much more up to date, targeting both 32 and 64 bits but I 
haven't found a way to complete my setup satisfactorily.
So using http://www.mingw.org, I knew I would end up with an older setup but 
suited to the task.

## My steps to setup MinGW.

Follow the Downloads link from the top bar, leading you to 
https://sourceforge.net/projects/mingw/files/
From the Installer folder, download and run mingw-get-setup.exe
Following the steps of the installer (I only opted out from links on the 
desktop), you end up with a GUI to manage your packages. From the Basic Setup 
node I only selected 'mingw-developer-toolkit', 'mingw32-base' and 'msys-base'. 
Then hit Apply.  A few minutes later, it is done.

## My steps to set myself ready to compile fossil.

Start a windows command prompt.
Run C:\MinGW\msys\1.0\msys.bat to open up another prompt with a sh prompt.
Ended up in my home directory which happen to read '/home/Olivier' (pwd) and 
that actually is C:\MinGW\msys\1.0\home\Olivier.

## Building fossil

Assuming some fossil.exe is already in your windows path (which is easy to fix 
downloading a pre-built binary), I did nothing more than what I expected:

$ mkdir fossil
$ cd fossil
$ fossil clone http://www.fossil-scm.org/ fossil.fossil
$ fossil open fossil.fossil
$ make win/Makefile.mingw

And voilĂ :

$ fossil version -v
This is fossil version 2.5 [21d5038fd0] 2018-01-01 18:56:19 UTC
Compiled on Jan  2 2018 00:02:38 using mingw32-5000001L-gcc-6.3.0 (32-bit)

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia


_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to