After building Thunderbird is finished it was very disappointing that there were no fireworks or even a "congratulations your build was successful" message, all what you get is this screen in the picture below :(.
After running Thunderbird I tested it for the "mailto" bug, and as you can see it is still present.
Thursday, November 12, 2009
Wednesday, November 11, 2009
Easy to follow steps for building Thunderbird on Ubuntu
1. Install cvs:
2. Installing build tools:
3. To get autoconf version 2.13:
4. Get the source:
5. To get missing packages such as mesa or header files such as iwlib.h:
6. Create an empty file in comm-central directory and rename it to ".mozconfig"
7. Add the following lines in the ".mozconfig" file:
8. Start the build:
It worked for me !!!, I tried to make it as easy as possible without any descriptions for my colleagues who don’t want to get into details of the build :), but if you want to ask about anything just post a comment and I hope that I can help you. Also I would like to thank Eng. Mina Metias for his post about building Thunderbird.
Note: It takes time to download the source code.
sudo apt-get install cvs
2. Installing build tools:
sudo apt-get build-dep thunderbird
sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev
3. To get autoconf version 2.13:
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -xvzf autoconf-2.13.tar.gz
cd autoconf-2.13/
./configure --program-suffix=2.13
make
sudo make install
4. Get the source:
hg clone http://hg.mozilla.org/comm-central/
cd comm-central
python client.py checkout
5. To get missing packages such as mesa or header files such as iwlib.h:
sudo apt-get install mesa-common-dev libiw-dev
6. Create an empty file in comm-central directory and rename it to ".mozconfig"
7. Add the following lines in the ".mozconfig" file:
ac_add_options --enable-application=mail
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-tb-release
mk_add_options MOZ_MAKE_FLAGS="-j4"
8. Start the build:
make -f client.mk
It worked for me !!!, I tried to make it as easy as possible without any descriptions for my colleagues who don’t want to get into details of the build :), but if you want to ask about anything just post a comment and I hope that I can help you. Also I would like to thank Eng. Mina Metias for his post about building Thunderbird.
Note: It takes time to download the source code.
Sunday, November 8, 2009
Fixing the Thunderbird bug
The first step in fixing the bug is finding it in the source code, in my approach I used MXR (Cross-Reference), and you have to cleverly choose the very specific keywords used for searching, because the source code isn’t small. I used "mailto" as my searching keyword, the code related to the bug was in the mozTXTToHTMLConv.cpp file between lines 194 to 204.
This part of the code just checks if there is an '.' after the '@' sign and ignores a lot of other invalid cases of an email address.
Invalid Addresses
a@.
a@..
a@..f
a@....f
@.
@.com
@a.com
@a
@a.
@a..
@a...com
a@a.a..a
So we must add more conditions to the if-statement in line 199, the first one is to check if we have a '.' right after the '@', the second condition is to check if we have more than one consecutive '.' after the '@' sign, the third condition is to check if the address ends with '.', finally we must check if the address starts with the '@' sign.
So this is my modified code:
Unfortunately I didn’t test or patch it :( for a well known reason :D, so can some one test it for me ??
if (aInString[pos] == '@')
{
// only pre-pend a mailto url if the string contains a .domain in it..
//i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
nsDependentString inString(aInString, aInLength);
if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
{
aOutString.AssignLiteral("mailto:");
aOutString += aInString;
}
}
This part of the code just checks if there is an '.' after the '@' sign and ignores a lot of other invalid cases of an email address.
Invalid Addresses
a@.
a@..
a@..f
a@....f
@.
@.com
@a.com
@a
@a.
@a..
@a...com
a@a.a..a
So we must add more conditions to the if-statement in line 199, the first one is to check if we have a '.' right after the '@', the second condition is to check if we have more than one consecutive '.' after the '@' sign, the third condition is to check if the address ends with '.', finally we must check if the address starts with the '@' sign.
So this is my modified code:
if (aInString[pos] == '@')
{
nsDependentString inString(aInString, aInLength);
if ( (inString.FindChar('.', pos) != kNotFound) &&
(inString.CharAt(pos+1) != '.') &&
(inString.Find("..", pos) == kNotFound) &&
(inString.CharAt(inString.length()-1) != '.')&&
(pos!=0))
{
aOutString.AssignLiteral("mailto:");
aOutString += aInString;
}
}
Unfortunately I didn’t test or patch it :( for a well known reason :D, so can some one test it for me ??
Subscribe to:
Posts (Atom)