mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Remove xvkbd from cmake build.
The directory still exists because automake build refers it.
This commit is contained in:
parent
4495481d97
commit
4436431ea5
@ -67,12 +67,18 @@ if(QT_USES_X11)
|
||||
message(STATUS "cmake build is therefore omitting keytests")
|
||||
endif()
|
||||
|
||||
find_program(XVKBD_EXE NAMES "xvkbd")
|
||||
if (XVKBD_EXE MATCHES "NOTFOUND")
|
||||
message(STATUS "Missing xvkbd, omitting keytests")
|
||||
list(APPEND Missing "xvkbd")
|
||||
endif()
|
||||
|
||||
if(Missing OR NOT LYX_ENABLE_KEYTESTS)
|
||||
set(_runtest FALSE)
|
||||
else()
|
||||
project(keytest)
|
||||
|
||||
add_subdirectory(xvkbd)
|
||||
#add_subdirectory(xvkbd)
|
||||
|
||||
set(_runtest TRUE)
|
||||
set(KEYTEST "${CMAKE_CURRENT_SOURCE_DIR}/keytest.py")
|
||||
@ -101,6 +107,7 @@ if(QT_USES_X11)
|
||||
-DKEYTEST_INFILE=${_tf}
|
||||
-DBINDIR=$<TARGET_FILE_DIR:${_lyx}>
|
||||
-DLYX=${_lyx}
|
||||
-DXVKBD_EXE=${XVKBD_EXE}
|
||||
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
|
||||
-DLYX_USERDIR_VER=${LYX_USERDIR_VER}
|
||||
-DKEYTEST_OUTFILE=${_t}-out.txt
|
||||
|
@ -207,7 +207,6 @@ def lyx_dead():
|
||||
def sendKeystringLocal(keystr, LYX_PID):
|
||||
|
||||
# print "sending keystring "+keystr+"\n"
|
||||
|
||||
if not re.match(".*\w.*", keystr):
|
||||
print('print .' + keystr + '.\n')
|
||||
keystr = 'a'
|
||||
@ -239,10 +238,7 @@ def sendKeystringLocal(keystr, LYX_PID):
|
||||
xvpar.extend(["-no-jump-pointer"])
|
||||
else:
|
||||
xvpar.extend(["-xsendevent"])
|
||||
if xvkbd_hacked:
|
||||
xvpar.extend(["-wait_idle", lyx_pid])
|
||||
#xvpar.extend(["-window", lyx_window_name, "-delay", actual_delay, "-text", keystr])
|
||||
xvpar.extend(["-delay", actual_delay, "-text", keystr])
|
||||
xvpar.extend(["-window", lyx_window_name, "-delay", actual_delay, "-text", keystr])
|
||||
|
||||
print("Sending \"" + keystr + "\"\n")
|
||||
subprocess.call(xvpar, stdout = FNULL, stderr = FNULL)
|
||||
@ -337,7 +333,6 @@ xvkbd_exe = os.environ.get('XVKBD_EXE')
|
||||
if xvkbd_exe is None:
|
||||
xvkbd_exe = "xvkbd"
|
||||
|
||||
xvkbd_hacked = os.environ.get('XVKBD_HACKED') != None
|
||||
qt_frontend = os.environ.get('QT_FRONTEND')
|
||||
if qt_frontend is None:
|
||||
qt_frontend = 'QT4'
|
||||
@ -470,17 +465,17 @@ while not failed:
|
||||
print("result=" + str(result) + ", failed=" + str(failed))
|
||||
elif c[0:7] == 'TestEnd':
|
||||
# time.sleep(0.5)
|
||||
if not lyx_exists():
|
||||
if lyx_dead():
|
||||
print("LyX instance not found because of crash or assert !\n")
|
||||
failed = True
|
||||
else:
|
||||
print("Forcing quit of lyx instance: " + str(lyx_pid) + "...\n")
|
||||
# \Ax Enter command line is sometimes blocked
|
||||
# \[Escape] works after this
|
||||
sendKeystringLocal("\Ax\[Escape]", lyx_pid)
|
||||
sendKeystring("\Ax\[Escape]", lyx_pid)
|
||||
# now we should be outside any dialog
|
||||
# and so the function lyx-quit should work
|
||||
sendKeystringLocal("\Cq", lyx_pid)
|
||||
sendKeystring("\Cq", lyx_pid)
|
||||
time.sleep(0.5)
|
||||
if lyx_sleeping():
|
||||
# probably waiting for Save/Discard/Abort, we select 'Discard'
|
||||
|
@ -56,25 +56,7 @@ if(NOT DISPLAY_VAR MATCHES "^[a-zA-Z\\.]*:[0-9]+\(\\.[0-9]+\)?$")
|
||||
endif()
|
||||
|
||||
set(LYX_EXE "${BINDIR}/${LYX}")
|
||||
set(use_hacked $ENV{XVKBD_HACKED})
|
||||
if(NOT use_hacked)
|
||||
if(use_hacked STREQUAL "")
|
||||
# ENV{XVKBD_HACKED} probably not set, so the default should be
|
||||
# to use the hacked
|
||||
set(use_hacked "1")
|
||||
else()
|
||||
set(use_hacked "0")
|
||||
endif()
|
||||
else()
|
||||
set(use_hacked "1")
|
||||
endif()
|
||||
|
||||
set(ENV{XVKBD_HACKED} ${use_hacked})
|
||||
if(use_hacked)
|
||||
set(XVKBD_EXE "${BINDIR}/xvkbd")
|
||||
else()
|
||||
set(XVKBD_EXE "/usr/bin/xvkbd")
|
||||
endif()
|
||||
set(ENV{QT_FRONTEND} ${FRONTEND})
|
||||
|
||||
if(EXISTS "${LYX_TESTS_USERDIR}/session")
|
||||
@ -109,6 +91,7 @@ endif()
|
||||
if(EXISTS "${AUTOTEST_ROOT}/${_jj}.lyx")
|
||||
configure_file("${AUTOTEST_ROOT}/${_jj}.lyx" "${WORKDIR}/../${_jj}.lyx" COPYONLY)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND python ${KEYTEST}
|
||||
RESULT_VARIABLE KEYTEST_RES)
|
||||
|
Loading…
Reference in New Issue
Block a user