Build Hop from Source

Build Hop yourself from source code. This is only recommended for people who want to change Hop or contribute to it.

Tip

Building Hop from source is not recommended for most users. The installer already holds both apps and everything they need.

This page is for people who want to change Hop, or who would rather build the installer themselves.

To build Hop, you first need Python, 7-Zip and Inno Setup.

Important

Hop is built and tested with Python 3.11. Other Python versions may not be able to build it.

The build script looks for 7-Zip in %ProgramFiles%\7-Zip and for Inno Setup 6 in its default folder, so install both to their default locations.

The tools the build needs are as follows:

ToolVersionUsed for
Python3.11Running Hop and packaging it with PyInstaller
7-ZipanyUnpacking the FFmpeg download
Inno Setup6Compiling the installer

Getting the source code

Clone the repository from GitHub:

git clone https://github.com/preinfection/hop.git
cd hop

Dependencies

Install the Python packages Hop uses. PyInstaller is in the same list:

pip install -r requirements.txt

Building

One script builds everything:

powershell -File installer\build.ps1

It does three things, in order:

  1. Packages Hop Island and Hop Clipper with PyInstaller.
  2. Downloads FFmpeg (gyan.dev's full shared build) and unpacks it with 7-Zip. This is skipped when it is already there.
  3. Compiles the installer with Inno Setup.

Warning

The first build downloads FFmpeg, so it needs an internet connection and takes a while.

If 7-Zip or Inno Setup is missing, or installed somewhere else, the script stops at that step.

Build output

Everything is written to the build folder:

PathContents
build\dist\HopIslandHop Island
build\dist\HopClipperHop Clipper
build\dist\ffmpegFFmpeg and its license
build\installer\HopSetup-x.y.z.exeThe installer

The version comes from the VERSION file at the top of the repository. Both apps and the installer read it.

Running from source

You can also run Hop without building anything. Put an FFmpeg build in the ffmpeg folder, then start either app with pythonw:

pythonw island\host.py
pythonw clipper\clipper.py

Hop running from source and an installed Hop share the same settings. Close the installed apps first, so you don't end up with two islands or two clippers.

Type to search every docs page.