[Python-checkins] python/dist/src/PC/bdist_wininst install.c,
1.1.14.5, 1.1.14.6
theller at users.sourceforge.net
theller at users.sourceforge.net
Wed Dec 22 16:12:56 CET 2004
Update of /cvsroot/python/python/dist/src/PC/bdist_wininst
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19327
Modified Files:
Tag: release23-maint
install.c
Log Message:
Backport from trunk, rev. 1.11 and 1.12. Don't hardcode the Python
version number.
Index: install.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/bdist_wininst/install.c,v
retrieving revision 1.1.14.5
retrieving revision 1.1.14.6
diff -u -d -r1.1.14.5 -r1.1.14.6
--- install.c 14 Jul 2004 15:03:45 -0000 1.1.14.5
+++ install.c 22 Dec 2004 15:12:46 -0000 1.1.14.6
@@ -1510,12 +1510,15 @@
static HINSTANCE LoadPythonDll(char *fname)
{
char fullpath[_MAX_PATH];
+ char subkey_name[80];
LONG size = sizeof(fullpath);
HINSTANCE h = LoadLibrary(fname);
if (h)
return h;
- if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER,
- "SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath",
+ wsprintf(subkey_name,
+ "SOFTWARE\\Python\\PythonCore\\%d.%d\\InstallPath",
+ py_major, py_minor);
+ if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name,
fullpath, &size))
return NULL;
strcat(fullpath, "\\");
More information about the Python-checkins
mailing list