Saturday, April 12, 2008

Long Road

I began writing my final report this week. It sums up my learning throughout the course and the development of my project. After working on it for several hours I realize how much I've developed this semester. At the beginning of this project I had no idea how
I was going to make this work. I now have a good understanding of several technologies including .msi's, Wix and Xml.

When I started this project I had no idea what I was doing or how I was going to create .msi files. Soon after figuring out Wix I was able to create a Wix file that packages up Firefox. Then I was able to adapt that script to the newest vesion of Firefox. From there I was able to create C# code that actually creates a Wix script based on a Firefox installation. I never expected to get as far as I have with this project.

My learning throughout this course has not only helped me better understand Wix but it has actually helped me out in real life. I recently obtained a position with a company working closely with XML files. All in all I'm glad that I took this course and I hope to continue to work on my project in the future.

Wednesday, April 9, 2008

The Final Build

With my 0.9 build working properly (minus some small bugs) I am on my way to completing my final build. My .9 build had some very concerning bugs in it that I must fix for my 1.0 build. One of these bugs has to do with Wix and the way that Wix build scripts. To properly follow Wix formatting, Directory and Component identifications must be unique. Their id's should also reflect their name and this can be hard sometimes. In several area's of the Firefox folder there are folders called chrome or default. The way I've written my program is to take a random letter and attach it to the end of these folders . The problem with this is that if that 'random' letter happens to match anther 'random' letter then the program will not compile and a .msi will not be created. To get around this I have to figure out a smarter way of naming my folders but since they can sometimes be no longer than 6 characters, this could be hard.

The other bug that I have noticed in my program is if the user adds a '\' at the end of the directory field. This one is simple and should be easily fixed for my 1.0 build.

Lastly I'm planning on creating some error reporting so that if/when things do go wrong there will be some feedback for the user.

More soon,

Thursday, April 3, 2008

Scratch that

Well totally ignore my last blog post. Most of it was psuedo code/theory and when it came to coding it just didn't work. Here is the problem, my first goal was integrate Mkaply's CCK extension into my program. Since CCK outputs an .xpi I figured I could write a static Wix script that would simply copy those files over and I'd be done. Problem is, like most extensions, CCK is dynamic which means that files change based on the installation. Sometimes a file will be there and sometimes it won't, for me to write a static script on this is impossible.

I've taken the same idea from my last post and changed it a bit. After several hours of work on a function I think I'm close to my goal. I've created a function in my program that recursively iterates through a folder and builds a Wix script dynamically. While I have the program creating the script properly, I have yet to test this. However if this does work it means that I can point this function at a directory and it will create a piece of Wix script for me dynamically based on that folder's content.

So far the code seems to work, I'll be testing more today.

Monday, March 31, 2008

Extensions?


After finishing my last build I was confident that I would be able to add in extensions with little to no problems. Once again, I was wrong. Extensions are stored in the extensions folder of the Firefox directory. Since Wix isn't dynamic and can't simply grab folders and package them, I have to figure out a different way of doing this.

Any way I do this is going to be problematic. I have to decide which extensions my packager will support and then build that support in. I am going to start with Mkaply's CCK extension. In theory this is how I envision the packager to handle extensions.

When a user selects an extension the packager program will actually open up the Wix script and write the code in to the script to copy an extension into the .msi file. It will copy the extension right from the packager install directory and not the Firefox install directory. This is to avoid bugs or problems that might occur if a user hasn't installed the extension properly.

If this doesn't make sense, I have created a diagram to illustrate the process. This week I aim to have my packager be able to package up CCK and create some error reporting. Providing all goes well for build .9 I should be able to add more extensions in for my 1.0 build.

Saturday, March 22, 2008

Getting somewhere

Turns out my professor and I have had different ideas of where my project was going, I hope this road ends with some success. After much work over the last few days I finally have something to show for it. I've built a Wix script that works on the latest build of Firefox. This task wasn't too difficult but it was very time consuming. The debugging of my script took a long time as I was forgetting to copy airbag to the extensions folder. Once all that was done I was able to build my own .MSi from scratch.

There is TONS more work here such as integrating a license agreement etc, however I also need to get my packaging tool working. After brushing up my C# skills I created a tool that puts all this Wix stuff together with a nice GUI interface. Right now the script copies over the necessary files, creates some batch files and then compiles it all using the Wix toolset to create an .Msi.

Although I finally have a working product, there is still tons of work I have to do. Ideally I'd like to integrate Mkaply's CCK and other extensions so that network admins can create custom .msi's and push them over a network with extensions installed. I'd also like to do some more editing with the program so that it can copy over the necessary wix tools so that the end user doesn't need to have Wix installed to use my tool. All in all, I'm quite excited for this program and I think its going to be a success.

Tuesday, March 18, 2008

My build struggle

As of this week I have left my position with a company known as The Tech Zone in order to see this project through. It is in good timing that I find out my project needs to be 2.0 compatible.

Wix scripts are a basic XML files that tell the .msi where to put each and every file for the install. The XML file tells the installer where to put files including setup files, customized files and registry entrys. To bring my current 1.5.0.4 script up to 2.0 might take me days or weeks to do. I have to figure out where every single file that Firefox installs goes and map them in my Wix script.

At the same time I have created a program that automates the build process of Firefox, and can even install add-ons. Since I am working on this project full time I will continue to update my blog and the wiki continually and I am aiming to have something impressive for build 0.8

Sunday, March 9, 2008

Wix or Custom App

I've decieded that instead of bringing my 1.5.0.4 msi build to Firefox 2.0 I will instead write some code that will allow an end user to customize the way that Firefox is installed. Though I eventually wish to bring my code up to date with the current vesion of Firefox, it will be very time consuming to do and I'd rather do something more intesting.

Having a brief understanding of Wix I figured I could use the tool to customize the .msi install of Firefox; I was wrong. Though Wix offers the user tools such as install directory, license agreements and installation types, it really doesn't give me the power I am looking for. Ideally I'd like to give the user the power to change the home page and other features inside Firefox. To do that, I'm going to need to write a tool that can change those features then call Wix functions to build the .msi.

This is the direction I am planning on going, where I start and if I can finish are two questions I can't answer.

Dave