Vincent Lam’s Weblog

On Open Source

Distcc?!?! Woo!

Peter talked about his open source project in class today on “add support for more compilers to distcc“.

Peter gives us steps by steps instructure on how to get his code to “complie” a C# program with mulitple computer within the internal network. Although, it failed at the end but it is cool to know about what he did. (trying to build a file with 10-20 computers is very cool! Xx)

The quote of the day, I hear from class is that, there are a lot of “good” code and project that do great things but they needs to be package and organized for easy installation and use. (for example cygwin is hard to setup…they really should improve the installing interface) gotta remember this. ūüôā

November 27, 2007 Posted by | open source | Leave a comment

Lab 5 Completed

Lab #5 adding chrome/UI to the FirstXpcom component is our last lab for this semester.¬† It is the first lab that I completely given up on Vista and guess what? It works so well.¬† As mentioned from my previous post, I redo my Lab 4 for lab 5 and it took me a little less than 10 minutes to get it done on XP.¬† Here is my prove.¬† ūüôā

Lab 4 on XP

I continue worked on Lab 5 with my “Lab 4 build on XP”, followed the instruction on the wiki and I encounter a few small problem.

First of all, Target Applications Firefox Minimum Version=2.0 Maximum Version=3.0a3pre

should be updated to Target Applications Firefox Minimum Version=2.0 Maximum Version=3.0b2pre

Second of all,

$ cd Application\ Data/Mozilla/Firefox/Profiles/development_profile/extensions

is located here “C:\Documents and Settings\$Account Name$\Application Data\Mozilla\Firefox\Profiles”

Third of all,

$ echo c:\temp\firstxpcomchrome\ > firstxpcomchrome@senecac.on.ca

doesn’t work for me…. maybe i should say, it acted funny because i got something like this: “ctempfirstxpcomchrome” in the file.¬† Therefore, I recreated the “firstxpcomchrome@senecac.on.ca” with notepad and manually entered the “folder address”

Other than that, everything is good ūüôā

To test your code, go “Tools”, there should be a red text, click on it and it will generates pop up input box, enter a value and you should get something like this.

Lab 5 Success

Man… I wish I given up Vista earlier.

November 21, 2007 Posted by | open source | Leave a comment

Redo Lab 1-2 & Lab 3-4 Posted

I have to redo lab 1 and 2 because I lost my previous files due to the problem I have with Windows Vista.¬† I would strongly recommend everyone “NOT” to use Windows Vista for the labs because “NOT” only do you get a lot of stupid assertion error, it corrupts files¬† and act funny.¬† For the time being, I am doing all my open source work/lab with XP for now.¬† I got Fedora 7 last week, but I would have to wait until the end of semester to get it installed.¬† For one, I am too busy with project and presentation.¬† For two, I don’t want to risk any file in my labtop being damaged/corrupted.¬† Moreover, I am running low in disk space.

I have updated the labs section of my wiki, all the link for lab 1, 2, 3 and 4 should now be working probably.  I will probably has to redo lab4 again on Xp for Lab 5, because I did lab 4 on Vista.  *sigh* so much trouble.

If you are going to take DPS909, please do yourself a favor.¬† *DON’T USE WINDOWS* for your labs.¬† You got so much errors and it takes so long to make a build… It basically downgrade the learning experience by a few letter grades.¬† Get a Apple computer or something…. At least download Fedora, ubuntu, Suse or whatever but not Vista.¬† Good Luck.

November 19, 2007 Posted by | open source | 1 Comment

Lab: Creating a Binary C++ XPCOM Component

Finally got the Creating a Binary C++ XPCOM Component lab working. here is the steps and trick i used.

1. have a firefox debug build ready.

2. create firstxpcom, firstxpcom/public, and firstxpcom/src folder in the mozilla/extensions folder

3. generate a UUID with the “uuidgen” command, create IFirstXpcom.id with the UUID generated.

4. create three Makefile.in (copy and paste the exact code from the wiki)

5. create the “install.rdf” file

6. run “../build/autoconf/make-makefile extensions/firstxpcom” in the object directory, to create the make object folder/file

7. copy “FirstXpcom.cpp” from the wiki to the firstxpcom/src folder.

8. run make at the objdir of firstxpcom, firstxpcom/public and firstxpcom/src

