Commit Graph

16 Commits

Author SHA1 Message Date
Mark Hammond 7c5c8e6823 #2581: Vista UAC/elevation support for bdist_wininst 2008-05-02 12:48:15 +00:00
Thomas Heller 9f2e3be4e8 Running a bdist_wininst installer, built with Python 2.3, installing
for Python 2.4 caused a segfault when post_install_script was used.

The reason was that the file handle passed to PyRun_SimpleFile() was
created with MSVCRT.DLL, but Python 2.4 uses MSVCR71.DLL.

So, I replaced PyRun_SimpleFile() with PyRun_SimpleString().  The
segfault is gone, but the output of the postinstall script doesn't
show up, because still freopen() from MSVCRT is used.

Already backported.
2005-02-03 20:35:10 +00:00
Thomas Heller 8abe7bfb2f Set PYTHONHOME before loading Python, so that sys.path will be set correctly.
Already backported.
2005-02-03 20:11:28 +00:00
Thomas Heller 0f25b72228 Close stdout and stderr, which are redirected into a temp file, before
trying to remove this file - the file was never removed before.

Fixes [ 1067732 ] wininst --install-script leaves residual files

Already backported.
2004-12-22 17:24:14 +00:00
Thomas Heller 8992b9bdf5 printf format code for integers is %d not %s.
Will backport.
2004-12-01 19:43:02 +00:00
Thomas Heller 9cc5cb7c4b Running the pre-install or post-install script did not work when
Python was installed with the 'only for me' option. The registry key
had a hardcoded '2.3' in it where the python version chosen for
installation should be used instead.

Will backport myself.
2004-12-01 18:18:08 +00:00
Thomas Heller 876d990ae0 The binary layout of cfgdata has changed, so the magic number has to
change as well.
Display an additional message box when a mismatch is detected.
2004-07-19 09:57:58 +00:00
Thomas Heller d1d92ea59a Add a warning so that it isn't forgotten to recreate the binaries AND
CHECK INTO CVS if these files are changed.
2004-07-14 15:17:04 +00:00
Thomas Heller 55a9864cb4 Don't complain that non-existant registry entries cannot be deleted. 2004-07-14 14:53:50 +00:00
Thomas Heller ad6ce46f49 Remove the annoing and useless messagebox asking about overwriting files.
Fixes SF #984290.
2004-07-07 07:34:40 +00:00
Mark Hammond f9bfdd850c Patch [ 983775 ] Allow bdist_wininst to install for non-admin users
to address bugs:
[ 555812 ] installing extension w/o admin rights
[ 555810 ] removing extensions without admin rights

* When enumerating the Python versions found, also remember the HKEY
  they were found under.
* When installing, if Python was installed under HKCU, we will too.
  If Python was installed under HKLM, we check the permissions of
  the current user, and install where we can.
* The "root" key we use is a global variable - all registry setting and
  delete functions use this global rather than a hardcoded HKLM.
* A new entry is written to the install log, indicating the key we used.
  Uninstallation is based on this key.
* 'tempnam()' is used rather than 'tmpnam()' - 'tmpnam' creates a temp
  file on the root of the current drive, and if this is readonly would
  explain the 'freopen' errors occasionally reported. 'tempnam'
  creates the temp file in the %TEMP% directory.
2004-07-02 23:53:16 +00:00
Thomas Heller 32b8f8052a Fix for SF 982215: bdist_wininst - Next button not greyed out during file copy.
Patch from Mark Hammond.
Recompiled binary.

Already packported to the 2.3 branch.
2004-07-02 08:02:40 +00:00
Thomas Heller 48340390ac When loading the Python dll to run the postinstall script, try to load
it from the install directory (as reported by the registry) in case it
is not found on the default Loadlibrary search path.

Fixes SF 935091: bdist_winist post-install script fails on non-admin Python

Already backported.
2004-06-18 17:03:38 +00:00
Thomas Heller 9614219140 Minor reformatting. 2004-04-15 18:19:02 +00:00
Thomas Heller a19cdad6dc Patch #892660 from Mark Hammond, for distutils bdist_wininst command.
install.c: support for a 'pre-install-script', run before anything has
been installed. Provides a 'message_box' module function for use by
either the pre-install or post-install scripts.

bdist_wininst.py: support for pre-install script. Typo (build->built),
fixes so that --target-version can still work, even when the
distribution has extension modules - in this case, we insist on
--skip-build, as we still can't actually build other versions.
2004-02-20 14:43:21 +00:00
Thomas Heller bb4b7d2d68 Copied the sources from the distutils CVS repository.
Changed the MSVC project file to create the exe in the
lib/distutils/command directory, bdist_wininst.py must still be
changed to use it.

Also changed to use the same zlib as the zlib module - this has the nice
sideeffect that now the buggy 1.1.3 version is no longer used.

Most of the source files now conform to PEP 7, except for the maximum
line length.  Windows api programming in 78 character lines =:(.

README.txt is a new file, but still empty except for placeholders.
2002-11-22 20:39:33 +00:00