diff --git a/Build.py b/Build.py index 2e9de4a..d30607d 100755 --- a/Build.py +++ b/Build.py @@ -480,7 +480,10 @@ def checkCache(fnm, strip, upx): if upx: if strip: fnm = checkCache(fnm, 1, 0) - cmd = "upx --best -q \"%s\"" % cachedfile + bestopt = "--best" + if config["hasUPX"] >= (3,): + bestopt = "--lzma" + cmd = "upx " + bestopt + " -q \"%s\"" % cachedfile else: if strip: cmd = "strip \"%s\"" % cachedfile diff --git a/Makespec.py b/Makespec.py index baf8ba9..5a9e30d 100755 --- a/Makespec.py +++ b/Makespec.py @@ -260,7 +260,7 @@ if __name__ == '__main__': g.add_option("-s", "--strip", action="store_true", default=False, help="strip the exe and shared libs " "(don't try this on Windows)") - g.add_option("-X", "--upx", action="store_true", default=False, + g.add_option("-X", "--upx", action="store_true", default=True, help="use UPX if available (works differently between " "Windows and *nix)") #p.add_option("-Y", "--crypt", type="string", default=None, metavar="FILE",