Skip to content

Commit

Permalink
clean up & credits
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 committed Jun 13, 2024
1 parent 19d23d7 commit 6b2ccdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 36 deletions.
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@

[![GitHub Releases](https://img.shields.io/github/downloads/Jason2866/ESP_Flasher/total?label=downloads&color=%231FA3EC&style=for-the-badge)](https://github.com/Jason2866/ESP_Flasher/releases/latest)

This project is a fork of [ESP_Flasher](https://github.com/Jason2866/ESP_Flasher).

Tasmota-ESP-Flasher is an app for ESP8266 / ESP32 designed to make flashing Tasmota on ESPs as simple as possible by:

* Pre-built binaries for most used operating systems
* Support for Tasmota factory images
* Support for Tasmota factory images
* Hiding all non-essential options for flashing
* All necessary options (bootloader, flash mode, safeboot) are set automatically
* Flashing is lightning fast
Expand All @@ -32,7 +30,6 @@ In the odd case of your antivirus going haywire over that application, it's a [f
If you want to build this application yourself you need to:

- Install Python 3.x
- ~~Install [wxPython 4.x](https://wxpython.org/) manually or run `pip3 install wxpython`~~
- Download this project and run `pip3 install -e .` in the project's root.
- Start the GUI using `esp_flasher`. Alternatively, you can use the command line interface (
type `esp_flasher -h` for info)
Expand All @@ -45,22 +42,6 @@ Info: https://www.silabs.com/community/interface/forum.topic.html/vcp_driver_for

Driver: https://www.silabs.com/documents/public/software/Mac_OSX_VCP_Driver.zip


## Linux Notes (Fixed, using Qt5, not nessessary anymore)

~~Installing wxpython for linux can be a bit challenging (especially when you don't want to install from source).
You can use the following command to install a wxpython suitable with your OS and Python version:~~

```bash
# Go to https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ and select the correct OS type
# here, we assume ubuntu 20.04
# sudo apt-get update
# sudo apt install libgtk-3-dev libnotify-dev libsdl2-dev
# pip3 install -U \
# -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 \
# wxPython
```

## License

[MIT](http://opensource.org/licenses/MIT) © Marcel Stör, Otto Winter, Johann Obermeier
[MIT](http://opensource.org/licenses/MIT) © Otto Winter, Michael Kandziora, Johann Obermeier
25 changes: 10 additions & 15 deletions esp_flasher/gui.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Big thx to Michael Kandziora for this GUI port to PyQt5
import re
import sys
import threading
import os
import platform
import distro # Added import
import os
import platform
import distro

from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
QHBoxLayout, QPushButton, QLabel, QComboBox,
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
QHBoxLayout, QPushButton, QLabel, QComboBox,
QFileDialog, QTextEdit, QGroupBox, QGridLayout)
from PyQt5.QtGui import QColor, QTextCursor, QPalette, QColor
from PyQt5.QtGui import QColor, QTextCursor, QPalette, QColor
from PyQt5.QtCore import pyqtSignal, QObject

from esp_flasher.helpers import list_serial_ports
Expand Down Expand Up @@ -94,7 +95,6 @@ def init_ui(self):

vbox = QVBoxLayout()


port_group_box = QGroupBox("Serial Port")
port_layout = QGridLayout()
port_label = QLabel("Select Port:")
Expand All @@ -108,7 +108,6 @@ def init_ui(self):
port_layout.addWidget(reload_button, 0, 2)
port_group_box.setLayout(port_layout)


firmware_group_box = QGroupBox("Firmware")
firmware_layout = QGridLayout()
firmware_label = QLabel("Select Firmware:")
Expand All @@ -118,7 +117,6 @@ def init_ui(self):
firmware_layout.addWidget(self.firmware_button, 0, 1)
firmware_group_box.setLayout(firmware_layout)


actions_group_box = QGroupBox("Actions")
actions_layout = QHBoxLayout()
self.flash_button = QPushButton("Flash ESP")
Expand All @@ -129,15 +127,13 @@ def init_ui(self):
actions_layout.addWidget(self.logs_button)
actions_group_box.setLayout(actions_layout)


console_group_box = QGroupBox("Console")
console_layout = QVBoxLayout()
self.console = QTextEdit()
self.console.setReadOnly(True)
console_layout.addWidget(self.console)
console_group_box.setLayout(console_layout)


vbox.addWidget(port_group_box)
vbox.addWidget(firmware_group_box)
vbox.addWidget(actions_group_box)
Expand Down Expand Up @@ -177,7 +173,7 @@ def view_logs(self):
worker.start()

def main():

os_name = platform.system()
if os_name == 'Darwin':
os.environ['QT_QPA_PLATFORM'] = 'cocoa'
Expand All @@ -190,11 +186,10 @@ def main():
elif os_name == 'Windows':
os.environ['QT_QPA_PLATFORM'] = 'windows'
else:
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
os.environ['QT_QPA_PLATFORM'] = 'offscreen'

app = QApplication(sys.argv)


app.setStyle("Fusion")
palette = QPalette()
palette.setColor(QPalette.Window, QColor(53, 53, 53))
Expand All @@ -210,7 +205,7 @@ def main():
palette.setColor(QPalette.Link, QColor(42, 130, 218))
palette.setColor(QPalette.Highlight, QColor(42, 130, 218))
palette.setColor(QPalette.HighlightedText, QColor(0, 0, 0))
app.setPalette(palette)
app.setPalette(palette)

main_window = MainWindow()
main_window.show()
Expand Down

0 comments on commit 6b2ccdd

Please sign in to comment.