mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 13:25:46 -04:00
Stop building resource PWADs and "make dist" generates a single Zip
The resource PWADs have been around for a very long time and dated from before Freedoom was capable of running as a complete IWAD on its own. Few people ever cared about these files, as evident by a lack of reports about freedoom_levels.wad not even being correct. Additionally, the separate Zips for each IWAD is gone. With that, Freedoom will be distributed as a single Zip file only that includes all of the subprojects.
This commit is contained in:
parent
683169965f
commit
bfb95753bd
3 changed files with 25 additions and 98 deletions
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013
|
||||
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013, 2014
|
||||
# Contributors to the Freedoom project. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -39,14 +38,7 @@ DIST_DOCS = [
|
|||
"README.html"
|
||||
]
|
||||
|
||||
# Most WADs are given a ZIP equal to their name, but some have different
|
||||
# names:
|
||||
|
||||
DIR_NAMES = {
|
||||
'doom2' : 'freedoom-iwad',
|
||||
'doom' : 'freedoom-ultimate',
|
||||
'freedoom' : 'freedoom-resource-wad',
|
||||
}
|
||||
DIR_NAME='freedoom'
|
||||
|
||||
# Run a command, displaying it before executing it.
|
||||
|
||||
|
@ -59,47 +51,28 @@ def run_command(command):
|
|||
version = os.getenv("VERSION")
|
||||
|
||||
if version is None:
|
||||
raise Exception("Version not specified for release!")
|
||||
sys.stderr.write("Version not specific for release\n")
|
||||
sys.exit(1)
|
||||
if version[0] is 'v':
|
||||
# Strip the leading 'v' from versioning
|
||||
version = version[1:]
|
||||
|
||||
# Build all of the packages
|
||||
path = os.path.dirname(sys.argv[1])
|
||||
basename = os.path.basename(sys.argv[1])
|
||||
|
||||
for filename in sys.argv[1:]:
|
||||
base_dir = DIR_NAME + "-" + version
|
||||
full_path = path + "/" + base_dir
|
||||
|
||||
path = os.path.dirname(filename)
|
||||
basename = os.path.basename(filename)
|
||||
# Create directory and add files
|
||||
|
||||
# Cut off the extension, and build the directory name
|
||||
run_command("mkdir %s" % full_path)
|
||||
for files in DIST_DOCS + sys.argv[1:]:
|
||||
run_command("cp %s %s" % (files, full_path))
|
||||
|
||||
pkgname = basename[0:-4]
|
||||
orig_dir = os.getcwd()
|
||||
|
||||
if pkgname in DIR_NAMES:
|
||||
base_dir = DIR_NAMES[pkgname]
|
||||
else:
|
||||
base_dir = pkgname
|
||||
|
||||
# Append the version:
|
||||
|
||||
base_dir += "-" + version
|
||||
|
||||
# Replace underscores with hyphens:
|
||||
|
||||
base_dir = base_dir.replace("_", "-")
|
||||
|
||||
full_path = path + "/" + base_dir
|
||||
|
||||
# Create directory, and add files.
|
||||
|
||||
run_command("mkdir %s" % full_path)
|
||||
|
||||
for doc in DIST_DOCS + [ filename ]:
|
||||
run_command("cp %s %s" % (doc, full_path))
|
||||
|
||||
# Change to the parent directory, and build the zip
|
||||
|
||||
orig_dir = os.getcwd()
|
||||
|
||||
os.chdir(path)
|
||||
run_command("rm -f %s.zip" % base_dir)
|
||||
run_command("zip -r %s.zip %s" % (base_dir, base_dir))
|
||||
run_command("rm -rf %s" % base_dir)
|
||||
os.chdir(orig_dir)
|
||||
os.chdir(path)
|
||||
run_command("rm -f %s.zip" % base_dir)
|
||||
run_command("zip -r %s.zip %s" % (base_dir, base_dir))
|
||||
run_command("rm -rf %s" % base_dir)
|
||||
os.chdir(orig_dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue