Friday, February 13, 2009

Open Office - Mac OS X Build - Part 2

I have talked with Eric on IRC about hacking the OOo on Mac OS X. He provided me with many solutions, but the main difference is the way we build.

I described to him my situation of my method of build and it appears that I have missed a few steps in between. Lets review my old method...

1. Make changes to the .cxx file
2. Rebuild the directory branch of the .cxx file that it resides.
3. Rebuild the entire project from the source root.
4. Extract the OpenOffice Application inside the instsetoo_native/....../install/en-US/
5. Open OpenOffice to see changes.

Of course this method does not work, because I do not see any changes.

Now, this is Eric's solution
1. Make changes to the .cxx file
2. Rebuild the directory branch of the .cxx file that it resides.
3. Deliver on the same directory
4. Delete the initial output tree
cd instsetoo_native
rm -rf unxmacxi.pro
5. Rebuild the entire thing

I have not yet confirm on the status of this method, because I am only trying this now right after I spoke with Eric.


A different method that was introduce to me was delete portion of the OpenOffice Bundle content and replace it the newly build. (Sounds really confusing to me and wondering how people figure out this method.)

This is what had been said to my understanding.
1. Make the change on the .cxx
2. Rebuild the branch of the .cxx reside
3. Remove a portion of the OpenOffice Bundle in the Application
4.
rm -f /Applications/OpenOffice.org.app/Contents/basis-link/program/libvclmxi.dylib
In the Mac OS X case, you will find the Openoffice.org.app inside the instsetoo_native folder
5.
Copy the unxmacxi.pro inside vcl to the OpenOffice.org.app/Contents/basis-link/program/
cp unxmacxi.pro/lib/libvclmxi.dylib /Applications/OpenOffice.org.app/Contents/basis-
link/program/
6. Run the program.

To my understanding this method is a really quick way to modify the application without rebuilding everything. But I have not yet confirm if it works.

The 3rd method, he describe is to install cache, so any build that is not been modify it'll be ignore.
So imagin, your build takes 1 hour, with cache it might take 30 minutes.
So this is how he describe how to do it.
Once you install cache... do the following

1. export CC="ccache gcc"
2. export CXX = "ccache g++"

then just do you build routine with ./bootstrap and build

I am going to try them out see how well they work :)




Wednesday, February 11, 2009

Mac OS X Build

I tried the Mac OS X build yesterday night by following the instruction on the wiki.
Surprisingly the build on the Mac OS X is much less complex than the Linux.

Now I am trying to 'hack' the OpenOffice, by editing the code in the SW(Open Office writer) source.
I ran the build again with the modification, but it did not seem to have any effect.

I edited the menu.cxx inside the ~/DEV300_m40/solenv/source/window
to get the menu item to display their names backward. The code were successfully build, but the changes are not apply. Maybe perhaps I am missing a few steps in between.

Then I went on to modify the SW(Open Office writer) source hoping that I might get more of a noticeable change. I simply write a code to open a file for writing and put some random text in there and close the file whenever I bookmark something.
Again, the changes did not apply, because when I try to bookmark in -writer I did not see any sort of text file being generated.