# Building Valence

Building Valence is easy. It requires the complete sources that are available in the same location as the add-on XPI binary. Older versions of both sources and binaries can also be found there.

## Quick Build

First of all the zip file needs to be downloaded and decompressed. Then, if only a quick build using the bundled iOS proxy binaries is required, a simple `make` in the `valence` directory will suffice. The command will create XPI files in that directory for every platform.

In order to build the iOS proxy binaries from source, the process is a bit more involved and different for each platform.

## Linux

To build `ios-webkit-debug-proxy` on Linux, follow the instructions in the `ios-webkit-debug-proxy/README.md` file. It mentions that you first need to install its dependencies: `libplist, libusbmuxd, libimobiledevice`. For each one of these you have to follow the instructions in the README files of the respective directories. The process for each one in a nutshell is:

- `./autogen.sh`
- `./configure` (only for ios-webkit-debug-proxy)
- `make`
- `sudo make install`

Then, copy the binary compilation artifacts back to `valence/tools/linux{32,64}` (depending on the platform you are on), overwriting the existing versions. Everything is now ready for running `make` in the `valence` directory to get the XPI file.

## Mac

To build `ios-webkit-debug-proxy` on Mac, the Linux instructions above can be followed with 2 more additional dependencies, OpenSSL and libxml2. The build instructions for OpenSSL can be found in `openssl/INSTALL` and the process in a nutshell is:

- `./config`
- `make`
- `sudo make install`

The commands to build libxml2 can be found in `libxml2/README` and they are the same as for `ios-webkit-debug-proxy`:

- `./autogen.sh`
- `./configure`
- `make`
- `sudo make install`

All resulting compilation artifacts should be copied to the `valence/tools/mac64` directory, replacing the existing ones. Running `make` will then create the XPI file in the same directory.

## Windows

To build `ios-webkit-debug-proxy.exe` on Windows, the process is simpler, but Visual Studio 2012 or 2013 is required (Community is fine). Open the `ios-webkit-debug-proxy-win32/iwdp-solution.sln` solution file in Visual Studio and then build it. Once it is done, copy the binary artifacts from the `Release` directory to the `valence/tools/win32` directory. Then, just run `make` to get an XPI file suitable for installation through the Firefox Addon Manager.

Return to top.