Skip to content

Commit 1a00db8

Browse files
Merge branch 'gui_linux'
2 parents 1d3ba62 + 7b06145 commit 1a00db8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2563
-159
lines changed

keychain_cmd_app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(APPLE)
2222
endif()
2323

2424
SET(BOOST_COMPONENTS)
25-
LIST(APPEND BOOST_COMPONENTS log date_time system filesystem program_options signals serialization chrono unit_test_framework locale thread exception iostreams)
25+
LIST(APPEND BOOST_COMPONENTS log date_time system filesystem program_options serialization chrono unit_test_framework locale thread exception iostreams)
2626
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
2727

2828
SET(BOOST_ROOT $ENV{BOOST_ROOT})

keychain_lib/include/keychain_lib/keychain_commands.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ struct keychain_command<command_te::create>: keychain_command_base
587587
hash = dev::ethash::sha3_ethash(keys.pub());
588588
priv_key = keys.secret();
589589
filename = hash.hex().substr(0,16);
590-
keyname = params.keyname + "@"+ filename;
590+
keyname = params.keyname ;
591591
filename += ".json";
592592
}
593593
break;

keychain_linux/passentry_cmd/pass_entry_term.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ std::wstring pass_entry_term::input_password(const KeySym * map, int socket)
216216
char name[256] = "Unknown";
217217
bool first_key = true;
218218
auto gui = polling(socket);
219-
ChangeKbProperty(dev_info, kbd_atom, device_enabled_prop, dev_cnt, 0);
219+
//ChangeKbProperty(dev_info, kbd_atom, device_enabled_prop, dev_cnt, 0);
220220

221221
capslock = keyState(XK_Caps_Lock);
222222
numlock = keyState(XK_Num_Lock);
@@ -257,7 +257,7 @@ std::wstring pass_entry_term::input_password(const KeySym * map, int socket)
257257
if ( ev[1].code <= 255)
258258
{
259259
kbd_id = fd_list[id];
260-
if (ioctl(kbd_id, EVIOCGRAB, 1) != 0) throw std::runtime_error("cannot get exclusive access to keyboard");
260+
//if (ioctl(kbd_id, EVIOCGRAB, 1) != 0) throw std::runtime_error("cannot get exclusive access to keyboard");
261261
break;
262262
}
263263
}

keychain_linux/passentry_gui/CMakeLists.txt

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,72 @@ set(CMAKE_CXX_STANDARD 14)
33
#set(CMAKE_CXX_FLAGS "-std=c++14 --verbose -fno-limit-debug-info")
44
set(CMAKE_CXX_FLAGS "-std=c++14 ")
55

6+
project(testproject)
7+
8+
69
if (NOT MSVC)
710
if ( LIBCXX_BUILD )
811
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
912
endif()
1013
endif()
1114

12-
set (CMAKE_PREFIX_PATH "${QT_ROOT}/gcc_64/lib/cmake/Qt5Widgets/")
15+
#set (CMAKE_PREFIX_PATH "${QT_ROOT}/gcc_64/lib/cmake/Qt5Widgets/")
16+
set (CMAKE_PREFIX_PATH "/home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5Widgets")
1317

1418
project(passentrygui)
1519
# Find includes in corresponding build directories
1620

1721
set(CMAKE_INCLUDE_CURRENT_DIR ON)
18-
# Instruct CMake to run moc automatically when needed
22+
23+
#set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src")
24+
#set(AUTOGEN_BUILD_DIR "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/GeneratedFiles")
25+
1926
set(CMAKE_AUTOMOC ON)
20-
# Create code from a list of Qt designer ui files
21-
#set(CMAKE_AUTOUIC ON)
27+
set(CMAKE_AUTOUIC ON)
28+
#set(CMAKE_AUTORCC ON)
29+
30+
SET(Qt5_DIR /home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5)
31+
SET(Qt5Core_DIR /home/user/Qt5.12.0/5.12.0/gcc_64/lib/cmake/Qt5Core)
32+
33+
find_package(Qt5Widgets CONFIG REQUIRED)
34+
find_package(Qt5Core)
35+
#find_package(Qt5 5.12.0 REQUIRED Gui Xml)
2236

