mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Add autotype library linking
Added Autotype switch + updated Travis to always test all extension
This commit is contained in:
parent
fa891edb7c
commit
07a41f58d7
@ -10,7 +10,7 @@ os:
|
||||
# Define clang compiler without any frills
|
||||
compiler:
|
||||
- clang
|
||||
|
||||
|
||||
# Define gcc compile with deploy option (only for master/develop merges)
|
||||
matrix:
|
||||
include:
|
||||
@ -33,7 +33,7 @@ before_script:
|
||||
- mkdir build && pushd build
|
||||
|
||||
script:
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUI_TESTS=ON $CMAKE_ARGS ..
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUI_TESTS=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
|
||||
- make -j2
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
|
||||
|
@ -29,15 +29,6 @@ endif()
|
||||
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
|
||||
|
||||
set(keepassx_SOURCES
|
||||
autotype/AutoType.cpp
|
||||
autotype/AutoTypeAction.cpp
|
||||
autotype/AutoTypePlatformPlugin.h
|
||||
autotype/AutoTypeSelectDialog.cpp
|
||||
autotype/AutoTypeSelectView.cpp
|
||||
autotype/ShortcutWidget.cpp
|
||||
autotype/WildcardMatcher.cpp
|
||||
autotype/WindowSelectComboBox.cpp
|
||||
autotype/test/AutoTypeTestInterface.h
|
||||
core/AutoTypeAssociations.cpp
|
||||
core/Config.cpp
|
||||
core/Database.cpp
|
||||
@ -156,6 +147,7 @@ set(keepassx_FORMS
|
||||
)
|
||||
|
||||
add_feature_info(KeePassHTTP WITH_XC_HTTP "KeePassHTTP support for ChromeIPass and PassIFox")
|
||||
add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields")
|
||||
|
||||
if(WITH_XC_HTTP)
|
||||
set(keepasshttp_SOURCES
|
||||
@ -177,6 +169,20 @@ if(WITH_XC_HTTP)
|
||||
qt5_wrap_ui(keepasshttp_SOURCES ${keepasshttp_FORMS})
|
||||
endif()
|
||||
|
||||
set(autotype_SOURCES
|
||||
core/Tools.cpp
|
||||
autotype/AutoType.cpp
|
||||
autotype/AutoTypeAction.cpp
|
||||
autotype/AutoTypePlatformPlugin.h
|
||||
autotype/AutoTypeSelectDialog.cpp
|
||||
autotype/AutoTypeSelectView.cpp
|
||||
autotype/ShortcutWidget.cpp
|
||||
autotype/WildcardMatcher.cpp
|
||||
autotype/WindowSelectComboBox.cpp
|
||||
autotype/test/AutoTypeTestInterface.h
|
||||
)
|
||||
set(autotype_LIB autotype)
|
||||
|
||||
if(MINGW)
|
||||
set(keepassx_SOURCES_MAINEXE
|
||||
${keepassx_SOURCES_MAINEXE}
|
||||
@ -193,15 +199,19 @@ if(WITH_XC_HTTP)
|
||||
target_link_libraries(keepasshttp ${MHD_LIBRARIES} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
||||
endif()
|
||||
|
||||
add_library(autotype STATIC ${autotype_SOURCES})
|
||||
target_link_libraries(autotype Qt5::Core Qt5::Widgets)
|
||||
|
||||
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
||||
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
||||
target_link_libraries(keepassx_core zxcvbn ${keepasshttp_LIB} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
||||
target_link_libraries(keepassx_core zxcvbn ${keepasshttp_LIB} ${autotype_LIB} Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network)
|
||||
|
||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
||||
target_link_libraries(${PROGNAME}
|
||||
keepassx_core
|
||||
zxcvbn
|
||||
${keepasshttp_LIB}
|
||||
${autotype_LIB}
|
||||
Qt5::Core
|
||||
Qt5::Concurrent
|
||||
Qt5::Widgets
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <QApplication>
|
||||
#include <QPluginLoader>
|
||||
|
||||
#include "config-keepassx.h"
|
||||
|
||||
#include "autotype/AutoTypePlatformPlugin.h"
|
||||
#include "autotype/AutoTypeSelectDialog.h"
|
||||
#include "autotype/WildcardMatcher.h"
|
||||
@ -59,7 +61,9 @@ AutoType::AutoType(QObject* parent, bool test)
|
||||
QString pluginPath = filePath()->pluginPath(pluginName);
|
||||
|
||||
if (!pluginPath.isEmpty()) {
|
||||
#ifdef WITH_XC_AUTOTYPE
|
||||
loadPlugin(pluginPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
connect(qApp, SIGNAL(aboutToQuit()), SLOT(unloadPlugin()));
|
||||
|
@ -1,5 +1,3 @@
|
||||
add_feature_info(Autotype WITH_XC_AUTOTYPE "Auto-type passwords in Input fields")
|
||||
|
||||
if(WITH_XC_AUTOTYPE)
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(X11)
|
||||
|
@ -3,4 +3,4 @@ set(autotype_test_SOURCES
|
||||
)
|
||||
|
||||
add_library(keepassx-autotype-test MODULE ${autotype_test_SOURCES})
|
||||
target_link_libraries(keepassx-autotype-test testautotype Qt5::Core Qt5::Widgets)
|
||||
target_link_libraries(keepassx-autotype-test testautotype keepassx_core ${autotype_LIB} Qt5::Core Qt5::Widgets)
|
||||
|
@ -86,6 +86,7 @@ endmacro(add_unit_test)
|
||||
set(TEST_LIBRARIES
|
||||
keepassx_core
|
||||
${keepasshttp_LIB}
|
||||
${autotype_LIB}
|
||||
Qt5::Core
|
||||
Qt5::Concurrent
|
||||
Qt5::Widgets
|
||||
|
Loading…
Reference in New Issue
Block a user