Project

General

Profile

Actions

Bug #869

closed

Доработки для MS® Windows©

Added by DJm00n about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Windows
Target version:
Start date:
10/11/2012
Due date:
% Done:

100%

Estimated time:
4:00 h
Reported in:
master

Description

Доработки для Шиндовс, которые нужны в апстриме:

  • Везде заменить по коду #if not defined -> #if !defined
  • Добавить проверку на QSysInfo::WV_WINDOWS7 в source:src/util/sysinfo.cpp
  • По возможности избавиться от DBLock (const DBLock&) = delete (source:src/util/dblock.h) и т.д. - фича не поддерживается последним компилятором от MS. Не аргумент, но все же хотелось бы надеяться на код который соберется везде. Да и толку ИМХО не особо много от именно этой фичи.
  • Подбавлять типы возвращаемых значений из лямбд, длиннее одной строки. Я сам поправлю, потом выдам патч, чтобы ты накатил.
  • Добавить #include <functional> в source:src/plugins/monocle/documenttab.cpp

Если еще что-то будет - буду сюда писать в каменты.


Files

0001-LMP-Win32-Fixes.patch (1.84 KB) 0001-LMP-Win32-Fixes.patch DJm00n, 10/18/2012 08:00 PM
0002-Win32-Some-cmake-script-fixes.patch (4.55 KB) 0002-Win32-Some-cmake-script-fixes.patch DJm00n, 10/18/2012 08:00 PM
0003-Win32-build-fixes-in-bittorrent-plugin.patch (3.07 KB) 0003-Win32-build-fixes-in-bittorrent-plugin.patch DJm00n, 10/18/2012 08:00 PM
0004-Win32-some-headers-were-missed.patch (2.31 KB) 0004-Win32-some-headers-were-missed.patch DJm00n, 10/18/2012 08:00 PM
0005-Win32-lackman-7zip-arguments-fix.patch (884 Bytes) 0005-Win32-lackman-7zip-arguments-fix.patch DJm00n, 10/18/2012 08:00 PM
0001-Liznoo-remove-assert-in-win32-part.patch (2.05 KB) 0001-Liznoo-remove-assert-in-win32-part.patch DJm00n, 10/18/2012 08:11 PM
0001-Agreggator-unneeded-namespace-removed.patch (1.02 KB) 0001-Agreggator-unneeded-namespace-removed.patch DJm00n, 10/18/2012 08:19 PM
0001-Util-functional-include-added.patch (638 Bytes) 0001-Util-functional-include-added.patch DJm00n, 11/21/2012 12:01 AM
0003-Azoth-SHX-try-to-use-cmd.exe-on-Windows-platform.patch (861 Bytes) 0003-Azoth-SHX-try-to-use-cmd.exe-on-Windows-platform.patch DJm00n, 11/21/2012 12:01 AM
0005-Azoth-SHX-Win32-locale-bug-fixed.-Maybe-working-only.patch (1.43 KB) 0005-Azoth-SHX-Win32-locale-bug-fixed.-Maybe-working-only.patch DJm00n, 11/21/2012 12:01 AM
0001-Azoth-SHX-Win32-locale-bug-fixed.patch (1.48 KB) 0001-Azoth-SHX-Win32-locale-bug-fixed.patch DJm00n, 11/21/2012 01:43 AM
0001-Win32-fix-crash-on-Win32-when-closing-LC.patch (936 Bytes) 0001-Win32-fix-crash-on-Win32-when-closing-LC.patch DJm00n, 11/30/2012 09:22 PM
0001-Bittorrent-use-GCC-pragma-s-only-when-buiding-with-i.patch (1002 Bytes) 0001-Bittorrent-use-GCC-pragma-s-only-when-buiding-with-i.patch DJm00n, 12/03/2012 12:09 AM
Actions #1

