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

  • 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 a half 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.