[wxPython] freezing wxPython code?

From: Kaufman, Duane (MED, LUNAR) [SMTP:Duane.Kaufman@med.ge.com]
Sent: Thursday, December 07, 2000 2:47 PM
To: 'wxpython-users@lists.sourceforge.net'
Subject: RE: [wxPython] freezing wxPython code?

  >> So I needed to put wx22_2.dll into the same dir that my app,
because
  >> Installer can´t find it in his normal location (wxPython dir).
  >>
  >Now I didn't have that problem. My wx dll is in windows system,
where
  >the wxPython installer put it. Gordon's installer finds it there
just
  >fine.

  >Duane

  Until I know, wxPython 2.2.2 always install wx22_2.dll in the
wxPython directory (?).
  Anyway I solved the problem puting wxPython dir into the system
path.

  Cristian

···

-----Original Message-----

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

Until I know, wxPython 2.2.2 always install wx22_2.dll in the
wxPython directory (?).

2.2.1 and previous installed it in the system directory. Starting with
2.2.2 I changed it to install into the package directory instead. I prefer
to do the least amount of impact on a person's computer as possible and
keeping everything in one directory tree seems a good way to do that.

Anyway I solved the problem puting wxPython dir into the system
path.

The Installer searches for DLLs by looking in the system directory as well
as the directories on the PATH. Apparently it is not looking in the
directory where the .pyd is located. Perhaps it should. Gordon, what do
you think?

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

[someone]

> Until I know, wxPython 2.2.2 always install wx22_2.dll in the
> wxPython directory (?).

[Robin]

2.2.1 and previous installed it in the system directory.
Starting with 2.2.2 I changed it to install into the package
directory instead. I prefer to do the least amount of impact on
a person's computer as possible and keeping everything in one
directory tree seems a good way to do that.

...

The Installer searches for DLLs by looking in the system
directory as well as the directories on the PATH. Apparently it
is not looking in the directory where the .pyd is located.
Perhaps it should. Gordon, what do you think?

As a matter of python-ethics, I think it's risque to even put
pyd's in a package directory, (it's certainly not something that
Guido planned for). I'm surprised it even works to put a
(regular) dll there - is this one of VC 6 's advanced dynamic
linking features? (I haven't been following MS very closely for
awhile.)

I search for .pyd's in <normal dll load path> + sys.path, but
only look in <normal dll load path> for secondary
dependencies. One workaround would be to extend PATH in
the DOS box before running installer.

- Gordon

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

"Gordon McMillan" <gmcm@hypernet.com> writes:

As a matter of python-ethics, I think it's risque to even put
pyd's in a package directory, (it's certainly not something that
Guido planned for). I'm surprised it even works to put a
(regular) dll there - is this one of VC 6 's advanced dynamic
linking features? (I haven't been following MS very closely for
awhile.)

I don't know how long it's been, but having the system locate a DLL in
the same directory as the module trying to load it is something I've
been used to for a while. The following snippet of MSDN info on the
LoadLibrary() call may help explain it.

"""
(...) When no path is specified, the function searches for loaded
modules whose base name matches the base name of the module to be
loaded. If the name matches, the load succeeds. Otherwise, the
function searches for the file in the following sequence:

* The directory from which the application loaded.

* The current directory.

* Windows 95/98: The Windows system directory. Use the
  GetSystemDirectory function to get the path of this directory.

* Windows NT/ 2000: The 32-bit Windows system directory. Use the
  GetSystemDirectory function to get the path of this directory. The
  name of this directory is SYSTEM32.

* Windows NT/ 2000: The 16-bit Windows system directory. There is no
  function that obtains the path of this directory, but it is
  searched. The name of this directory is SYSTEM.

* The Windows directory. Use the GetWindowsDirectory function to get
  the path of this directory.

* The directories that are listed in the PATH environment variable.

The first directory searched is the one directory containing the image
file used to create the calling process (for more information, see the
CreateProcess function). Doing this allows private dynamic-link
library (DLL) files associated with a process to be found without
adding the process's installed directory to the PATH environment
variable.

Windows 2000: If a path is specified and there is a redirection file
for the application, the function searches for the module in the
application's directory. If the module exists in the application's
directory, the LoadLibrary function ignores the specified path and
loads the module from the application's directory. If the module does
not exist in the application's directory, LoadLibrary loads the module
from the specified directory.
"""

The one place you can get caught (this was one of the places 2000 made
some changes) is if you have an already loaded module with the same
basename - in that case the new load will attach to that module
regardless of the directory it was originally located in.

···

--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l@fitlinxx.com /
  > FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users