diff --git a/Include/pyatomic.h b/Include/pyatomic.h index 4cbc529c0d1..bd516b8bb6c 100644 --- a/Include/pyatomic.h +++ b/Include/pyatomic.h @@ -285,20 +285,20 @@ typedef struct _Py_atomic_int { a uintptr_t it will do an unsigned compare and crash */ inline intptr_t _Py_atomic_load_64bit(volatile uintptr_t* value, int order) { - uintptr_t old; + __int64 old; switch (order) { case _Py_memory_order_acquire: { do { old = *value; - } while(_InterlockedCompareExchange64_HLEAcquire(value, old, old) != old); + } while(_InterlockedCompareExchange64_HLEAcquire((volatile __int64*)value, old, old) != old); break; } case _Py_memory_order_release: { do { old = *value; - } while(_InterlockedCompareExchange64_HLERelease(value, old, old) != old); + } while(_InterlockedCompareExchange64_HLERelease((volatile __int64*)value, old, old) != old); break; } case _Py_memory_order_relaxed: @@ -308,7 +308,7 @@ inline intptr_t _Py_atomic_load_64bit(volatile uintptr_t* value, int order) { { do { old = *value; - } while(_InterlockedCompareExchange64(value, old, old) != old); + } while(_InterlockedCompareExchange64((volatile __int64*)value, old, old) != old); break; } } @@ -320,20 +320,20 @@ inline intptr_t _Py_atomic_load_64bit(volatile uintptr_t* value, int order) { #endif inline int _Py_atomic_load_32bit(volatile int* value, int order) { - int old; + long old; switch (order) { case _Py_memory_order_acquire: { do { old = *value; - } while(_InterlockedCompareExchange_HLEAcquire(value, old, old) != old); + } while(_InterlockedCompareExchange_HLEAcquire((volatile long*)value, old, old) != old); break; } case _Py_memory_order_release: { do { old = *value; - } while(_InterlockedCompareExchange_HLERelease(value, old, old) != old); + } while(_InterlockedCompareExchange_HLERelease((volatile long*)value, old, old) != old); break; } case _Py_memory_order_relaxed: @@ -343,7 +343,7 @@ inline int _Py_atomic_load_32bit(volatile int* value, int order) { { do { old = *value; - } while(_InterlockedCompareExchange(value, old, old) != old); + } while(_InterlockedCompareExchange((volatile long*)value, old, old) != old); break; } } diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py index b120273fe9e..ef1356b97d6 100644 --- a/Lib/distutils/_msvccompiler.py +++ b/Lib/distutils/_msvccompiler.py @@ -17,6 +17,7 @@ import os import shutil import stat import subprocess +import winreg from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ CompileError, LibError, LinkError @@ -24,10 +25,9 @@ from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log from distutils.util import get_platform -import winreg from itertools import count -def _find_vcvarsall(plat_spec): +def _find_vc2015(): try: key = winreg.OpenKeyEx( winreg.HKEY_LOCAL_MACHINE, @@ -38,9 +38,9 @@ def _find_vcvarsall(plat_spec): log.debug("Visual C++ is not registered") return None, None + best_version = 0 + best_dir = None with key: - best_version = 0 - best_dir = None for i in count(): try: v, vc_dir, vt = winreg.EnumValue(key, i) @@ -53,25 +53,74 @@ def _find_vcvarsall(plat_spec): continue if version >= 14 and version > best_version: best_version, best_dir = version, vc_dir - if not best_version: - log.debug("No suitable Visual C++ version found") - return None, None + return best_version, best_dir - vcvarsall = os.path.join(best_dir, "vcvarsall.bat") - if not os.path.isfile(vcvarsall): - log.debug("%s cannot be found", vcvarsall) - return None, None +def _find_vc2017(): + import _findvs + import threading + best_version = 0, # tuple for full version comparisons + best_dir = None + + # We need to call findall() on its own thread because it will + # initialize COM. + all_packages = [] + def _getall(): + all_packages.extend(_findvs.findall()) + t = threading.Thread(target=_getall) + t.start() + t.join() + + for name, version_str, path, packages in all_packages: + if 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' in packages: + vc_dir = os.path.join(path, 'VC', 'Auxiliary', 'Build') + if not os.path.isdir(vc_dir): + continue + try: + version = tuple(int(i) for i in version_str.split('.')) + except (ValueError, TypeError): + continue + if version > best_version: + best_version, best_dir = version, vc_dir + try: + best_version = best_version[0] + except IndexError: + best_version = None + return best_version, best_dir + +def _find_vcvarsall(plat_spec): + best_version, best_dir = _find_vc2017() + vcruntime = None + vcruntime_plat = 'x64' if 'amd64' in plat_spec else 'x86' + if best_version: + vcredist = os.path.join(best_dir, "..", "..", "redist", "MSVC", "**", + "Microsoft.VC141.CRT", "vcruntime140.dll") + try: + import glob + vcruntime = glob.glob(vcredist, recursive=True)[-1] + except (ImportError, OSError, LookupError): + vcruntime = None + + if not best_version: + best_version, best_dir = _find_vc2015() + if best_version: + vcruntime = os.path.join(best_dir, 'redist', vcruntime_plat, + "Microsoft.VC140.CRT", "vcruntime140.dll") + + if not best_version: + log.debug("No suitable Visual C++ version found") + return None, None + + vcvarsall = os.path.join(best_dir, "vcvarsall.bat") + if not os.path.isfile(vcvarsall): + log.debug("%s cannot be found", vcvarsall) + return None, None + + if not vcruntime or not os.path.isfile(vcruntime): + log.debug("%s cannot be found", vcruntime) vcruntime = None - vcruntime_spec = _VCVARS_PLAT_TO_VCRUNTIME_REDIST.get(plat_spec) - if vcruntime_spec: - vcruntime = os.path.join(best_dir, - vcruntime_spec.format(best_version)) - if not os.path.isfile(vcruntime): - log.debug("%s cannot be found", vcruntime) - vcruntime = None - return vcvarsall, vcruntime + return vcvarsall, vcruntime def _get_vc_env(plat_spec): if os.getenv("DISTUTILS_USE_SDK"): @@ -130,14 +179,6 @@ PLAT_TO_VCVARS = { 'win-amd64' : 'x86_amd64', } -# A map keyed by get_platform() return values to the file under -# the VC install directory containing the vcruntime redistributable. -_VCVARS_PLAT_TO_VCRUNTIME_REDIST = { - 'x86' : 'redist\\x86\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', - 'amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', - 'x86_amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll', -} - # A set containing the DLLs that are guaranteed to be available for # all micro versions of this Python version. Known extension # dependencies that are not in this set will be copied to the output diff --git a/Lib/distutils/tests/test_msvccompiler.py b/Lib/distutils/tests/test_msvccompiler.py index 4dc24886c82..70a9c93a4e8 100644 --- a/Lib/distutils/tests/test_msvccompiler.py +++ b/Lib/distutils/tests/test_msvccompiler.py @@ -76,12 +76,12 @@ class msvccompilerTestCase(support.TempdirManager, compiler = _msvccompiler.MSVCCompiler() compiler.initialize() dll = compiler._vcruntime_redist - self.assertTrue(os.path.isfile(dll)) + self.assertTrue(os.path.isfile(dll), dll or "") compiler._copy_vcruntime(tempdir) self.assertFalse(os.path.isfile(os.path.join( - tempdir, os.path.basename(dll)))) + tempdir, os.path.basename(dll))), dll or "") def test_get_vc_env_unicode(self): import distutils._msvccompiler as _msvccompiler @@ -101,6 +101,30 @@ class msvccompilerTestCase(support.TempdirManager, if old_distutils_use_sdk: os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk + def test_get_vc2017(self): + import distutils._msvccompiler as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2017 + # and mark it skipped if we do not. + version, path = _msvccompiler._find_vc2017() + if version: + self.assertGreaterEqual(version, 15) + self.assertTrue(os.path.isdir(path)) + else: + raise unittest.SkipTest("VS 2017 is not installed") + + def test_get_vc2015(self): + import distutils._msvccompiler as _msvccompiler + + # This function cannot be mocked, so pass it if we find VS 2015 + # and mark it skipped if we do not. + version, path = _msvccompiler._find_vc2015() + if version: + self.assertGreaterEqual(version, 14) + self.assertTrue(os.path.isdir(path)) + else: + raise unittest.SkipTest("VS 2015 is not installed") + def test_suite(): return unittest.makeSuite(msvccompilerTestCase) diff --git a/Misc/NEWS.d/next/Windows/2017-09-06-17-14-54.bpo-30389.9Dizrx.rst b/Misc/NEWS.d/next/Windows/2017-09-06-17-14-54.bpo-30389.9Dizrx.rst new file mode 100644 index 00000000000..7c72e315142 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2017-09-06-17-14-54.bpo-30389.9Dizrx.rst @@ -0,0 +1 @@ +Adds detection of Visual Studio 2017 to distutils on Windows. diff --git a/PC/_findvs.cpp b/PC/_findvs.cpp new file mode 100644 index 00000000000..6c660115963 --- /dev/null +++ b/PC/_findvs.cpp @@ -0,0 +1,255 @@ +// +// Helper library for location Visual Studio installations +// using the COM-based query API. +// +// Copyright (c) Microsoft Corporation +// Licensed to PSF under a contributor agreement +// + +// Version history +// 2017-05: Initial contribution (Steve Dower) + +#include +#include +#include "external\include\Setup.Configuration.h" +#pragma comment(lib, "ole32.lib") +#pragma comment(lib, "oleaut32.lib") +#pragma comment(lib, "version.lib") +#pragma comment(lib, "Microsoft.VisualStudio.Setup.Configuration.Native.lib") + +#include + +static PyObject *error_from_hr(HRESULT hr) +{ + if (FAILED(hr)) + PyErr_Format(PyExc_OSError, "Error %08x", hr); + assert(PyErr_Occurred()); + return nullptr; +} + +static PyObject *get_install_name(ISetupInstance2 *inst) +{ + HRESULT hr; + BSTR name; + PyObject *str = nullptr; + if (FAILED(hr = inst->GetDisplayName(LOCALE_USER_DEFAULT, &name))) + goto error; + str = PyUnicode_FromWideChar(name, SysStringLen(name)); + SysFreeString(name); + return str; +error: + + return error_from_hr(hr); +} + +static PyObject *get_install_version(ISetupInstance *inst) +{ + HRESULT hr; + BSTR ver; + PyObject *str = nullptr; + if (FAILED(hr = inst->GetInstallationVersion(&ver))) + goto error; + str = PyUnicode_FromWideChar(ver, SysStringLen(ver)); + SysFreeString(ver); + return str; +error: + + return error_from_hr(hr); +} + +static PyObject *get_install_path(ISetupInstance *inst) +{ + HRESULT hr; + BSTR path; + PyObject *str = nullptr; + if (FAILED(hr = inst->GetInstallationPath(&path))) + goto error; + str = PyUnicode_FromWideChar(path, SysStringLen(path)); + SysFreeString(path); + return str; +error: + + return error_from_hr(hr); +} + +static PyObject *get_installed_packages(ISetupInstance2 *inst) +{ + HRESULT hr; + PyObject *res = nullptr; + LPSAFEARRAY sa_packages = nullptr; + LONG ub = 0; + IUnknown **packages = nullptr; + PyObject *str = nullptr; + + if (FAILED(hr = inst->GetPackages(&sa_packages)) || + FAILED(hr = SafeArrayAccessData(sa_packages, (void**)&packages)) || + FAILED(SafeArrayGetUBound(sa_packages, 1, &ub)) || + !(res = PyList_New(0))) + goto error; + + for (LONG i = 0; i < ub; ++i) { + ISetupPackageReference *package = nullptr; + BSTR id = nullptr; + PyObject *str = nullptr; + + if (FAILED(hr = packages[i]->QueryInterface(&package)) || + FAILED(hr = package->GetId(&id))) + goto iter_error; + + str = PyUnicode_FromWideChar(id, SysStringLen(id)); + SysFreeString(id); + + if (!str || PyList_Append(res, str) < 0) + goto iter_error; + + Py_CLEAR(str); + package->Release(); + continue; + + iter_error: + if (package) package->Release(); + Py_XDECREF(str); + + goto error; + } + + SafeArrayUnaccessData(sa_packages); + SafeArrayDestroy(sa_packages); + + return res; +error: + if (sa_packages && packages) SafeArrayUnaccessData(sa_packages); + if (sa_packages) SafeArrayDestroy(sa_packages); + Py_XDECREF(res); + + return error_from_hr(hr); +} + +static PyObject *find_all_instances() +{ + ISetupConfiguration *sc = nullptr; + ISetupConfiguration2 *sc2 = nullptr; + IEnumSetupInstances *enm = nullptr; + ISetupInstance *inst = nullptr; + ISetupInstance2 *inst2 = nullptr; + PyObject *res = nullptr; + ULONG fetched; + HRESULT hr; + + if (!(res = PyList_New(0))) + goto error; + + if (FAILED(hr = CoCreateInstance( + __uuidof(SetupConfiguration), + NULL, + CLSCTX_INPROC_SERVER, + __uuidof(ISetupConfiguration), + (LPVOID*)&sc + )) && hr != REGDB_E_CLASSNOTREG) + goto error; + + // If the class is not registered, there are no VS instances installed + if (hr == REGDB_E_CLASSNOTREG) + return res; + + if (FAILED(hr = sc->QueryInterface(&sc2)) || + FAILED(hr = sc2->EnumAllInstances(&enm))) + goto error; + + while (SUCCEEDED(enm->Next(1, &inst, &fetched)) && fetched) { + PyObject *name = nullptr; + PyObject *version = nullptr; + PyObject *path = nullptr; + PyObject *packages = nullptr; + + if (FAILED(hr = inst->QueryInterface(&inst2)) || + !(name = get_install_name(inst2)) || + !(version = get_install_version(inst)) || + !(path = get_install_path(inst)) || + !(packages = get_installed_packages(inst2)) || + PyList_Append(res, PyTuple_Pack(4, name, version, path, packages)) < 0) + goto iter_error; + + continue; + iter_error: + if (inst2) inst2->Release(); + Py_XDECREF(packages); + Py_XDECREF(path); + Py_XDECREF(version); + Py_XDECREF(name); + goto error; + } + + enm->Release(); + sc2->Release(); + sc->Release(); + return res; + +error: + if (enm) enm->Release(); + if (sc2) sc2->Release(); + if (sc) sc->Release(); + Py_XDECREF(res); + + return error_from_hr(hr); +} + +PyDoc_STRVAR(findvs_findall_doc, "findall()\ +\ +Finds all installed versions of Visual Studio.\ +\ +This function will initialize COM temporarily. To avoid impact on other parts\ +of your application, use a new thread to make this call."); + +static PyObject *findvs_findall(PyObject *self, PyObject *args, PyObject *kwargs) +{ + HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED); + if (hr == RPC_E_CHANGED_MODE) + hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + if (FAILED(hr)) + return error_from_hr(hr); + PyObject *res = find_all_instances(); + CoUninitialize(); + return res; +} + +// List of functions to add to findvs in exec_findvs(). +static PyMethodDef findvs_functions[] = { + { "findall", (PyCFunction)findvs_findall, METH_VARARGS | METH_KEYWORDS, findvs_findall_doc }, + { NULL, NULL, 0, NULL } +}; + +// Initialize findvs. May be called multiple times, so avoid +// using static state. +static int exec_findvs(PyObject *module) +{ + PyModule_AddFunctions(module, findvs_functions); + + return 0; // success +} + +PyDoc_STRVAR(findvs_doc, "The _findvs helper module"); + +static PyModuleDef_Slot findvs_slots[] = { + { Py_mod_exec, exec_findvs }, + { 0, NULL } +}; + +static PyModuleDef findvs_def = { + PyModuleDef_HEAD_INIT, + "_findvs", + findvs_doc, + 0, // m_size + NULL, // m_methods + findvs_slots, + NULL, // m_traverse + NULL, // m_clear + NULL, // m_free +}; + +extern "C" { + PyMODINIT_FUNC PyInit__findvs(void) + { + return PyModuleDef_Init(&findvs_def); + } +} \ No newline at end of file diff --git a/PC/config.c b/PC/config.c index f14e06886e2..699e1d07077 100644 --- a/PC/config.c +++ b/PC/config.c @@ -1,7 +1,7 @@ /* Module configuration */ /* This file contains the table of built-in modules. - See create_builtin() in import.c. */ + See create_builtin() in import.c. */ #include "Python.h" @@ -69,6 +69,7 @@ extern PyObject* _PyWarnings_Init(void); extern PyObject* PyInit__string(void); extern PyObject* PyInit__stat(void); extern PyObject* PyInit__opcode(void); +extern PyObject* PyInit__findvs(void); /* tools/freeze/makeconfig.py marker for additional "extern" */ /* -- ADDMODULE MARKER 1 -- */ @@ -161,6 +162,8 @@ struct _inittab _PyImport_Inittab[] = { {"_stat", PyInit__stat}, {"_opcode", PyInit__opcode}, + {"_findvs", PyInit__findvs}, + /* Sentinel */ {0, 0} }; diff --git a/PC/external/Externals.txt b/PC/external/Externals.txt new file mode 100644 index 00000000000..618fe16fd4c --- /dev/null +++ b/PC/external/Externals.txt @@ -0,0 +1,3 @@ +The files in this folder are from the Microsoft.VisualStudio.Setup.Configuration.Native package on Nuget. + +They are licensed under the MIT license. diff --git a/PC/external/include/Setup.Configuration.h b/PC/external/include/Setup.Configuration.h new file mode 100644 index 00000000000..1fb31878d7a --- /dev/null +++ b/PC/external/include/Setup.Configuration.h @@ -0,0 +1,827 @@ +// The MIT License(MIT) +// Copyright(C) Microsoft Corporation.All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. +// + +#pragma once + +// Constants +// +#ifndef E_NOTFOUND +#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) +#endif + +#ifndef E_FILENOTFOUND +#define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) +#endif + +#ifndef E_NOTSUPPORTED +#define E_NOTSUPPORTED HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) +#endif + +// Enumerations +// +/// +/// The state of an instance. +/// +enum InstanceState +{ + /// + /// The instance state has not been determined. + /// + eNone = 0, + + /// + /// The instance installation path exists. + /// + eLocal = 1, + + /// + /// A product is registered to the instance. + /// + eRegistered = 2, + + /// + /// No reboot is required for the instance. + /// + eNoRebootRequired = 4, + + /// + /// No errors were reported for the instance. + /// + eNoErrors = 8, + + /// + /// The instance represents a complete install. + /// + eComplete = MAXUINT, +}; + +// Forward interface declarations +// +#ifndef __ISetupInstance_FWD_DEFINED__ +#define __ISetupInstance_FWD_DEFINED__ +typedef struct ISetupInstance ISetupInstance; +#endif + +#ifndef __ISetupInstance2_FWD_DEFINED__ +#define __ISetupInstance2_FWD_DEFINED__ +typedef struct ISetupInstance2 ISetupInstance2; +#endif + +#ifndef __ISetupLocalizedProperties_FWD_DEFINED__ +#define __ISetupLocalizedProperties_FWD_DEFINED__ +typedef struct ISetupLocalizedProperties ISetupLocalizedProperties; +#endif + +#ifndef __IEnumSetupInstances_FWD_DEFINED__ +#define __IEnumSetupInstances_FWD_DEFINED__ +typedef struct IEnumSetupInstances IEnumSetupInstances; +#endif + +#ifndef __ISetupConfiguration_FWD_DEFINED__ +#define __ISetupConfiguration_FWD_DEFINED__ +typedef struct ISetupConfiguration ISetupConfiguration; +#endif + +#ifndef __ISetupConfiguration2_FWD_DEFINED__ +#define __ISetupConfiguration2_FWD_DEFINED__ +typedef struct ISetupConfiguration2 ISetupConfiguration2; +#endif + +#ifndef __ISetupPackageReference_FWD_DEFINED__ +#define __ISetupPackageReference_FWD_DEFINED__ +typedef struct ISetupPackageReference ISetupPackageReference; +#endif + +#ifndef __ISetupHelper_FWD_DEFINED__ +#define __ISetupHelper_FWD_DEFINED__ +typedef struct ISetupHelper ISetupHelper; +#endif + +#ifndef __ISetupErrorState_FWD_DEFINED__ +#define __ISetupErrorState_FWD_DEFINED__ +typedef struct ISetupErrorState ISetupErrorState; +#endif + +#ifndef __ISetupErrorState2_FWD_DEFINED__ +#define __ISetupErrorState2_FWD_DEFINED__ +typedef struct ISetupErrorState2 ISetupErrorState2; +#endif + +#ifndef __ISetupFailedPackageReference_FWD_DEFINED__ +#define __ISetupFailedPackageReference_FWD_DEFINED__ +typedef struct ISetupFailedPackageReference ISetupFailedPackageReference; +#endif + +#ifndef __ISetupFailedPackageReference2_FWD_DEFINED__ +#define __ISetupFailedPackageReference2_FWD_DEFINED__ +typedef struct ISetupFailedPackageReference2 ISetupFailedPackageReference2; +#endif + +#ifndef __ISetupPropertyStore_FWD_DEFINED__ +#define __ISetupPropertyStore_FWD_DEFINED__ +typedef struct ISetupPropertyStore ISetupPropertyStore; +#endif + +#ifndef __ISetupLocalizedPropertyStore_FWD_DEFINED__ +#define __ISetupLocalizedPropertyStore_FWD_DEFINED__ +typedef struct ISetupLocalizedPropertyStore ISetupLocalizedPropertyStore; +#endif + +// Forward class declarations +// +#ifndef __SetupConfiguration_FWD_DEFINED__ +#define __SetupConfiguration_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SetupConfiguration SetupConfiguration; +#endif + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// Interface definitions +// +EXTERN_C const IID IID_ISetupInstance; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about an instance of a product. +/// +struct DECLSPEC_UUID("B41463C3-8866-43B5-BC33-2B0676F7F42E") DECLSPEC_NOVTABLE ISetupInstance : public IUnknown +{ + /// + /// Gets the instance identifier (should match the name of the parent instance directory). + /// + /// The instance identifier. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetInstanceId)( + _Out_ BSTR* pbstrInstanceId + ) = 0; + + /// + /// Gets the local date and time when the installation was originally installed. + /// + /// The local date and time when the installation was originally installed. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallDate)( + _Out_ LPFILETIME pInstallDate + ) = 0; + + /// + /// Gets the unique name of the installation, often indicating the branch and other information used for telemetry. + /// + /// The unique name of the installation, often indicating the branch and other information used for telemetry. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationName)( + _Out_ BSTR* pbstrInstallationName + ) = 0; + + /// + /// Gets the path to the installation root of the product. + /// + /// The path to the installation root of the product. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationPath)( + _Out_ BSTR* pbstrInstallationPath + ) = 0; + + /// + /// Gets the version of the product installed in this instance. + /// + /// The version of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationVersion)( + _Out_ BSTR* pbstrInstallationVersion + ) = 0; + + /// + /// Gets the display name (title) of the product installed in this instance. + /// + /// The LCID for the display name. + /// The display name (title) of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDisplayName)( + _In_ LCID lcid, + _Out_ BSTR* pbstrDisplayName + ) = 0; + + /// + /// Gets the description of the product installed in this instance. + /// + /// The LCID for the description. + /// The description of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDescription)( + _In_ LCID lcid, + _Out_ BSTR* pbstrDescription + ) = 0; + + /// + /// Resolves the optional relative path to the root path of the instance. + /// + /// A relative path within the instance to resolve, or NULL to get the root path. + /// The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(ResolvePath)( + _In_opt_z_ LPCOLESTR pwszRelativePath, + _Out_ BSTR* pbstrAbsolutePath + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupInstance2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about an instance of a product. +/// +struct DECLSPEC_UUID("89143C9A-05AF-49B0-B717-72E218A2185C") DECLSPEC_NOVTABLE ISetupInstance2 : public ISetupInstance +{ + /// + /// Gets the state of the instance. + /// + /// The state of the instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetState)( + _Out_ InstanceState* pState + ) = 0; + + /// + /// Gets an array of package references registered to the instance. + /// + /// Pointer to an array of . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetPackages)( + _Out_ LPSAFEARRAY* ppsaPackages + ) = 0; + + /// + /// Gets a pointer to the that represents the registered product. + /// + /// Pointer to an instance of . This may be NULL if does not return . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetProduct)( + _Outptr_result_maybenull_ ISetupPackageReference** ppPackage + ) = 0; + + /// + /// Gets the relative path to the product application, if available. + /// + /// The relative path to the product application, if available. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetProductPath)( + _Outptr_result_maybenull_ BSTR* pbstrProductPath + ) = 0; + + /// + /// Gets the error state of the instance, if available. + /// + /// The error state of the instance, if available. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetErrors)( + _Outptr_result_maybenull_ ISetupErrorState** ppErrorState + ) = 0; + + /// + /// Gets a value indicating whether the instance can be launched. + /// + /// Whether the instance can be launched. + /// Standard HRESULT indicating success or failure. + /// + /// An instance could have had errors during install but still be launched. Some features may not work correctly, but others will. + /// + STDMETHOD(IsLaunchable)( + _Out_ VARIANT_BOOL* pfIsLaunchable + ) = 0; + + /// + /// Gets a value indicating whether the instance is complete. + /// + /// Whether the instance is complete. + /// Standard HRESULT indicating success or failure. + /// + /// An instance is complete if it had no errors during install, resume, or repair. + /// + STDMETHOD(IsComplete)( + _Out_ VARIANT_BOOL* pfIsComplete + ) = 0; + + /// + /// Gets product-specific properties. + /// + /// A pointer to an instance of . This may be NULL if no properties are defined. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetProperties)( + _Outptr_result_maybenull_ ISetupPropertyStore** ppProperties + ) = 0; + + /// + /// Gets the directory path to the setup engine that installed the instance. + /// + /// The directory path to the setup engine that installed the instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetEnginePath)( + _Outptr_result_maybenull_ BSTR* pbstrEnginePath + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupLocalizedProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Provides localized properties of an instance of a product. +/// +struct DECLSPEC_UUID("F4BD7382-FE27-4AB4-B974-9905B2A148B0") DECLSPEC_NOVTABLE ISetupLocalizedProperties : public IUnknown +{ + /// + /// Gets localized product-specific properties. + /// + /// A pointer to an instance of . This may be NULL if no properties are defined. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLocalizedProperties)( + _Outptr_result_maybenull_ ISetupLocalizedPropertyStore** ppLocalizedProperties + ) = 0; + + /// + /// Gets localized channel-specific properties. + /// + /// A pointer to an instance of . This may be NULL if no channel properties are defined. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLocalizedChannelProperties)( + _Outptr_result_maybenull_ ISetupLocalizedPropertyStore** ppLocalizedChannelProperties + ) = 0; +}; +#endif + +EXTERN_C const IID IID_IEnumSetupInstances; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// An enumerator of installed objects. +/// +struct DECLSPEC_UUID("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848") DECLSPEC_NOVTABLE IEnumSetupInstances : public IUnknown +{ + /// + /// Retrieves the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to retrieve. + /// A pointer to an array of . + /// A pointer to the number of product instances retrieved. If is 1 this parameter may be NULL. + /// S_OK if the number of elements were fetched, S_FALSE if nothing was fetched (at end of enumeration), E_INVALIDARG if is greater than 1 and pceltFetched is NULL, or E_OUTOFMEMORY if an could not be allocated. + STDMETHOD(Next)( + _In_ ULONG celt, + _Out_writes_to_(celt, *pceltFetched) ISetupInstance** rgelt, + _Out_opt_ _Deref_out_range_(0, celt) ULONG* pceltFetched + ) = 0; + + /// + /// Skips the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to skip. + /// S_OK if the number of elements could be skipped; otherwise, S_FALSE; + STDMETHOD(Skip)( + _In_ ULONG celt + ) = 0; + + /// + /// Resets the enumeration sequence to the beginning. + /// + /// Always returns S_OK; + STDMETHOD(Reset)(void) = 0; + + /// + /// Creates a new enumeration object in the same state as the current enumeration object: the new object points to the same place in the enumeration sequence. + /// + /// A pointer to a pointer to a new interface. If the method fails, this parameter is undefined. + /// S_OK if a clone was returned; otherwise, E_OUTOFMEMORY. + STDMETHOD(Clone)( + _Deref_out_opt_ IEnumSetupInstances** ppenum + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupConfiguration; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Gets information about product instances installed on the machine. +/// +struct DECLSPEC_UUID("42843719-DB4C-46C2-8E7C-64F1816EFD5B") DECLSPEC_NOVTABLE ISetupConfiguration : public IUnknown +{ + /// + /// Enumerates all launchable product instances installed. + /// + /// An enumeration of completed, installed product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumInstances)( + _Out_ IEnumSetupInstances** ppEnumInstances + ) = 0; + + /// + /// Gets the instance for the current process path. + /// + /// The instance for the current process path. + /// + /// The instance for the current process path, or E_NOTFOUND if not found. + /// The may indicate the instance is invalid. + /// + /// + /// The returned instance may not be launchable. + /// +STDMETHOD(GetInstanceForCurrentProcess)( + _Out_ ISetupInstance** ppInstance + ) = 0; + + /// + /// Gets the instance for the given path. + /// + /// The instance for the given path. + /// + /// The instance for the given path, or E_NOTFOUND if not found. + /// The may indicate the instance is invalid. + /// + /// + /// The returned instance may not be launchable. + /// +STDMETHOD(GetInstanceForPath)( + _In_z_ LPCWSTR wzPath, + _Out_ ISetupInstance** ppInstance + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupConfiguration2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Gets information about product instances. +/// +struct DECLSPEC_UUID("26AAB78C-4A60-49D6-AF3B-3C35BC93365D") DECLSPEC_NOVTABLE ISetupConfiguration2 : public ISetupConfiguration +{ + /// + /// Enumerates all product instances. + /// + /// An enumeration of all product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumAllInstances)( + _Out_ IEnumSetupInstances** ppEnumInstances + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupPackageReference; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// A reference to a package. +/// +struct DECLSPEC_UUID("da8d8a16-b2b6-4487-a2f1-594ccccd6bf5") DECLSPEC_NOVTABLE ISetupPackageReference : public IUnknown +{ + /// + /// Gets the general package identifier. + /// + /// The general package identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetId)( + _Out_ BSTR* pbstrId + ) = 0; + + /// + /// Gets the version of the package. + /// + /// The version of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetVersion)( + _Out_ BSTR* pbstrVersion + ) = 0; + + /// + /// Gets the target process architecture of the package. + /// + /// The target process architecture of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetChip)( + _Out_ BSTR* pbstrChip + ) = 0; + + /// + /// Gets the language and optional region identifier. + /// + /// The language and optional region identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLanguage)( + _Out_ BSTR* pbstrLanguage + ) = 0; + + /// + /// Gets the build branch of the package. + /// + /// The build branch of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetBranch)( + _Out_ BSTR* pbstrBranch + ) = 0; + + /// + /// Gets the type of the package. + /// + /// The type of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetType)( + _Out_ BSTR* pbstrType + ) = 0; + + /// + /// Gets the unique identifier consisting of all defined tokens. + /// + /// The unique identifier consisting of all defined tokens. + /// Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required). + STDMETHOD(GetUniqueId)( + _Out_ BSTR* pbstrUniqueId + ) = 0; + + /// + /// Gets a value indicating whether the package refers to an external extension. + /// + /// A value indicating whether the package refers to an external extension. + /// Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required). + STDMETHOD(GetIsExtension)( + _Out_ VARIANT_BOOL* pfIsExtension + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupHelper; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Helper functions. +/// +/// +/// You can query for this interface from the class. +/// +struct DECLSPEC_UUID("42b21b78-6192-463e-87bf-d577838f1d5c") DECLSPEC_NOVTABLE ISetupHelper : public IUnknown +{ + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The dotted quad version string to parse, e.g. 1.2.3.4. + /// A 64-bit unsigned integer representing the version. You can compare this to other versions. + /// Standard HRESULT indicating success or failure, including E_INVALIDARG if the version is not valid. + STDMETHOD(ParseVersion)( + _In_ LPCOLESTR pwszVersion, + _Out_ PULONGLONG pullVersion + ) = 0; + + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The string containing 1 or 2 dotted quad version strings to parse, e.g. [1.0,) that means 1.0.0.0 or newer. + /// A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions. + /// A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions. + /// Standard HRESULT indicating success or failure, including E_INVALIDARG if the version range is not valid. + STDMETHOD(ParseVersionRange)( + _In_ LPCOLESTR pwszVersionRange, + _Out_ PULONGLONG pullMinVersion, + _Out_ PULONGLONG pullMaxVersion + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupErrorState; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about the error state of an instance. +/// +struct DECLSPEC_UUID("46DCCD94-A287-476A-851E-DFBC2FFDBC20") DECLSPEC_NOVTABLE ISetupErrorState : public IUnknown +{ + /// + /// Gets an array of failed package references. + /// + /// Pointer to an array of , if packages have failed. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetFailedPackages)( + _Outptr_result_maybenull_ LPSAFEARRAY* ppsaFailedPackages + ) = 0; + + /// + /// Gets an array of skipped package references. + /// + /// Pointer to an array of , if packages have been skipped. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetSkippedPackages)( + _Outptr_result_maybenull_ LPSAFEARRAY* ppsaSkippedPackages + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupErrorState2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about the error state of an instance. +/// +struct DECLSPEC_UUID("9871385B-CA69-48F2-BC1F-7A37CBF0B1EF") DECLSPEC_NOVTABLE ISetupErrorState2 : public ISetupErrorState +{ + /// + /// Gets the path to the error log. + /// + /// The path to the error log. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetErrorLogFilePath)( + _Outptr_result_maybenull_ BSTR* pbstrErrorLogFilePath + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupFailedPackageReference; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// A reference to a failed package. +/// +struct DECLSPEC_UUID("E73559CD-7003-4022-B134-27DC650B280F") DECLSPEC_NOVTABLE ISetupFailedPackageReference : public ISetupPackageReference +{ +}; + +#endif + +EXTERN_C const IID IID_ISetupFailedPackageReference2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// A reference to a failed package. +/// +struct DECLSPEC_UUID("0FAD873E-E874-42E3-B268-4FE2F096B9CA") DECLSPEC_NOVTABLE ISetupFailedPackageReference2 : public ISetupFailedPackageReference +{ + /// + /// Gets the path to the optional package log. + /// + /// The path to the optional package log. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLogFilePath)( + _Outptr_result_maybenull_ BSTR* pbstrLogFilePath + ) = 0; + + /// + /// Gets the description of the package failure. + /// + /// The description of the package failure. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetDescription)( + _Outptr_result_maybenull_ BSTR* pbstrDescription + ) = 0; + + /// + /// Gets the signature to use for feedback reporting. + /// + /// The signature to use for feedback reporting. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetSignature)( + _Outptr_result_maybenull_ BSTR* pbstrSignature + ) = 0; + + /// + /// Gets the array of details for this package failure. + /// + /// Pointer to an array of details as BSTRs. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetDetails)( + _Out_ LPSAFEARRAY* ppsaDetails + ) = 0; + + /// + /// Gets an array of packages affected by this package failure. + /// + /// Pointer to an array of for packages affected by this package failure. This may be NULL. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetAffectedPackages)( + _Out_ LPSAFEARRAY* ppsaAffectedPackages + ) = 0; +}; + +#endif + +EXTERN_C const IID IID_ISetupPropertyStore; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Provides named properties. +/// +/// +/// You can get this from an , , or derivative. +/// +struct DECLSPEC_UUID("C601C175-A3BE-44BC-91F6-4568D230FC83") DECLSPEC_NOVTABLE ISetupPropertyStore : public IUnknown +{ + /// + /// Gets an array of property names in this property store. + /// + /// Pointer to an array of property names as BSTRs. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetNames)( + _Out_ LPSAFEARRAY* ppsaNames + ) = 0; + + /// + /// Gets the value of a named property in this property store. + /// + /// The name of the property to get. + /// The value of the property. + /// Standard HRESULT indicating success or failure, including E_NOTFOUND if the property is not defined or E_NOTSUPPORTED if the property type is not supported. + STDMETHOD(GetValue)( + _In_ LPCOLESTR pwszName, + _Out_ LPVARIANT pvtValue + ) = 0; +}; + +#endif + +EXTERN_C const IID IID_ISetupLocalizedPropertyStore; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Provides localized named properties. +/// +/// +/// You can get this from an . +/// +struct DECLSPEC_UUID("5BB53126-E0D5-43DF-80F1-6B161E5C6F6C") DECLSPEC_NOVTABLE ISetupLocalizedPropertyStore : public IUnknown +{ + /// + /// Gets an array of property names in this property store. + /// + /// The LCID for the property names. + /// Pointer to an array of property names as BSTRs. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetNames)( + _In_ LCID lcid, + _Out_ LPSAFEARRAY* ppsaNames + ) = 0; + + /// + /// Gets the value of a named property in this property store. + /// + /// The name of the property to get. + /// The LCID for the property. + /// The value of the property. + /// Standard HRESULT indicating success or failure, including E_NOTFOUND if the property is not defined or E_NOTSUPPORTED if the property type is not supported. + STDMETHOD(GetValue)( + _In_ LPCOLESTR pwszName, + _In_ LCID lcid, + _Out_ LPVARIANT pvtValue + ) = 0; +}; + +#endif + +// Class declarations +// +EXTERN_C const CLSID CLSID_SetupConfiguration; + +#ifdef __cplusplus +/// +/// This class implements , , and . +/// +class DECLSPEC_UUID("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D") SetupConfiguration; +#endif + +// Function declarations +// +/// +/// Gets an that provides information about product instances installed on the machine. +/// +/// The that provides information about product instances installed on the machine. +/// Reserved for future use. +/// Standard HRESULT indicating success or failure. +STDMETHODIMP GetSetupConfiguration( + _Out_ ISetupConfiguration** ppConfiguration, + _Reserved_ LPVOID pReserved +); + +#ifdef __cplusplus +} +#endif diff --git a/PC/external/v140/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib b/PC/external/v140/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib new file mode 100644 index 00000000000..675a501d8cb Binary files /dev/null and b/PC/external/v140/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib differ diff --git a/PC/external/v140/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib b/PC/external/v140/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib new file mode 100644 index 00000000000..40f70b2682d Binary files /dev/null and b/PC/external/v140/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib differ diff --git a/PC/external/v141/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib b/PC/external/v141/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib new file mode 100644 index 00000000000..675a501d8cb Binary files /dev/null and b/PC/external/v141/amd64/Microsoft.VisualStudio.Setup.Configuration.Native.lib differ diff --git a/PC/external/v141/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib b/PC/external/v141/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib new file mode 100644 index 00000000000..40f70b2682d Binary files /dev/null and b/PC/external/v141/win32/Microsoft.VisualStudio.Setup.Configuration.Native.lib differ diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj index 7ec26920107..d8b159e6a1d 100644 --- a/PCbuild/_lzma.vcxproj +++ b/PCbuild/_lzma.vcxproj @@ -65,7 +65,7 @@ WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) - $(OutDir)/liblzma$(PyDebugExt).lib + $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 99d9eadc28f..d4aebf55513 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -84,7 +84,7 @@ if "%~1"=="-E" (set IncludeExternals=false) & shift & goto CheckOpts if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts -if "%IncludeExternals%"=="" set IncludeExternals=false +if "%IncludeExternals%"=="" set IncludeExternals=true if "%IncludeSSL%"=="" set IncludeSSL=true if "%IncludeTkinter%"=="" set IncludeTkinter=true diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index b0d2e9be8a4..59910951b62 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -50,6 +50,8 @@ true true + true + false @@ -73,6 +75,7 @@ version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName) 0x1e000000 @@ -218,6 +221,7 @@ + @@ -341,6 +345,7 @@ + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index cbe1a3943ff..115ce85edec 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -321,39 +321,6 @@ Modules\_io - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - Modules\cjkcodecs @@ -444,11 +411,41 @@ Include + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + - - Modules - Modules @@ -614,39 +611,6 @@ Modules\_io - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - Modules\cjkcodecs @@ -1001,10 +965,49 @@ Objects + + PC + + + Modules + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + + + Modules\zlib + Resource Files - + \ No newline at end of file