Friday, September 28, 2007

How to name our project: "auto l10n" tool

Our project has changed from last week to this one.
If I was to give a codename for it, it would be "auto l10n" tool

Last week we were looking into doing an en-CA localization of Firefox, but we found out through Axel that it would be more productive for the Mozilla community to create an automated localization build tool. I will explain why:
Differences between en-US and en-GB are little (check Bug 345039) and they don't want us to "fork" en-GB to make an en-CA localization.

This tool in mind, that is not decided the language or how to do it (e.g. perl, python, makefiles, ...) has been discussed during the week between the three of us (Rueen, Vince, myself), our OS professor David Humphrey, Axel, Mic, Chris Tyler (OS professor at Seneca), shaver, dynamis (from Japan), Chris Hofman, Kohei Yoshino (from Japan), John O'Duinn, Pascal Chevrel (Axel CCed for different reasons)

It seems that Dynamis has been working on something that Axel thinks that he: "
sees a chance for code-reuse here with the merge-l10n work you're working on". TODO find out what is Dynamis working on

Axel wrote this (I've added the bolding and the (??) symbols):
Variants of existing localizations should
- make it easy to share bug-fixes between the variants, in particular,
create a joint development team
- assist in a joint support infrastructure, think SUMO(??). For all users of
Spanish localizations, for example, we should build one support forum.
- consist of a minimal set of information describing the changes
- be able to create a localization to be used for a localized build
automatically
He wrote few pages of technical information that I still have to diggest and by this weekend I should be able to talk about our 0.1 milestone for the project

Monday, September 24, 2007

en-CA team

I have added to my blog's menu, the two blogs of the other team members by adding their feeds.

We are going to have a meeting with Dave Humphrey (our professor) and Michal (she works in the Toronto office and wrote some localization tutorials) in the afternoon that will bring some light into the project

Friday, September 21, 2007

Session 5 - build ff debug mode in Windows XP computer

I assumed that my experience on the spring about building the fox was enough, therefore I didn't worry too much to do this time, but I decided to have multiple mozconfig files and I have seen that the build in my windows vista doesn't work properly.

Now, I'm gone to my brothers XP computer and I have done this:
  • Installed MS Visual C++ Express edition
  • Installed Windows 2003 SP SDK
  • Installed Mozilla Build 1.1
I've run msvc8.bat and run these commands:
  • cd /c/
  • mkdir ff
  • cd ff
  • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk
  • time make -f client.mk checkout MOZ_CO_PROJECT=browser // 11 min and 27 sec
  • vi .mozconfig
  • # mozconfig file for Firefox in debug mode, disable optimization
    # and using shared libraries instead of static

    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../ff-debug-@CONFIG-GUESS@

    # this line includes two commands that appear on
    # http://mxr.mozilla.org/mozilla/source/browser/config/mozconfig
    # it adds MOZ_CO_PROJECT=browser and enable app = browser
    . $topsrcdir/browser/config/mozconfig

    ac_add_options --disable-optimize
    ac_add_options --enable-debug
    ac_add_options --disable-static --enable-shared
  • time make -f client.mk checkout // 5 min; I don't have to type MOZ_CO_PROJECT since it is defined in the .mozconfig - Last checkout to see if I've the latest code
  • Before I build (instructions )
  • time make -f client.mk build // 81min (Amd Sempron 2600+, 1,6Ghz, 768MBRam)
Let's run the ff3 in debug mode:
  • export XPCOM_DEBUG=warn
  • /c/ff/mozilla/ff-debug-/dist/bin/firefox.exe -Profilemanager -no-remote
  • Create a new profile: development
  • Select "OK", few error messages and minefield is running

Another things that I have learnt:
  • I could download a tar ball (source code compressed into .tar.gz extension) and build from there
  • For trunk builds, you can simply run make package in your object directory to create a packaged build. This will create a zip or tar.gz file in objdir/dist which you can then unpack anywhere.
  • To build a Windows installer, simply use make installer in your object directory.

Thursday, September 20, 2007

Session 4 - build problems, vista!!

Before you read my notes of session 4, I will tell you what happened.
I'm trying to have few mozconfig files and build the firefox in debug mode.
The problem is that I'm running on Windows Vista and that is a big problem.
In session 5, I will delete everything and just try to follow step by step, detail by detail the lab, but I'm afraid it will happen again since when I tried to use the "run as administrator" solution, it brought another problem (I wish I took a screenshot!!)

Session 4

I'm trying to build firefox in debug mode but it is not working:
I will checkout again and run again this:
export MOZCONFIG=/d/MozillaffSource/mozilla/mozconfig-firefox-debug
make -f client.mk build
This is the error:
configure: error: --enable-application=APP is required
*** Fix above errors and then restart with "make -f client.mk build"
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/d/MozillaffSource/mozilla'
make: *** [/d/MozillaffSource/mozilla/Makefile] Error 2
I misspelled the export MOZCONFIG command
Let's try again. I started at 9:10pm
I see a lot of "can't read this and that"
/c/mozilla-build//make-3.81/bin/make -C config export
make[2]: Entering directory `/d/MozillaffSource/mozilla/config'
make[3]: Entering directory `/d/MozillaffSource/mozilla/config/mkdepend'
make[3]: Nothing to be done for `export'.
make[3]: Leaving directory `/d/MozillaffSource/mozilla/config/mkdepend'
/bin/perl -I/d/MozillaffSource/mozilla/config /d/MozillaffSource/mozilla/config/bdate.pl build_number
/c/mozilla-build/moztools/bin/nsinstall -m 644 nsBuildID.h ../mozilla-config.h /d/MozillaffSource/mozilla/config/nsStaticComponents.h ../dist/include
make[2]: execvp: /c/mozilla-build/moztools/bin/nsinstall: Permission denied
make[2]: *** [export] Error 127
make[2]: Leaving directory `/d/MozillaffSource/mozilla/config'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/d/MozillaffSource/mozilla'
make: *** [build] Error 2

Start again, normal ways
I'm using Window Vista, I have Mozilla build in my C: drive and the MozillaffSource in my D: drive
Therefore, I will follow step by step http://zenit.senecac.on.ca/wiki/index.php/Real_World_Mozilla_Build_Mozilla_Lab
I'm checking tinderbox, I see one of the columns in orange but doesn't say that the tree is closed


Bug bug bug, why?!!!! https://bugzilla.mozilla.org/show_bug.cgi?id=388543
It's because I'm on Vista; I'm trying to try a way around, I'm running the "msvc8.bat" as administrator (start time 9:35pm).
It seems it's working
10 minutes later, I got a pop up message saying:
xpt_link.exe - Unable to locate Component
This application has failed to start because MSVCR80D.dll was not found. Re-install ...

I close it and I read this:
../../dist/bin/xpt_link.exe _xpidlgen/xpcom_base.xpt _xpidlgen/nsIConsoleListener.xpt _xpidlgen/nsIConsoleMessage.xpt _xpidlgen/nsIConsoleService.xpt _xpidlgen/nsIErrorService.xpt _xpidlgen/nsIException.xpt _xpidlgen/nsIExceptionService.xpt _xpidlgen/nsIVersionComparator.xpt _xpidlgen/nsIUUIDGenerator.xpt _xpidlgen/nsIDebug.xpt _xpidlgen/nsIInterfaceRequestor.xpt _xpidlgen/nsIMemory.xpt _xpidlgen/nsIProgrammingLanguage.xpt _xpidlgen/nsISupports.xpt _xpidlgen/nsITraceRefcnt.xpt _xpidlgen/nsIWeakReference.xpt _xpidlgen/nsrootidl.xpt
make[4]: *** [_xpidlgen/xpcom_base.xpt] Error 53
make[4]: Leaving directory `/d/MozillaffSource/mozilla/xpcom/base'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/d/MozillaffSource/mozilla/xpcom'
make[2]: *** [tier_2] Error 2
make[2]: Leaving directory `/d/MozillaffSource/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/d/MozillaffSource/mozilla'
make: *** [build] Error 2

Session 3 - setting up the mozconfig files

Session 3
Before I continue with the Armenian localization process, I have to build Firefox in debug mode for the DPS909 course I'm taking.
Therefore I'm going to read about how to build different things from the same source code.

Finally, it seems that I know what I'm doing:
http://developer.mozilla.org/en/docs/Configuring_Build_Options#Using_multiple_mozconfig_files
- I have set 2 mozconfig files:
- one to build firefox in debug mode
- the other to build firefox hy-AM (in Armenian)

- Aside of creating two specific files, I had to create a common one that will pull the whole source code for the browser
(Check the source code of the them at the bottom)

To checkout, run the following commands:
> export MOZCONFIG=/d/MozillaffSource/mozilla/mozconfig-common
> make -f client.mk checkout //It started 19:26pm and 15 mins later is here

To build Firefox with debug, run the following commands:
> export MOZCONFIG=/d/MozillaffSource/mozilla/mozconfig-firefox-debug
> make -f client.mk build

To build Firefox's Armenian localization, run the following commands:
> export MOZCONFIG=/d/MozillaffSource/mozilla/mozconfig-firefox-hyAM
> make -f client.mk build

mozconfig-common
mk_add_options MOZ_CO_PROJECT=browser

mozconfig-firefox-debug
# include the common mozconfig
. ./mozconfig-common

# Build Firefox
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build-firefox-debug
ac_add_options --enable-application=browser
ac_add_options --disable-optimize
ac_add_options --enable-debug

mozconfigfirefox-hyAM
# include the common mozconfig
. ./mozconfig-common

# remove the next comment when you are about to build (as I said before)
#. $topsrcdir/browser/config/mozconfig
# this is to set where you want the binaries to be built
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build-hyAM
# this is to pull the code related to the Armenian language
mk_add_options MOZ_CO_LOCALES=hy-AM
# for translations in the incubator (term used by Axel), we use HEAD
mk_add_options LOCALES_CO_TAG=HEAD

Next session, I will actually try to build it


Note from Ted's lecture

Sept. 20th, 2007 - luser's speech about the Moz build
Ted Mielczarek, Mozilla Platform Engineer
irc: luser
http://zenit.senecac.on.ca/wiki/index.php/Shining_Some_Light_on_the_Mozilla_Build_System

  • Mozilla has thousands of makefiles
  • Cross-platform support, 3 major ones
  • tinderbox, web system that shows information about different builds, we have unit tests
  • lxr.m.o, searchable index of the source code, mozilla cross-reference
  • in the last year a lot of effort has been put into making the build system easier
  • virtual machine, vmwares to have different platforms running at the same time
  • Source code showed:
    • mozilla/configure.in
    • mozilla/client.mk
    • makefile.in
    • mozilla/config/rules.mk ?
  • There are makefile.in in every folder and it is used to create make files
  • Builbot is being used by many people and Ben has been working on it
  • They want to get rid autoconf and use a python script instead
  • http://wiki.mozilla.org/Build:Configure_System_Rewrite
  • Socorro web app - http://code.google.com/p/socorro/
  • Google breakpad
  • bonsai - matches different branches
  • CVS Blame
  • make -n
  • http://developer.mozilla.org/en/docs/Using_the_Mozilla_symbol_server
  • Use lxr to search for features of the different products

Tuesday, September 18, 2007

http://koolu.com

I love it!
Such a great idea, read this post: http://littlesvr.ca/grumble/index.php/2007/09/18/cool-quiet-and-reasonably-priced-server/

I want one for christmas!!

Armenian localization project update 0.1

I've spoken with my teacher Dave, Axel (localization owner) and the rest of Armenian localization team and I'm going to continue the localization of Firefox into Armenian.

To keep up with what is going on, check this page:

  • According to Axel, we are going to be working on the MOZILLA_1_8_BRANCH, which I believe is the trunk (the source code of what will be FF3)

  • Aleksey (one of the team members) said: "It's hard to predict my schedule for coming months, but if not personally, I... can [get in you in touch with] some armenian guys who were interested in IT-Activism"
  • He also said that: "there is already, hunspell spellchecking dicitonaries for armenian. it's rated as version 0.1, but is already quite helpful for daily usage. I can send .xpi files, if someone is interested"

Friday, September 14, 2007

3rds!!

The Richmond Hill Select played last night their last game and winning Stallions by 2-3. This game put the Stallions' chance to stay in the play-offs since Suburbia just needs to get a point to get into them.

Even though we have lost so many games, I have found good fellas to play with and had really exciting moments. It has been amazing and next year the Conquistadors will impose their empire finally... ;)

Select!!

Thursday, September 13, 2007

Mozilla 24, a 24-hour Worldwide Community Event

"Remember, remember, the... 15th of September" -- This SATURDAY!!

If you didn't read Dave Humphrey's post about it, I want to remember you that Mozilla 24 is happening this coming Saturday.

I hope I can take part of it online this Saturday!!

RevOS, Cath&Bazaar & Microsoft's MVP

Revolution OS
The first I watched this movie in the Moz week crash course, I understood a little bit but I didn't realize the immensity that Open Source meant to a lot of people. I grew up getting cracks to a lot of software since it was a good way of trying it and realizing if it was worthy to spend money on it, and sometimes it wasn't because the feature I was looking for wasn't yet in it or it wouldn't work properly. I didn't realize until now that what I used to do is wait for that feature to be added in an update, but I never thought that if the actual program's source code was available somebody could have fixed it without waiting for the company to do it, if they did.

The Cathedral and the Bazaar
Eric Raymond's description of what he found out after getting perplexed how did Linux became what it was with so many contributors without an apparent control?

NOTE: I have been delaying this post since I didn't find time to seat and read the whole thing, but I will give a shot from what I have read in the first five sections

Raymond seems to narrate his experience in the bazaar style of building software; he took over a mailing application that wasn't finished and he started realizing few principles that he mentions in this paper, and it also compares them with the principles that he had been following all his life that he called the cathedral style.

He also mentions in the last section about Netscape embracing the bazaar style too!

I want to mention what some of you mentioned about "release early, release often"; it is an excellent idea since you get feedback but I want to point out that if you release early, please, you better release something decent!!

Conclusion
Open Source is a great thing, more than I thought and I did not understand it until I got in touched through Mozilla@Seneca and the Club Moz. It allows people who are curious about how to change things to meet their needs or other people's need, but we can also say that proprietary work has to exist because not everything that the OS community produces is as easy to use as it should or it has too much of "programers" ways of doing things.

One example, I want to bring up is what it happened to the Microsoft's MVP of last month (I'm sorry it is in Spanish), Chema Alonso. In his blog explains that he was trying to install a new release of Red Hat 4.2 and suddenly the graphic card wasn't recognized and had to change the configuration but everything went wrong. He used to be a preacher of Linux and all the OS stuff, but he found a CD of Windows 95 and he installed it, everything went so smooth that even though he would uninstall it as soon as he had time again, he didn't. After many years, he has become an MVP of Microsoft and he always speaks as himself to have turned into the "dark side" of the force, but this is an example on how proprietary work can even be easier for programmers and let's not just talk about regular users!!

What I wanted to get across is that Open Source is not the panacea to user's frustration that they can't change the programs they use, but it is extremely needed in Software Development world to make it a better place.


Thursday, September 06, 2007

Get back to school and get involved with Mozilla

Back to school and I'm taking DSP909 -Topics in Open Source Development) on Seneca College with Dave Humphrey and Chris Tyler teaches the same course but on the diploma program; This course requires me to work in a major project and I'm thinking of retaking the project of Firefox localization in Armenian but I have to see how this fits in the course.