diff options
-rw-r--r-- | CHANGES.txt | 8 | ||||
-rw-r--r-- | CONTRIBUTORS.txt | 1 | ||||
-rwxr-xr-x | launcher.c | 8 | ||||
-rw-r--r-- | msvc-build-launcher.cmd | 52 | ||||
-rw-r--r-- | setuptools/cli-32.exe | bin | 69632 -> 65536 bytes | |||
-rw-r--r-- | setuptools/cli-64.exe | bin | 75264 -> 74752 bytes | |||
-rw-r--r-- | setuptools/cli-arm-32.exe | bin | 0 -> 69120 bytes | |||
-rw-r--r-- | setuptools/cli.exe | bin | 69632 -> 0 bytes | |||
-rwxr-xr-x | setuptools/command/easy_install.py | 3 | ||||
-rw-r--r-- | setuptools/gui-32.exe | bin | 65536 -> 65536 bytes | |||
-rw-r--r-- | setuptools/gui-64.exe | bin | 75264 -> 75264 bytes | |||
-rw-r--r-- | setuptools/gui-arm-32.exe | bin | 0 -> 69120 bytes | |||
-rw-r--r-- | setuptools/gui.exe | bin | 65536 -> 0 bytes | |||
-rw-r--r-- | setuptools/tests/win_script_wrapper.txt | 6 |
14 files changed, 66 insertions, 12 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 6e2b3b28..0a1befdb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,14 @@ CHANGES ======= ------ +0.6.39 +------ + +* Add support for console launchers on ARM platforms. +* Fix possible issue in GUI launchers where the subsystem was not supplied to + the linker. +* Launcher build script now refactored for robustness. + 0.6.38 ------ diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 22c90aba..487e0a44 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -8,6 +8,7 @@ Contributors * Christophe Combelles * Daniel Stutzbach * Daniel Holth +* Grigory Petrov * Hanno Schlichting * Jannis Leidel * Jason R. Coombs @@ -14,6 +14,14 @@ gcc -DGUI=0 -mno-cygwin -O -s -o setuptools/cli.exe launcher.c gcc -DGUI=1 -mwindows -mno-cygwin -O -s -o setuptools/gui.exe launcher.c + To build for Windows RT, install both Visual Studio Express for Windows 8 + and for Windows Desktop (both freeware), create "win32" application using + "Windows Desktop" version, create new "ARM" target via + "Configuration Manager" menu and modify ".vcxproj" file by adding + "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>" tag + as child of "PropertyGroup" tags that has "Debug|ARM" and "Release|ARM" + properties. + It links to msvcrt.dll, but this shouldn't be a problem since it doesn't actually run Python in the same process. Note that using 'exec' instead of 'spawn' doesn't work, because on Windows this leads to the Python diff --git a/msvc-build-launcher.cmd b/msvc-build-launcher.cmd index 3666d723..07c474d4 100644 --- a/msvc-build-launcher.cmd +++ b/msvc-build-launcher.cmd @@ -1,15 +1,49 @@ @echo off
-REM VCVARSALL may be in Program Files or Program Files (x86)
-PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC;%PATH%
-PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC;%PATH%
+REM Use old Windows SDK 6.1 so created .exe will be compatible with
+REM old Windows versions.
+REM Windows SDK 6.1 may be downloaded at:
+REM http://www.microsoft.com/en-us/download/details.aspx?id=11310
+set PATH_OLD=%PATH%
+
+REM The SDK creates a false install of Visual Studio at one of these locations
+set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin;%PATH%
+set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;%PATH%
REM set up the environment to compile to x86
-call VCVARSALL x86
-cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/cli-32.exe
-cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /out:setuptools/gui-32.exe
+call VCVARS32
+if "%ERRORLEVEL%"=="0" (
+ cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:CONSOLE /out:setuptools/cli-32.exe
+ cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x86 /SUBSYSTEM:WINDOWS /out:setuptools/gui-32.exe
+) else (
+ echo Windows SDK 6.1 not found to build Windows 32-bit version
+)
REM now for 64-bit
-call VCVARSALL x86_amd64
-cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/cli-64.exe
-cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /out:setuptools/gui-64.exe
\ No newline at end of file +REM Use the x86_amd64 profile, which is the 32-bit cross compiler for amd64
+call VCVARSx86_amd64
+if "%ERRORLEVEL%"=="0" (
+ cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-64.exe
+ cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:x64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-64.exe
+) else (
+ echo Windows SDK 6.1 not found to build Windows 64-bit version
+)
+
+REM Windows RT ARM build requires both freeware
+REM "Visual Studio Express 2012 for Windows 8" and
+REM "Visual Studio Express 2012 for Windows Desktop" to be installed from
+REM http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
+set PATH=%PATH_OLD%
+set PATH=C:\Program Files\Microsoft Visual Studio 11.0\VC;%PATH%
+set PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC;%PATH%
+call VCVARSALL x86_arm >nul 2>&1
+if "%ERRORLEVEL%"=="0" (
+ echo Building Windows RT Version ...
+ cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:CONSOLE /out:setuptools/cli-arm-32.exe
+ cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" /D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE launcher.c /O2 /link /MACHINE:ARM /SUBSYSTEM:WINDOWS /out:setuptools/gui-arm-32.exe
+) else (
+ echo Visual Studio ^(Express^) 2012 not found to build Windows RT Version
+)
+
+set PATH=%PATH_OLD%
+
diff --git a/setuptools/cli-32.exe b/setuptools/cli-32.exe Binary files differindex 9b7717b7..b1487b78 100644 --- a/setuptools/cli-32.exe +++ b/setuptools/cli-32.exe diff --git a/setuptools/cli-64.exe b/setuptools/cli-64.exe Binary files differindex 265585af..675e6bf3 100644 --- a/setuptools/cli-64.exe +++ b/setuptools/cli-64.exe diff --git a/setuptools/cli-arm-32.exe b/setuptools/cli-arm-32.exe Binary files differnew file mode 100644 index 00000000..2f40402d --- /dev/null +++ b/setuptools/cli-arm-32.exe diff --git a/setuptools/cli.exe b/setuptools/cli.exe Binary files differdeleted file mode 100644 index 9b7717b7..00000000 --- a/setuptools/cli.exe +++ /dev/null diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index dc851d1e..10a8f272 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -19,6 +19,7 @@ import zipfile import re import stat import random +import platform from glob import glob import pkg_resources from setuptools import Command, _dont_write_bytecode @@ -1839,6 +1840,8 @@ def get_script_args(dist, executable=sys_executable, wininst=False): ext, launcher = '-script.py', 'cli.exe' old = ['.py','.pyc','.pyo'] new_header = re.sub('(?i)pythonw.exe','python.exe',header) + if platform.machine().lower()=='arm': + launcher = launcher.replace(".", "-arm.") if is_64bit(): launcher = launcher.replace(".", "-64.") else: diff --git a/setuptools/gui-32.exe b/setuptools/gui-32.exe Binary files differindex 3f64af7d..f8d35096 100644 --- a/setuptools/gui-32.exe +++ b/setuptools/gui-32.exe diff --git a/setuptools/gui-64.exe b/setuptools/gui-64.exe Binary files differindex 3ab4378e..330c51a5 100644 --- a/setuptools/gui-64.exe +++ b/setuptools/gui-64.exe diff --git a/setuptools/gui-arm-32.exe b/setuptools/gui-arm-32.exe Binary files differnew file mode 100644 index 00000000..537aff37 --- /dev/null +++ b/setuptools/gui-arm-32.exe diff --git a/setuptools/gui.exe b/setuptools/gui.exe Binary files differdeleted file mode 100644 index 3f64af7d..00000000 --- a/setuptools/gui.exe +++ /dev/null diff --git a/setuptools/tests/win_script_wrapper.txt b/setuptools/tests/win_script_wrapper.txt index 9f7c81d6..9ccc96f0 100644 --- a/setuptools/tests/win_script_wrapper.txt +++ b/setuptools/tests/win_script_wrapper.txt @@ -38,7 +38,7 @@ We'll also copy cli.exe to the sample-directory with the name foo.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'foo.exe'), 'wb') >>> f.write( - ... pkg_resources.resource_string('setuptools', 'cli.exe') + ... pkg_resources.resource_string('setuptools', 'cli-32.exe') ... ) >>> f.close() @@ -83,7 +83,7 @@ enter the interpreter after running the script, you could use -Oi: >>> f = open(os.path.join(sample_directory, 'foo-script.py'), 'w') >>> f.write( - ... """#!%(python_exe)s -Oi + ... """#!%(python_exe)s -Oi ... import sys ... input = repr(sys.stdin.read()) ... print sys.argv[0][-14:] @@ -126,7 +126,7 @@ We'll also copy gui.exe to the sample-directory with the name bar.exe: >>> import pkg_resources >>> f = open(os.path.join(sample_directory, 'bar.exe'), 'wb') >>> f.write( - ... pkg_resources.resource_string('setuptools', 'gui.exe') + ... pkg_resources.resource_string('setuptools', 'gui-32.exe') ... ) >>> f.close() |