View | Details | Raw Unified | Return to bug 257261
Collapse All | Expand All

(-)b/CMakeLists.txt (-2 / +3 lines)
Lines 62-68 if(UNIX AND NOT APPLE) Link Here
62
endif()
62
endif()
63
option(WITH_XC_DOCS "Enable building of documentation" ON)
63
option(WITH_XC_DOCS "Enable building of documentation" ON)
64
64
65
set(WITH_XC_X11 ON CACHE BOOL "Enable building with X11 deps")
65
set(WITH_XC_X11 OFF CACHE BOOL "Enable building with X11 deps")
66
66
67
if(APPLE)
67
if(APPLE)
68
    # Perform the platform checks before applying the stricter compiler flags.
68
    # Perform the platform checks before applying the stricter compiler flags.
Lines 471-477 endif() Link Here
471
471
472
include(CLangFormat)
472
include(CLangFormat)
473
473
474
set(QT_COMPONENTS Core Network Concurrent Gui Svg Widgets Test LinguistTools)
474
#set(QT_COMPONENTS Core Network Concurrent Gui Svg Widgets Test LinguistTools)
475
set(QT_COMPONENTS Core Network Concurrent LinguistTools)
475
if(UNIX AND NOT APPLE)
476
if(UNIX AND NOT APPLE)
476
    if(WITH_XC_X11)
477
    if(WITH_XC_X11)
477
        list(APPEND QT_COMPONENTS X11Extras)
478
        list(APPEND QT_COMPONENTS X11Extras)
(-)b/src/CMakeLists.txt (-33 / +38 lines)
Lines 89-94 set(keepassx_SOURCES Link Here
89
        format/OpVaultReaderAttachments.cpp
89
        format/OpVaultReaderAttachments.cpp
90
        format/OpVaultReaderBandEntry.cpp
90
        format/OpVaultReaderBandEntry.cpp
91
        format/OpVaultReaderSections.cpp
91
        format/OpVaultReaderSections.cpp
92
        keys/CompositeKey.cpp
93
        keys/FileKey.cpp
94
        keys/PasswordKey.cpp
95
        keys/ChallengeResponseKey.cpp
96
        streams/HashedBlockStream.cpp
97
        streams/HmacBlockStream.cpp
98
        streams/LayeredStream.cpp
99
        streams/qtiocompressor.cpp
100
        streams/StoreDataStream.cpp
101
        streams/SymmetricCipherStream.cpp
102
        totp/totp.cpp)
103
104
if(WITH_XC_X11)
105
    list(APPEND keepassx_SOURCES
92
        gui/styles/styles.qrc
106
        gui/styles/styles.qrc
93
        gui/styles/StateColorPalette.cpp
107
        gui/styles/StateColorPalette.cpp
94
        gui/styles/base/phantomcolor.cpp
108
        gui/styles/base/phantomcolor.cpp
Lines 182-199 set(keepassx_SOURCES Link Here
182
        gui/wizard/NewDatabaseWizardPage.cpp
196
        gui/wizard/NewDatabaseWizardPage.cpp
183
        gui/wizard/NewDatabaseWizardPageMetaData.cpp
197
        gui/wizard/NewDatabaseWizardPageMetaData.cpp
184
        gui/wizard/NewDatabaseWizardPageEncryption.cpp
198
        gui/wizard/NewDatabaseWizardPageEncryption.cpp
185
        gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp
199
        gui/wizard/NewDatabaseWizardPageDatabaseKey.cpp)
186
        keys/CompositeKey.cpp
200
endif()
187
        keys/FileKey.cpp
201
188
        keys/PasswordKey.cpp
189
        keys/ChallengeResponseKey.cpp
190
        streams/HashedBlockStream.cpp
191
        streams/HmacBlockStream.cpp
192
        streams/LayeredStream.cpp
193
        streams/qtiocompressor.cpp
194
        streams/StoreDataStream.cpp
195
        streams/SymmetricCipherStream.cpp
196
        totp/totp.cpp)
197
if(APPLE)
202
if(APPLE)
198
    set(keepassx_SOURCES
203
    set(keepassx_SOURCES
199
            ${keepassx_SOURCES}
204
            ${keepassx_SOURCES}
Lines 204-221 if(APPLE) Link Here
204
            gui/osutils/macutils/AppKit.h)
209
            gui/osutils/macutils/AppKit.h)
