Ircama / epson_print_conf

Epson Printer Configuration tool
MIT License
122 stars 18 forks source link

Add user interface #6

Closed sshsphere closed 4 months ago

sshsphere commented 4 months ago

The main focus of this PR is to add an optional user interface for using epson_print_conf as discussed here. So far it only supports the most basic functions (getting printer information and resetting waste ink levels).

Description of changes:

Build guide

  1. Install pyinstaller if not already installed with pip install pyinstaller
  2. Run: pyinstaller --onefile --noconsole ui.py
  3. Run exe in dist/ folder

Future

sshsphere commented 4 months ago

Ok, I removed the draft status. I am going on a trip soon and won't be available for 2-3 weeks, you can continue adding the rest of the missing features if you want

Ircama commented 4 months ago

Merged, thanks

sshsphere commented 4 months ago

Thx, you should probably add the built exe in the releases page in github

Ircama commented 4 months ago

Thx, you should probably add the built exe in the releases page in github

The GUI program can be simply run via python ui.py.

There is also a fully documented build procedure so that one can autonomously create the executable program via pyinstaller.

In addition, there is a GitHub Action now, that automatically builds the executable to the Tags page. Anyway, my antivirus removes the downloaded file after detecting a Trojan (possibly a false positive because GitHub fully manages such workflow and appears to appropriately perform the build with valid and updated prerequisites). This problem is mentioned in the pyinstaller repository. If one does not trust such mode, the alternative of using python ui.py is always valid. I have no intention of investigating this further as my aim was to develop a technical tool and not an easy-to-run program.

Ircama commented 4 months ago

Following the note to avoid windowed mode in the pyinstaller doc, now the code is generated enabling console mode and hiding the related window. The result is an annoying black console window at the start of the program (which might or might not become hidden), but this way is more robust to antivirus false positives.