wiki:BuildingFromSource

Getting the Source

On Linux or OS X:

git clone git://exe.git.sourceforge.net/gitroot/exe/exe

This will create a directory called exe in the current directory.

On Windows:

Download TortoiseGit? from  http://code.google.com/p/tortoisegit/

To check out the first time:

Building From Source

The Windows version can be built with either Visual C++ 2005 (including the free to download  Express version although you need to use the same version as was used for your Python build) or  MinGW. You should use the same compiler that was used to build the version of Python you are using.

Prerequisites

To build exe you'll need to install the following packages:

change

extern PyTypeObject SpecType;   /* Forward */

to

static PyTypeObject SpecType;   /* Forward */

and then re-build.

Remark: when patching on Windows, make sure files are in Windows format (and not *nix or Mac). A handy tool to detect and switch this, is Notepad++ (Menu > Format > Convert to Windows|Unix|Mac)

To make a snapshot of the online manual to be bundled into the executable:

cd exe
python tools/getManual.py

To run from source (on Linux or Mac):

cd exe
./run-exe.sh

To run from source (on Windows):

cd exe
c:\Python25\python exe

To build an excutable file including Python and the required modules (on Windows):

cd exe\installs\windows
python make.py

To build an application bundle including Python and the required modules (on Mac OS X):

cd exe/installs/osx
python make.py

Firefox

Copy Firefox into your build tree.

  • Windows: dist/Mozilla Firefox
  • Windows Standalone: exe/webui/Mozilla Firefox
  • OS X: exe/webui/firefox/Firefox.app
  • Linux: We use the system Firefox, so you don't need to copy it into the build tree.

Delete all of the Firefox/extensions/ folders except the one labeled {972ce4c6-7e08-4474-a285-3208198ce6fd}

Change the Firefox chrome:

 1. Copy Mozilla Firefox folder to exe/webui
 2. cd exe/webui/Mozilla Firefox/chrome
 3. unzip browser.jar 
 4. cd content/browser 
 5. gvim browser.xul 
 6. / -- Menu
 7. Delete the --> that closes the comment
 8. Stick it in again just after </toolbar> line, commenting out the menubar
 9. cd ../..
 10. zip -r browser.jar content
 11. rmdir content /S/Q

On Windows, delete the plugins\npnul.dll file from within the Firefox tree.

Installers

Windows

To make Windows installs you'll need  NSIS and the plugins:

Then you can right click on the installs\windows\exe.nsi and exe.standalone.nsi files to build installable/runable packages. Or change to the installs/windows directory and use python make.py which will build both the installer and runable packages.

OS X

To make Mac OS X installs you'll need  py2app.

Attachments