37+
#find_package(Qt5Qml )
38+
#find_package(Qt5Svg)
39+
40+
#get_target_property(QtCore_location Qt5::Core LOCATION)
41+
42+
#add_definitions(-DUNICODE -D_UNICODE)
43+
44+
#qt5_add_resources(RESOURCES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/Resources/*.qrc")
45+
#QT5_WRAP_UI(MOC_FILES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src/*.ui")
46+
#include_directories(${Qt5Widgets_INCLUDES})
47+
#include_directories(${Qt5Core_INCLUDES})
48+
#include_directories(${Qt5Qml_INCLUDES})
49+
#include_directories(${Qt5Svg_INCLUDES})
50+
#add_definitions(${Qt5Widgets_DEFINITIONS})
2351

2452
find_library(LIB_PTHREAD NAME pthread HINTS "/usr/lib/x86_64-linux-gnu")
2553

2654
SET(BOOST_COMPONENTS)
27-
LIST(APPEND BOOST_COMPONENTS date_time system filesystem program_options signals serialization chrono unit_test_framework locale iostreams)
55+
LIST(APPEND BOOST_COMPONENTS log date_time system filesystem program_options serialization chrono locale thread exception iostreams)
2856
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
2957

58+
#SET(BOOST_ROOT $ENV{BOOST_ROOT})
3059
set(Boost_USE_MULTITHREADED ON)
3160
set(BOOST_ALL_DYN_LINK OFF)
3261

3362
FIND_PACKAGE(Boost 1.65 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
3463
SET(Boost_LIBRARIES ${Boost_LIBRARIES})
3564

36-
include_directories(
37-
"../../libraries/fc_light/include"
65+
66+
include_directories("${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/include"
67+
# "${AUTOGEN_BUILD_DIR}"
68+
"${CMAKE_SOURCE_DIR}/libraries/fc_light/include"
69+
"${CMAKE_SOURCE_DIR}/keychain_lib/include"
70+
"${CMAKE_SOURCE_DIR}/libraries/kaitai_struct_cpp_stl_runtime"
71+
${Boost_INCLUDE_DIR}
3872
"/usr/include/libcxxabi"
3973
"${OPENSSL_ROOT_DIR}/include"
4074
${Boost_INCLUDE_DIR})
@@ -43,12 +77,13 @@ include_directories(
4377
find_package(Qt5Widgets CONFIG REQUIRED)
4478
find_library(LIB_OPENSSL NAME crypto HINTS "${OPENSSL_ROOT_DIR}/lib")
4579

46-
file(GLOB GUI_SOURCES "./*.cpp")
47-
file(GLOB GUI_INCLUDE "./*.hpp")
48-
49-
add_executable(passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE})
80+
file(GLOB GUI_SOURCES "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/src/*.cpp")
81+
file(GLOB GUI_INCLUDE "${CMAKE_SOURCE_DIR}/keychain_linux/passentry_gui/include/*.h*")
82+
file(GLOB GUI_RESOURCES "./Resources/*.qrc")
83+
file(GLOB GUI_UIS "./src/*.ui")
5084

85+
add_executable(passentry_gui ${GUI_SOURCES} ${GUI_INCLUDE} ${GUI_RESOURCES} ${GUI_UIS} )
5186

5287
# Use the Widgets module from Qt 5
53-
target_link_libraries(passentry_gui Qt5::Widgets fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
54-
88+
#target_link_libraries(passentry_gui Qt5::Widgets Qt5::Core Qt5::Qml Qt5::Svg keychain_common secmodlib kaitai_struct_cpp_stl_runtime fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
89+
target_link_libraries(passentry_gui Qt5::Widgets Qt5::Core keychain_common kaitai_struct_cpp_stl_runtime fc_light ${LIB_PTHREAD} ${LIB_OPENSSL} ${Boost_LIBRARIES} )
Loading
292 Bytes
Loading
736 Bytes
Loading
635 Bytes
Loading
Loading
315 Bytes
Loading

0 commit comments

Comments
 (0)