102 lines
3.4 KiB
Diff
102 lines
3.4 KiB
Diff
--- a/py2exe/hooks.py
|
|
+++ b/py2exe/hooks.py
|
|
@@ -18,6 +18,7 @@
|
|
_dummy_threading
|
|
_emx_link
|
|
_gestalt
|
|
+_posixshmem
|
|
_posixsubprocess
|
|
ce
|
|
clr
|
|
@@ -29,6 +30,7 @@
|
|
os2
|
|
posix
|
|
pwd
|
|
+resource
|
|
site
|
|
termios
|
|
vms_lib
|
|
--- a/py2exe/runtime.py
|
|
+++ b/py2exe/runtime.py
|
|
@@ -302,11 +302,11 @@
|
|
def get_runstub_bytes(self, target):
|
|
from sysconfig import get_platform
|
|
if target.exe_type in ("console_exe", "service"):
|
|
- run_stub = 'run%s-py%s.%s-%s.exe' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
+ run_stub = 'run%s-py%s%s-%s.exe' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
elif target.exe_type == "windows_exe":
|
|
- run_stub = 'run_w%s-py%s.%s-%s.exe' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
+ run_stub = 'run_w%s-py%s%s-%s.exe' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
elif target.exe_type == "ctypes_comdll":
|
|
- run_stub = 'run_ctypes_dll%s-py%s.%s-%s.dll' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
+ run_stub = 'run_ctypes_dll%s-py%s%s-%s.dll' % (RUNTIME_SUFFIX, sys.version_info[0], sys.version_info[1], get_platform())
|
|
else:
|
|
raise ValueError("Unknown exe_type %r" % target.exe_type)
|
|
## if self.options.verbose:
|
|
+++ b/source/_memimporter.c
|
|
@@ -1,4 +1,5 @@
|
|
// Need to define these to be able to use SetDllDirectory.
|
|
+#undef _WIN32_WINNT
|
|
#define _WIN32_WINNT 0x0502
|
|
#define NTDDI_VERSION 0x05020000
|
|
#include <Python.h>
|
|
--- a/source/python-dynload.c
|
|
+++ b/source/python-dynload.c
|
|
@@ -31,7 +31,7 @@
|
|
|
|
#define FUNC(res, name, args) \
|
|
static res(*proc)args; \
|
|
- if (!proc) (FARPROC)proc = MyGetProcAddress(hmod_pydll, #name)
|
|
+ if (!proc) proc = (res(*)args)MyGetProcAddress(hmod_pydll, #name)
|
|
|
|
#define DATA(type, name) \
|
|
static type pflag; \
|
|
@@ -434,13 +434,13 @@
|
|
|
|
int PyStatus_Exception(PyStatus status)
|
|
{
|
|
- FUNC(int, PyStatus_Exception, (status));
|
|
+ FUNC(int, PyStatus_Exception, (PyStatus));
|
|
return proc(status);
|
|
}
|
|
|
|
int PyStatus_IsExit(PyStatus status)
|
|
{
|
|
- FUNC(int, PyStatus_IsExit, (status));
|
|
+ FUNC(int, PyStatus_IsExit, (PyStatus));
|
|
return proc(status);
|
|
}
|
|
|
|
--- a/source/start.c
|
|
+++ b/source/start.c
|
|
@@ -128,7 +128,8 @@
|
|
SystemError(GetLastError(), "Could not load script resource:");
|
|
return FALSE;
|
|
}
|
|
- p_script_info = (struct scriptinfo *)pScript = LockResource(hgbl);
|
|
+ struct scriptinfo *pScript;
|
|
+ p_script_info = pScript = LockResource(hgbl);
|
|
if (!pScript) {
|
|
SystemError(GetLastError(), "Could not lock script resource:");
|
|
return FALSE;
|
|
@@ -142,7 +143,7 @@
|
|
}
|
|
|
|
// let pScript point to the start of the python script resource
|
|
- pScript = p_script_info->zippath + strlen(p_script_info->zippath) + 1;
|
|
+ pScript = (struct scriptinfo *)p_script_info->zippath + strlen(p_script_info->zippath) + 1;
|
|
|
|
// get full pathname of the 'library.zip' file
|
|
if (p_script_info->zippath[0]) {
|
|
@@ -307,8 +308,8 @@
|
|
int rc = 0;
|
|
HMODULE hmod_pydll;
|
|
|
|
-/* Py_NoSiteFlag = 1; /* Suppress 'import site' */
|
|
-/* Py_InspectFlag = 1; /* Needed to determine whether to exit at SystemExit */
|
|
+// Py_NoSiteFlag = 1; /* Suppress 'import site' */
|
|
+// Py_InspectFlag = 1; /* Needed to determine whether to exit at SystemExit */
|
|
|
|
calc_dirname(hmod_exe);
|
|
// wprintf(L"modulename %s\n", modulename);
|