Skip to content

Commit

Permalink
Namecoin: rebrand checks for the .desktop file and the snapcraft config.
Browse files Browse the repository at this point in the history
This should fix the ability to run Electrum-NMC locally (i.e. without pip3 install).
  • Loading branch information
JeremyRand committed Jun 30, 2018
1 parent b98723f commit 32aa0b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion electrum-nmc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import sys

script_dir = os.path.dirname(os.path.realpath(__file__))
is_bundle = getattr(sys, 'frozen', False)
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum-nmc.desktop"))
is_android = 'ANDROID_DATA' in os.environ

# move this back to gui/kivy/__init.py once plugins are moved
Expand Down
2 changes: 1 addition & 1 deletion gui/qt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self, config, daemon, plugins):
if hasattr(QtCore.Qt, "AA_ShareOpenGLContexts"):
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
if hasattr(QGuiApplication, 'setDesktopFileName'):
QGuiApplication.setDesktopFileName('electrum.desktop')
QGuiApplication.setDesktopFileName('electrum-nmc.desktop')
self.config = config
self.daemon = daemon
self.plugins = plugins
Expand Down
14 changes: 7 additions & 7 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: electrum
name: electrum-nmc
version: master
summary: Bitcoin thin client
summary: Namecoin thin client
description: |
Lightweight Bitcoin client
Lightweight Namecoin client
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict

apps:
electrum:
command: desktop-launch electrum
electrum-nmc:
command: desktop-launch electrum-nmc
plugs: [network, network-bind, x11, unity7]

parts:
electrum:
electrum-nmc:
source: .
plugin: python
python-version: python3
stage-packages: [python3-pyqt5]
build-packages: [pyqt5-dev-tools]
install: pyrcc5 icons.qrc -o $SNAPCRAFT_PART_INSTALL/lib/python3.5/site-packages/electrum_gui/qt/icons_rc.py
install: pyrcc5 icons.qrc -o $SNAPCRAFT_PART_INSTALL/lib/python3.5/site-packages/electrum_nmc_gui/qt/icons_rc.py
after: [desktop-qt5]

0 comments on commit 32aa0b7

Please sign in to comment.