Updated by 0xd34df00d about 12 years ago

  • Tracker changed from Support to Bug
  • Status changed from New to Assigned
  • Target version set to 0.5.90
  • Estimated time set to 2:00 h
  • Reported in set to master
  • QSysInfo::WV_WINDOWS7 нет в более ранних версиях кутей — можешь сказать ее числовое значение?
  • Насчет типов лямбд не парься, я шланг по коду прогоню, он на такие вещи ворнинги выдает. Ты прав, лучше писать код без опоры на gcc/clang extensions.
  • Очень не хочется избавляться от deleted functions :(

Остальное ок, принято.

Actions #2

Updated by DJm00n about 12 years ago

0xd34df00d wrote:

  • QSysInfo::WV_WINDOWS7 нет в более ранних версиях кутей — можешь сказать ее числовое значение?

WV_WINDOWS8 = 0x00a0
Конечно, я про Windows 8. Но мы друг друга поняли :)

Actions #3

Updated by 0xd34df00d about 12 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Запилил все, кроме устранения deleted-функций.

Actions #4

Updated by DJm00n about 12 years ago

diff --git a/src/plugins/azoth/plugins/rosenthal/cmake/FindHunspell.cmake b/src/plugins/azoth/plugins/rosenthal/cmake/FindHunspell.cmake
index 1e9c59f..3dd0d07 100644
--- a/src/plugins/azoth/plugins/rosenthal/cmake/FindHunspell.cmake
+++ b/src/plugins/azoth/plugins/rosenthal/cmake/FindHunspell.cmake
@@ -12,14 +12,47 @@ IF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)
   SET(HUNSPELL_FIND_QUIETLY TRUE)
 ENDIF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)

-FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx )
+INCLUDE(FindPackageHandleStandardArgs)
+
+IF (WIN32)
+    IF (MSVC)
+        #MSVS 2010
+        IF (MSVC_VERSION LESS 1600)
+            MESSAGE(FATAL_ERROR "We currently support only MSVC 2010 or greater version")
+        ENDIF (MSVC_VERSION LESS 1600)
+    ENDIF (MSVC)
+    IF (NOT DEFINED HUNSPELL_DIR)
+        IF (HUNSPELL_FIND_REQUIRED)
+            MESSAGE(FATAL_ERROR "Please set HUNSPELL_DIR variable")
+        ELSE (HUNSPELL_FIND_REQUIRED)
+            MESSAGE(STATUS "Please set HUNSPELL_DIR variable for HUNSPELL support")
+        ENDIF (HUNSPELL_FIND_REQUIRED)
+    ENDIF (NOT DEFINED HUNSPELL_DIR)
+    SET (HUNSPELL_INCLUDE_WIN32 ${HUNSPELL_DIR}/src/)
+
+    SET (PROBE_DIR
+        ${HUNSPELL_DIR}/src/win_api/Release_dll/libhunspell)
+
+    FIND_LIBRARY (HUNSPELL_LIBRARIES NAMES libhunspell.lib PATHS ${PROBE_DIR})
+ELSE (WIN32)
+    FIND_LIBRARY (HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2 HINTS ${HUNSPELL_DIR})
+ENDIF (WIN32)
+
+FIND_PATH (HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx HINTS ${HUNSPELL_DIR} ${HUNSPELL_INCLUDE_WIN32})

-FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2)

 # handle the QUIETLY and REQUIRED arguments and set HUNSPELL_FOUND to TRUE if
 # all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR)

+if (HUNSPELL_FOUND)
+  if (NOT HUNSPELL_FIND_QUIETLY AND HUNSPELLCONFIG_EXECUTABLE)
+    message(STATUS "Hunspell found: ${HUNSPELL_LIBRARIES}")
+  endif(NOT HUNSPELL_FIND_QUIETLY AND HUNSPELLCONFIG_EXECUTABLE)
+else(HUNSPELL_FOUND)
+  if(HUNSPELL_FIND_REQUIRED)
+    message(FATAL_ERROR "Could not find Hunspell")
+  endif(HUNSPELL_FIND_REQUIRED)
+endif(HUNSPELL_FOUND)

 MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES)
Actions #5

Updated by DJm00n about 12 years ago

Меньше костыликов:

diff --git a/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake b/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake
index e000202..069e032 100644
--- a/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake
+++ b/src/plugins/azoth/plugins/xoox/cmake/FindQXmpp.cmake
@@ -1,4 +1,4 @@
-# Find gloox library
+# Find QXmpp library

 #
 # QXMPP_INCLUDE_DIR
