Skip to content

Latest commit

 

History

History
91 lines (75 loc) · 2.46 KB

File metadata and controls

91 lines (75 loc) · 2.46 KB

FrankerFaceZ Build Script

Copyright (c) 2024 Dan Salvato LLC

Licensed under the Apache License, Version 2.0. See LICENSE.

The build process is intended to be performed using CI via GitHub Actions. However, the individual steps can be performed manually should you wish.

Requirements

  • node 22+
  • pnpm 10+
  • git

How to Build: Source Archive (Firefox Staff: Use This!)

There is a special build script called build.sh for building from a prepared source archive. Just:

  1. Ensure you have the requirements installed on your machine.
  2. Ensure build.sh is executable and run it:
    chmod +x build.sh
    ./build.sh
  3. Find the unpacked extension in the dist folder.

That's it. You're done! You can now zip the extension, if you need to, or do anything else.

How to Build: Complete From Scratch (Firefox Staff: You don't need this!)

These instructions assume you're working from a clean checkout of the Extension repository itself, without any pre-downloaded source.

  1. Ensure you have the requirements installed on your machine.
  2. Run the following git commands to download the latest source code from FrankerFaceZ's repositories:
    git clone https://github.com/FrankerFaceZ/FrankerFaceZ.git client
    git clone https://github.com/FrankerFaceZ/Add-Ons.git addons
  3. Run these commands to calculate the correct version information based on the state of the git repositories:
    chmod +x scripts/calculate-version.sh
    ./scripts/calculate-version.sh
  4. Run this command to load the appropriate environmental variables:
    source ffz_env
  5. Build the main client.
    cd client
    pnpm install --frozen-lockfile
    pnpm build:ext
    cd ..
  6. Build the add-ons.
    cd addons
    pnpm install --frozen-lockfile
    pnpm build:ext
    cd ..
  7. Ensure you don't have a dist folder. Delete it if you do with:
    rm -rf dist
  8. Copy the build output from steps 5 and 6 into the dist folder:
    chmod +x scripts/copy-output.sh
    ./scripts/copy-output.sh
  9. Update the version in the manifest.
    node scripts/update-manifest.js
  10. Find the unpacked extension in the dist folder.

That's it. You're done! You can now zip the extension, if you need to, or do anything else.