Linux Configurations - GraphFilter/GraphFilter GitHub Wiki

Virtual Environment

Inside the project directory, create a virtual environment (venv)

At the cmd, at the project's root directory, type:

python -m venv venv

After that you should see a venv directory.

To use the virtual environment, run:

source ./venv/bin/activate

The terminal will show you that you are inside the virtual environment somehow, usually with a flag (venv) above the insert line.

Building

To build the project, PyInstaller will be required. You can use it directly from the virtual environment.

pyinstaller --icon ./resources/icons/hexagon.ico --add-data "./resources/fonts:resources/fonts" --add-data "./resources/gifs:resources/gifs" --add-data "./resources/icons:resources/icons" --add-data "./resources/images:resources/images" --add-data "./resources/logos:resources/logos" --onefile --clean --noconfirm --noconsole --name GraphFilter-x.x.x-linux app.py

Create spec file

Create a spec file it's useful because it's easier to change some configuration in the file instead of the command line, since it has too many options.

Alternatively, it is possible to create the spec file, which is just replace pyinstaller for pyi-makespec, removing the --clean and --noconfirm options.

pyi-makespec --icon ./resources/icons/hexagon.ico --add-data "./resources/fonts:resources/fonts" --add-data "./resources/gifs:resources/gifs" --add-data "./resources/icons:resources/icons" --add-data "./resources/images:resources/images" --add-data "./resources/logos:resources/logos" --collect-data pulp --onefile --noconsole --name GraphFilter-x.x.x-linux app.py

This will create an GraphFilter-x.x.x-linux.spec file.

Replace x.x.x for the version number of the release

After creating the spec file, run the following command:

pyinstaller GraphFilter-x.x.x-linux.spec

And then you will see that two folders were created inside the project structure: build and dist.
Inside dist will be an executable file that runs the program.

Executing

To run the program, from the folder you downloaded the executable, you just need to run:

./GraphFilter

Note In ubuntu, you need to run the following commands (see this link):

sudo apt-get install libxcb-xinerama0
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-
xinerama0 libxcb-xfixes0 libegl1-mesa

or double click the file.