@@ -8,37 +8,30 @@
 # Copyright (c) 2010-2012 Georg Rudoy <0xd34df00d@gmail.com>
 # Copyright (c) 2012 Minh Ngo <nlminhtl@gmail.com>
 # Win32 additions by Eugene Mamin <TheDZhon@gmail.com>
+# Win32 fixes by Dimtriy Ryazantcev <DJm00n@mail.ru>

 FIND_PATH(QXMPP_INCLUDE_DIR
     NAMES
-    qxmpp-dev/QXmppClient.h
     qxmpp/QXmppClient.h
     PATH
     ENV
 )
 FIND_LIBRARY(QXMPP_LIBRARIES
     NAMES
-    qxmpp-dev
+    qxmpp0
     qxmpp
 )

 IF(QXMPP_LOCAL)
     FIND_PATH(QXMPP_INCLUDE_DIR client/QXmppClient.h "${QXMPP_LOCAL}/src")
     IF(QXMPP_INCLUDE_DIR)
-        IF(WIN32 AND MSVC)
-            SET(QXMPP_LIBRARY_RELEASE "${QXMPP_LOCAL}/lib/qxmpp.lib")
-            SET(QXMPP_LIBRARY_DEBUG "${QXMPP_LOCAL}/lib/qxmpp_d.lib")
-            win32_tune_libs_names (QXMPP)
-        ELSE(WIN32 AND MSVC)
-            SET(QXMPP_LIBRARIES ${QXMPP_LOCAL}/build/src/libqxmpp0.a)
-        ENDIF(WIN32 AND MSVC)
+        SET(QXMPP_LIBRARIES ${QXMPP_LOCAL}/build/src/libqxmpp0.a)
     ENDIF(QXMPP_INCLUDE_DIR)
 ENDIF(QXMPP_LOCAL)

 IF(QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIR)
     IF(NOT QXMPP_LOCAL)
         SET(QXMPP_INCLUDE_DIR
-            ${QXMPP_INCLUDE_DIR}/qxmpp-dev
             ${QXMPP_INCLUDE_DIR}/qxmpp
         )
     ENDIF(NOT QXMPP_LOCAL)
@@ -48,9 +41,6 @@ ENDIF(QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIR)
 IF(QXMPP_FOUND)
     MESSAGE(STATUS "Found QXmpp libraries at ${QXMPP_LIBRARIES}")
     MESSAGE(STATUS "Found QXmpp headers at ${QXMPP_INCLUDE_DIR}")
-    IF(WIN32)
-        MESSAGE(STATUS ${_WIN32_ADDITIONAL_MESS})
-    ENDIF(WIN32)
 ELSE(QXMPP_FOUND)
     IF(QXMPP_FIND_REQUIRED)
         MESSAGE(FATAL_ERROR "Could NOT find required QXmpp library, aborting")

Actions #6

Updated by DJm00n about 12 years ago

Еще костылики :)

diff --git a/src/plugins/bittorrent/torrentfilesmodel.cpp b/src/plugins/bittorrent/torrentfilesmodel.cpp
index 693e190..f872dd6 100644
--- a/src/plugins/bittorrent/torrentfilesmodel.cpp
+++ b/src/plugins/bittorrent/torrentfilesmodel.cpp
@@ -315,7 +315,11 @@ namespace LeechCraft
                     MkParentIfDoesntExist (path);

                     QList<QVariant> displayData;
+#ifdef Q_OS_WIN32
+                    displayData << QString::fromUtf16 (reinterpret_cast<const ushort*> (path.leaf ().c_str ()))
+#else
                     displayData << QString::fromUtf8 (path.leaf ().c_str ())
+#endif
                         << Util::MakePrettySize (begin->size);

                     TreeItem *parentItem = Path2TreeItem_ [parentPath],
@@ -354,7 +358,11 @@ namespace LeechCraft
                     QString pathStr = QString::fromUtf8 (fi.Path_.string ().c_str ());

                     QList<QVariant> displayData;
+#ifdef Q_OS_WIN32
+                    displayData << QString::fromUtf16 (reinterpret_cast<const ushort*> (fi.Path_.leaf ().c_str ()))
+#else
                     displayData << QString::fromUtf8 (fi.Path_.leaf ().c_str ())
