With a bit of free time on my hands, I started to apply a couple tricks I’d learned, and write a checkout and build Python script for my “unstable” Verbosio code – specifically the template editing system I’m still trying to get working.
One of the challenges is in making sure edits propagate both upstream into the Mercurial repository and downstream into the Firefox test builds. Since the code I’m working on starts two subdirectories deep in the repository, and ends up a different three subdirectories deep in the Mozilla source code, it gets tricky. Unless you use symbolic links.
Now, if you’re on Linux or Macintosh, you have a built-in symbolic link command already:
ln -s (source) (target). Windows users… well, if you’re on Windows 7 or Vista,
and using the newer filesystem (not NTFS), you also have a built-in symbolic link command:
mklink /D (target) (source). If you’re on Windows before Vista, you can install an utility called “junction”, and off you go. UPDATE: Faulty statement struck per comments. Sorry about that.
On Windows and Linux, I find I only need one symbolic link: from my source repository’s desired working directory to a special folder in mozilla/extensions. On Mac, I need two: the source-to-target one, and another from target-to-inside-the-Namoroka.app-special-folder. (Otherwise, changes I make don’t show up in the Mac environment, short of rebuilding tier_app.)
Since I can’t always remember the format of these commands, a little Python takes care of the dirty work. (Oh, did you notice how Microsoft again does things in the reverse order Linux and Mac’s terminals do?) It also supports checking out the latest FIREFOX_3_6_*_RELEASE tag (handy when I don’t want to look that up either) and building the whole smash, including a few shell scripts I commonly use to run my Mochitests.
Wouldn’t it be nice if files that don’t get pre-processed were symbolically linked in at build time, until the installer was built?