Skip to content

Testing and build

unnecessarydave edited this page Sep 2, 2025 · 3 revisions

Introduction

The easiest way to test changes to Foxtrick is to 'test in place' i.e. without building an extension xpi/zip.

  • Chrome: Developer Mode, and then Load Unpacked.
  • Firefox: install Mozilla web-ext tool, and then $ web-ext run

However, the update to version 0.19.0.0 has some new implications for testing.

  1. manifest.json is no longer present - replaced by manifest-mv2.json and manifest-mv3.json
  2. module CurrencyConverter issues

Now there are two ways to 'test in place', each with their own pros and cons.

  1. Direct from the cloned repository
  2. Build method

Direct from the cloned repository

This still works, but there are a couple of steps that must be done first:

  • Copy manifest-mv2.json (Firefox) or manifest-mv3.json (Chrome) to manifest.json
  • In content/preferences.html comment out or remove the entry for currency-converter.js (line 175).

Be careful not to commit these changes back to the repository.

Build method

This is the preferred method, but requires waiting for the build to complete before starting to test.

Prerequisites

  • General POSIX utilities - rm, cat, grep, make, zip and so on
  • Base python install.

On Windows a git install including git-bash will provide most of the POSIX utils needed, but you will need to download a GnuWin32 version of make and zip, and have these in the PATH. https://sourceforge.net/projects/gnuwin32/files/

The build uses tags on the Foxtrick repo to set version number.

  • $ git fetch upstream --tags where upstream is a remote that points to foxtrick-ng/foxtrick.

Method

By default the Makefile is configured for in-place development testing.

  • $ make build both ff and chrome versions
  • $ make chrome build chrome version only
  • $ make firefox build ff version only
  • $ make clean remove build directory

The build creates a build-dev directory containing chrome and firefox directories for use with 'Load Unpacked' and web-ext respectively.

Notes

  • It is recommended to set your IDE to run the make targets.
  • $ make chrome and $ make firefox can be run in parallel.
  • If a change has been made to manifest-mv2.json (Firefox) you must $ make clean-firefox firefox and restart web-ext.
  • Dave has a basic VSCode config that streamlines some of this, and can provide it if you ask.
Clone this wiki locally