Build from Source - ZvanTors/GoodByeDPI-GUI GitHub Wiki

๐Ÿ›  Build from Source

Want to build the EXE yourself, contribute to the code, or customize the app? This guide walks you through every step.

๐Ÿ’ก Just want to use the app? Skip this and download the ready-made EXE from the Releases page.


โœ… Prerequisites

Requirement
๐Ÿ Python 3.8 or newer โ€” python.org
๐ŸชŸ Windows 10 / 11 (64-bit)
๐Ÿ“ฆ Git โ€” git-scm.com
๐Ÿ’ป VS Code (recommended) or any code editor

Verify Python is installed

python --version

Should output something like Python 3.11.5.


๐Ÿ“ฅ Step 1 โ€” Clone the Repository

git clone https://github.com/ZvanTors/GoodByeDPI-GUI.git
cd GoodByeDPI-GUI

๐Ÿ“ฆ Step 2 โ€” Install Dependencies

Option A โ€” From requirements file (recommended):

pip install -r requirements.txt

Option B โ€” Manually:

pip install pyside6 pyinstaller

๐Ÿ’ก Using a virtual environment is recommended:

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

๐Ÿ“ Step 3 โ€” Add GoodbyeDPI Binaries

The GUI doesn't ship the engine โ€” you need to provide it. Download the latest GoodbyeDPI release and place these three files inside the bin/ folder:

File Source
bin/goodbyedpi.exe From GoodbyeDPI release
bin/WinDivert.dll From GoodbyeDPI release (x86_64 folder)
bin/WinDivert64.sys From GoodbyeDPI release (x86_64 folder)

Final structure should look like:

GoodByeDPI-GUI/
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ logo.ico
โ”œโ”€โ”€ bin/
โ”‚   โ”œโ”€โ”€ goodbyedpi.exe
โ”‚   โ”œโ”€โ”€ WinDivert.dll
โ”‚   โ””โ”€โ”€ WinDivert64.sys
โ””โ”€โ”€ app/
    โ””โ”€โ”€ ...

โš ๏ธ Make sure you use the 64-bit versions of the DLL and SYS files.


๐ŸŽจ Step 4 โ€” Add an Icon (optional)

If you want a custom icon, place logo.ico inside the assets/ folder.

If you don't have one, skip this step โ€” the app will run fine without it.


๐Ÿงช Step 5 โ€” Test Before Building

Always run the app from source first to catch errors early:

python main.py

Run it as Administrator โ€” the app requires it and will refuse to start otherwise.

๐Ÿ’ก Tip: In VS Code, open a Terminal (Ctrl+`) and make sure it's running as admin, or use an elevated PowerShell window.

If everything works (window opens, mode cards appear, Start button works), you're ready to build.


๐Ÿ— Step 6 โ€” Build the EXE

One-line command (CMD)

pyinstaller --onefile --windowed --uac-admin --name "GoodByeDPI GUI" --add-data "assets;assets" --add-data "bin;bin" --icon=assets/logo.ico main.py

Multi-line command (CMD โ€” with ^)

pyinstaller --onefile --windowed --uac-admin --name "GoodByeDPI GUI" ^
  --add-data "assets;assets" ^
  --add-data "bin;bin" ^
  --icon=assets/logo.ico ^
  main.py

Multi-line command (PowerShell โ€” with backtick)

pyinstaller --onefile --windowed --uac-admin --name "GoodByeDPI GUI" `
  --add-data "assets;assets" `
  --add-data "bin;bin" `
  --icon=assets/logo.ico `
  main.py

What each flag does

Flag Purpose
--onefile Bundle everything into a single EXE
--windowed Hide the console window
--uac-admin Request admin privileges on launch
--name Name of the output EXE
--add-data Include assets/ and bin/ folders
--icon Set the EXE icon

โš ๏ธ On Windows, the separator in --add-data is ; โ€” not :. Using : will silently fail.


๐Ÿ“ฆ Step 7 โ€” Find Your EXE

After the build completes, PyInstaller creates a dist/ folder:

dist/
โ””โ”€โ”€ GoodByeDPI GUI.exe

Rename it to match the release convention used by the updater:

dist/GoodByeDPI.GUI.exe

๐Ÿ’ก This name matters โ€” the in-app updater looks for exactly GoodByeDPI.GUI.exe in GitHub releases.


๐Ÿš€ Step 8 โ€” Test the Built EXE

  1. Move the EXE to a different folder (e.g., Desktop) to test portability
  2. Right-click โ†’ Run as administrator
  3. Verify:
    • โœ… Window opens
    • โœ… Icons and theme render correctly
    • โœ… Mode cards appear
    • โœ… Start/Stop works
    • โœ… Toasts appear at bottom-right

๐Ÿงน Step 9 โ€” Clean Up (optional)

After a successful build, you can safely delete:

build/
*.spec

Only dist/ and your source files matter.


๐Ÿ” Rebuilding After Changes

Whenever you modify the source, just run the build command again. PyInstaller overwrites the old EXE.

๐Ÿ’ก To keep builds clean, delete build/ and dist/ first:

rmdir /s /q build dist

๐Ÿฉบ Troubleshooting the Build

โŒ pyinstaller: command not found

PyInstaller isn't installed or isn't on your PATH.

pip install pyinstaller
python -m PyInstaller --version

If that works, use python -m PyInstaller instead of pyinstaller.

โŒ ModuleNotFoundError: No module named 'app'

You're building from the wrong directory. Make sure you're in the project root:

cd GoodByeDPI-GUI
pyinstaller ...

โŒ Assets or binaries missing in the EXE

Check your --add-data flags. The separator must be ; on Windows.

Also verify the source folders actually exist:

dir assets
dir bin

โŒ EXE opens then closes immediately

Run it from CMD to see the error:

"dist\GoodByeDPI.GUI.exe"

Common causes:

  • Missing bin/goodbyedpi.exe
  • Not running as admin
  • Antivirus quarantined a bundled file

โŒ Antivirus flags the built EXE

PyInstaller EXEs are sometimes flagged as suspicious โ€” a known false positive. Add the folder to your antivirus exclusions.

โŒ Build takes forever

Normal โ€” first build can take 1-3 minutes. Subsequent builds are faster.


๐Ÿ’ก Pro Tips

  • ๐ŸŽฏ Use a virtual environment โ€” avoids polluting your global Python install
  • ๐Ÿงน Clean before rebuild โ€” deletes stale artifacts
  • ๐Ÿ“ Check EXE size โ€” a healthy build is ~40-60 MB
  • ๐Ÿ”’ Sign your EXE (optional) โ€” reduces antivirus false positives (requires a code-signing certificate)
  • ๐Ÿ“ Version your build โ€” bump APP_VERSION in app/constants.py before release

Next: Understand the codebase in Architecture ๐Ÿ—

โš ๏ธ **GitHub.com Fallback** โš ๏ธ