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:
The section is mostly derived from Mozilla's own build documentation, so you should consult that document first if you encounter any problem.
Based on Mozilla Build Documentation for the 1.8.1 and 1.9.1 Branches
Notes:
Install all items in their default location.
Commercial of the VC++ compilers and tools sold by Microsoft
Either VC7.1 (Visual Studio 2003), VC8 (Visual Studio 2005) or VC9 (Visual Studio 2008) can be used to build GRE 1.9.1.x. But there are also free tools that You can use to see how it works.
Free Versions of the VC++ compilers and tools distributed/sponsored by Microsoft
Visual Studio 2005 Express-Edition additionally SP1
System requirements for VC2005 EE:
Visual Studio 2008 Express-Edition with SP1
System requirements for VC2008 EE:
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). Default location for the installed files ./3790.1830/bin/x86. Another item You will need to build with Toolkit 2003 is a batch file to get a command prompt so start compilation with Toolkit 2003 from the mozilla-build environment. Just unpack the archive into the folder any mozilla-build tools version higher than 1.3 and start with start-msvc71 toolz.bat.
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
When the prerequisites are set up, launch one of the batch files from the c:\mozilla-build directory:
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 # move into 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 download the needed source into the subfolder C:/projects/191src. The last part of the first line "> .clone.log 2>&1" creates a log so that you can check whether all was done or if you had errors.
Start the batch file via the command prompt:
clone.bat
Your firewall will prompt You that hg.exe wants to access the net. Allow it. The process will get You the Mozilla source.
Alternatively You can download the latest release source archive and unpack it to ./projects. You can use either the SeaMonkey 2.0.14. or the Firefox version of the source.
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.
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.
Based on Mozilla Build Documentation for the 1.7 and 1.8 Branches
Notes:
command /E:4096
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.
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
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.
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\.
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.
Not yet written.