mirror of
https://github.com/python/cpython
synced 2024-10-14 11:58:12 +00:00
Different version games:
- MS_DLL_ID is now set to "1.5" instead of "1.5.x" so Mark Hammond's extensions won't have to be changed. - FILEVERSION and PRODUCTVERSION are set to 1,5,2,1. (The last number could be the build# or the alpha release# or so.)
This commit is contained in:
parent
e2d81cd4d7
commit
67ab67218b
|
@ -1,6 +1,7 @@
|
||||||
/* Minimal main program -- everything is loaded from the library */
|
/* Minimal main program -- everything is loaded from the library */
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "Python.h"
|
||||||
|
|
||||||
extern int Py_Main();
|
extern int Py_Main();
|
||||||
|
|
||||||
|
|
|
@ -352,6 +352,7 @@ calculate_path()
|
||||||
/* We need to construct a path from the following parts:
|
/* We need to construct a path from the following parts:
|
||||||
(1) the PYTHONPATH environment variable, if set;
|
(1) the PYTHONPATH environment variable, if set;
|
||||||
(2) for Win32, the machinepath and userpath, if set;
|
(2) for Win32, the machinepath and userpath, if set;
|
||||||
|
The following only if neither machinepath nor userpath is set:
|
||||||
(3) the PYTHONPATH config macro, with the leading "."
|
(3) the PYTHONPATH config macro, with the leading "."
|
||||||
of each component replaced with pythonhome, if set;
|
of each component replaced with pythonhome, if set;
|
||||||
(4) the directory containing the executable (argv0_path).
|
(4) the directory containing the executable (argv0_path).
|
||||||
|
@ -371,15 +372,17 @@ calculate_path()
|
||||||
else
|
else
|
||||||
bufsz = 0;
|
bufsz = 0;
|
||||||
bufsz += strlen(PYTHONPATH) + 1;
|
bufsz += strlen(PYTHONPATH) + 1;
|
||||||
if (envpath != NULL)
|
|
||||||
bufsz += strlen(envpath) + 1;
|
|
||||||
bufsz += strlen(argv0_path) + 1;
|
bufsz += strlen(argv0_path) + 1;
|
||||||
#ifdef MS_WIN32
|
#ifdef MS_WIN32
|
||||||
if (machinepath)
|
if (userpath || machinepath)
|
||||||
bufsz += strlen(machinepath) + 1;
|
bufsz = 0; /* Reset! */
|
||||||
if (userpath)
|
if (userpath)
|
||||||
bufsz += strlen(userpath) + 1;
|
bufsz += strlen(userpath) + 1;
|
||||||
|
if (machinepath)
|
||||||
|
bufsz += strlen(machinepath) + 1;
|
||||||
#endif
|
#endif
|
||||||
|
if (envpath != NULL)
|
||||||
|
bufsz += strlen(envpath) + 1;
|
||||||
|
|
||||||
module_search_path = buf = malloc(bufsz);
|
module_search_path = buf = malloc(bufsz);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
|
@ -408,17 +411,21 @@ calculate_path()
|
||||||
*buf++ = DELIM;
|
*buf++ = DELIM;
|
||||||
}
|
}
|
||||||
#ifdef MS_WIN32
|
#ifdef MS_WIN32
|
||||||
|
if (userpath) {
|
||||||
|
strcpy(buf, userpath);
|
||||||
|
buf = strchr(buf, '\0');
|
||||||
|
*buf++ = DELIM;
|
||||||
|
free(userpath);
|
||||||
|
}
|
||||||
if (machinepath) {
|
if (machinepath) {
|
||||||
strcpy(buf, machinepath);
|
strcpy(buf, machinepath);
|
||||||
buf = strchr(buf, '\0');
|
buf = strchr(buf, '\0');
|
||||||
*buf++ = DELIM;
|
*buf++ = DELIM;
|
||||||
free(machinepath);
|
free(machinepath);
|
||||||
}
|
}
|
||||||
if (userpath) {
|
if (userpath || machinepath) {
|
||||||
strcpy(buf, userpath);
|
buf[-1] = '\0';
|
||||||
buf = strchr(buf, '\0');
|
return;
|
||||||
*buf++ = DELIM;
|
|
||||||
free(userpath);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (pythonhome == NULL) {
|
if (pythonhome == NULL) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "modsupport.h"
|
#include "modsupport.h"
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
|
|
||||||
#define MS_DLL_ID "1.5.2"
|
#define MS_DLL_ID "1.5"
|
||||||
|
|
||||||
#define PYTHON_VERSION MS_DLL_ID "." PYTHON_API_STRING "\0"
|
#define PYTHON_VERSION MS_DLL_ID "." PYTHON_API_STRING "\0"
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,0,1
|
FILEVERSION 1,5,2,1
|
||||||
PRODUCTVERSION 1,0,0,1
|
PRODUCTVERSION 1,5,2,1
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
|
Loading…
Reference in a new issue