[python-win32] Creating an installer for a COM server.
pavlos@gaaros.com
pavlos@gaaros.com
Mon, 28 Oct 2002 12:07:29 GMT
Hello everyone
We are trying to create an installer that installs and registers 4-5 COM
servers on win2000/nt machines. We would like to ship a single installer
that contains a custom python distro plus all the required external modules
including win32com support. The scale/requirements of our app do not fit
well the already available ones like the Installer app by Gordon McMillan
therefore we need to create the appropriate path/configuration modifications
to both python and to win32all so that the COM servers will be registered
appropriately. Additionally we do not want to modify or affect in any way
existing python installations on the client machines. So far we have figured
out the following:
* python sets up its sys.path attribute from a number of sources. One is
a hardcoded registry key. This we can modify to point to an appropriate
subkey under our application's root key. As far as we can tell the
following registry keys need to be set appropriately:
SOFTWARE\<OurApp>\Python\PythonCore\2.2\InstallPath
SOFTWARE\<OurApp>\Python\PythonCore\2.2\InstallPath\InstallGroup
SOFTWARE\<OurApp>\Python\PythonCore\2.2\Modules\pythoncom
SOFTWARE\<OurApp>\Python\PythonCore\2.2\Modules\pywintypes
SOFTWARE\<OurApp>\Python\PythonCore\2.2\PythonPath
SOFTWARE\<OurApp>\Python\PythonCore\2.2\PythonPath\win32com
SOFTWARE\<OurApp>\Python\PythonCore\2.2\PythonPath\win32
* If the shiped python is modified to look in the above registry keys
the COM servers work fine as long as pywintypes22.dll and
pythoncom22.dll exist in the winnt/system32/ dir. We do not want to
overwrite existing python installations in any way (in case users
are running modified versions of pythoncom22.dll ...). However if we
modify the above registry keys for pythoncom22.dll and pywintypes22.dll
paths, then the COM servers no longer work. A few *.py files in
the win32all distro contain hardwired references to registry keys.
Modifying those does not fix the problem.
Any ideas/pointers?
Thanks in advance
=====
Pavlos Christoforou