base_dir = os.path.dirname(__file__)
subprocess.call('Devenv "' + os.path.join(base_dir, 'mmo.sln') + '" /build release', shell=True)
-def make_full_package():
+def make_full_package(model = True):
version_header = open(os.path.join(base_dir, 'client/version.hpp')).read()
ver_major = re.search("#define MMO_VERSION_MAJOR\s+(\d+)", version_header).group(1)
ver_minor = re.search("#define MMO_VERSION_MINOR\s+(\d+)", version_header).group(1)
build_version_header = open(build_version_path).read()
ver_build = re.search("#define MMO_VERSION_BUILD\s+(\d+)", build_version_header).group(1)
ver_text += "_" + ver_build
-
- zip_path = os.path.join(base_dir, "mmo-" + ver_text + ".zip")
+
+ if (model):
+ zip_path = os.path.join(base_dir, "mmo-" + ver_text + ".zip")
+ else:
+ zip_path = os.path.join(base_dir, "mmo-nomodel-" + ver_text + ".zip")
+
zip = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
bin_path = os.path.join(base_dir, 'client/bin/')
relative_path = os.path.relpath(absolute_path, bin_path)
zip.write(absolute_path, relative_path)
- for root, dirs, files in os.walk(os.path.join(bin_path, 'models')):
- for file in files:
- absolute_path = os.path.join(root, file)
- relative_path = os.path.relpath(absolute_path, bin_path)
- zip.write(absolute_path, relative_path)
+ if (model):
+ for root, dirs, files in os.walk(os.path.join(bin_path, 'models')):
+ for file in files:
+ absolute_path = os.path.join(root, file)
+ relative_path = os.path.relpath(absolute_path, bin_path)
+ zip.write(absolute_path, relative_path)
+ else:
+ zip.writestr('models/', '')
for root, dirs, files in os.walk(os.path.join(bin_path, 'motions')):
for file in files:
zip.close()
-make_full_package();
+make_full_package(True);
+make_full_package(False);
make_server_package();
\ No newline at end of file