diff options
| author | Sworddragon <sworddragon2@aol.com> | 2011-04-02 04:49:14 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-03 22:34:04 +0200 |
| commit | e3a2d656f165c39e46ad4d04f7acc91bccf3b666 (patch) | |
| tree | c50b2262e3fdfa6ecdf802c8fda3959a149b0989 /scripts | |
| parent | 3e6b77b0409d05d5ed19c61e24246ed2a88b65e7 (diff) | |
| download | zcatch-e3a2d656f165c39e46ad4d04f7acc91bccf3b666.tar.gz zcatch-e3a2d656f165c39e46ad4d04f7acc91bccf3b666.zip | |
Fixed Python 3 support
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build.py | 2 | ||||
| -rw-r--r-- | scripts/make_release.py | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/scripts/build.py b/scripts/build.py index 0fa0bd2b..bceac47f 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -220,7 +220,7 @@ if 1: content += "call %VSPATH%vsvars32.bat\n\n" content += ":compile\n" content += 'cd %s\n"%s\\%s%sbam" config\n"%s\\%s%sbam" %s' % (src_dir_teeworlds, work_dir, src_dir_bam, bam_execution_path, work_dir, src_dir_bam, bam_execution_path, options.release_type) - file.write(content) + file.write(content.encode()) file.close() command = os.system("build.bat") else: diff --git a/scripts/make_release.py b/scripts/make_release.py index b056bc4e..1dc9a798 100644 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -6,8 +6,8 @@ if match != None: #valid_platforms = ["win32", "linux86", "linux86_64", "src"] if len(sys.argv) != 3: - print "wrong number of arguments" - print sys.argv[0], "VERSION PLATFORM" + print("wrong number of arguments") + print(sys.argv[0], "VERSION PLATFORM") sys.exit(-1) name = "teeworlds" @@ -30,8 +30,8 @@ if platform == "src": use_gz = 1 #if not platform in valid_platforms: -# print "not a valid platform" -# print valid_platforms +# print("not a valid platform") +# print(valid_platforms) # sys.exit(-1) if platform == 'win32': @@ -57,11 +57,11 @@ def copydir(src, dst, excl=[]): package = "%s-%s-%s" %(name, version, platform) package_dir = package -print "cleaning target" +print("cleaning target") shutil.rmtree(package_dir, True) os.mkdir(package_dir) -print "adding files" +print("adding files") shutil.copy("readme.txt", package_dir) shutil.copy("license.txt", package_dir) shutil.copy("storage.cfg", package_dir) @@ -169,7 +169,7 @@ if use_bundle: file(os.path.join(serverbundle_content_dir, "PkgInfo"), "w").write("APPL????") if use_zip: - print "making zip archive" + print("making zip archive") zf = zipfile.ZipFile("%s.zip" % package, 'w', zipfile.ZIP_DEFLATED) for root, dirs, files in os.walk(package_dir, topdown=True): @@ -180,14 +180,14 @@ if use_zip: zf.close() if use_gz: - print "making tar.gz archive" + print("making tar.gz archive") os.system("tar czf %s.tar.gz %s" % (package, package_dir)) if use_dmg: - print "making disk image" + print("making disk image") os.system("rm -f %s.dmg %s_temp.dmg" % (package, package)) os.system("hdiutil create -srcfolder %s -volname Teeworlds -quiet %s_temp" % (package_dir, package)) os.system("hdiutil convert %s_temp.dmg -format UDBZ -o %s.dmg -quiet" % (package, package)) os.system("rm -f %s_temp.dmg" % package) -print "done" +print("done") |