FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [linux-minidisc] qhimdtransfer windows autoupdate feature

<-- thread
<-- date -->
  • From: Thomas Arp <manner.moe@gmx.de>
  • To: "linux-minidisc@lists.fu-berlin.de" <linux-minidisc@lists.fu-berlin.de>
  • Date: Fri, 25 Jan 2013 23:13:52 +0100
  • Subject: Re: [linux-minidisc] qhimdtransfer windows autoupdate feature


-------- Original-Nachricht --------
Betreff: Re: [linux-minidisc] qhimdtransfer windows autoupdate feature
Datum: Fri, 25 Jan 2013 23:12:26 +0100
Von: Thomas Arp <manner.moe@gmx.de>
An: Thomas Arp <manner.moe@gmx.de>
Kopie (CC): John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, linux-minidisc@physik.fu-berlin.de


Am 23.01.2013 17:57, schrieb Thomas Arp:
>> On 01/23/2013 05:10 PM, Thomas Arp wrote:
>>> Maybe we could add the WinSparkle.def definition file to our sources and
>> than use libtool from a system call to create the lib.
>>
>> Yes, that would be acceptable.
I tried to compile winsparkle with gcc/g++ but it seems that some basic 
definitions/implementations in msvc are not really compatible with 
implementations in  libstdc++ used by gcc.
I have to patch the winsparkle source code to make it compilable with 
gcc so i decided to offer a definition file for now.

Thomas



>From 3cd465ebacbdcb7d41f8147dda1016e733a0a826 Mon Sep 17 00:00:00 2001
From: Thomas Arp <manner.moe@gmx.de>
Date: Fri, 25 Jan 2013 22:58:37 +0100
Subject: [PATCH 2/2] Removed unnecessary cleanup function in QHiMDUpdate
 class, use class destructor to call sparkle/winsparkle
 cleanup method instead, added definition file for
 WinSparkle.dll and make use of dlltool to create an
 import library which can be linked to this gcc based
 project

---
 qhimdtransfer/qhimdmainwindow.cpp |  1 -
 qhimdtransfer/qhimdtransfer.pro   | 13 ++++++++++---
 qhimdtransfer/qhimdupdate.h       |  1 -
 qhimdtransfer/qhimdwinupdate.cpp  |  7 +------
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/qhimdtransfer/qhimdmainwindow.cpp b/qhimdtransfer/qhimdmainwindow.cpp
index 01db25b..70494ab 100644
--- a/qhimdtransfer/qhimdmainwindow.cpp
+++ b/qhimdtransfer/qhimdmainwindow.cpp
@@ -407,7 +407,6 @@ QHiMDMainWindow::QHiMDMainWindow(QWidget *parent)
 QHiMDMainWindow::~QHiMDMainWindow()
 {
     save_window_settings();
-    update->cleanup_updatecheck();
     delete ui;
 }
 
diff --git a/qhimdtransfer/qhimdtransfer.pro b/qhimdtransfer/qhimdtransfer.pro
index dc4775b..7e5a867 100644
--- a/qhimdtransfer/qhimdtransfer.pro
+++ b/qhimdtransfer/qhimdtransfer.pro
@@ -70,9 +70,14 @@ else:SOURCES += qhimddummydetection.cpp \
 RESOURCES += icons.qrc
 PKGCONFIG += sox \
     taglib
-win32:LIBS += -lsetupapi \
-    -lcfgmgr32 \
-    -lwinsparkle
+win32: {
+    # for mingw on windows: ld.exe cannot directly link to WinSparkle.dll compiled with msvc, create import library first
+    system(dlltool -d win32/winsparkle.def -l win32/libwinsparkle.a)
+    LIBS += -lsetupapi \
+        -lcfgmgr32 \
+        -Lwin32 \
+        -lwinsparkle
+}
 win32:RC_FILE = qhimdtransfer.rc
 mac:ICON = qhimdtransfer.icns
 
@@ -94,3 +99,5 @@ unix:!macx {
     target.path = /usr/bin
     INSTALLS += target
 }
+
+win32:OTHER_FILES += win32/winsparkle.def
diff --git a/qhimdtransfer/qhimdupdate.h b/qhimdtransfer/qhimdupdate.h
index 57ca0fd..72ebda1 100644
--- a/qhimdtransfer/qhimdupdate.h
+++ b/qhimdtransfer/qhimdupdate.h
@@ -17,7 +17,6 @@ public:
     ~QHiMDUpdate() {}
     virtual bool is_active() {return active;}
     virtual void check_for_updates() {}
-    virtual void cleanup_updatecheck() {}
 };
 
 QHiMDUpdate * createUpdate();
diff --git a/qhimdtransfer/qhimdwinupdate.cpp b/qhimdtransfer/qhimdwinupdate.cpp
index fd0dff0..cae25dd 100644
--- a/qhimdtransfer/qhimdwinupdate.cpp
+++ b/qhimdtransfer/qhimdwinupdate.cpp
@@ -15,7 +15,6 @@ public:
     QHiMDWinUpdate();
     ~QHiMDWinUpdate();
     virtual void check_for_updates();
-    virtual void cleanup_updatecheck();
 };
 
 QHiMDUpdate * createUpdate()
@@ -42,7 +41,7 @@ QHiMDWinUpdate::QHiMDWinUpdate()
 
 QHiMDWinUpdate::~QHiMDWinUpdate()
 {
-    cleanup_updatecheck();
+    win_sparkle_cleanup();
 }
 
 void QHiMDWinUpdate::check_for_updates()
@@ -50,7 +49,3 @@ void QHiMDWinUpdate::check_for_updates()
     win_sparkle_check_update_with_ui();
 }
 
-void QHiMDWinUpdate::cleanup_updatecheck()
-{
-    win_sparkle_cleanup();
-}
-- 
1.8.0.msysgit.0


<-- thread
<-- date -->
  • linux-minidisc - January 2013 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal