Skip to content

Commit 6b2ccdd

Browse files
committed
clean up & credits
1 parent 19d23d7 commit 6b2ccdd

File tree

2 files changed

+12
-36
lines changed

2 files changed

+12
-36
lines changed

README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55

66
[![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)
77

8-
This project is a fork of [ESP_Flasher](https://github.com/Jason2866/ESP_Flasher).
9-
108
Tasmota-ESP-Flasher is an app for ESP8266 / ESP32 designed to make flashing Tasmota on ESPs as simple as possible by:
119

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

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

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

48-
49-
## Linux Notes (Fixed, using Qt5, not nessessary anymore)
50-
51-
~~Installing wxpython for linux can be a bit challenging (especially when you don't want to install from source).
52-
You can use the following command to install a wxpython suitable with your OS and Python version:~~
53-
54-
```bash
55-
# Go to https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ and select the correct OS type
56-
# here, we assume ubuntu 20.04
57-
# sudo apt-get update
58-
# sudo apt install libgtk-3-dev libnotify-dev libsdl2-dev
59-
# pip3 install -U \
60-
# -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 \
61-
# wxPython
62-
```
63-
6445
## License
6546

66-
[MIT](http://opensource.org/licenses/MIT) © Marcel Stör, Otto Winter, Johann Obermeier
47+
[MIT](http://opensource.org/licenses/MIT) © Otto Winter, Michael Kandziora, Johann Obermeier

esp_flasher/gui.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
# Big thx to Michael Kandziora for this GUI port to PyQt5
12
import re
23
import sys
34
import threading
4-
import os
5-
import platform
6-
import distro # Added import
5+
import os
6+
import platform
7+
import distro
78

8-
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
9-
QHBoxLayout, QPushButton, QLabel, QComboBox,
9+
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
10+
QHBoxLayout, QPushButton, QLabel, QComboBox,
1011
QFileDialog, QTextEdit, QGroupBox, QGridLayout)
11-
from PyQt5.QtGui import QColor, QTextCursor, QPalette, QColor
12+
from PyQt5.QtGui import QColor, QTextCursor, QPalette, QColor
1213
from PyQt5.QtCore import pyqtSignal, QObject
1314

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

9596
vbox = QVBoxLayout()
9697

97-
9898
port_group_box = QGroupBox("Serial Port")
9999
port_layout = QGridLayout()
100100
port_label = QLabel("Select Port:")
@@ -108,7 +108,6 @@ def init_ui(self):
108108
port_layout.addWidget(reload_button, 0, 2)
109109
port_group_box.setLayout(port_layout)
110110

111-
112111
firmware_group_box = QGroupBox("Firmware")
113112
firmware_layout = QGridLayout()
114113
firmware_label = QLabel("Select Firmware:")
@@ -118,7 +117,6 @@ def init_ui(self):
118117
firmware_layout.addWidget(self.firmware_button, 0, 1)
119118
firmware_group_box.setLayout(firmware_layout)
120119

121-
122120
actions_group_box = QGroupBox("Actions")
123121
actions_layout = QHBoxLayout()
124122
self.flash_button = QPushButton("Flash ESP")
@@ -129,15 +127,13 @@ def init_ui(self):
129127
actions_layout.addWidget(self.logs_button)
130128
actions_group_box.setLayout(actions_layout)
131129

132-
133130
console_group_box = QGroupBox("Console")
134131
console_layout = QVBoxLayout()
135132
self.console = QTextEdit()
136133
self.console.setReadOnly(True)
137134
console_layout.addWidget(self.console)
138135
console_group_box.setLayout(console_layout)
139136

140-
141137
vbox.addWidget(port_group_box)
142138
vbox.addWidget(firmware_group_box)
143139
vbox.addWidget(actions_group_box)
@@ -177,7 +173,7 @@ def view_logs(self):
177173
worker.start()
178174

179175
def main():
180-
176+
181177
os_name = platform.system()
182178
if os_name == 'Darwin':
183179
os.environ['QT_QPA_PLATFORM'] = 'cocoa'
@@ -190,11 +186,10 @@ def main():
190186
elif os_name == 'Windows':
191187
os.environ['QT_QPA_PLATFORM'] = 'windows'
192188
else:
193-
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
189+
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
194190

195191
app = QApplication(sys.argv)
196192

197-
198193
app.setStyle("Fusion")
199194
palette = QPalette()
200195
palette.setColor(QPalette.Window, QColor(53, 53, 53))
@@ -210,7 +205,7 @@ def main():
210205
palette.setColor(QPalette.Link, QColor(42, 130, 218))
211206
palette.setColor(QPalette.Highlight, QColor(42, 130, 218))
212207
palette.setColor(QPalette.HighlightedText, QColor(0, 0, 0))
213-
app.setPalette(palette)
208+
app.setPalette(palette)
214209

215210
main_window = MainWindow()
216211
main_window.show()

0 commit comments

Comments
 (0)