Rebranding SpiderMonkey (1.8.5)

  • Revision slug: SpiderMonkey/Build_Documentation/Rebranding_SpiderMonkey_(1.8.5)
  • Revision title: Rebranding SpiderMonkey (1.8.5)
  • Revision id: 38931
  • Created:
  • Creator: pc.wiz.tt
  • Is current revision? No
  • Comment page created, 314 words added

Revision Content

After installing the build pre-requisites and downloading the SpiderMonkey source tarball issue the following commands at the terminal:

cd js/src
autoconf-2.13

For the remainder of this document wherever you see the text $BRAND you will type the name of your brand. For example the default brand for SpiderMonkey is 'mozjs185'.

mkdir build-$BRAND-release
cd build-$BRAND-release

Configure this build of SpiderMonkey with the desired options. For example:

../configure --enable-ctypes --with-system-nspr
Your desired configuration may be different. The only required part in this step is the '../configure' command.

So far, so good. Now for the tricky parts. We need to perform a recursive find and replace text operation on all files in the current directory. In the UNIX world we would issue the following command:

find ./ -type f -exec sed -i "s/mozjs185/$BRAND/" {} \;
Windows Users: Notepad++ can be used to perform the recursive find and replace text operation.
If you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning. This time paying careful attention to the commands you issue to your command shell.

The above command has actually changed some information we need changed back so we will re-issue the recursive find and replace text in files command with some modifications.

find ./ -type f -exec sed -i "s/$BRAND.pc/mozjs185/" {} \;

Allright, almost there now comes the manual editing. Using your favorite editor open up the file named 'Makefile' (without the single quotes) for editing. Search for this text:

mozjs185.pc

"Scroll down" a few lines until you see this line:

    > $@ && chmod 644 $@

That line should be modified to read back:

    > $BRAND.pc && chmod 644 $BRAND.pc

That's it! You may now perform the build and installation of your custom branded SpiderMonkey library.

Revision Source

<p>After installing the build pre-requisites and downloading the SpiderMonkey source tarball issue the following commands at the terminal:</p>
<pre class="eval">cd js/src
autoconf-2.13
</pre>
<p>For the remainder of this document wherever you see the text $BRAND you will type the name of your brand. For example the default brand for SpiderMonkey is 'mozjs185'.</p>
<pre class="eval">mkdir build-$BRAND-release
cd build-$BRAND-release</pre>
<p>Configure this build of SpiderMonkey with the desired options. For example:</p>
<pre>../configure --enable-ctypes --with-system-nspr
</pre>
<div class="note">Your desired configuration may be different. The only required part in this step is the '../configure' command.</div>
<p>So far, so good. Now for the tricky parts. We need to perform a recursive find and replace text operation on all files in the current directory. In the UNIX world we would issue the following command:</p>
<pre>find ./ -type f -exec sed -i "s/mozjs185/$BRAND/" {} \;
</pre>
<div class="note">Windows Users: Notepad++ can be used to perform the recursive find and replace text operation.</div>
<div class="warning">If you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning. This time paying careful attention to the commands you issue to your command shell.</div>
<p>The above command has actually changed some information we need changed back so we will re-issue the recursive find and replace text in files command with some modifications.</p>
<pre>find ./ -type f -exec sed -i "s/$BRAND.pc/mozjs185/" {} \;</pre>
<p>Allright, almost there now comes the manual editing. Using your favorite editor open up the file named 'Makefile' (without the single quotes) for editing. Search for this text:</p>
<p><code>mozjs185.pc</code></p>
<p>"Scroll down" a few lines until you see this line:<br> <br> <code>    &gt; $@ &amp;&amp; chmod 644 $@</code><br> <br> That line should be modified to read back:<br> <br> <code>    &gt; $BRAND.pc &amp;&amp; chmod 644 $BRAND.pc</code><br> <br> That's it! You may now perform the build and installation of your custom branded SpiderMonkey library.</p>
Revert to this revision