Skip to content

raulroda/qet_tb_generator-plugin

Repository files navigation

Licensed under the General Public License 2.0


Terminal Block Generator Plugin for Qelectrotech



# DIRECTORY CONTENTS

- <dist>: distribution versions (pip package and portable versiones)
- <qet_tb_generator.egg-info>: metadata
- <sample_projects>: some diagrams for testing
- <src>: source code
- run.py: launch the app



# HOW TO CREATE THE DISTRIBUTION PACKAGES


## PIP3 package

Doc: https://www.digitalocean.com/community/tutorials/how-to-package-and-distribute-python-applications
https://packaging.python.org/distributing/

 
1. requirements:
    - sudo pip3 install setuptools
    - sudo apt-get install twine
2. Update version number in setup.py and main.py
3. Update CHANGES file
4. Execute auto_dist.sh. The script does:
    - Delete content of 'build' and 'dist' folders
    - Create distribution: python3 setup.py sdist
    - Create wheel for pip: python3 setup.py bdist_wheel
    - Twine uploads of dist/*
5. To check if a package is installed:
    pip3 list : show all
    pip3 show qet_tb_generator : shows package info and where is installed



## Windows portable version
Creates using pyinstaller.org
1. Check if python vesion is  3.6.8 or newer
2. Install pyinstaller: python -m pip install PyInstaller
3. Execute: pyinstaller --onefile --windowed run.py
4. Rename: run.exe to qet_tb_generator_v???.exe


## Linux portable version
Creates using pyinstaller.org
1. Execute: pyinstaller --onefile --windowed run.py
2. Rename: mv ./dist/run ./dist/qet_tb_generator_v???.exe



# How to install the QET terminal generator plugin

## Via pip3
Requires python 3.5 or above.

>> First install on Linux (Debian based distros)
1. In a terminalm install python3 and GUI library:
    sudo apt-get install python3 python3-tk python3-pip
2. Install the program: 
    sudo pip3 install qet_tb_generator
3. Launch the plugin from the 'Project' menu of QElectrotech.

>> Update on Linux
sudo python3 -m pip install --upgrade qet_tb_generator

>> First install on Windows
1. Install, if required, python 3.5 or above
2. pip3 install qet_tb_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator



## Portable Linux

Copy the plugin portable file to the same folder that the QET AppImage is:
  1. Download the the plugin from https://github.com/raulroda/qet_tb_generator-plugin/tree/master/dist
  2. Rename to "qet_tb_generator" if it has another filename.
  3. Mark "qet_tb_generator" as executable
  4. Copy to the same folder that the QET appimage is.
  5. Launch the plugin from the "Project" menu of QET

If you have some problem launche the plugin from QET, add the directory where the AppImage is to the PATH. Example if the directory is "/home/<your_user_name>/bin", edit the "~/.bashrc" file adding:
     export PATH="/home/$USER/bin:$PATH"

If you are not using the portable version of QET, copy the plugin portable file inside the folder where the executable QET file are. Remember mark as exexutable on Linux's.



## Portable WINDOWS

Copy the plugin portable file to the same readytouse folder of QET
  1. Download the plugin portable file from https://github.com/raulroda/qet_tb_generator-plugin/tree/master/dist
  2. Rename to "qet_tb_generator.exe" if it has another file name.
  3. Copy "qet_tb_generator.exe" inside the descompressed folder of QET
  4. Launch the plugin from the "Project" menu of QET