aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohn Willis2009-06-08 14:47:38 +0000
committerJohn Willis2009-06-08 14:47:38 +0000
commite78edd8ef6450a61f89a40ae6d8f7e9656a28237 (patch)
tree2ab7a8cc8c1a347fcbef826beece87cfb34221be /backends
parent87db37316c6d2cd410592cea278727d700cbc2f5 (diff)
downloadscummvm-rg350-e78edd8ef6450a61f89a40ae6d8f7e9656a28237.tar.gz
scummvm-rg350-e78edd8ef6450a61f89a40ae6d8f7e9656a28237.tar.bz2
scummvm-rg350-e78edd8ef6450a61f89a40ae6d8f7e9656a28237.zip
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
Diffstat (limited to 'backends')
-rw-r--r--backends/events/default/default-events.cpp2
-rwxr-xr-xbackends/platform/gp2x/build/bundle.sh4
-rwxr-xr-xbackends/platform/gp2xwiz/build/bundle.sh2
-rw-r--r--backends/vkeybd/packs/vkeybd_default.zipbin0 -> 505579 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp (renamed from backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp)bin153654 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp (renamed from backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp)bin612534 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp (renamed from backends/vkeybd/packs/vkeybd/lowercase320x240.bmp)bin153654 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp (renamed from backends/vkeybd/packs/vkeybd/lowercase640x480.bmp)bin612534 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp (renamed from backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp)bin153654 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp (renamed from backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp)bin612534 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp (renamed from backends/vkeybd/packs/vkeybd/uppercase320x240.bmp)bin153654 -> 153654 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp (renamed from backends/vkeybd/packs/vkeybd/uppercase640x480.bmp)bin612534 -> 612534 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/vkeybd.xml (renamed from backends/vkeybd/packs/vkeybd/vkeybd.xml)0
-rwxr-xr-xbackends/vkeybd/packs/vkeybdpack.py26
-rw-r--r--backends/vkeybd/vkeybd.zipbin504879 -> 0 bytes
15 files changed, 13 insertions, 21 deletions
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_default.zip b/backends/vkeybd/packs/vkeybd_default.zip
new file mode 100644
index 0000000000..eb06a173a7
--- /dev/null
+++ b/backends/vkeybd/packs/vkeybd_default.zip
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp
index 02254aa3c7..02254aa3c7 100644
--- a/backends/vkeybd/packs/vkeybd/lowercase-symbols320x240.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp
index 98c602acbe..98c602acbe 100644
--- a/backends/vkeybd/packs/vkeybd/lowercase-symbols640x480.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/lowercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp
index 27a450f2d2..27a450f2d2 100644
--- a/backends/vkeybd/packs/vkeybd/lowercase320x240.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/lowercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp
index 3df2a58b83..3df2a58b83 100644
--- a/backends/vkeybd/packs/vkeybd/lowercase640x480.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp
index 8fd645eb22..8fd645eb22 100644
--- a/backends/vkeybd/packs/vkeybd/uppercase-symbols320x240.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp
index cbdfbf19e9..cbdfbf19e9 100644
--- a/backends/vkeybd/packs/vkeybd/uppercase-symbols640x480.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/uppercase320x240.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp
index 6a1132314a..6a1132314a 100644
--- a/backends/vkeybd/packs/vkeybd/uppercase320x240.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/uppercase640x480.bmp b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp
index e635a3ccf2..e635a3ccf2 100644
--- a/backends/vkeybd/packs/vkeybd/uppercase640x480.bmp
+++ b/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp
Binary files differ
diff --git a/backends/vkeybd/packs/vkeybd/vkeybd.xml b/backends/vkeybd/packs/vkeybd_default/vkeybd.xml
index aba31b1096..aba31b1096 100644
--- a/backends/vkeybd/packs/vkeybd/vkeybd.xml
+++ b/backends/vkeybd/packs/vkeybd_default/vkeybd.xml
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
--- a/backends/vkeybd/vkeybd.zip
+++ /dev/null
Binary files differ