+#endif
                         << QString::number (fi.Priority_)
                         << QString::number (fi.Progress_, 'f', 3);
                     qDebug () << Q_FUNC_INFO << fi.Priority_;
@@ -485,7 +493,11 @@ namespace LeechCraft
                     {
                         if (item->Data (0, RoleProgress).toDouble () != 1)
                         {
+#ifdef Q_OS_WIN32
+                            QString filename = QString::fromUtf16 (reinterpret_cast<const ushort*> (i->first.filename ().c_str ()));
+#else
                             QString filename = QString::fromUtf8 (i->first.filename ().c_str ());
+#endif
                             emit gotEntity (Util::MakeNotification ("BitTorrent",
                                     tr ("The file %1 hasn't finished downloading yet.")
                                         .arg (filename),
@@ -525,7 +537,11 @@ namespace LeechCraft
                 TreeItem *parent = Path2TreeItem_ [parentPath.branch_path ()];

                 QList<QVariant> data;
+#ifdef Q_OS_WIN32
+                data << QString::fromUtf16 (reinterpret_cast<const ushort*> (parentPath.leaf ().c_str ())) << QString ("");
+#else
                 data << QString::fromUtf8 (parentPath.leaf ().c_str ()) << QString ("");
+#endif
                 if (!AdditionDialog_)
                     data << QString ("") << QString ("");
                 TreeItem *item = new TreeItem (data, parent);

Actions #7

Updated by DJm00n about 12 years ago

Ты немножко забыл здесь:

diff --git a/src/plugins/bittorrent/torrentplugin.cpp b/src/plugins/bittorrent/torrentplugin.cpp
index 97f074b..5184e4b 100644
--- a/src/plugins/bittorrent/torrentplugin.cpp
+++ b/src/plugins/bittorrent/torrentplugin.cpp
@@ -32,6 +32,9 @@
 #include <QHeaderView>
 #include <QInputDialog>
 #include <QSortFilterProxyModel>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
 #include <libtorrent/session.hpp>
 #include <libtorrent/version.hpp>
 #include <interfaces/entitytesthandleresult.h>

Actions #8

Updated by DJm00n about 12 years ago

И здесь:

diff --git a/src/plugins/hotstreams/icecastfetcher.cpp b/src/plugins/hotstreams/icecastfetcher.cpp
index 80da789..1036016 100644
--- a/src/plugins/hotstreams/icecastfetcher.cpp
+++ b/src/plugins/hotstreams/icecastfetcher.cpp
@@ -19,6 +19,7 @@
 #include "icecastfetcher.h" 
 #include "roles.h" 
 #include <algorithm>
+#include <functional>
 #include <QStandardItem>
 #include <QFileInfo>
 #include <QUrl>

Actions #9

Updated by DJm00n about 12 years ago

Фикс 7zip'а

diff --git a/src/plugins/lackman/packageprocessor.cpp b/src/plugins/lackman/packageprocessor.cpp
index 5aea82f..ed20ef6 100644
--- a/src/plugins/lackman/packageprocessor.cpp
+++ b/src/plugins/lackman/packageprocessor.cpp
@@ -336,6 +336,7 @@ namespace LackMan
 #ifdef Q_OS_WIN32
         args << "x" 
             << "-ttar" 
+            << "-y" 
             << "-si";

         QString outDirArg ("-o");
@@ -346,6 +347,7 @@ namespace LackMan
         firstStep->setStandardOutputProcess (unarch);
         QStringList firstStepArgs;
         firstStepArgs << "x" 
+            << "-y" 
             << "-so" 
             << path;
 #else

Actions #13

Updated by 0xd34df00d about 12 years ago

Спасибо, патчи применены :3

Actions #14

Updated by 0xd34df00d about 12 years ago

  • Status changed from Resolved to Closed
  • Estimated time changed from 2:00 h to 4:00 h

Ок, считаем пока, что все ок, потом, если чо, лучше еще ишшуезы открывать.

Actions #17

Updated by DJm00n about 12 years ago

Пофиксил вот тот гребаный баг - падение при закрытии личкрафта. Сейчас не падает.

Actions

Also available in: Atom PDF