diff --git a/src/main.cpp b/src/main.cpp index 6b6ae15..ccde0a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,6 @@ +#ifndef _WIN32 #include +#endif #include "precompiled.h" #include "mainwindow.h" @@ -45,9 +47,7 @@ private: // There can be only ONE SignalHandler per process SignalHandler* g_handler(NULL); -#ifdef _WIN32 - -#else //_WIN32 +#ifndef _WIN32 void POSIX_handleFunc(int); int POSIX_physicalToLogical(int); @@ -60,18 +60,12 @@ SignalHandler::SignalHandler(int mask) : _mask(mask) assert(g_handler == NULL); g_handler = this; -#ifdef _WIN32 - -#endif //_WIN32 - for (int i=0;i 0) { @@ -186,6 +179,7 @@ public: a.exit( 0 ); return 0; } +#endif QCoreApplication::setOrganizationName("zec-qt-wallet-org"); QCoreApplication::setApplicationName("zec-qt-wallet"); @@ -239,6 +233,7 @@ public: w->payZcashURI(parser.positionalArguments()[0]); } +#ifndef _WIN32 // Listen for any secondary instances telling us about a zcash payment URI QObject::connect(&a, &SingleApplication::receivedMessage, [=] (quint32, QByteArray msg) { QString uri(msg); @@ -246,6 +241,7 @@ public: // We need to execute this async, otherwise the app seems to crash for some reason. QTimer::singleShot(1, [=]() { w->payZcashURI(uri); }); }); +#endif // Check if starting headless if (parser.isSet(headlessOption)) { diff --git a/src/scripts/desktopentry b/src/scripts/desktopentry index afe1390..b79c813 100644 --- a/src/scripts/desktopentry +++ b/src/scripts/desktopentry @@ -2,12 +2,12 @@ Name=ZecWallet Comment=Full node and wallet for Zcash GenericName=Wallet -Exec=/usr/local/bin/zecwallet +Exec=/usr/local/bin/zecwallet %u Icon=zecwallet.xpm Type=Application StartupNotify=true StartupWMClass=zecwallet Categories=Utility; -MimeType=text/plain;inode/directory; +MimeType=x-scheme-handler/zcash; Keywords=zecwallet; diff --git a/zec-qt-wallet.pro b/zec-qt-wallet.pro index b42d058..7eea408 100644 --- a/zec-qt-wallet.pro +++ b/zec-qt-wallet.pro @@ -104,8 +104,8 @@ TRANSLATIONS = res/zec_qt_wallet_es.ts \ res/zec_qt_wallet_pt.ts \ res/zec_qt_wallet_it.ts -include(singleapplication/singleapplication.pri) -DEFINES += QAPPLICATION_CLASS=QApplication +unix: include(singleapplication/singleapplication.pri) +unix: DEFINES += QAPPLICATION_CLASS=QApplication win32: RC_ICONS = res/icon.ico ICON = res/logo.icns