When running UPX, default to --lzma if possible.

Turn on UPX by default (if available).


git-svn-id: http://svn.pyinstaller.org/trunk@653 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
giovannibajo
2009-05-03 22:32:07 +00:00
parent 9a00ba086a
commit bdee3f5ca5
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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
+1 -1
View File
@@ -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",