Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2010-08-28 11:04:44 and 2010-08-28 11:56:22

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
8
9
10
11
12
13
14

15
16
17
18
19
20
21







-







      <li><a href="#CGI">Using <cite>Fossil</cite>'s Built-In CGI</a>
    </ul>
  </li>
  <li><a href="#env">Using Environment variables</a></li>
  <li><a href="#css">Example CSS</a></li>
  <li><a href="#source-hilight">Source highlighting</a></li>
  <li><a href="#win32dev">Fossil Win32 Development Machine setup</a></li>
  <li><a href="#MingW">Compiling for windows</a></li>
  <li>[compillingOnWindows| page describing how to compile on windows]</li>
  <li><a href="#wysiwig">Javascript HTML WYSIWYG editor control</a>
    <ul>
      <li><a href="#tinymce">TinyMCE</a></li>
      <li><a href="#markitup">markitup!</a></li>
    </ul>
  </li>
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
531
532
533
534
535
536
537




































































538
539
540
541
542
543
544







-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-








<h4>Visual Studio Express 2008+WiX</h4>
<h5>Setup TCL</h5>
<h5>Setup VS2008</h5>
<h5>Getting WiX Windows MSI tool </h5>
<h5>Getting Fossil source code</h5>
<h5>Build the code with Makefile.win32</h5>

<a name="MingW"><h2>Compiling for windows (xp, vista, win2k?, 7?)</h2></a>
<small>Windows versions with a ? after the version haven't been build by me and I cannot say if it works on those versions.</small>

In order to produce windows executable, and more specific fossil we can follow, at least, 2 strategies.
  *  Compiling under windows with MingW.
  *  Compiling under Linux with crosscompiler MingW.


<h3>Compiling under windows with Mingw</h3>
<h4>Installing the tools.</h4>
  *  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 <strong>c:\MingW</strong>
  *  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 <strong>c:\msys</strong>
  *  download [http://gnuwin32.sourceforge.net/packages/zlib.htm|zlib] the binary and developer files. Extract to <strong>c:\MingW</strong>
  *  If you want <strong>https</strong> support download [http://gnuwin32.sourceforge.net/packages/openssl.htm|openssl] the binary and developer files. Extract to <strong>c:\MingW</strong>
  *  download [http://www.fossil-scm.org/download.html|fossil] and copy fossil.exe to <strong>c:\MingW\bin</strong>

<h4>Getting fossil source code</h4>
  *  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

<h4>Compiling fossil source code</h4>
  *  If you want <strong>https</strong> supports
     <ul><li>make -f Makefile.w32 FOSSIL_ENABLE_SSL=1 LIB="-lssl -lcrypto -lgdi32 -lmingwex -lz -lws2_32"</li> </ul>
  *  else do make -f Makefile.w32 

 
<h3>Compiling under linux for windows with Mingw</h3>
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.

<h4>Installing the tools.</h4>
  *  Install mingw32-gccs. With Arch linux you do Pacman -S mingw32-gcc (As root!). This will be installed in <strong>/usr/i486-mingw32</strong>
  *  download [http://gnuwin32.sourceforge.net/packages/zlib.htm|zlib] the binary and developer files.
  *  If you want <strong>https</strong> support download [http://gnuwin32.sourceforge.net/packages/openssl.htm|openssl] the binary and developer files.
  *  Extract to <strong>/usr/i486-mingw32</strong> by: su to root
  *  cd <strong>/usr/i486-mingw32</strong>
  *  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.

<h4>Getting fossil source code</h4>
  *  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

<h4>Compiling fossil source code</h4>
  *  If you want <strong>https</strong> supports
     <ul><li>make -f Makefile.w32 TCC="i486-mingw32-gcc -Os -Wall  -DFOSSIL_I18N=0  -L/usr/i486-mingw32/lib -I/usr/i486-mingw32/include -DFOSSIL_ENABLE_SSL=1" FOSSIL_ENABLE_SSL=1 LIB="-lssl -lcrypto -lgdi32 -lmingwex -lz -lws2_32"</li> </ul>
  *   else make -f Makefile.w32 TCC="i486-mingw32-gcc -Os -Wall  -DFOSSIL_I18N=0  -L/usr/i486-mingw32/lib -I/usr/i486-mingw32/include "

<h4>Distribution of cross compiled fossil.exe</h4>
Because you have linked against zlib and maybe ssl you need to include from <strong>/usr/i486-mingw32/bin</strong> zlib1.dll and, optional, libssl32.dll (and maybe also libeay32.dll)

<h4>testing the cross compiled fossil.exe</h4>
  *  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 <strong>https</strong> support then fossil clone https://www.fossil-scm.org/ https.fossil