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-Zipand for Inno Setup 6 in its default folder, so install both to their default locations.
The tools the build needs are as follows:
| Tool | Version | Used for |
|---|---|---|
| Python | 3.11 | Running Hop and packaging it with PyInstaller |
| 7-Zip | any | Unpacking the FFmpeg download |
| Inno Setup | 6 | Compiling the installer |
Getting the source code
Clone the repository from GitHub:
git clone https://github.com/preinfection/hop.git
cd hopDependencies
Install the Python packages Hop uses. PyInstaller is in the same list:
pip install -r requirements.txtBuilding
One script builds everything:
powershell -File installer\build.ps1It does three things, in order:
- Packages Hop Island and Hop Clipper with PyInstaller.
- Downloads FFmpeg (gyan.dev's full shared build) and unpacks it with 7-Zip. This is skipped when it is already there.
- 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:
| Path | Contents |
|---|---|
build\dist\HopIsland | Hop Island |
build\dist\HopClipper | Hop Clipper |
build\dist\ffmpeg | FFmpeg and its license |
build\installer\HopSetup-x.y.z.exe | The 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.pyHop 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.