From ff9aa4ac848baa364ca6a7bed84b875c30362dc3 Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Fri, 24 Jun 2011 18:04:47 -0700 Subject: [PATCH] Add automatic creation of external plClient resources. --- .../Apps/plClient/external/Cursor_Base.svg | 383 ++++ .../Apps/plClient/external/Linking_Book.svg | 508 ++++++ .../external/Loading_Text_rasterfont.svg | 207 +++ .../Plasma/Apps/plClient/external/Makefile | 13 + .../Apps/plClient/external/Voice_Chat.svg | 1595 +++++++++++++++++ .../plClient/external/create_resource_dat.py | 62 + .../Plasma/Apps/plClient/external/makeres.py | 52 + .../Apps/plClient/external/render_svg.py | 205 +++ 8 files changed, 3025 insertions(+) create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Cursor_Base.svg create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Linking_Book.svg create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Loading_Text_rasterfont.svg create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Makefile create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Voice_Chat.svg create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/create_resource_dat.py create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/makeres.py create mode 100644 MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/render_svg.py diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Cursor_Base.svg b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Cursor_Base.svg new file mode 100644 index 00000000..737abfec --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Cursor_Base.svg @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Linking_Book.svg b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Linking_Book.svg new file mode 100644 index 00000000..628b8b55 --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Linking_Book.svg @@ -0,0 +1,508 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Loading_Text_rasterfont.svg b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Loading_Text_rasterfont.svg new file mode 100644 index 00000000..e93bdcbb --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Loading_Text_rasterfont.svg @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Makefile b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Makefile new file mode 100644 index 00000000..be059942 --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Makefile @@ -0,0 +1,13 @@ +SOURCE_DIR = . +BINARY_DIR = . + +.PHONY: all clean + +all: $(BINARY_DIR)/resource.dat + +$(BINARY_DIR)/resource.dat: $(SOURCE_DIR)/makeres.py $(SOURCE_DIR)/render_svg.py $(SOURCE_DIR)/create_resource_dat.py $(SOURCE_DIR)/Cursor_Base.svg $(SOURCE_DIR)/Linking_Book.svg $(SOURCE_DIR)/Loading_Text_rasterfont.svg $(SOURCE_DIR)/Voice_Chat.svg + python $(SOURCE_DIR)/makeres.py --optimize --render --package -i $(SOURCE_DIR) -o $(BINARY_DIR) + +clean: + rm -rf $(BINARY_DIR)/render + rm -fv $(BINARY_DIR)/resource.dat diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Voice_Chat.svg b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Voice_Chat.svg new file mode 100644 index 00000000..42ae5ceb --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/Voice_Chat.svg @@ -0,0 +1,1595 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/create_resource_dat.py b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/create_resource_dat.py new file mode 100644 index 00000000..50374346 --- /dev/null +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/external/create_resource_dat.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +from __future__ import print_function +from __future__ import with_statement + +import os +import sys +import glob +import struct +from optparse import OptionParser + +version = 1 + +def create_resource_dat(resfilepath, inrespath): + datHeader = 0xCBBCF00D + datVersion = 0x00000001 + + ## Get list of files to archive + resourceList = glob.glob(os.path.join(inrespath, "*")) + resourceList.sort() + if len(resourceList) == 0: + print("No files found in '{0}'. Quitting.\n".format(inrespath)) + return False + print("{0} resources found in '{1}'.".format(len(resourceList), inrespath, )) + + ## Write each resource into the output file + with open(resfilepath, "wb") as datFile: + datFile.write(struct.pack("