205
endif()
210
endif()
206
if(UNIX AND NOT APPLE)
211
if(UNIX AND NOT APPLE)
207
    set(keepassx_SOURCES
212
    #set(keepassx_SOURCES
208
            ${keepassx_SOURCES}
213
    #        ${keepassx_SOURCES}
209
            gui/osutils/nixutils/ScreenLockListenerDBus.cpp
214
    #        gui/osutils/nixutils/ScreenLockListenerDBus.cpp
210
            gui/osutils/nixutils/NixUtils.cpp)
215
    #        gui/osutils/nixutils/NixUtils.cpp)
211
    if(WITH_XC_X11)
216
    if(WITH_XC_X11)
212
        list(APPEND keepassx_SOURCES
217
        list(APPEND keepassx_SOURCES
213
            gui/osutils/nixutils/X11Funcs.cpp)
218
            gui/osutils/nixutils/X11Funcs.cpp)
214
    endif()
219
    endif()
215
    qt5_add_dbus_adaptor(keepassx_SOURCES
220
    #qt5_add_dbus_adaptor(keepassx_SOURCES
216
            gui/org.keepassxc.KeePassXC.MainWindow.xml
221
        #        gui/org.keepassxc.KeePassXC.MainWindow.xml
217
            gui/MainWindow.h
222
        #    gui/MainWindow.h
218
            MainWindow)
223
        #    MainWindow)
