summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/archivefactory.cpp4
-rw-r--r--src/libs/installer/init.cpp5
-rw-r--r--src/libs/installer/installer.pro30
-rw-r--r--src/libs/libs.pro12
4 files changed, 33 insertions, 18 deletions
diff --git a/src/libs/installer/archivefactory.cpp b/src/libs/installer/archivefactory.cpp
index 5bfabe943..56811d8e3 100644
--- a/src/libs/installer/archivefactory.cpp
+++ b/src/libs/installer/archivefactory.cpp
@@ -29,7 +29,7 @@
#include "archivefactory.h"
#ifdef IFW_LIBARCHIVE
#include "libarchivewrapper.h"
-#else
+#elif defined(IFW_LIB7Z)
#include "lib7zarchive.h"
#endif
@@ -144,7 +144,7 @@ ArchiveFactory::ArchiveFactory()
<< QLatin1String("tar") << QLatin1String("tar.gz") << QLatin1String("tar.bz2")
<< QLatin1String("tar.xz") << QLatin1String("zip") << QLatin1String("7z")
<< QLatin1String("qbsp"));
-#else
+#elif defined(IFW_LIB7Z)
registerArchive<Lib7zArchive>(QLatin1String("Lib7z"), QStringList()
<< QLatin1String("7z") << QLatin1String("qbsp"));
#endif
diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp
index 4aa65296f..f47040d93 100644
--- a/src/libs/installer/init.cpp
+++ b/src/libs/installer/init.cpp
@@ -49,7 +49,9 @@
#include "consumeoutputoperation.h"
#include "loggingutils.h"
+#ifdef IFW_LIB7Z
#include "lib7z_facade.h"
+#endif
#include "updateoperationfactory.h"
#include "filedownloaderfactory.h"
@@ -72,8 +74,9 @@ static void initResources()
*/
void QInstaller::init()
{
+#ifdef IFW_LIB7Z
Lib7z::initSevenZ();
-
+#endif
#if defined(QT_STATIC)
::initResources();
#endif
diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro
index ed7d739ed..7aedc6590 100644
--- a/src/libs/installer/installer.pro
+++ b/src/libs/installer/installer.pro
@@ -4,7 +4,6 @@ INCLUDEPATH += . ..
CONFIG += staticlib
-include(../7zip/7zip.pri)
include(../kdtools/kdtools.pri)
include(../ifwtools/ifwtools.pri)
include(../../../installerfw.pri)
@@ -91,7 +90,6 @@ HEADERS += packagemanagercore.h \
constants.h \
packagemanagerproxyfactory.h \
createlocalrepositoryoperation.h \
- lib7z_facade.h \
link.h \
createlinkoperation.h \
packagemanagercoredata.h \
@@ -105,7 +103,6 @@ HEADERS += packagemanagercore.h \
copyfiletask.h \
downloadfiletask.h \
downloadfiletask_p.h \
- unziptask.h \
observer.h \
runextensions.h \
metadatajob.h \
@@ -132,17 +129,12 @@ HEADERS += packagemanagercore.h \
keepaliveobject.h \
systeminfo.h \
packagesource.h \
- lib7z_guid.h \
- lib7z_create.h \
- lib7z_extract.h \
- lib7z_list.h \
repositorycategory.h \
componentselectionpage_p.h \
commandlineparser.h \
commandlineparser_p.h \
abstractarchive.h \
directoryguard.h \
- lib7zarchive.h \
archivefactory.h
SOURCES += packagemanagercore.cpp \
@@ -150,7 +142,6 @@ SOURCES += packagemanagercore.cpp \
archivefactory.cpp \
aspectratiolabel.cpp \
directoryguard.cpp \
- lib7zarchive.cpp \
componentsortfilterproxymodel.cpp \
loggingutils.cpp \
packagemanagercore_p.cpp \
@@ -194,7 +185,6 @@ SOURCES += packagemanagercore.cpp \
permissionsettings.cpp \
packagemanagerproxyfactory.cpp \
createlocalrepositoryoperation.cpp \
- lib7z_facade.cpp \
link.cpp \
createlinkoperation.cpp \
packagemanagercoredata.cpp \
@@ -205,7 +195,6 @@ SOURCES += packagemanagercore.cpp \
abstractfiletask.cpp \
copyfiletask.cpp \
downloadfiletask.cpp \
- unziptask.cpp \
observer.cpp \
metadatajob.cpp \
protocol.cpp \
@@ -251,11 +240,26 @@ CONFIG(libarchive) {
LIBS += -llibarchive
}
-LIBS += -l7z
+CONFIG(lzmasdk) {
+ include(../7zip/7zip.pri)
+
+ HEADERS += lib7z_facade.h \
+ lib7z_guid.h \
+ lib7z_create.h \
+ lib7z_extract.h \
+ lib7z_list.h \
+ lib7zarchive.h
+
+ SOURCES += lib7z_facade.cpp \
+ lib7zarchive.cpp
+
+ LIBS += -l7z
+ win32:LIBS += -loleaut32 -luser32
+}
+
win32 {
SOURCES += adminauthorization_win.cpp sysinfo_win.cpp
- LIBS += -loleaut32 -luser32 # 7zip
LIBS += -ladvapi32 -lpsapi # kdtools
LIBS += -lole32 -lshell32 # createshortcutoperation
diff --git a/src/libs/libs.pro b/src/libs/libs.pro
index 64bc41d51..8d849fd15 100644
--- a/src/libs/libs.pro
+++ b/src/libs/libs.pro
@@ -1,3 +1,11 @@
TEMPLATE = subdirs
-SUBDIRS += 3rdparty 7zip installer
-installer.depends = 3rdparty 7zip
+
+include(../../installerfw.pri)
+
+SUBDIRS += 3rdparty installer
+installer.depends = 3rdparty
+
+CONFIG(lzmasdk) {
+ SUBDIRS += 7zip
+ installer.depends = 7zip
+}