K-Meleon

KMeleonWiki > Documentation > BuildKMeleonDistribution


To create a K-Meleon distribution, you need the Gecko engine, K-Meleon's executable file and its plugins, and the chrome files. In addition, K-Meleon's standard distribution uses an installer created using NSIS. This document covers these four sections:

Building Mozilla

The section is mostly derived from Mozilla's own build documentation, so you should consult that document first if you encounter any problem.

What You Need to Build for K-Meleon 1.5.x to 1.6.x

Based on Mozilla Build Documentation for the 1.8.1 and 1.9.1 Branches

  • a PC running a NT based Windows (Win2000, XP or newer) with the Microsoft Service Packs required by the MS Visual C++ Version You want to use
  • a hard drive with about 5 GB free space or more
  • the Microsoft Visual C++ version/compilers and their respective updates
  • the appropriate Microsoft SDKs that are needed by Your Visual C++ Version
  • the Mozilla Build package that contains the other software prerequisites needed for building Mozilla. This includes the MSYS build environment (Cygwin) and useful tools. Best use the latest package

Notes:

Best install all items on their default location.

Free Versions of the VC++ compilers distributed/sponsored by Microsoft

Visual Studio 2005 Express-Edition Plus SP1

System requirements for VC2005 EE:

  • W2K SP4
  • XP SP2
  • W2k3 SP1
  • XP/W2k3 x64
  • Vista

Visual Studio 2008 Express-Edition with SP1

System requirements for VC2008 EE:

  • XP SP2
  • W2k3 SP1
  • XP/W2k3 x64
  • Vista x86/x64

Microsoft Visual C Toolkit 2003. The article Visual C++ Toolkit 2003 still in use by Mateusz Loskot gives additional info on what is needed. Missing ml.exe, link.exe and other tools ship in the bin directory of "Windows Server 2003 Service Pack 1 (SP1) Driver Development Kit (DDK)"

The 3 free compilers require that You to install the Microsoft Windows Server 2003 R2 Platform SDK in order to include some libraries.

90-days test version of Visual Studio 2008 Team Suite

Getting a command prompt for building GRE 1.9.1.x

Either VC7.1 (Visual Studio 2003), VC8 (Visual Studio 2005) or VC9 (Visual Studio 2008) are used for GRE 1.9.1.x. When the prerequisites are set up, launch one of the following batch files from the c:\mozilla-build directory:

* start-msvc71.bat (VS 2003) * start-msvc8.bat (VS 2005) * start-msvc9.bat (VS 2008)

The batch file will automatically display a MSYS command prompt window with all the needed environment variables set, provided the software requirements were met. To paste commands into this window, you must right-click on the window's title bar to open its context menu.

Lets move to partition C:/ and create a directory called c:/projects to work there.

cd c: // go to c:/ which is a directory for bash

mkdir projects // create the directory projects.

cd projects // go inside projects

Create a text file with an text editor with the extension bat called clone.bat and write inside:

hg clone http://hg.mozilla.org/releases/mozilla-1.9.1/ 191src > .clone.log 2>&1 cd 191src

The two commands will get us the needed source int the subfolder C:/projects/191src

Lets start the batch file via command prompt:

clone.bat

The firewall will prompt You that cvs wants to access the net. It will get us the Mozilla source.

Getting a command prompt for building GRE 1.8.1.x

Either Microsoft Visual C++ 6 (Service Pack 5), VC7.1 (Visual Studio 2003) or VC8 (Visual Studio 2005) are used for GRE 1.8.1.x.

* start-msvc6.bat (Visual C6) * start-msvc71.bat (VS 2003) * start-msvc8.bat (VS 2005)

The batch file will automatically display a MSYS command prompt window with all the needed environment variables set, provided the software requirements were met. To paste commands into this window, you must right-click on the window's title bar to open its context menu.

What You Need to Build for K-Meleon 0.9 to 1.1.x

