From 97d9648f5d950ea7d7b64f5c2db67359e8f47013 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Tue, 1 Dec 2015 15:29:24 +0200 Subject: Improve build configuration Add new configuration flags to simplify the customization process of the virtual keyboard. - lang- flag enables the specified language. - lang-all flag enables all the languages. - handwriting flag enables the handwriting input method (t9write or lipi-toolkit) Updated test cases and also fixed the virtual keyboard for single language support. Change-Id: I599816bed591bd193ad26cef0e9bf4812146e865 Reviewed-by: Oswald Buddenhagen Reviewed-by: Mitch Curtis --- .../3rdparty/t9write/generateresource.prf | 27 ---------------------- .../3rdparty/t9write/t9write-build.pri | 17 ++++++++------ src/virtualkeyboard/3rdparty/t9write/t9write.pro | 2 +- 3 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 src/virtualkeyboard/3rdparty/t9write/generateresource.prf (limited to 'src/virtualkeyboard/3rdparty') diff --git a/src/virtualkeyboard/3rdparty/t9write/generateresource.prf b/src/virtualkeyboard/3rdparty/t9write/generateresource.prf deleted file mode 100644 index 2d6c3a7e..00000000 --- a/src/virtualkeyboard/3rdparty/t9write/generateresource.prf +++ /dev/null @@ -1,27 +0,0 @@ -defineReplace(generate_resource) { - GENERATED_FILE = $$OUT_PWD/$$1 - INCLUDED_FILES = $$2 - GENERATED_CONTENT = \ - "" - - RESOURCE_PREFIX = "" - for (FILE, INCLUDED_FILES) { - RELATIVE_PATH = $$relative_path($$absolute_path($$FILE), $$_PRO_FILE_PWD_) - SUB_FOLDER = /$$dirname(RELATIVE_PATH) - !equals(SUB_FOLDER, $$RESOURCE_PREFIX) { - !isEmpty(RESOURCE_PREFIX): GENERATED_CONTENT += "" - RESOURCE_PREFIX = $$SUB_FOLDER - GENERATED_CONTENT += "" - } - ABSOLUTE_PATH = $$absolute_path($$FILE) - ALIAS_NAME = $$basename(FILE) - GENERATED_CONTENT += "$$ABSOLUTE_PATH" - } - !isEmpty(RESOURCE_PREFIX): GENERATED_CONTENT += "" - - GENERATED_CONTENT += \ - "" - write_file($$GENERATED_FILE, GENERATED_CONTENT)|error("Failed to write resource file!") - - return($$GENERATED_FILE) -} diff --git a/src/virtualkeyboard/3rdparty/t9write/t9write-build.pri b/src/virtualkeyboard/3rdparty/t9write/t9write-build.pri index 9769d04c..5ec0257d 100644 --- a/src/virtualkeyboard/3rdparty/t9write/t9write-build.pri +++ b/src/virtualkeyboard/3rdparty/t9write/t9write-build.pri @@ -13,10 +13,13 @@ T9WRITE_BUILD_DIR = $$files(build_VC*) } -isEmpty(T9WRITE_BUILD_DIR): error(T9Write SDK could not be detected. Please make sure you have extracted the contents of the T9Write SDK to $$PWD) -!count(T9WRITE_BUILD_DIR, 1): error(Conflicting T9Write build directories found: $$T9WRITE_BUILD_DIR) - -T9WRITE_ALPHABETIC_OBJ = $$PWD/$$files($$T9WRITE_BUILD_DIR/objects/t9write_alphabetic*.o*) - -count(T9WRITE_BUILD_DIR, 0): error(T9Write object file is missing for the target $$T9WRITE_BUILD_DIR) -!count(T9WRITE_BUILD_DIR, 1): error(Multiple T9Write object files found for the target $$T9WRITE_BUILD_DIR) +count(T9WRITE_BUILD_DIR, 1) { + T9WRITE_FOUND = 1 + T9WRITE_INCLUDE_DIRS = \ + $$PWD/$$T9WRITE_BUILD_DIR/api \ + $$PWD/$$T9WRITE_BUILD_DIR/public + T9WRITE_ALPHABETIC_LIBS = \ + $$PWD/$$files($$T9WRITE_BUILD_DIR/objects/t9write_alphabetic*.o*) +} else { + T9WRITE_FOUND = 0 +} diff --git a/src/virtualkeyboard/3rdparty/t9write/t9write.pro b/src/virtualkeyboard/3rdparty/t9write/t9write.pro index 8e65a5cc..197d1015 100644 --- a/src/virtualkeyboard/3rdparty/t9write/t9write.pro +++ b/src/virtualkeyboard/3rdparty/t9write/t9write.pro @@ -20,6 +20,6 @@ T9WRITE_RESOURCE_FILES = \ # Note: Compression is disabled, because the resource is accessed directly from the memory QMAKE_RESOURCE_FLAGS += -no-compress -include(generateresource.prf) +include(../../generateresource.pri) RESOURCES += $$generate_resource(t9write_db.qrc, $$T9WRITE_RESOURCE_FILES) -- cgit v1.2.3