From 32b996eb6077786a89aec43425ee481628a70a73 Mon Sep 17 00:00:00 2001
From: Insoleet <insomniak.fr@gmail.com>
Date: Sun, 29 Mar 2015 14:44:53 +0200
Subject: [PATCH] Dirty hooks for windows builds (to display icons)

---
 res/ui/homescreen.ui |  8 ++++----
 setup.py             | 10 +++++++++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/res/ui/homescreen.ui b/res/ui/homescreen.ui
index b26d8fc1..9b80e39c 100644
--- a/res/ui/homescreen.ui
+++ b/res/ui/homescreen.ui
@@ -46,7 +46,7 @@ QToolButton {
    <item>
     <widget class="QLabel" name="label_welcome">
      <property name="text">
-      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;TestText&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
      </property>
      <property name="textFormat">
       <enum>Qt::RichText</enum>
@@ -77,7 +77,7 @@ QToolButton {
         </size>
        </property>
        <property name="toolButtonStyle">
-        <enum>Qt::ToolButtonFollowStyle</enum>
+        <enum>Qt::ToolButtonTextBesideIcon</enum>
        </property>
        <property name="autoRaise">
         <bool>false</bool>
@@ -110,7 +110,7 @@ QToolButton {
         </size>
        </property>
        <property name="toolButtonStyle">
-        <enum>Qt::ToolButtonFollowStyle</enum>
+        <enum>Qt::ToolButtonTextBesideIcon</enum>
        </property>
       </widget>
      </item>
@@ -137,7 +137,7 @@ QToolButton {
         </size>
        </property>
        <property name="toolButtonStyle">
-        <enum>Qt::ToolButtonFollowStyle</enum>
+        <enum>Qt::ToolButtonTextBesideIcon</enum>
        </property>
       </widget>
      </item>
diff --git a/setup.py b/setup.py
index ccfbe073..34660a7f 100644
--- a/setup.py
+++ b/setup.py
@@ -5,6 +5,7 @@
 
 import sys, os, subprocess, multiprocessing
 from cx_Freeze import setup, Executable
+from PyQt5 import QtCore
 
 #############################################################################
 # preparation des options
@@ -18,8 +19,15 @@ packages = ["libnacl"]
 
 includefiles = []
 if sys.platform == "win32":
-    includefiles.append("platforms/win32/libEGL.dll")
+    app = QtCore.QCoreApplication(sys.argv)
+    pyqt_path = QtCore.QCoreApplication.libraryPaths()[0]
+    print(pyqt_path)
+    libEGL_path = os.path.join(os.path.dirname(pyqt_path), "libEGL.dll")
+    qt5svg_path = os.path.join(os.path.dirname(pyqt_path), "Qt5Svg.dll")
+    includefiles.append(libEGL_path)
+    includefiles.append(qt5svg_path)
     includefiles.append("platforms/win32/libsodium.dll")
+    
 elif sys.platform == "darwin":
     pass
 else:
-- 
GitLab