No description
Find a file
2024-12-14 18:09:56 +01:00
spitfire updated run flag to create new profile each time 2024-12-14 18:09:56 +01:00
.gitignore added gitignore windows compressed 2024-09-13 12:58:37 +02:00
go.mod updated patching process 2024-12-08 14:34:31 +01:00
main.go fixed '--skip-patch-update' flag 2024-12-13 14:31:28 +01:00
README.md updated patching process 2024-12-08 14:34:31 +01:00
sourceforge_config.json fix windows robocopy 2024-09-11 13:19:06 +02:00

Logo

Spitfire Builder

This is a "simple" script for building the Spitfire Browser based on Mozilla Firefox source code.

Project Overview

Spitfire Builder script is a tool designed to automate the building, patching, packaging, and uploading of the Spitfire Browser, which is based on the Mozilla Firefox source code. It streamlines tasks like:

  • Cloning and updating the Mozilla source repository.
  • Applying patches for Spitfire.
  • Building the browser for different platforms.
  • Compressing and uploading builts to a remote server.

Dependencies

  • Mercurial (hg)
  • Git
  • Golang (tested with v1.21)
  • Python 3.11 and pip3

Flags

Below is a detailed description of all the flags supported by the Spitfire Builder script:

General Flags

  • -h: Displays the help message and exits. Use this to see all available flags and their descriptions.

Build Process Flags

  • -a: Perform all steps of the build process, including cleaning, updating the repository, building, and applying patches.
  • -b: Compiles the source code without cleaning or updating.
  • --clean: Cleans the build directory by removing temporary or cached files.
  • -u: Updates the Mozilla source repository to the latest revision using Mercurial (hg pull).
  • --patches: Applies custom patches to the source code.
  • -r: Runs the built project after the build process completes successfully.

Compression and Upload Flags

  • -c: Compresses the build output into a .tar.gz file. Use with the --upload-path flag to specify the directory to compress.
  • --upload: Uploads the compressed build file to a remote server (e.g., SourceForge). Requires a configuration file (sourceforge_config.json) to define upload parameters.
  • --upload-path=<path>: Specifies the directory or file to upload. This is required for both compression and uploading.

Customization Flags

  • -p=<path>: Specifies the build directory path. If not provided, the default path is used.
  • -t=<target>: Sets the target format for the build output. The format follows component-arch-release-platform.
  • -v=<version>: Defines the version of the package. For nightly builds, the current date is used by default.
  • --component=<name>: Sets the name of the component being built (default: 'browser').
  • --arch=<architecture>: Specifies the architecture for the build (default: system architecture, e.g., amd64).
  • --release=<type>: Specifies the release type (stable, nightly, etc.). Default is nightly.
  • --platform=<platform>: Sets the platform for the build (default: system platform, e.g., linux).

Example usage:

  • All steps:
go run . -a
  • Build only:
go run . -b
  • Upload:
go run . --upload -c --upload-path=./mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin
  • Build and upload:
go run . --upload -c --upload-path=./mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin -a
  • Display all flags:
go run . -h

Config file for uploading example:

sourceforge_config.json

{
    "SFKeyPath": "~/.ssh/id_rsa.pub",
    "SFUser": "internet-addict",
    "SFHost": "web.sourceforge.net",
    "SFProject": "spitfire-browser"
}

APPINDEX example:

C:905cd0cc2dea9e400e1ecd099462b6b19188a9f1
P:Spitfire
R:nightly
V:2024.09.08
A:amd64
S:788506622
I:3324483350
T:Spitfire build
U:https://spitfirebrowser.xyz/
L:AGPL-3.0
o:browser
m:Internet Addict
t:1725830641
c:905cd0cc2dea9e400e1ecd099462b6b19188a9f1
D:
p:linux
q:
Z:905cd0cc2dea9e400e1ecd099462b6b19188a9f1

Repository structure

spitfire-browser/
├── browser/
│   ├── amd64/
│   │   ├── stable/
│   │   │   ├── latest/deb.tar.gz
│   │   │   ├── x.x.x/deb.tar.gz
│   │   ├── nightly/
│   │       ├── latest/deb.tar.gz
│   │       ├── yyyy-mm-dd/deb.tar.gz
│   ├── arm/
│   │   ├── stable/
│   │   │   ├── latest/
│   │   │   ├── x.x.x/
│   │   ├── nightly/
│   │       ├── latest/
│   │       ├── yyyy-mm-dd/
├── cli-package-manager/
│   ├── stable/
│   │   ├── latest/
│   │   ├── x.x.x/
│   ├── nightly/
│       ├── latest/
│       ├── yyyy-mm-dd/
├── gui-installer/
│   ├── stable/
│   │   ├── latest/
│   │   ├── x.x.x/
│   ├── nightly/
│       ├── latest/
│       ├── yyyy-mm-dd/
├── gui-package-manager/
│   ├── stable/
│   │   ├── latest/
│   │   ├── x.x.x/
│   ├── nightly/
│       ├── latest/
│       ├── yyyy-mm-dd/
├── addons/
│   ├── themes/
│   │   ├── stable/
│   │   │   ├── latest/
│   │   │   ├── x.x.x/
│   │   ├── nightly/
│   │       ├── latest/
│   │       ├── yyyy-mm-dd/
│   ├── custom-configs/
│   │   ├── stable/
│   │   │   ├── latest/
│   │   │   ├── x.x.x/
│   │   ├── nightly/
│   │       ├── latest/
│   │       ├── yyyy-mm-dd/
│   ├── search-engines/
│       ├── stable/
│       │   ├── latest/
│       │   ├── x.x.x/
│       ├── nightly/
│           ├── latest/
│           ├── yyyy-mm-dd/
├── APPINDEX