Giter Site home page Giter Site logo

windreader's Introduction

WindReader

This application was developed for the Wind Tunnel in the "PWS Lab" from the TU Delft. It should be adoptable for similar projects using Phidget.

Setting the project

Make sure to have the Phidghet22 drivers installed.

To make sure the software works as it supposed to, please use a Virtual Environment.

Go to the root of the project directory and setup a virtual environment. This project was developed in Python 3.9.13. It should also work on other versions, but I have not tested this.

python -m venv venv

Activate the virtual environment.

call venv\Scripts\activate

Install the dependencies using the package manager pip. This should be done inside the virtual environment.

pip install -r requirements.txt

Running the python project

Run the application inside the virtual environment

python src/main_application.py

Creating with Qt (designer)

The GUI of WindReader has been created with PySide6 (A version of PyQT available under the LGPL license.). To edit the GUI follow these steps.

Run the following command in the virtual environment.

pyside6-designer

This will open the designer application of Qt. Here you can open the ui file located in ui/main.ui.

In the editor you can edit the GUI however you want. Save the file after you are done.

To convert the gui to a python file the application can interact with, run the following command.

pyside6-uic ui/main.ui -o src/priv/mainwindow.py

Please do not edit the mainwindow.py file directly This file will be overwritten when the previous command is executed again. Instead edit it via main_application.py.

export to executable with pyinstaller

To compile the application to an executable which can directly be distributed without the user installing python, pyinstaller is used. To prevent windows from detecting the application as a trojan, please follow the following steps (You only have to do this once).

Create python bootloader

Make sure you are in the virtual environment.

Clone the pyinstaller repository

git clone https://github.com/pyinstaller/pyinstaller.git

Go to the root of the repository you just cloned and go the bootloader folder.

cd bootloader

Make the bootloader.

python ./waf all

return back to the root of the repository.

Add the new version of pyinstaller to pip.

pip install .

Create executable

Windows

pyinstaller src/main_application.py -n WindReader -w -i resources/icon.ico

MacOS

pyinstaller src/main_application.py -n WindReader -w -i resources/icon.icns

This will create an executable in the folder dist/WindReader.

Create windows installer with Inno Setup

Finally, for windows users, a installer can be created. For this you can use Inno Setup. The process speaks for itself. Do make sure you include the dist/WindReader/ folder when it asks for other application files.

windreader's People

Contributors

kaspervaessen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.