Menu

Development Environment

Patrick Brunschwig Ludwig Hügelschäfer Nicolai Josuttis

<= =>

Development Environment

The enigmail is implemented in JavaScript.
To make development as convenient as possible, we recommend to set up your development environment as follows

  1. Set up your environment as described in our building instructions

  2. Get the source code.

  3. For debugging, we recommend to install the Tiny JavaScript Debugger

    • After installed, you can start it at any time from Thunderbird under Extras -> Tiny JS Debugger
  4. For development in general we recommend two have 2 (two!) additional Thunderbird profiles (beside the one that is used as your day-to-day emailer):

    • One is used for developing or manual tests and one is exclusively used for unit tests.
      • See http://kb.mozillazine.org/Profile_Manager for general information about multiple profiles
      • According the recommendations in the MozillaDevNetwork, you should:
        • start Thunderbird in all development profiles with the -no-remote option to be able to run unit tests, while having another Thunderbird/Firefox open
        • start your regular Thunderbird with the -new-instance option to be able to start your ordinary mailer while running unit tests
  5. "Install" Enigmail in all development profiles using the "Proxy File" method (see the MDN hints about this)

    • Create the file "{847b3a00-7ab1-11d4-8f02-006008948af5}" in the "extensions" directory under your profile directory.
      • Note: You can't create directories without suffixes under Windows. Use mkdir from cygwin instead.
    • The contents of this file should be the path to the build/dist directory of the Enigmail source tree (i.e. after make was run). E.g. /home/patrick/develop/enigmail/build/dist. Remember to remove any trailing whitespace.
      • Note: If you already installed the extension via XPI, you should uninstall it first before creating the pointer file.
    • Place the file in the extensions folder of your profile and restart the application.
    • If everything was installed correctly, you will be asked once by the AddOn Manager to confirm the usage of the Enigmail AddOn.
  6. For static code analysis (useful whenever you edit the code) you need eslint, version 2.x:

    • Ideally you download eslint from the node-js project:

      • Download and install node-js
      • install eslint with: "npm install -g eslint"
      • If not part of the path (e.g. under cygwin) extend the PATH accordingly.
        For example under Windows with cygwin, it might look like:

           PATH="$PATH:/cygdrive/C/Program Files/nodejs"
           PATH="$PATH:/cygdrive/C/Users/<username>/AppData/Roaming/npm"
        
    • Perform static code analysis with 'make eslint' (included also in other targets)

  7. To run unit tests you need JSUnit:

  8. Note that some Thoughworks guys did provide support for complete development environment with Vagrant or Docker


Related

Developer Wiki: Building Enigmail
Developer Wiki: Code Style
Developer Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.