wiki:running_From_Source

How to compile and run exe2 from source

eXe2 runs under Mozilla, Firefox or XULRunner.

We use Firefox to debug it because it provides a DOMInspector and JSConsole. We use XULRunner to release it, because it the most compact base available.

So there are two steps in getting exe2 running from source:

  1. Compile the base (firefox or xulrunner)
  1. Install exe2 source code

Compiling The Base

Compiling Under Windows

First follow the instructions in this document to set up your build environment, then follow the Linux build instructions below

Compiling Under Linux

To build xulrunner in ~/projects/exe2/mozilla, just type this on the command line:

cd ~
mkdir projects
mkdir projects/exe2
cd ~/projects/exe2
cvs -d:pserver:[email protected]:/cvsroot login}}}
 . (password: anonymous)
{{{
cvs -d:pserver:[email protected]:/cvsroot co mozilla/client.mk
cd mozilla/
make -f client.mk checkout MOZ_CO_PROJECT=xulrunner
}}}
You need to create a file called .mozconfig in the current directory. The easiest way to do this is to use:

{{{
cat > .mozconfig}}}
With Ctrl+D to finish. Here are some files that work:

=== xulrunner on Windows: ===
{{{
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-xulrunner
ac_add_options --enable-application=xulrunner
ac_add_options --disable-debug
ac_add_options --enable-optimise
ac_add_options --enable-extensions=python,default
ac_add_options --disable-tests
# If you don't have a java SDK
ac_add_options -- disable-javaxpcom
# For Window's users using Express Edition MSC++ uncomment below lines
#ac_add_options --disable-activex
#ac_add_options --disable-activex-scripting
#ac_add_options --disable-xpconnect-idispatch # This is only required until  is fixed
#ac_add_options --disable-accessibility       # This is only required until  is fixed
}}}
=== xulrunner on linux: ===
{{{
mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-xulrunner
ac_add_options --enable-extensions=python/xpcom,python/dom,default,inspector
ac_add_options --enable-application=xulrunner
ac_add_options --disable-javaxpcom
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --without-system-nspr
ac_add_options --without-system-zlib
ac_add_options --without-system-jpeg
ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --enable-crypto #comment to disable PSM/SSL support
}}}
=== Firefox on Linux: ===
{{{
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-browser-@CONFIG_GUESS@
ac_add_options --enable-extensions=python/xpcom,python/dom,default,inspector
ac_add_options --enable-application=browser
ac_add_options --disable-javaxpcom
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --without-system-nspr
ac_add_options --without-system-zlib
ac_add_options --without-system-jpeg
ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --enable-crypto #comment to disable PSM/SSL support
}}}
Once you have created the .mozconfig file, you are ready to build:

{{{
make -f client.mk build}}}
To build firefox, just replace all the “xulrunner”s above with “browser”

== Configuration ==
To make things work well for debugging (but not for releasing), do this: Make a doc called exe.js in:

{{{
mozilla/obj-xulrunner/dist/bin/defaults/pref/exe.js}}}
with this content:

{{{
pref("browser.dom.window.dump.enabled", true);
pref("javascript.options.showInConsole", true);
pref("javascript.options.strict", true);
pref("nglayout.debug.disable_xul_cache", true);
pref("nglayout.debug.disable_xul_fastload", true);}}}
and if you're running xulrunner (as apposed to browser), add this line:

{{{
pref("toolkit.defaultChromeURI", "chrome://exe/content");}}}
With this configuration in firefox, you can just "reload" the exe page (chrome://exe/content/exe.xul) after changing the code most of the time, instead of restarting Firefox.

= Download SVN =
{{{
cd ~/projects/exe2/mozilla/obj-xulrunner/dist/bin/chrome
svn co https://svn.sourceforge.net/svnroot/exe/trunk exe
cd exe
./setupdirs.sh
# For windows users use: setupdirs.bat}}}
== Run! ==
{{{
cd ~/projects/exe2/mozilla/obj-xulrunner/dist/bin
./run-mozilla.sh ./xulrunner application.ini -console -jsconsole
# For windows users: xulrunner application.ini -console -jsconsole
# For Firefox: ./run-mozilla.sh ./firefox
# For Firefox on Windows: firefox}}}
= Creating An Installation =
No one has made an installation yet. [https://www.mozilla.org/build/distribution.html This document] should get you started.
}}}
}}}
}}}
}}}
}}}
}}}
}}}