This document tries to describe all I have done to build the tpol tinderbox (as seen in the Mozilla1.8-SeaMonkey tree). I hope I didn't forget anything important in this doc...
\include\atl
folder under the PSDK directory, and:
atlbase.h
around line 300
change the block around "#pragma include atlthunk.lib
" to:
[...] }; #pragma pack(pop) /* PVOID __stdcall __AllocStdCallThunk(VOID); VOID __stdcall __FreeStdCallThunk(PVOID); #define AllocStdCallThunk() __AllocStdCallThunk() #define FreeStdCallThunk(p) __FreeStdCallThunk(p) #pragma comment(lib, "atlthunk.lib") */ // workaround for not having atlthunk.lib in PSDK or VC++ 2005 Express Edition #define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk)) #define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p) #elif defined (_M_AMD64) #pragma pack(push,2) [...]
atlwin.h
around line 1753,
replace "for(i = 0;
" with "for(int i = 0;
"
--disable-activex
build option instead,
as ATL should only be needed for ActiveX.
ash
, cvs
, coreutils
, diffutils
,
findutils
, gawk
, grep
, patch
,
perl
, sed
, unzip
, zip
(as provided)
make
: select version 3.79.1-7, because
make 3.80 may break the build (?)
openssh
, rsync
(needed by tinderbox)SET MOZ_TOOLS=C:\moztools cd buildtools\windows install.bat
glib
, libIDL
and pthreads
from
our fellow mozillazine building folks
(see also bug 315929)
directly on C:\
so that they end up in a C:\vc8
directory.
C:\moz
directory, create a buildsetup.bat
with the following content:
@ECHO OFF SET MOZ_TOOLS=C:\moztools SET VCMOZTOOLS=C:\vc8 SET MASM=C:\masm32 SET VSTUDIO=%ProgramFiles%\Microsoft Visual Studio 8 SET VCPATH=%VSTUDIO%\VC SET NETSDK=%VSTUDIO%\SDK\v2.0 SET NETFW=%SystemRoot%Microsoft.NET\Framework\v2.0.50727 SET PSDK=%ProgramFiles%\Microsoft Platform SDK SET PATH=%VCMOZTOOLS%;%VCMOZTOOLS%\bin SET PATH=%PATH%;%VCPATH%\bin;%PSDK%\Bin;%NETSDK%\Bin SET PATH=%PATH%;%MOZ_TOOLS%\bin;C:\cygwin\bin SET PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\wbem SET PATH=%PATH%;%VSTUDIO%\Common7\IDE SET PATH=%PATH%;%PSDK%\Bin\win64 SET PATH=%PATH%;%NETFW% SET PATH=%PATH%;%MASM%\BIN SET LIB=%VCPATH%\lib;%PSDK%\Lib;%NETSDK%\Lib SET LIB=%LIB%;%MASM%\LIB SET INCLUDE=%VCPATH%\include;%PSDK%\Include;%NETSDK%\Include SET INCLUDE=%INCLUDE%;%MASM%\INCLUDE SET INCLUDE=%INCLUDE%;%PSDK%\Include\atl SET INCLUDE=%INCLUDE%;%PSDK%\Include\crt SET INCLUDE=%INCLUDE%;%PSDK%\Include\mfc SET GLIB_PREFIX=%VCMOZTOOLS% SET LIBIDL_PREFIX=%VCMOZTOOLS% SET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot SET HOME=C:\moz SET CVS_RSH=ssh ECHO Installation environment variables set! @ECHO ON
C:\moztools\bin
blat -install <mailserver> <sender's addr> 5
C:\tinderbox\SeaMonkey
and set up a fitting
tinder-config.pl
there:
C:\tinderbox
directory, open a command prompt there and run
C:\moz\buildsetup.bat cvs co mozilla/tools/tinderbox cvs co mozilla/tools/performance/startup/startup-test.htmlNOTE: you might get a note about a missing .cvspass file. In this case, run
touch C:\moz\.cvspass
.
C:\tinderbox\SeaMonkey
directory and copy the following files from
C:\tinderbox\mozilla\tools\tinderbox
in there:
bloatdiff.pl
, build-seamonkey-util.pl
, build-seamonkey.pl
,
gettime.pl
, post-mozilla-rel.pl
, post-mozilla.pl
, reportdata.pl
,
tinder-config.pl
, tinder-defaults.pl
, tinderbox
startup-test.html
you checked out into that dir as well.tinder-config.pl
, with the following non-default options (adjust as wanted/needed):
$BuildAdministrator = "yourname\@yourdomain.tld"; $CleanProfile = 1; $ProductName = "SeaMonkey"; $DHTMLPerformanceTest = 1; # Tdhtml $XULWindowOpenTest = 1; # Txul $StartupPerformanceTest = 1; # Ts $Make = 'make'; # Must be GNU make $use_blat = 1; $ObjDir = '../build/'; $BuildNameExtra = 'SeaMonkey-1.0'; $BuildName = 'mymachine'; $BuildTag = 'MOZILLA_1_8_BRANCH'; $BinaryName = 'seamonkey.exe'; $ReleaseBuild = 0; $clean_objdir = 1; # remove objdir when starting release cycle? $clean_srcdir = 0; # remove srcdir when starting release cycle? $milestone = "mozilla1.8"; $ENV{MOZILLA_OFFICIAL} = 1; $ENV{BUILD_OFFICIAL} = 1; $ENV{NO_MFC} = 1;NOTE: it's important you use
make
and the correct
$BinaryName
ending in ".exe
".
The $ENV{}
statements are needed as it seems that tinderbox doesn't use the export
s
made by the mozconfig
(see below).
build-seamonkey-util.pl
line 1116 from "if ($ENV{USERPROFILE}) {
" to
"if ($ENV{USERPROFILE} && -d $ENV{USERPROFILE}."\\Application Data") {
"
(see bug 318403)
mozconfig
in C:\tinderbox\SeaMonkey
with the following content:
# tpol tinderbox config mk_add_options MOZ_OBJDIR=../build mk_add_options MOZ_CO_PROJECT=suite ac_add_options --enable-application=suite # these are done in tinder-config.pl since this doesn't seem to work: export MOZILLA_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1 ac_add_options --disable-tests # disable embedding's MFC tests (don't build with free tools) export NO_MFC=1 ac_add_options --without-system-jpg ac_add_options --without-system-zlib ac_add_options --enable-extensions=default,tasks ac_add_options --enable-crypto ac_add_options --disable-debug ac_add_options --enable-optimize="-Ox -Zc:wchar_t-" # SVG and canvas ac_add_options --enable-svg ac_add_options --enable-canvasEspecially care that
--enable-optimize="-Zc:wchar_t-"
and export NO_MFC=1
are in there,
both are needed to successfully build with your VC8 environment.Ctrl+C
once it has checked out the whole source).
.manifest
embedding
(see bug 249782)
C:\tinderbox\SeaMonkey
in a command prompt and run
c:\moz\buildsetup.bat perl build-seamonkey.pl --depend --mozconfig mozconfigNOTE: Instead of the perl command, you can also use the tinderbox start script to run it, which needs to be run through bash, but completely runs tinderbox in the background. For this, run the following command after loading
buildsetup.bat
:
bash -c "./tinderbox depend start"
The generated builds run fine on the build machine, but for redistributing, all included
.exe
and .dll
files need to find the VC8 libraries. Actually, only
msvcr80.dll
is needed. Interestingly, even if the EULA grants the permission to
redistribute the libraries (from how I read it), the Express Edition creates no
redist
folder that would contain them for redistribution. Of couse, it installs
them on your system though.
NOTE: With the full Visual C++ 2005, you get not only the redist
folder,
but also a vcredist_x86.exe
that can be installed on the target system.
Once that's done, all VC8 builds run out-of-the-box there.
So, you need to get your build to have and find msvcr80.dll
on the target system.
It's harder to find out how to do that than one would expect, but it's possible. First, find your
msvcr80.dll
, which should be in a folder called
"C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
",
and copy this file into the application's main directory (next to seamonkey.exe
in our case).
With luck, the build should run with Windows versions up to Windows 2000 now. Windows XP makes use of
so-called "Side-by-side" Assemblies, and uses much tighter versioning of binaries, which makes
deployment of our packages more complicated unfortunately, as the VC8 linker writes a requirement
for different versions of the libraries into our files than the versions distributed with VC8.
To make it short, you need to add a Microsoft.VC80.CRT.manifest
next to
msvcr80.dll
. This is a simple XML file with the following content:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <noInheritable></noInheritable> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> <file name="msvcr80.dll" hash="2a0d797a8c5eac76e54e98db9682e0938c614b45" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>phRUExlAeZ8BwmlD8VlO5udAnRE=</dsig:DigestValue></asmv2:hash></file> <file name="msvcp80.dll" hash="cc4ca55fb6aa6b7bb8577ab4b649ab77e42f8f91" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>7AY1JqoUvK3u/6bYWbOagGgAFbc=</dsig:DigestValue></asmv2:hash></file> <file name="msvcm80.dll" hash="55e8e87bbde00d1d96cc119ccd94e0c02c9a2768" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>hWq8zazTsMeKVxWFBa6bnv4hEOw=</dsig:DigestValue></asmv2:hash></file> </assembly>SeaMonkey has a quite big set of
.dll
files in the components
folder as well,
we have to direct them to the VC library as well, so copy our .manifest
in there, but with
one slight change: the name="msvc*80.dll"
attributes get changed to
name="..\msvc*80.dll"
so that we can trick modern Windows versions into loading only one copy
of the libraries. Note that older Windows version might need another copy of msvcr80.dll
in the
components
folder, we haven't tested that (yet).
With those changes, you should actually be able to run your builds on a computer that doesn't have VC8 installed.
From what I've heard, Windows NT 3.51 or Windows 95 still can't run the builds however...
NO_MFC=1
.