Based on Mozilla Build Documentation for the 1.7 and 1.8 Branches

  • a PC running Windows 95 or a more recent Windows operating system
  • a hard drive with at least 1.5 GB NTFS / 3 GB FAT of free space
  • Microsoft Visual C++ 6 (with Service Pack 5) or higher
  • Cygwin with at least the following packages installed:
    • ash
    • cvs
    • coreutils
    • diffutils
    • findutils
    • gawk
    • grep
    • make
    • patchutils
    • perl
    • sed
    • unzip
    • zip
  • Netscape wintools
  • Mozilla source code, currently SeaMonkey 1.0.4 is used
  • K-Meleon source code, currently at version 1.0

Notes:

  • SeaMonkey 1.0.x is based on the Mozilla 1.8.0 branch, which does not support VC8 (VS 2005).
  • For those requirements, your total download size will be around 50 MB.
  • If you are using Windows 9x, you probably need to give the DOS environment more memory space by running:
command /E:4096

Unzip the Source

Create a directory where everything will go. Say, C:\projects. Create two more in there, one named mozilla and the other kmeleon. Now, unzip the respective source code packages with your favorite archive program in their respective directories.

How to Configure

You'll need a batch file in your projects directory to set up the environment prior to compiling:

rem --- Set VCVARS to wherever the MSVC vcvars.bat file is found
set VCVARS=C:\Program Files\Microsoft Visual Studio 6\VC98\Bin\VCVARS32.BAT

rem --- Set MOZ_TOOLS to wherever you have the moztools packaged installed
set MOZ_TOOLS=C:\moztools

rem --- Set CYGWINBASE to wherever cygwin is installed
set CYGWINBASE=C:\cygwin

rem --- Prepend Cygwin path and append moztools path
rem --- This is necessary so that cygwin find is ahead of windows find.exe in the PATH, but cygwin link is after MSVC link.exe.
set PATH=%CYGWINBASE%\bin;%PATH%;%MOZ_TOOLS%

rem --- Set MSVC environment vars
call "%VCVARS%"

Next, you'll need a .mozconfig file to place in your mozilla source code directory:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonkey
ac_add_options --enable-application=suite
ac_add_options --with-user-appdir="K-Meleon"

ac_add_options --enable-optimize
ac_add_options --enable-strip
ac_add_options --enable-crypto
ac_add_options --enable-extensions=cookie,wallet,xml-rpc,xmlextras,p3p,pref,transformiix,inspector,universalchardet,typeaheadfind,webservices,permissions

ac_add_options --disable-debug
ac_add_options --disable-logging
ac_add_options --disable-dtd-debug
ac_add_options --disable-tests
ac_add_options --disable-ldap        
ac_add_options --disable-postscript
ac_add_options --disable-jsd
ac_add_options --disable-composer
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-installer
ac_add_options --disable-xprint
ac_add_options --disable-mailnews
ac_add_options --disable-xpinstall
ac_add_options --disable-chatzilla

For more information on mozconfig options, read this page: http://developer.mozilla.org/en/docs/Configuring_Build_Options

Build the Mozilla Source Code

Open a command prompt, and go to the projects directory with it. Run your batch file. Next, enter the mozilla directory, and use the following command to start building:

make -f client.mk build

Depending on the speed of your PC, this might take anywhere from half an hour to several hours.

Building K-Meleon

There is a detailed build instruction in BuildKMeleon. Because you have built Mozilla, you don't need to download the SDK anymore. If you follow the previous section, the Mozilla include files would be in C:\projects\mozilla\seamonkey\dist\include\.

Creating the Chrome Package

Note: This section is outdated.

%kmeleon% is the directory of an existing version of K-Meleon (the binary release).

Copy %kmeleon%\components\txmgr.dll to %mozilla%\dist\bin\components

Copy %kmeleon%\nssckbi.dll to %mozilla%\dist\bin

Rename %kmeleon%\chrome\embed.jar to embed.zip, and unpack it.

Rename %mozilla%\dist\bin\chrome\embed.jar to embed.zip, and unpack it.

Copy the unpacked files from %kmeleon%\chrome\embed (or wherever you put them) into %mozilla%\dist\bin\chrome\embed, overwriting the existing stuff.

Zip %mozilla%\dist\bin\chrome\embed to %mozilla%\dist\bin\chrome\embed.zip, and rename it to embed.jar.

Creating the installer

Not yet written.

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.