aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2016-09-06 00:43:25 +0100
committerThierry Crozat2016-09-06 00:43:25 +0100
commitfa5a5bf865e86f02257f3b1bec84ba74e71319b1 (patch)
tree65fe939a958c8d9d588a9b7a0ed4895b8f3fb6c4
parentb8948c332643da2be296cf3df4daa1fa6eeb1f08 (diff)
downloadscummvm-rg350-fa5a5bf865e86f02257f3b1bec84ba74e71319b1.tar.gz
scummvm-rg350-fa5a5bf865e86f02257f3b1bec84ba74e71319b1.tar.bz2
scummvm-rg350-fa5a5bf865e86f02257f3b1bec84ba74e71319b1.zip
CLOUD: Move wwwroot archive to dists and script to devtools
Both the data used to generate the archive and the archive itself were moved to dists/ instead of being in backends/. The script was also improved to optionally take a path as a command line argument to indicate where the wwwroot data are instead of assuming they are in the working directory. Finally a 'wwwroot' make target was also added to invoke the python script and generate the archive. with the expected path to
-rw-r--r--Makefile.common2
-rwxr-xr-x[-rw-r--r--]devtools/make-www-archive.py (renamed from backends/networking/make_archive.py)11
-rw-r--r--devtools/module.mk5
-rw-r--r--dists/networking/wwwroot.zip (renamed from backends/networking/wwwroot.zip)bin242704 -> 242704 bytes
-rw-r--r--dists/networking/wwwroot/.files.html (renamed from backends/networking/wwwroot/.files.html)0
-rw-r--r--dists/networking/wwwroot/.filesAJAX.html (renamed from backends/networking/wwwroot/.filesAJAX.html)0
-rw-r--r--dists/networking/wwwroot/.index.html (renamed from backends/networking/wwwroot/.index.html)0
-rw-r--r--dists/networking/wwwroot/ajax.js (renamed from backends/networking/wwwroot/ajax.js)0
-rw-r--r--dists/networking/wwwroot/favicon.ico (renamed from backends/networking/wwwroot/favicon.ico)bin94081 -> 94081 bytes
-rw-r--r--dists/networking/wwwroot/icons/7z.png (renamed from backends/networking/wwwroot/icons/7z.png)bin166 -> 166 bytes
-rw-r--r--dists/networking/wwwroot/icons/dir.png (renamed from backends/networking/wwwroot/icons/dir.png)bin150 -> 150 bytes
-rw-r--r--dists/networking/wwwroot/icons/txt.png (renamed from backends/networking/wwwroot/icons/txt.png)bin156 -> 156 bytes
-rw-r--r--dists/networking/wwwroot/icons/unk.png (renamed from backends/networking/wwwroot/icons/unk.png)bin142 -> 142 bytes
-rw-r--r--dists/networking/wwwroot/icons/up.png (renamed from backends/networking/wwwroot/icons/up.png)bin161 -> 161 bytes
-rw-r--r--dists/networking/wwwroot/icons/zip.png (renamed from backends/networking/wwwroot/icons/zip.png)bin183 -> 183 bytes
-rw-r--r--dists/networking/wwwroot/logo.png (renamed from backends/networking/wwwroot/logo.png)bin132967 -> 132967 bytes
-rw-r--r--dists/networking/wwwroot/style.css (renamed from backends/networking/wwwroot/style.css)0
-rw-r--r--dists/scummvm.rc2
-rw-r--r--dists/scummvm.rc.in2
19 files changed, 19 insertions, 3 deletions
diff --git a/Makefile.common b/Makefile.common
index cbd87ed06a..a1f43128a2 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -247,7 +247,7 @@ DIST_FILES_THEMES:=$(addprefix $(srcdir)/gui/themes/,$(DIST_FILES_THEMES))
# Networking files
DIST_FILES_NETWORKING=
ifdef USE_SDL_NET
-DIST_FILES_NETWORKING:=$(addprefix $(srcdir)/backends/networking/,wwwroot.zip)
+DIST_FILES_NETWORKING:=$(addprefix $(srcdir)/dists/networking/,wwwroot.zip)
endif
# Engine data files
diff --git a/backends/networking/make_archive.py b/devtools/make-www-archive.py
index 64d314bedd..95aeb1533f 100644..100755
--- a/backends/networking/make_archive.py
+++ b/devtools/make-www-archive.py
@@ -4,6 +4,7 @@ import sys
import re
import os
import zipfile
+import argparse
ARCHIVE_FILE_EXTENSIONS = ('.html', '.css', '.js', '.ico', '.png')
@@ -31,6 +32,16 @@ def buildArchive(archiveName):
zf.close()
def main():
+ parser = argparse.ArgumentParser(description='Generates wwwroot archive')
+ parser.add_argument('path', nargs='?', help='path where the wwwroot source data can be found')
+ args = parser.parse_args()
+ if args.path != None:
+ if not os.path.isdir(args.path):
+ print ("Directory '" + args.path + "' does not exist!")
+ return
+ else:
+ os.chdir(args.path)
+
buildArchive("wwwroot")
if __name__ == "__main__":
diff --git a/devtools/module.mk b/devtools/module.mk
index 1d682cdf05..0f2d19176a 100644
--- a/devtools/module.mk
+++ b/devtools/module.mk
@@ -44,6 +44,11 @@ devtools/make-scumm-fontdata$(EXEEXT): $(srcdir)/devtools/make-scumm-fontdata.c
$(QUIET)$(MKDIR) devtools/$(DEPDIR)
$(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
+# Rule to explicitly rebuild the wwwroot archive
+wwwroot:
+ $(srcdir)/devtools/make-www-archive.py $(srcdir)/dists/networking/
+
+
#
# Rules to explicitly rebuild the credits / MD5 tables.
# The rules for the files in the "web" resp. "docs" modules
diff --git a/backends/networking/wwwroot.zip b/dists/networking/wwwroot.zip
index b767d7c5d7..b767d7c5d7 100644
--- a/backends/networking/wwwroot.zip
+++ b/dists/networking/wwwroot.zip
Binary files differ
diff --git a/backends/networking/wwwroot/.files.html b/dists/networking/wwwroot/.files.html
index f05c0113f8..f05c0113f8 100644
--- a/backends/networking/wwwroot/.files.html
+++ b/dists/networking/wwwroot/.files.html
diff --git a/backends/networking/wwwroot/.filesAJAX.html b/dists/networking/wwwroot/.filesAJAX.html
index d45c73069d..d45c73069d 100644
--- a/backends/networking/wwwroot/.filesAJAX.html
+++ b/dists/networking/wwwroot/.filesAJAX.html
diff --git a/backends/networking/wwwroot/.index.html b/dists/networking/wwwroot/.index.html
index 2a3d9d382d..2a3d9d382d 100644
--- a/backends/networking/wwwroot/.index.html
+++ b/dists/networking/wwwroot/.index.html
diff --git a/backends/networking/wwwroot/ajax.js b/dists/networking/wwwroot/ajax.js
index c01d7e93fc..c01d7e93fc 100644
--- a/backends/networking/wwwroot/ajax.js
+++ b/dists/networking/wwwroot/ajax.js
diff --git a/backends/networking/wwwroot/favicon.ico b/dists/networking/wwwroot/favicon.ico
index 0283e8432e..0283e8432e 100644
--- a/backends/networking/wwwroot/favicon.ico
+++ b/dists/networking/wwwroot/favicon.ico
Binary files differ
diff --git a/backends/networking/wwwroot/icons/7z.png b/dists/networking/wwwroot/icons/7z.png
index 656e7e7c62..656e7e7c62 100644
--- a/backends/networking/wwwroot/icons/7z.png
+++ b/dists/networking/wwwroot/icons/7z.png
Binary files differ
diff --git a/backends/networking/wwwroot/icons/dir.png b/dists/networking/wwwroot/icons/dir.png
index bcdec04a57..bcdec04a57 100644
--- a/backends/networking/wwwroot/icons/dir.png
+++ b/dists/networking/wwwroot/icons/dir.png
Binary files differ
diff --git a/backends/networking/wwwroot/icons/txt.png b/dists/networking/wwwroot/icons/txt.png
index 023d2ee24a..023d2ee24a 100644
--- a/backends/networking/wwwroot/icons/txt.png
+++ b/dists/networking/wwwroot/icons/txt.png
Binary files differ
diff --git a/backends/networking/wwwroot/icons/unk.png b/dists/networking/wwwroot/icons/unk.png
index 346eebecc3..346eebecc3 100644
--- a/backends/networking/wwwroot/icons/unk.png
+++ b/dists/networking/wwwroot/icons/unk.png
Binary files differ
diff --git a/backends/networking/wwwroot/icons/up.png b/dists/networking/wwwroot/icons/up.png
index 2dc3df022b..2dc3df022b 100644
--- a/backends/networking/wwwroot/icons/up.png
+++ b/dists/networking/wwwroot/icons/up.png
Binary files differ
diff --git a/backends/networking/wwwroot/icons/zip.png b/dists/networking/wwwroot/icons/zip.png
index cdfc5763dd..cdfc5763dd 100644
--- a/backends/networking/wwwroot/icons/zip.png
+++ b/dists/networking/wwwroot/icons/zip.png
Binary files differ
diff --git a/backends/networking/wwwroot/logo.png b/dists/networking/wwwroot/logo.png
index 9fdd2d0d1e..9fdd2d0d1e 100644
--- a/backends/networking/wwwroot/logo.png
+++ b/dists/networking/wwwroot/logo.png
Binary files differ
diff --git a/backends/networking/wwwroot/style.css b/dists/networking/wwwroot/style.css
index ba31587c4d..ba31587c4d 100644
--- a/backends/networking/wwwroot/style.css
+++ b/dists/networking/wwwroot/style.css
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index d52d97dd2d..023e7a0965 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -20,7 +20,7 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
#ifdef USE_SDL_NET
-wwwroot.zip FILE "backends/networking/wwwroot.zip"
+wwwroot.zip FILE "dists/networking/wwwroot.zip"
#endif
#if ENABLE_ACCESS == STATIC_PLUGIN
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index 60fa44b017..3d7375b1da 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -20,7 +20,7 @@ scummmodern.zip FILE "gui/themes/scummmodern.zip"
translations.dat FILE "gui/themes/translations.dat"
#endif
#ifdef USE_SDL_NET
-wwwroot.zip FILE "backends/networking/wwwroot.zip"
+wwwroot.zip FILE "dists/networking/wwwroot.zip"
#endif
#if ENABLE_ACCESS == STATIC_PLUGIN