Setup UPX properly with Python 2.4 under Windows

git-svn-id: http://svn.pyinstaller.org/trunk@251 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
giovannibajo
2006-02-06 18:01:23 +00:00
parent c566d6478a
commit e535afce22
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -42,6 +42,19 @@ if config['pythonVersion'] != sys.version:
if config['hasRsrcUpdate']:
import icon, versionInfo
def setupUPXFlags():
f = os.environ.get("UPX", "")
is24 = hasattr(sys, "version_info") and sys.version_info[:2] >= (2,4)
if iswin and is24:
# Binaries built with Visual Studio 7.1 require --strip-loadconf
# or they won't compress.
f = "--strip-loadconf " + f
f = "--best " + f
os.environ["UPX"] = f
if config['hasUPX']:
setupUPXFlags()
def build(spec):
global SPECPATH, BUILDPATH, WARNFILE, rthooks
rthooks = eval(open(os.path.join(HOMEPATH, 'rthooks.dat'), 'r').read())
+3
View File
@@ -22,6 +22,9 @@ Current changes since PyInstaller 1.0
single-file executables, even when using the newest Python version!
+ (Linux) Ignore linux-gate.so while calculating dependencies (fix provided
by Vikram Aggarwal).
+ (Windows) With Python 2.4, setup UPX properly so to be able to compress
binaries generated with Visual Studio .NET 2003 (such as most of the
extensions).
PyInstaller 1.0 (with respect to McMillan's Python Installer 5b5):