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
This commit is contained in:
Thierry Crozat 2016-09-06 00:43:25 +01:00
parent b8948c3326
commit fa5a5bf865
19 changed files with 19 additions and 3 deletions

View file

@ -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

View file

@ -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__":

View file

@ -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

View file

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 150 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 156 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 161 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 183 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Before After
Before After

View file

@ -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

View file

@ -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