Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (61 sloc) 2.47 KB
# coding=utf-8
import sys
import os
import wx
import wx.html
import wx.lib.wxpTag
import webbrowser
from Main import __version__
# ---------------------------------------------------------------------------
class AboutDlg(wx.Dialog):
text = '''
<body bgcolor="#DCDCDC" style="font-family: Arial; background-color: #DCDCDC;">
<img src="{0}/images/python-64.png" width="64" height="64" alt="Python">
<img src="{0}/images/icon-64.png" width="64" height="64" alt="NodeMCU">
<img src="{0}/images/espressif-64.png" width="64" height="64" alt="Espressif, producers of ESP8266">
<img src="{0}/images/wxpython-64.png" width="64" height="43" alt="wxPython, cross-platform GUI framework">
<h1>NodeMCU PyFlasher</h1>
<p>Version {1}</p>
<p>Fork the <a style="color: #004CE5;" href="">project on
GitHub</a> and help improve it for all!</p>
As with everything I offer for free, this is donation-ware.
<a href="">
<img src="{0}/images/paypal-256.png" width="256" height="88" alt="Donate with PayPal">
<p>&copy; 2018 Marcel St&ouml;r. Licensed under MIT.</p>
<wxp module="wx" class="Button">
<param name="label" value="Close">
<param name="id" value="ID_OK">
def __init__(self, parent):
wx.Dialog.__init__(self, parent, wx.ID_ANY, "About NodeMCU PyFlasher")
html = HtmlWindow(self, wx.ID_ANY, size=(420, -1))
if "gtk2" in wx.PlatformInfo or "gtk3" in wx.PlatformInfo:
txt = self.text.format(self._get_bundle_dir(), __version__)
ir = html.GetInternalRepresentation()
html.SetSize((ir.GetWidth() + 25, ir.GetHeight() + 25))
def _get_bundle_dir():
# set by PyInstaller, see
if getattr(sys, 'frozen', False):
return sys._MEIPASS
return os.path.dirname(os.path.abspath(__file__))
class HtmlWindow(wx.html.HtmlWindow):
def OnLinkClicked(self, link):
# ---------------------------------------------------------------------------