Packaging Guide for Marmara Connector for different OS
For packaging the Qt Gui Application, fbs is used.
- PYTHON3 -> python3.6 is needed for fbs packaging
- PyQt5
- pip library with latest version
Make sure that the OS is up to date and upgraded:
sudo apt-get update
sudo apt-get upgrade
Install tools required to build dependencies:
sudo apt install git python3 python3-pip python3-venv
Clone the repository to a desired location on the local machine and make sure the branch is set to master
:
git clone https://github.com/marmarachain/marmara-connector.git
cd marmara-connector
git checkout master
Check the python3 version. The free version of fbs only supports Python 3.5 and 3.6. So, make sure to switch to python 3.6 for fbs packaging.
python3 --version
Create a virtual environment in the current directory with python3.6:
python3 -m venv venv
Activate the virtual environment:
source venv/bin/activate
Install the required libraries:
sudo apt-get install qttools5-dev-tools
sudo apt-get install python3-pyqt5
sudo apt-get install pyqt5-dev-tools
pip install wheel
pip install pip==21.2.4
pip3 install pyqt5==5.15.4
pip install -r requirements
To run the basic PyQt application from source, execute the following command:
fbs run
To turn the app's source code into a standalone executable, run the following command:
fbs freeze
This creates the folder target/
which then can be copied to any other computer (with the same OS as yours) to run the app there.
To create an installer on Linux, the following command is used:
fbs installer
However, the installer command requires that you have fpm. One can follow these instructions in here to install it and use the installer command to create the .deb
executable file.
To install fpm:
sudo apt-get install ruby ruby-dev rubygems build-essential
gem install --no-document fpm
To make sure fpm is installed correctly, try running the following command:
fpm --version
Now, running the fbs installer
command would create the .deb
executable Linux installer.
Install the following tools required to build dependencies:
- git python3 python3-pip python3-venv
Open the command prompt with admin privileges and clone the repository to a desired location on the local machine:
git clone https://github.com/marmarachain/marmara-connector.git
cd marmara-connector
Check the branch and make sure the branch is set to master
:
git branch
git checkout master
Check the python version:
python --version
The free version of fbs only supports Python 3.5 and 3.6. So, make sure to switch to pyhon 3.6 for fbs packaging. For this refer to the resource provided in 1.
Place the .dll files under C:\Windows\System32
folder.
Create a virtual environment in the current directory:
python36 -m venv venv
Activate the virtual environment:
call venv\scripts\activate.bat
Continue the following steps while the virtual environment is active:
Install the following libraries:
python -m pip install --upgrade pip
python -m pip install pywin32
pip install wheel
pip install PyQt5
pip install pyqt5-tools
pip install pip==21.3.1
pip3 install pyqt5==5.15.4
pip install -r requirements
To run the basic PyQt application from source, execute the following command:
fbs run
Use the following command to turn the app's source code into a standalone executable:
fbs freeze
This creates the folder target/
. You can copy this directory to any other computer (with the same OS as yours) and run the app there.
Before using the installer command on Windows, please install NSIS. Then, create an installer by using the following command.
fbs installer
This creates the installer
directory. Change directory to installer
, right click and compile the installer.nsi
with NSIS. This creates the MarmaraConnectorSetup.exe
file under the target
directory.