D 2011-06-11T05:12:53.722 L compillingOnWindows P d43d1740dda91c6ff980fd24dc89410b24f9ab63 U anonymous W 7025

Compiling under windows XP with sdk compiler.

* download [http://www.microsoft.com/downloads/details.aspx?familyid=C17BA869-9671-4330-A63E-1FD44E0E2505&displaylang=en|Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1]. Install and configure. * download the [http://zlib.net/|zlib source]. * download [http://www.openssl.org| openssl source] * download [http://www.nasm.us/|nasm] * download [http://strawberryperl.com/|perl] * install sdk * install nasm * install perl * mkdir c:\msc\extra\lib, c:\msc\extra\include * unzip zlib. I assume c:\src\zlib * unpack ssl source. I assume c:\src\openssl * open VIA START MENU "SDK..." > cmd shell * cd \src\zlib * edit win32\Makefile.msc change CFLAGS to -MT -O2. Add inffast.obj to OBJS * nmake win32\Makefile.msc * copy zlib.lib c:\msc\extra\lib * copy zlib.h and zconf.h to c:\msc\extra\include * make sure nasm is in the path * cd into c:\src\openssl * perl Configure VC-WIN32 --prefix=c:\msc\extra * ms\do_nasm * nmake -f ms\nt.mak * nmake -f ms\nt.mak install * checkout fossil. assume c:\src\fossil * cd \src\fossil * mkdir msc\ * cd msc * edit ..\win\Makefile.msc to enable SSL and uncomment the SSL LIBS * nmake -f ..\win\Makefile.msc

Compiling under windows with Digital Mars C compiler

* download [http://www.digitalmars.com/download/freecompiler.html|Digital Mars c-ompiler]. unzip to c:\ * download the [http://zlib.net/|zlib source]. * unzip it and compile * open dosbox * mkdir c:\DM\extra\lib, c:\DM\extra\include * copy zlib.lib c:\DM\extra\lib * copy zlib.h and zconf.h to c:\DM\extra\include * checkout fossil. assume c:\src\fossil * cd \src\fossil * mkdir dmc\ * cd dmc * c:\DM\bin\make -f ..\win\Makefile.dmc

Compiling under Wine with Digital Mars C compiler

* download [http://www.digitalmars.com/download/freecompiler.html|Digital Mars c-ompiler]. unzip to c:\ * download the [http://zlib.net/|zlib source]. * unzip it * open dosbox "wineconsole cmd" * compile zlib * mkdir c:\DM\extra\lib, c:\DM\extra\include * copy zlib.lib c:\DM\extra\lib * copy zlib.h and zconf.h to c:\DM\extra\include * checkout fossil. assume c:\src\fossil * cd \src\fossil * mkdir dmc\ * cd dmc * c:\DM\bin\make -f ..\win\Makefile.dmc

Compiling under windows with Mingw

Installing the tools.

* download [http://sourceforge.net/projects/mingw/files/|mingw-xx.exe] version 5.1.6 or later. Install it. I assume it will be installed in c:\MingW * download [http://sourceforge.net/projects/mingw/files/|msys-xx.exe] version 1.0.10 or later. Install it. I assume it will be installed in c:\msys * download [http://gnuwin32.sourceforge.net/packages/zlib.htm|zlib] the binary and developer files. Extract to c:\MingW * If you want https support download [http://gnuwin32.sourceforge.net/packages/openssl.htm|openssl] the binary and developer files. Extract to c:\MingW * download [http://www.fossil-scm.org/download.html|fossil] and copy fossil.exe to c:\MingW\bin

Getting fossil source code

* start msys. This will start a bash shell. * mkdir fossil; cd fossil * clone fossil repository. e.g. fossil clone http://www.fossil-scm.org/ myclone.fossil * mkdir src; cd src * fossil open ../myclone.fossil

Compiling fossil source code

* If you want https supports * else do make -f Makefile.w32

Compiling under windows with PellesC

* download and install [http://www.smorgasbordet.com/pellesc/index.htm|PellesC] C-compiler * download a windows version of gnu-make([http://unxutils.sourceforge.net/]) * download the zlib source and unzip * checkout fossil * edit Makefile.PellesCGMake and check paths * open dosbox * change directory to fossil project tree * mkdir PellesC * cd PellesC * unxutils-path\make -f ..\win\Makefile.PellesCGMake This is tested under Windows XP with PellesC 5 and Window 7 with PellesC 6(32 & 64 bit)

Compiling under linux for windows with Mingw

This is called cross compiling. I'm using [http://www.archlinux.org/|Arch linux] distribution which uses the package manager pacman to install packages. If you have a differen linux distribution the packages might be called different. I assume a login name of renez substitute yours were apropiate.

Installing the tools.

* Install mingw32-gccs. With Arch linux you do Pacman -S mingw32-gcc (As root!). This will be installed in /usr/i486-mingw32 * download [http://gnuwin32.sourceforge.net/packages/zlib.htm|zlib] the binary and developer files. * If you want https support download [http://gnuwin32.sourceforge.net/packages/openssl.htm|openssl] the binary and developer files. * Extract to /usr/i486-mingw32 by: su to root * cd /usr/i486-mingw32 * unzip ~renez/Downloads/zlib-1.2.3-bin.zip * unzip ~renez/Downloads/zlib-1.2.3-lib.zip * unzip ~renez/Downloads/openssl-0.9.8h-1-bin.zip * unzip ~renez/Downloads/openssl-0.9.8h-1-lib.zip * exit root * download [http://www.fossil-scm.org/download.html|fossil] for linux, and copy fossil to some where in your PATH directories maybe $HOME/bin.

Getting fossil source code

* cd ; mkdir fossil; cd fossil * clone fossil repository. e.g. fossil clone http://www.fossil-scm.org/ myclone.fossil * mkdir src; cd src * fossil open ../myclone.fossil

Compiling fossil source code

* If you want https supports * else make -f Makefile.w32 TCC="i486-mingw32-gcc -Os -Wall -DFOSSIL_I18N=0 -L/usr/i486-mingw32/lib -I/usr/i486-mingw32/include "

Distribution of cross compiled fossil.exe

Because you have linked against zlib and maybe ssl you need to include from /usr/i486-mingw32/bin zlib1.dll and, optional, libssl32.dll (and maybe also libeay32.dll)

testing the cross compiled fossil.exe

* copy fossil.exe and the dll's to a windows system. For testing purpose all in one directory. For production use a directory in your PATH * fossil clone http://www.fossil-scm.org/ http.fossil * If it has https support then fossil clone https://www.fossil-scm.org/ https.fossil
test
Z d0fb2ef9cc281d2727ee0d6ddd3fde0c