*That should do the trick. Now, to test.

9. install the javascript shell extension, if there is a security problem installing. read this “hints”

10. Run your debug build of firefox and follow the rest of the lab.

November 15, 2007 Posted by | open source | Leave a comment

Problem with Fixing a bug in Thunderbird Lab

I have been having problem creating a patch with the Fixing a bug in Thunderbird Lab

The coding part is not difficult.  I got it figured out before I have the pre-build trees downloaded.  Basically, all you do is to make a change in a if statement inside a cpp file.

Then my nightmare begin with cvs diff.  I have getting all kind of error messages and nothing seems to fix it.    Here is a recap of what I did and how i fix it.

1. I downloaded the pre-built tree
2. I unzipped it with winzip and put it in the “c:/moz/tb/” directory
3. I made a change to the if statement, so that it check for ‘..’
4. I did a “make” at in the object directory
5. I tested the thunderbird and the fix work
6. I tried to ‘cvs diff -u8p . > labpatch.txt’ and it FAIL!?

I am sure I did everything correctly? what went wrong? Did you spot any problem/error with my steps?

I got this error message such as
$ cvs diff -u8p . > patch.txt
: no such repository
cvs diff: authorization failed: server cvs-mirror.mozilla.org rejected access t for user anonymous
cvs diff: used empty password; try “cvs login” with a real password

Then I tried this
$ cvs login
(Logging in to anonymous@cvs-mirror.mozilla.org)
CVS password:
: no such repository
cvs login: authorization failed: server cvs-mirror.mozilla.org rejected access  for user anonymous

I went out IRC #seneca and asked for help.
I tried this:
$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot diff -u8p . > patch.txt

It runs for half and hour and no error message, but it didn’t patch correctly.¬† The patch.txt file didn’t pick up the change I made.

After that, I did a lot for echo, path, touch, etc.¬† I tried all the cvs statement. cvs -, $CVSROOT, $CVS, etc.¬† Then I tried a bunch of stuff that doesn’t make any sense. lol~¬† I mean … whatever that make it works right?¬† I tried to reinstall mozilla-build, I tried to reinstall vb complier, I tried a difficult computer.¬† Nothing worked.

After 6 hours of trying, it is time to try something new.¬† Since, I am sure that everything I did is correct.¬† The fact that I am having all these problem doesn’t make any sense.

Suddenly, I come up with a new idea.¬† Maybe there is a problem with I am decompiling/unzipping the pre-build tree.¬† I downloaded “Winrar” and did the lab again following the exact steps I had above:

1. I downloaded the pre-built tree
2. I unzipped it with “winrar” and put it in the “c:/moz/tb/” directory
3. I made a change to the if statement, so that it check for ‘..’
4. I did a “make” at in the object directory
5. I tested the thunderbird and the fix work
6. I tried to ‘cvs diff -u8p . > labpatch.txt’ Now it WORK?

6 hours of time well wasted. = =”
Thank for Winzip

Well, whatever that works right?

November 12, 2007 Posted by | open source | 2 Comments

Helping on SQLite/CVS Editor/Testing

I am currently helping TJ on his Desktop Social Networking Integration Project.  He needs someone to create a Client with SQLite for testing purpose.  I did something similar before with sql server 2003 express, i hope they are similar.  once I got the client running I will be testing his project with him.

On the other hand, I have been help Vijey on his extension project.  He has been having problem with setting up extension but everything is working now.  And I found him a free cvs editor, so that he can finally start working with cvs files.  I am going to contribute more on his project on Sunday.

November 10, 2007 Posted by | open source | Leave a comment

More for the Translator Tool 0.2

our 0.2 is mainly directory walk, which we did by reusing some of the code we find online.

currently we are working on the following,

1. fix the key problem, which can be tricky and could use a helping hand
2. make a list of translation words from EN-GB to EN-CA, take time but nothing technical
3. support multiple words, which I already have an idea on how to do that easily
4. file a new bug, as required based on the responsible we got from email
5. write/improve comments, make the code easier to read
6. update wiki  page and bug page, we are constantly doing this
7. allow user to select a directory to run our script (make translation)

we will try to have most of these tasks finished by this Sunday and the rest will be completed in our 0.3, as planned.

November 10, 2007 Posted by | open source | Leave a comment