main
Micke Nordin 4 years ago
parent 50f410a2c8
commit a28e4e1319

@ -8,30 +8,32 @@ ingredients:
script:
- wget -c https://github.com/mickenordin/wireguide/blob/main/wireguide/logo.png -O ke.mic.wireguide.png
- wget -c https://github.com/mickenordin/wireguide/blob/main/appimage/wireguide.appdata.xml -O wireguide.appdata.xml
- wget -c https://github.com/mickenordin/wireguide/blob/main/wireguide/wireguide -O wireguide
packages:
- python3-pip
- python3-gi
- python3-wxgtk4.0
- python3-sip
- libnm0
- gir1.2-nm-1.0
script:
- ./usr/bin/pip3 install WireGUIde==0.0.7
- cp ../ke.mic.wireguide.png ./usr/share/icons/hicolor/256x256/
- cp ../ke.mic.wireguide.png .
- mkdir -p usr/share/metainfo/ ; cp ../wireguide.appdata.xml usr/share/metainfo/
- cat > usr/share/applications/ke.mic.wireguide.desktop <<\EOF
- mkdir -p usr/share/metainfo/
- cp ../wireguide.appdata.xml ./usr/share/metainfo/
- cp ../wireguide ./usr/bin/
- chmod +x ./usr/bin/wireguide
- cat > ./usr/share/applications/ke.mic.wireguide.desktop <<\EOF
- [Desktop Entry]
- Type=Application
- Name=WireGUIde
- Comment=A GUI for WireGuard
- Icon=ke.mic.wireguide
- Exec=python3 /usr/local/bin/wireguide
- Exec=usr/bin/wireguide
- Terminal=false
- Categories=Application;
- Keywords=Python;
- MimeType=text/x-python3;
- EOF
- cp usr/share/applications/ke.mic.wireguide.desktop .
- usr/bin/pip3 freeze | grep "wireguide" | cut -d "=" -f 3 >> ../VERSION
- grep self.version ../wireguide | grep = | awk '{print $3}' | sed 's/"//g' > ../VERSION

@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="wireguide",
version="0.0.7",
version="0.0.8",
author="Mikael Nordin",
author_email="mik@elnord.in",
description="A WireGuard GUI for GNU/Linux",

@ -23,8 +23,10 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
"""
def __init__(self, *args, **kw):
super().__init__(*args, **kw)
self.SetIcon(wx.Icon(get_logo_path()))
self.version = "0.0.7"
icon = get_logo_path()
if icon:
self.SetIcon(wx.Icon(icon))
self.version = "0.0.8"
# Get active conns from NetworkManager
self.client = NM.Client.new(None)
@ -396,13 +398,18 @@ def get_logo_path():
Try to find a logo
"""
site_packages = next(p for p in sys.path if 'site-packages' in p)
base_path = os.path.dirname(__file__) #
logo_name = "logo.png"
image = site_packages + "/wireguide/" + logo_name
pipimage = site_packages + "/wireguide/" + logo_name
appimage = base_path + "/../share/icons/hicolor/256x256/ke.mic.wireguide.png"
fallback = base_path + "/" + logo_name
ret = None
if os.path.isfile(image):
ret = image
elif os.path.isfile(logo_name):
ret = logo_name
if os.path.isfile(pipimage):
ret = pipimage
elif os.path.isfile(appimage):
ret = appimage
elif os.path.isfile(fallback):
ret = fallback
return ret

Loading…
Cancel
Save