Logo path is so much easier now

main
Micke Nordin 4 years ago
parent 2ed8420dd8
commit e8b6324c49

@ -1 +0,0 @@
include wireguide/logo.png

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>wireguide</id>
<metadata_license>GPL-3.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>WireGUIde</name>
<summary>WireGUIde is a GUI for WireGuard</summary>
<description>
<p>WireGUIde is a GUI for WireGuard that uses dbus to talk to NetworkManager. WireGUIde is free and open source software.</p>
</description>
<launchable type="desktop-id">wireguide.desktop</launchable>
<url type="homepage">https://github.com/mickenordin/wireguide</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/mickenordin/wireguide/main/screenshots/scrot0.png</image>
</screenshot>
</screenshots>
<provides>
<id>wireguide.desktop</id>
</provides>
</component>

@ -1,39 +0,0 @@
app: ke.mic.wireguide
ingredients:
dist: groovy
sources:
- deb http://us.archive.ubuntu.com/ubuntu/ groovy groovy-updates groovy-security main universe
- deb http://us.archive.ubuntu.com/ubuntu/ groovy-updates main universe
- deb http://us.archive.ubuntu.com/ubuntu/ groovy-security main universe
script:
- wget -c https://raw.githubusercontent.com/mickenordin/wireguide/main/wireguide/logo.png -O ke.mic.wireguide.png
- wget -c https://raw.githubusercontent.com/mickenordin/wireguide/main/appimage/wireguide.appdata.xml -O wireguide.appdata.xml
- wget -c https://raw.githubusercontent.com/mickenordin/wireguide/main/wireguide/wireguide -O wireguide
packages:
- python3-gi
- python3-wxgtk4.0
- python3-sip
- libnm0
- gir1.2-nm-1.0
script:
- 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/
- 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=usr/bin/wireguide
- Terminal=false
- Categories=Application;
- Keywords=Python;
- MimeType=text/x-python3;
- EOF
- cp usr/share/applications/ke.mic.wireguide.desktop .
- echo 0.1.0 > ../VERSION

5
debian/changelog vendored

@ -0,0 +1,5 @@
wireguide (0.2.0-1) unstable; urgency=low
* Initial release.
-- Micke Nordin <hej@mic.ke> Thu Dec 17 14:35:39 CET 2020

23
debian/control vendored

@ -0,0 +1,23 @@
Source: wireguide
Section: net
Priority: optional
Maintainer: Micke Nordin <mik@elnord.in>
Build-Depends: debhelper (>=10)
Standards-Version: 4.0.0
Homepage: https://github.com/mickenordin/wireguide
Package: wireguide
Section: net
Priority: optional
Architecture: all
Depends:
gir1.2-nm-1.0,
libnm0,
network-manager,
python3-wxgtk4.0,
wireguard
Recommends:
resolvconf
Essential: no
Description: WireGUIde is a graphical user interface for WireGuard

63
debian/copyright vendored

@ -0,0 +1,63 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: wireguide
Upstream-Contact: Micke Nordin <hej@mic.ke>
Source: https://github.com/mickenordin/wireguide
Files: src/wireguide
Copyright: 2020 Micke Nordin <hej@mic.ke>
License: GPL-3+
Files: debian/*
Copyright: 2020 Micke Nordin <hej@mic.ke>
License: GPL-3+
Files: src/ke.mic.wireguide.png
Copyright: https://github.com/coreui/coreui-icons
License: CC0-1.0
License: GPL-3+
Copyright (C) 2020 Micke Nordin
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file
'/usr/share/common-licenses/GPL-3'.
License: CC0-1.0
No Copyright
The person who associated a work with this deed has dedicated the
work to the public domain by waiving all of his or her rights to the
work worldwide under copyright law, including all related and
neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for
commercial purposes, all without asking permission. See Other
Information below.
This license is acceptable for Free Cultural Works.
Other Information
In no way are the patent or trademark rights of any person affected by
CC0, nor are the rights that other persons may have in the work or in
how the work is used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work
with this deed makes no warranties about the work, and disclaims
liability for all uses of the work, to the fullest extent permitted
by applicable law.
When using or citing the work, you should not imply endorsement by the
author or the affirmer.
On Debian systems, the full text of the Creative Commons 0 License
version 1 can be found in the file
'/usr/share/common-licenses/CC0-1.0'.

2
debian/install vendored

@ -0,0 +1,2 @@
src/wireguide usr/bin
src/ke.mic.wireguide.png /usr/share/icons/hicolor/256x256

17
debian/rules vendored

@ -0,0 +1,17 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@

@ -1,31 +0,0 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

@ -1,2 +0,0 @@
wxPython==4.0.7
PyGObject==3.38.0

@ -1,25 +0,0 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="wireguide",
version="0.1.0",
author="Mikael Nordin",
author_email="mik@elnord.in",
description="A WireGuard GUI for GNU/Linux",
include_package_data=True,
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mickenordin/wireguide",
packages=setuptools.find_packages(),
scripts=["wireguide/wireguide"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Environment :: X11 Applications",
"Operating System :: POSIX :: Linux",
],
python_requires='>=3.6',
)

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -26,7 +26,7 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
icon = get_logo_path() icon = get_logo_path()
if icon: if icon:
self.SetIcon(wx.Icon(icon)) self.SetIcon(wx.Icon(icon))
self.version = "0.1.0" self.version = "0.2.0"
# Get active conns from NetworkManager # Get active conns from NetworkManager
self.client = NM.Client.new(None) self.client = NM.Client.new(None)
@ -411,21 +411,7 @@ def get_logo_path():
""" """
Try to find a logo Try to find a logo
""" """
site_packages = next(p for p in sys.path if 'site-packages' in p) return "/usr/share/icons/hicolor/256x256/ke.mic.wireguide.png"
base_path = os.path.dirname(__file__)
logo_name = "logo.png"
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(pipimage):
ret = pipimage
elif os.path.isfile(appimage):
ret = appimage
elif os.path.isfile(fallback):
ret = fallback
return ret
if __name__ == '__main__': if __name__ == '__main__':
Loading…
Cancel
Save