219
endif()
224
endif()
220
if(WIN32)
225
if(WIN32)
221
    set(keepassx_SOURCES
226
    set(keepassx_SOURCES
Lines 254-263 if(WITH_XC_BROWSER) Link Here
254
    set(keepassx_SOURCES ${keepassx_SOURCES} gui/reports/ReportsPageBrowserStatistics.cpp)
259
    set(keepassx_SOURCES ${keepassx_SOURCES} gui/reports/ReportsPageBrowserStatistics.cpp)
255
endif()
260
endif()
256
261
257
add_subdirectory(autotype)
262
#add_subdirectory(autotype)
258
add_subdirectory(cli)
263
add_subdirectory(cli)
259
add_subdirectory(qrcode)
264
#add_subdirectory(qrcode)
260
set(qrcode_LIB qrcode)
265
#set(qrcode_LIB qrcode)
261
266
262
add_subdirectory(keeshare)
267
add_subdirectory(keeshare)
263
if(WITH_XC_KEESHARE)
268
if(WITH_XC_KEESHARE)
Lines 292-305 if(WIN32) Link Here
292
endif()
297
endif()
293
298
294
if(WITH_XC_YUBIKEY)
299
if(WITH_XC_YUBIKEY)
295
    list(APPEND keepassx_SOURCES 
300
    list(APPEND keepassx_SOURCES
296
        keys/drivers/YubiKey.h
301
        keys/drivers/YubiKey.h
297
        keys/drivers/YubiKey.cpp 
302
        keys/drivers/YubiKey.cpp
298
        keys/drivers/YubiKeyInterface.cpp 
303
        keys/drivers/YubiKeyInterface.cpp
299
        keys/drivers/YubiKeyInterfaceUSB.cpp 
304
        keys/drivers/YubiKeyInterfaceUSB.cpp
300
        keys/drivers/YubiKeyInterfacePCSC.cpp)
305
        keys/drivers/YubiKeyInterfacePCSC.cpp)
301
else()
306
else()
302
    list(APPEND keepassx_SOURCES 
307
    list(APPEND keepassx_SOURCES
303
        keys/drivers/YubiKey.h
308
        keys/drivers/YubiKey.h
304
        keys/drivers/YubiKeyStub.cpp)
309
        keys/drivers/YubiKeyStub.cpp)
305
endif()
310
endif()
Lines 323-343 endif() Link Here
323
configure_file(config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h)
328
configure_file(config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h)
324
configure_file(git-info.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/git-info.h)
329
configure_file(git-info.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/git-info.h)
325
330
326
add_library(autotype STATIC ${autotype_SOURCES})
331
#add_library(autotype STATIC ${autotype_SOURCES})
327
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
332
#target_link_libraries(autotype Qt5::Core Qt5::Widgets)
328
333
329
add_library(keepassx_core STATIC ${keepassx_SOURCES})
334
add_library(keepassx_core STATIC ${keepassx_SOURCES})
330
335
331
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
336
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
332
target_link_libraries(keepassx_core
337
target_link_libraries(keepassx_core
333
        autotype
338
    #autotype
334
        ${keepassxcbrowser_LIB}
339
        ${keepassxcbrowser_LIB}
335
        ${qrcode_LIB}
340
        #${qrcode_LIB}
336
        ${fdosecrets_LIB}
341
        ${fdosecrets_LIB}
337
        Qt5::Core
342
        Qt5::Core
338
        Qt5::Concurrent
343
        Qt5::Concurrent
339
        Qt5::Network
344
        Qt5::Network
340
        Qt5::Widgets
345
        #Qt5::Widgets
341
        ${BOTAN2_LIBRARIES}
346
        ${BOTAN2_LIBRARIES}
342
        ${PCSC_LIBRARIES}
347
        ${PCSC_LIBRARIES}
343
        ${ZXCVBN_LIBRARIES}
348
        ${ZXCVBN_LIBRARIES}
(-)b/src/core/EntryAttachments.cpp (+5 lines)
Lines 21-27 Link Here
21
#include "core/Global.h"
21
#include "core/Global.h"
22
#include "crypto/Random.h"
22
#include "crypto/Random.h"
23
23
24
#ifdef WITH_XC_X11
24
#include <QDesktopServices>
25
#include <QDesktopServices>
26
#endif
27
25
#include <QDir>
28
#include <QDir>
26
#include <QProcessEnvironment>
29
#include <QProcessEnvironment>
27
#include <QSet>
30
#include <QSet>
Lines 215-220 int EntryAttachments::attachmentsSize() const Link Here
215
218
216
bool EntryAttachments::openAttachment(const QString& key, QString* errorMessage)
219
bool EntryAttachments::openAttachment(const QString& key, QString* errorMessage)
217
{
220
{
221
#ifdef WITH_XC_X11
218
    if (!m_openedAttachments.contains(key)) {
222
    if (!m_openedAttachments.contains(key)) {
219
        const QByteArray attachmentData = value(key);
223
        const QByteArray attachmentData = value(key);
220
        auto ext = key.contains(".") ? "." + key.split(".").last() : "";
224
        auto ext = key.contains(".") ? "." + key.split(".").last() : "";
Lines 256-261 bool EntryAttachments::openAttachment(const QString& key, QString* errorMessage) Link Here
256
        *errorMessage = tr("Cannot open file \"%1\"").arg(key);
260
        *errorMessage = tr("Cannot open file \"%1\"").arg(key);
257
        return false;
261
        return false;
258
    }
262
    }
263
#endif
259
264
260
    return true;
265
    return true;
261
}
266
}
(-)b/src/core/Metadata.cpp (+4 lines)
Lines 22-28 Link Here
22
#include "core/Entry.h"
22
#include "core/Entry.h"
23
#include "core/Group.h"
23
#include "core/Group.h"
24
24
25
#ifdef WITH_XC_X11
25
#include <QApplication>
26
#include <QApplication>
27
#else
28
#include <QCoreApplication>
29
#endif
26
#include <QCryptographicHash>
30
#include <QCryptographicHash>
27
#include <QJsonDocument>
31
#include <QJsonDocument>
28
32
(-)b/src/main.cpp (+5 lines)
Lines 19-34 Link Here
19
#include <QCommandLineParser>
19
#include <QCommandLineParser>
20
#include <QDir>
20
#include <QDir>
21
#include <QFile>
21
#include <QFile>
22
#ifdef WITH_XC_X11
22
#include <QWindow>
23
#include <QWindow>
24
#endif
23
25
24
#include "cli/Utils.h"
26
#include "cli/Utils.h"
25
#include "config-keepassx.h"
27
#include "config-keepassx.h"
26
#include "core/Tools.h"
28
#include "core/Tools.h"
27
#include "crypto/Crypto.h"
29
#include "crypto/Crypto.h"
30
31
#ifdef WITH_XC_X11
28
#include "gui/Application.h"
32
#include "gui/Application.h"
29
#include "gui/MainWindow.h"
33
#include "gui/MainWindow.h"
30
#include "gui/MessageBox.h"
34
#include "gui/MessageBox.h"
31
#include "gui/osutils/OSUtils.h"
35
#include "gui/osutils/OSUtils.h"
36
#endif
32
37
33
#if defined(WITH_ASAN) && defined(WITH_LSAN)
38
#if defined(WITH_ASAN) && defined(WITH_LSAN)
34
#include <sanitizer/lsan_interface.h>
39
#include <sanitizer/lsan_interface.h>

Return to bug 257261