From e78edd8ef6450a61f89a40ae6d8f7e9656a28237 Mon Sep 17 00:00:00 2001 From: John Willis Date: Mon, 8 Jun 2009 14:47:38 +0000 Subject: Virtual Keyboard: Move vkeybd.zip into packs folder and rename default keyboard pack to vkeybd_default(.zip) with updates to default-events.cpp. Also update vkeybdpack.py to use zlib compression if Python zlib is found. Update GP2X and GP2XWiz bundle files to get new vkeybd_default.zip. svn-id: r41373 --- backends/events/default/default-events.cpp | 2 +- backends/platform/gp2x/build/bundle.sh | 4 +- backends/platform/gp2xwiz/build/bundle.sh | 2 +- .../packs/vkeybd/lowercase-symbols320x240.bmp | Bin 153654 -> 0 bytes .../packs/vkeybd/lowercase-symbols640x480.bmp | Bin 612534 -> 0 bytes backends/vkeybd/packs/vkeybd/lowercase320x240.bmp | Bin 153654 -> 0 bytes backends/vkeybd/packs/vkeybd/lowercase640x480.bmp | Bin 612534 -> 0 bytes .../packs/vkeybd/uppercase-symbols320x240.bmp | Bin 153654 -> 0 bytes .../packs/vkeybd/uppercase-symbols640x480.bmp | Bin 612534 -> 0 bytes backends/vkeybd/packs/vkeybd/uppercase320x240.bmp | Bin 153654 -> 0 bytes backends/vkeybd/packs/vkeybd/uppercase640x480.bmp | Bin 612534 -> 0 bytes backends/vkeybd/packs/vkeybd/vkeybd.xml | 914 --------------------- backends/vkeybd/packs/vkeybd_default.zip | Bin 0 -> 505579 bytes .../vkeybd_default/lowercase-symbols320x240.bmp | Bin 0 -> 153654 bytes .../vkeybd_default/lowercase-symbols640x480.bmp | Bin 0 -> 612534 bytes .../packs/vkeybd_default/lowercase320x240.bmp | Bin 0 -> 153654 bytes .../packs/vkeybd_default/lowercase640x480.bmp | Bin 0 -> 612534 bytes .../vkeybd_default/uppercase-symbols320x240.bmp | Bin 0 -> 153654 bytes .../vkeybd_default/uppercase-symbols640x480.bmp | Bin 0 -> 612534 bytes .../packs/vkeybd_default/uppercase320x240.bmp | Bin 0 -> 153654 bytes .../packs/vkeybd_default/uppercase640x480.bmp | Bin 0 -> 612534 bytes backends/vkeybd/packs/vkeybd_default/vkeybd.xml | 914 +++++++++++++++++++++ backends/vkeybd/packs/vkeybdpack.py | 26 +- backends/vkeybd/vkeybd.zip | Bin 504879 -> 0 bytes 24 files changed, 927 insertions(+), 935 deletions(-) delete mode 100644 backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/lowercase320x240.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/lowercase640x480.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/uppercase320x240.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/uppercase640x480.bmp delete mode 100644 backends/vkeybd/packs/vkeybd/vkeybd.xml create mode 100644 backends/vkeybd/packs/vkeybd_default.zip create mode 100644 backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp create mode 100644 backends/vkeybd/packs/vkeybd_default/vkeybd.xml delete mode 100644 backends/vkeybd/vkeybd.zip (limited to 'backends') diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 06851c5185..4fdf96e57e 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -278,7 +278,7 @@ void DefaultEventManager::init() { if (ConfMan.hasKey("vkeybd_pack_name")) { _vk->loadKeyboardPack(ConfMan.get("vkeybd_pack_name")); } else { - _vk->loadKeyboardPack("vkeybd"); + _vk->loadKeyboardPack("vkeybd_default"); } #endif } diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh index 776e5bb649..560f096ed4 100755 --- a/backends/platform/gp2x/build/bundle.sh +++ b/backends/platform/gp2x/build/bundle.sh @@ -12,6 +12,7 @@ export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib echo Collecting files. mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`" mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/saves" +mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/plugins" mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`/engine-data" echo "Please put your save games in this dir" >> "scummvm-gp2x-`date '+%Y-%m-%d'`/saves/PUT_SAVES_IN_THIS_DIR" @@ -28,9 +29,10 @@ cp ../../../../COPYING ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../COPYRIGHT ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../NEWS ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../gui/themes/scummmodern.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/ -cp ../../../../backends/vkeybd/vkeybd.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/ +cp ../../../../backends/vkeybd/packs/vkeybd_default.zip ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../dists/pred.dic ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../dists/engine-data/* ./scummvm-gp2x-`date '+%Y-%m-%d'`/engine-data +cp ../../../../plugins/* ./scummvm-gp2x-`date '+%Y-%m-%d'`/plugins echo Making Stripped GPE. arm-open2x-linux-strip ./scummvm-gp2x-`date '+%Y-%m-%d'`/scummvm.gp2x diff --git a/backends/platform/gp2xwiz/build/bundle.sh b/backends/platform/gp2xwiz/build/bundle.sh index 9c9947b909..506dfcb742 100755 --- a/backends/platform/gp2xwiz/build/bundle.sh +++ b/backends/platform/gp2xwiz/build/bundle.sh @@ -22,7 +22,7 @@ cp ../../../../COPYING ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../COPYRIGHT ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../NEWS ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../gui/themes/scummmodern.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ -cp ../../../../backends/vkeybd/vkeybd.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ +cp ../../../../backends/vkeybd/packs/vkeybd_default.zip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins diff --git a/backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp deleted file mode 100644 index 02254aa3c7..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp deleted file mode 100644 index 98c602acbe..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/lowercase320x240.bmp b/backends/vkeybd/packs/vkeybd/lowercase320x240.bmp deleted file mode 100644 index 27a450f2d2..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/lowercase320x240.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/lowercase640x480.bmp b/backends/vkeybd/packs/vkeybd/lowercase640x480.bmp deleted file mode 100644 index 3df2a58b83..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/lowercase640x480.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp deleted file mode 100644 index 8fd645eb22..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp deleted file mode 100644 index cbdfbf19e9..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/uppercase320x240.bmp b/backends/vkeybd/packs/vkeybd/uppercase320x240.bmp deleted file mode 100644 index 6a1132314a..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/uppercase320x240.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/uppercase640x480.bmp b/backends/vkeybd/packs/vkeybd/uppercase640x480.bmp deleted file mode 100644 index e635a3ccf2..0000000000 Binary files a/backends/vkeybd/packs/vkeybd/uppercase640x480.bmp and /dev/null differ diff --git a/backends/vkeybd/packs/vkeybd/vkeybd.xml b/backends/vkeybd/packs/vkeybd/vkeybd.xml deleted file mode 100644 index aba31b1096..0000000000 --- a/backends/vkeybd/packs/vkeybd/vkeybd.xml +++ /dev/null @@ -1,914 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backends/vkeybd/packs/vkeybd_default.zip b/backends/vkeybd/packs/vkeybd_default.zip new file mode 100644 index 0000000000..eb06a173a7 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default.zip differ diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp new file mode 100644 index 0000000000..02254aa3c7 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp new file mode 100644 index 0000000000..98c602acbe Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp new file mode 100644 index 0000000000..27a450f2d2 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp new file mode 100644 index 0000000000..3df2a58b83 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp new file mode 100644 index 0000000000..8fd645eb22 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp new file mode 100644 index 0000000000..cbdfbf19e9 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp new file mode 100644 index 0000000000..6a1132314a Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp new file mode 100644 index 0000000000..e635a3ccf2 Binary files /dev/null and b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp differ diff --git a/backends/vkeybd/packs/vkeybd_default/vkeybd.xml b/backends/vkeybd/packs/vkeybd_default/vkeybd.xml new file mode 100644 index 0000000000..aba31b1096 --- /dev/null +++ b/backends/vkeybd/packs/vkeybd_default/vkeybd.xml @@ -0,0 +1,914 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backends/vkeybd/packs/vkeybdpack.py b/backends/vkeybd/packs/vkeybdpack.py index e7b1c63543..130e4b737b 100755 --- a/backends/vkeybd/packs/vkeybdpack.py +++ b/backends/vkeybd/packs/vkeybdpack.py @@ -4,6 +4,11 @@ import sys import re import os import zipfile +try: + import zlib + compression = zipfile.ZIP_DEFLATED +except: + compression = zipfile.ZIP_STORED PACK_FILE_EXTENSIONS = ('.xml', '.bmp') @@ -14,12 +19,14 @@ def buildPack(packName): zf = zipfile.ZipFile(packName + ".zip", 'w') + zf.compress_type = zipfile.ZIP_DEFLATED + print ("Building '" + packName + "' pack:") os.chdir(packName) for filename in os.listdir('.'): if os.path.isfile(filename) and not filename[0] == '.' and filename.endswith(PACK_FILE_EXTENSIONS): - zf.write(filename, './' + filename) + zf.write(filename, './' + filename, compress_type=compression) print (" Adding file: " + filename) os.chdir('../') @@ -30,24 +37,7 @@ def buildAllPacks(): for f in os.listdir('.'): if os.path.isdir(os.path.join('.', f)) and not f[0] == '.': buildPack(f) - -def parseSTX(pack_file, def_file): - comm = re.compile("", re.DOTALL) - head = re.compile("<\?(.*?)\?>") - output = "" - for line in pack_file: - output += line.rstrip("\r\n\t ").lstrip() + " \n" - - output = re.sub(comm, "", output) - output = re.sub(head, "", output) - output = output.replace("\t", " ").replace(" ", " ").replace("\"", "'") - output = output.replace(" = ", "=").replace(", ", ",") - - for line in output.splitlines(): - if line and not line.isspace(): - def_file.write("\"" + line + "\"\n") - def printUsage(): print ("===============================================") print ("ScummVM Virtual Keyboard Pack Generation Script") diff --git a/backends/vkeybd/vkeybd.zip b/backends/vkeybd/vkeybd.zip deleted file mode 100644 index a4314e908a..0000000000 Binary files a/backends/vkeybd/vkeybd.zip and /dev/null differ -- cgit v1.2.3