diff --git a/Mac/BuildScript/README.rst b/Mac/BuildScript/README.rst deleted file mode 100644 index 54341a81c26743..00000000000000 --- a/Mac/BuildScript/README.rst +++ /dev/null @@ -1,112 +0,0 @@ -Building a Python Mac OS X distribution -======================================= - -The ``build-install.py`` script creates Python distributions, including -certain third-party libraries as necessary. It builds a complete -framework-based Python out-of-tree, installs it in a funny place with -$DESTROOT, massages that installation to remove .pyc files and such, creates -an Installer package from the installation plus other files in ``resources`` -and ``scripts`` and placed that on a ``.dmg`` disk image. -The installer package built on the dmg is a macOS bundle format installer -package. This format is deprecated and is no longer supported by modern -macOS systems; it is usable on macOS 10.6 and earlier systems. -To be usable on newer versions of macOS, the bits in the bundle package -must be assembled in a macOS flat installer package, using current -versions of the pkgbuild and productbuild utilities. To pass macoS -Gatekeeper download quarantine, the final package must be signed -with a valid Apple Developer ID certificate using productsign. -Starting with macOS 10.15 Catalina, Gatekeeper now also requires -that installer packages are submitted to and pass Apple's automated -notarization service using the ``notarytool`` command. To pass notarization, -the binaries included in the package must be built with at least -the macOS 10.9 SDK, must now be signed with the codesign utility, -and executables must opt in to the hardened run time option with -any necessary entitlements. Details of these processes are -available in the on-line Apple Developer Documentation and man pages. - -A goal of PSF-provided (python.org) Python binaries for macOS is to -support a wide-range of operating system releases with one set of -binaries. Currently, the oldest release supported by python.org -binaries is macOS 10.9; it should still be possible to build Python and -Python installers on older versions of macOS but we not regularly -test on those systems nor provide binaries for them. - -Prior to Python 3.9.1, no Python releases supported building on a -newer version of macOS that will run on older versions -by setting MACOSX_DEPLOYMENT_TARGET. This is because the various -Python C modules did not yet support runtime testing of macOS -feature availability (for example, by using macOS AvailabilityMacros.h -and weak-linking). To build a Python that is to be used on a -range of macOS releases, it was necessary to always build on the -oldest release to be supported; the necessary shared libraries for -that release will normally also be available on later systems, -with the occasional exception such as the removal of 32-bit -libraries in macOS 10.15. For 3.9.x and recent earlier systems, -PSF practice was to provide a "macOS 64-bit Intel installer" variant -that was built on 10.9 that would run on macOS 10.9 and later. - -Starting with 3.9.1, Python fully supports macOS "weaklinking", -meaning it is now possible to build a Python on a current macOS version -with a deployment target of an earlier macOS system. For 3.9.1 and -later systems, we provide a "macOS 64-bit universal2 installer" -variant, currently built on macOS 11 Big Sur with fat binaries -natively supporting both Apple Silicon (arm64) and Intel-64 -(x86_64) Macs running macOS 10.9 or later. - -build-installer.py requires Apple Developer tools, either from the -Command Line Tools package or from a full Xcode installation. -You should use the most recent version of either for the operating -system version in use. (One notable exception: on macOS 10.6, -Snow Leopard, use Xcode 3, not Xcode 4 which was released later -in the 10.6 support cycle.) build-installer.py also must be run -with recent versions of Python 3.x. On older systems, -due to changes in TLS practices, it may be easier to manually -download and cache third-party source distributions used by -build-installer.py rather than have it attempt to automatically -download them. - -1. universal2, arm64 and x86_64, for OS X 10.9 (and later):: - - /path/to/bootstrap/python3 build-installer.py \ - --universal-archs=universal2 \ - --dep-target=10.9 - - - builds the following third-party libraries - - * OpenSSL 3.5.x - * Tcl/Tk 8.6.x - * NCurses - * SQLite - * XZ - * mpdecimal - - - uses system-supplied versions of third-party libraries - - * readline module links with Apple BSD editline (libedit) - * zlib - * bz2 - - - recommended build environment: - - * Mac OS X 11 or later - * Xcode Command Line Tools 12.5 or later - * current default macOS SDK - * ``MACOSX_DEPLOYMENT_TARGET=10.9`` - * Apple ``clang`` - - -General Prerequisites ---------------------- - -* No Fink (in ``/sw``) or MacPorts (in ``/opt/local``) or Homebrew or - other local libraries or utilities (in ``/usr/local``) as they could - interfere with the build. - -* It is safest to start each variant build with an empty source directory - populated with a fresh copy of the untarred source or a source repo. - -* It is recommended that you remove any existing installed version of the - Python being built:: - - sudo rm -rf /Library/Frameworks/Python.framework/Versions/n.n - diff --git a/Mac/BuildScript/backport_gh110950_fix.patch b/Mac/BuildScript/backport_gh110950_fix.patch deleted file mode 100644 index 793f5a78d8c6ab..00000000000000 --- a/Mac/BuildScript/backport_gh110950_fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -From https://core.tcl-lang.org/tk/info/ed7cfbac8db11aa0 - -Note: the diff here is hand-tweaked so that it applies cleanly to both Tk 8.6.8 and 8.6.13. - -diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c -index 71d7c3385..e6a68356c 100644 ---- a/macosx/tkMacOSXInit.c -+++ b/macosx/tkMacOSXInit.c -@@ -128,6 +128,16 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip, - observe(NSApplicationDidChangeScreenParametersNotification, displayChanged:); - observe(NSTextInputContextKeyboardSelectionDidChangeNotification, keyboardChanged:); - #undef observe -+} -+ -+ -+/* -+ * Fix for 10b38a7a7c. -+ */ -+ -+- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app -+{ -+ return YES; - } - - -(void)applicationWillFinishLaunching:(NSNotification *)aNotification diff --git a/Mac/BuildScript/backport_gh71383_fix.patch b/Mac/BuildScript/backport_gh71383_fix.patch deleted file mode 100644 index d77b1045e8c165..00000000000000 --- a/Mac/BuildScript/backport_gh71383_fix.patch +++ /dev/null @@ -1,89 +0,0 @@ -Adapted from https://core.tcl-lang.org/tk/info/b1876b9ebc4b - -Index: generic/tkInt.h -================================================================== ---- a/generic/tkInt.h.orig -+++ b/generic/tkInt.h -@@ -1094,10 +1094,11 @@ - /* - * Themed widget set init function: - */ - - MODULE_SCOPE int Ttk_Init(Tcl_Interp *interp); -+MODULE_SCOPE void Ttk_TkDestroyedHandler(Tcl_Interp *interp); - - /* - * Internal functions shared among Tk modules but not exported to the outside - * world: - */ - -Index: generic/tkWindow.c -================================================================== ---- a/generic/tkWindow.c.orig -+++ b/generic/tkWindow.c -@@ -1619,10 +1619,11 @@ - TkBindFree(winPtr->mainPtr); - TkDeleteAllImages(winPtr->mainPtr); - TkFontPkgFree(winPtr->mainPtr); - TkFocusFree(winPtr->mainPtr); - TkStylePkgFree(winPtr->mainPtr); -+ Ttk_TkDestroyedHandler(winPtr->mainPtr->interp); - - /* - * When embedding Tk into other applications, make sure that all - * destroy events reach the server. Otherwise the embedding - * application may also attempt to destroy the windows, resulting - -Index: generic/ttk/ttkTheme.c -================================================================== ---- a/generic/ttk/ttkTheme.c.orig -+++ b/generic/ttk/ttkTheme.c -@@ -415,17 +415,10 @@ - StylePackageData *pkgPtr = (StylePackageData *)clientData; - Tcl_HashSearch search; - Tcl_HashEntry *entryPtr; - Cleanup *cleanup; - -- /* -- * Cancel any pending ThemeChanged calls: -- */ -- if (pkgPtr->themeChangePending) { -- Tcl_CancelIdleCall(ThemeChangedProc, pkgPtr); -- } -- - /* - * Free themes. - */ - entryPtr = Tcl_FirstHashEntry(&pkgPtr->themeTable, &search); - while (entryPtr != NULL) { -@@ -528,10 +521,29 @@ - if (!pkgPtr->themeChangePending) { - Tcl_DoWhenIdle(ThemeChangedProc, pkgPtr); - pkgPtr->themeChangePending = 1; - } - } -+ -+/* Ttk_TkDestroyedHandler -- -+ * See bug [310c74ecf440]: idle calls to ThemeChangedProc() -+ * need to be canceled when Tk is destroyed, since the interp -+ * may still be active afterward; canceling them from -+ * Ttk_StylePkgFree() would be too late. -+ */ -+void Ttk_TkDestroyedHandler( -+ Tcl_Interp* interp) -+{ -+ StylePackageData* pkgPtr = GetStylePackageData(interp); -+ -+ /* -+ * Cancel any pending ThemeChanged calls: -+ */ -+ if (pkgPtr->themeChangePending) { -+ Tcl_CancelIdleCall(ThemeChangedProc, pkgPtr); -+ } -+} - - /* - * Ttk_CreateTheme -- - * Create a new theme and register it in the global theme table. - * - diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py deleted file mode 100755 index 3009b775f82dde..00000000000000 --- a/Mac/BuildScript/build-installer.py +++ /dev/null @@ -1,1777 +0,0 @@ -#!/usr/bin/env python -""" -This script is used to build "official" universal installers on macOS. - -NEW for 3.10 and backports: -- support universal2 variant with arm64 and x86_64 archs -- enable clang optimizations when building on 10.15+ - -NEW for 3.9.0 and backports: -- 2.7 end-of-life issues: - - Python 3 installs now update the Current version link - in /Library/Frameworks/Python.framework/Versions -- fully support running under Python 3 as well as 2.7 -- support building on newer macOS systems with SIP -- fully support building on macOS 10.9+ -- support 10.6+ on best effort -- support bypassing docs build by supplying a prebuilt - docs html tarball in the third-party source library, - in the format and filename conventional of those - downloadable from python.org: - python-3.x.y-docs-html.tar.bz2 - -NEW for 3.7.0: -- support Intel 64-bit-only () and 32-bit-only installer builds -- build and use internal Tcl/Tk 8.6 for 10.6+ builds -- deprecate use of explicit SDK (--sdk-path=) since all but the oldest - versions of Xcode support implicit setting of an SDK via environment - variables (SDKROOT and friends, see the xcrun man page for more info). - The SDK stuff was primarily needed for building universal installers - for 10.4; so as of 3.7.0, building installers for 10.4 is no longer - supported with build-installer. -- use generic "gcc" as compiler (CC env var) rather than "gcc-4.2" - -TODO: -- test building with SDKROOT and DEVELOPER_DIR xcrun env variables - -Usage: see USAGE variable in the script. -""" -import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp -try: - import urllib2 as urllib_request -except ImportError: - import urllib.request as urllib_request - -STAT_0o755 = ( stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR - | stat.S_IRGRP | stat.S_IXGRP - | stat.S_IROTH | stat.S_IXOTH ) - -STAT_0o775 = ( stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR - | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP - | stat.S_IROTH | stat.S_IXOTH ) - -INCLUDE_TIMESTAMP = 1 -VERBOSE = 1 - -RUNNING_ON_PYTHON2 = sys.version_info.major == 2 - -if RUNNING_ON_PYTHON2: - from plistlib import writePlist -else: - from plistlib import dump - def writePlist(path, plist): - with open(plist, 'wb') as fp: - dump(path, fp) - -def shellQuote(value): - """ - Return the string value in a form that can safely be inserted into - a shell command. - """ - return "'%s'"%(value.replace("'", "'\"'\"'")) - -def grepValue(fn, variable): - """ - Return the unquoted value of a variable from a file.. - QUOTED_VALUE='quotes' -> str('quotes') - UNQUOTED_VALUE=noquotes -> str('noquotes') - """ - variable = variable + '=' - for ln in open(fn, 'r'): - if ln.startswith(variable): - value = ln[len(variable):].strip() - return value.strip("\"'") - raise RuntimeError("Cannot find variable %s" % variable[:-1]) - -_cache_getVersion = None - -def getVersion(): - global _cache_getVersion - if _cache_getVersion is None: - _cache_getVersion = grepValue( - os.path.join(SRCDIR, 'configure'), 'PACKAGE_VERSION') - return _cache_getVersion - -def getVersionMajorMinor(): - return tuple([int(n) for n in getVersion().split('.', 2)]) - -_cache_getFullVersion = None - -def getFullVersion(): - global _cache_getFullVersion - if _cache_getFullVersion is not None: - return _cache_getFullVersion - fn = os.path.join(SRCDIR, 'Include', 'patchlevel.h') - for ln in open(fn): - if 'PY_VERSION' in ln: - _cache_getFullVersion = ln.split()[-1][1:-1] - return _cache_getFullVersion - raise RuntimeError("Cannot find full version??") - -FW_PREFIX = ["Library", "Frameworks", "Python.framework"] -FW_VERSION_PREFIX = "--undefined--" # initialized in parseOptions -FW_SSL_DIRECTORY = "--undefined--" # initialized in parseOptions - -# The directory we'll use to create the build (will be erased and recreated) -WORKDIR = "/tmp/_py" - -# The directory we'll use to store third-party sources. Set this to something -# else if you don't want to re-fetch required libraries every time. -DEPSRC = os.path.join(WORKDIR, 'third-party') -DEPSRC = os.path.expanduser('~/Universal/other-sources') - -universal_opts_map = { 'universal2': ('arm64', 'x86_64'), - '32-bit': ('i386', 'ppc',), - '64-bit': ('x86_64', 'ppc64',), - 'intel': ('i386', 'x86_64'), - 'intel-32': ('i386',), - 'intel-64': ('x86_64',), - '3-way': ('ppc', 'i386', 'x86_64'), - 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } -default_target_map = { - 'universal2': '10.9', - '64-bit': '10.5', - '3-way': '10.5', - 'intel': '10.5', - 'intel-32': '10.4', - 'intel-64': '10.5', - 'all': '10.5', -} - -UNIVERSALOPTS = tuple(universal_opts_map.keys()) - -UNIVERSALARCHS = '32-bit' - -ARCHLIST = universal_opts_map[UNIVERSALARCHS] - -# Source directory (assume we're in Mac/BuildScript) -SRCDIR = os.path.dirname( - os.path.dirname( - os.path.dirname( - os.path.abspath(__file__ - )))) - -# $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level -DEPTARGET = '10.5' - -def getDeptargetTuple(): - return tuple([int(n) for n in DEPTARGET.split('.')[0:2]]) - -def getBuildTuple(): - return tuple([int(n) for n in platform.mac_ver()[0].split('.')[0:2]]) - -def getTargetCompilers(): - target_cc_map = { - '10.4': ('gcc-4.0', 'g++-4.0'), - '10.5': ('gcc', 'g++'), - '10.6': ('gcc', 'g++'), - '10.7': ('gcc', 'g++'), - '10.8': ('gcc', 'g++'), - } - return target_cc_map.get(DEPTARGET, ('clang', 'clang++') ) - -CC, CXX = getTargetCompilers() - -PYTHON_3 = getVersionMajorMinor() >= (3, 0) - -USAGE = textwrap.dedent("""\ - Usage: build_python [options] - - Options: - -? or -h: Show this message - -b DIR - --build-dir=DIR: Create build here (default: %(WORKDIR)r) - --third-party=DIR: Store third-party sources here (default: %(DEPSRC)r) - --sdk-path=DIR: Location of the SDK (deprecated, use SDKROOT env variable) - --src-dir=DIR: Location of the Python sources (default: %(SRCDIR)r) - --dep-target=10.n macOS deployment target (default: %(DEPTARGET)r) - --universal-archs=x universal architectures (options: %(UNIVERSALOPTS)r, default: %(UNIVERSALARCHS)r) -""")% globals() - -# Dict of object file names with shared library names to check after building. -# This is to ensure that we ended up dynamically linking with the shared -# library paths and versions we expected. For example: -# EXPECTED_SHARED_LIBS['_tkinter.so'] = [ -# '/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl', -# '/Library/Frameworks/Tk.framework/Versions/8.5/Tk'] -EXPECTED_SHARED_LIBS = {} - -# Are we building and linking with our own copy of Tcl/TK? -# For now, do so if deployment target is 10.6+. -def internalTk(): - return getDeptargetTuple() >= (10, 6) - -# Do we use 8.6.8 when building our own copy -# of Tcl/Tk or a modern version. -# We use the old version when building on -# old versions of macOS due to build issues. -def useOldTk(): - return getBuildTuple() < (10, 15) - - -def tweak_tcl_build(basedir, archList): - with open("Makefile", "r") as fp: - contents = fp.readlines() - - # For reasons I don't understand the tcl configure script - # decides that some stdlib symbols aren't present, before - # deciding that strtod is broken. - new_contents = [] - for line in contents: - if line.startswith("COMPAT_OBJS"): - # note: the space before strtod.o is intentional, - # the detection of a broken strtod results in - # "fixstrod.o" on this line. - for nm in ("strstr.o", "strtoul.o", " strtod.o"): - line = line.replace(nm, "") - new_contents.append(line) - - with open("Makefile", "w") as fp: - fp.writelines(new_contents) - -# List of names of third party software built with this installer. -# The names will be inserted into the rtf version of the License. -THIRD_PARTY_LIBS = [] - -# Instructions for building libraries that are necessary for building a -# batteries included python. -# [The recipes are defined here for convenience but instantiated later after -# command line options have been processed.] -def library_recipes(): - result = [] - - # Since Apple removed the header files for the deprecated system - # OpenSSL as of the Xcode 7 release (for OS X 10.10+), we do not - # have much choice but to build our own copy here, too. - - result.extend([ - dict( - name="OpenSSL 3.5.9", - url="https://github.com/openssl/openssl/releases/download/openssl-3.5.9/openssl-3.5.9.tar.gz", - checksum="603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a", - buildrecipe=build_universal_openssl, - configure=None, - install=None, - ), - ]) - - if internalTk(): - if useOldTk(): - tcl_tk_ver='8.6.8' - tcl_checksum='81656d3367af032e0ae6157eff134f89' - - tk_checksum='5e0faecba458ee1386078fb228d008ba' - tk_patches = ['backport_gh71383_fix.patch', 'tk868_on_10_8_10_9.patch', 'backport_gh110950_fix.patch'] - - else: - tcl_tk_ver='8.6.18' - tcl_checksum='14f9af32b1767ff718477a8f974ad03c34341097e6b43f4ce54644ee974e268e' - - tk_checksum='95cd528a80f5e4bdb557af9b14a7197d6860793a3894e25e7c9fad2ed05d4c3c' - tk_patches = [] - - - base_url = "https://prdownloads.sourceforge.net/tcl/{what}{version}-src.tar.gz" - result.extend([ - dict( - name="Tcl %s"%(tcl_tk_ver,), - url=base_url.format(what="tcl", version=tcl_tk_ver), - checksum=tcl_checksum, - buildDir="unix", - configure_pre=[ - '--enable-shared', - '--enable-threads', - '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),), - ], - useLDFlags=False, - buildrecipe=tweak_tcl_build, - install='make TCL_LIBRARY=%(TCL_LIBRARY)s && make install TCL_LIBRARY=%(TCL_LIBRARY)s DESTDIR=%(DESTDIR)s'%{ - "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')), - "TCL_LIBRARY": shellQuote('/Library/Frameworks/Python.framework/Versions/%s/lib/tcl8.6'%(getVersion())), - }, - ), - dict( - name="Tk %s"%(tcl_tk_ver,), - url=base_url.format(what="tk", version=tcl_tk_ver), - checksum=tk_checksum, - patches=tk_patches, - buildDir="unix", - configure_pre=[ - '--enable-aqua', - '--enable-shared', - '--enable-threads', - '--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib'%(getVersion(),), - ], - useLDFlags=False, - install='make TCL_LIBRARY=%(TCL_LIBRARY)s TK_LIBRARY=%(TK_LIBRARY)s && make install TCL_LIBRARY=%(TCL_LIBRARY)s TK_LIBRARY=%(TK_LIBRARY)s DESTDIR=%(DESTDIR)s'%{ - "DESTDIR": shellQuote(os.path.join(WORKDIR, 'libraries')), - "TCL_LIBRARY": shellQuote('/Library/Frameworks/Python.framework/Versions/%s/lib/tcl8.6'%(getVersion())), - "TK_LIBRARY": shellQuote('/Library/Frameworks/Python.framework/Versions/%s/lib/tk8.6'%(getVersion())), - }, - ), - ]) - - if PYTHON_3: - result.extend([ - dict( - name="XZ 5.2.3", - url="http://tukaani.org/xz/xz-5.2.3.tar.gz", - checksum='ef68674fb47a8b8e741b34e429d86e9d', - configure_pre=[ - '--disable-dependency-tracking', - ] - ), - ]) - - result.extend([ - dict( - name="NCurses 6.5", - url="https://ftp.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz", - checksum="136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6", - configure_pre=[ - "--datadir=/usr/share", - "--disable-lib-suffixes", - "--disable-db-install", - "--disable-mixed-case", - "--enable-overwrite", - "--enable-widec", - f"--libdir=/Library/Frameworks/Python.framework/Versions/{getVersion()}/lib", - "--sharedstatedir=/usr/com", - "--sysconfdir=/etc", - "--with-default-terminfo-dir=/usr/share/terminfo", - "--with-shared", - "--with-terminfo-dirs=/usr/share/terminfo", - "--without-ada", - "--without-cxx", - "--without-cxx-binding", - "--without-cxx-shared", - "--without-debug", - "--without-manpages", - "--without-normal", - "--without-progs", - "--without-tests", - ], - useLDFlags=False, - install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - shellQuote(os.path.join(WORKDIR, 'libraries')), - getVersion(), - ), - ), - dict( - name="SQLite 3.50.4", - url="https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz", - checksum="a3db587a1b92ee5ddac2f66b3edb41b26f9c867275782d46c3a088977d6a5b18", - extra_cflags=('-Os ' - '-DSQLITE_ENABLE_FTS5 ' - '-DSQLITE_ENABLE_FTS4 ' - '-DSQLITE_ENABLE_FTS3_PARENTHESIS ' - '-DSQLITE_ENABLE_RTREE ' - '-DSQLITE_OMIT_AUTOINIT ' - '-DSQLITE_TCL=0 ' - ), - configure_pre=[ - '--enable-threadsafe', - '--disable-readline', - '--disable-dependency-tracking', - ], - install=f"make && ranlib libsqlite3.a && make install DESTDIR={shellQuote(os.path.join(WORKDIR, 'libraries'))}", - ), - dict( - name="libmpdec 4.0.1", - url="https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-4.0.1.tar.gz", - checksum="96d33abb4bb0070c7be0fed4246cd38416188325f820468214471938545b1ac8", - configure_pre=[ - "--disable-cxx", - "MACHINE=universal", - ] - ), - ]) - - if not PYTHON_3: - result.extend([ - dict( - name="Sleepycat DB 4.7.25", - url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz", - checksum='ec2b87e833779681a0c3a814aa71359e', - buildDir="build_unix", - configure="../dist/configure", - configure_pre=[ - '--includedir=/usr/local/include/db4', - ] - ), - ]) - - return result - -def compilerCanOptimize(): - """ - Return True iff the default Xcode version can use PGO and LTO - """ - # bpo-42235: The version check is pretty conservative, can be - # adjusted after testing - mac_ver = tuple(map(int, platform.mac_ver()[0].split('.'))) - return mac_ver >= (10, 15) - -# Instructions for building packages inside the .mpkg. -def pkg_recipes(): - unselected_for_python3 = ('selected', 'unselected')[PYTHON_3] - result = [ - dict( - name="PythonFramework", - long_name="Python Framework", - source="/Library/Frameworks/Python.framework", - readme="""\ - This package installs Python.framework, that is the python - interpreter and the standard library. - """, - postflight="scripts/postflight.framework", - selected='selected', - ), - dict( - name="PythonApplications", - long_name="GUI Applications", - source="/Applications/Python %(VER)s", - readme="""\ - This package installs IDLE (an interactive Python IDE), - Python Launcher and Build Applet (create application bundles - from python scripts). - - It also installs a number of examples and demos. - """, - required=False, - selected='selected', - ), - dict( - name="PythonUnixTools", - long_name="UNIX command-line tools", - source="/usr/local/bin", - readme="""\ - This package installs the unix tools in /usr/local/bin for - compatibility with older releases of Python. This package - is not necessary to use Python. - """, - required=False, - selected='selected', - ), - dict( - name="PythonDocumentation", - long_name="Python Documentation", - topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", - source="/pydocs", - readme="""\ - This package installs the python documentation at a location - that is usable for pydoc and IDLE. - """, - postflight="scripts/postflight.documentation", - required=False, - selected='selected', - ), - dict( - name="PythonProfileChanges", - long_name="Shell profile updater", - readme="""\ - This packages updates your shell profile to make sure that - the Python tools are found by your shell in preference of - the system provided Python tools. - - If you don't install this package you'll have to add - "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" - to your PATH by hand. - """, - postflight="scripts/postflight.patch-profile", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - selected='selected', - ), - dict( - name="PythonInstallPip", - long_name="Install or upgrade pip", - readme="""\ - This package installs (or upgrades from an earlier version) - pip, a tool for installing and managing Python packages. - """, - postflight="scripts/postflight.ensurepip", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - selected='selected', - ), - ] - - return result - -def fatal(msg): - """ - A fatal error, bail out. - """ - sys.stderr.write('FATAL: ') - sys.stderr.write(msg) - sys.stderr.write('\n') - sys.exit(1) - -def fileContents(fn): - """ - Return the contents of the named file - """ - return open(fn, 'r').read() - -def runCommand(commandline): - """ - Run a command and raise RuntimeError if it fails. Output is suppressed - unless the command fails. - """ - fd = os.popen(commandline, 'r') - data = fd.read() - xit = fd.close() - if xit is not None: - sys.stdout.write(data) - raise RuntimeError("command failed: %s"%(commandline,)) - - if VERBOSE: - sys.stdout.write(data); sys.stdout.flush() - -def captureCommand(commandline): - fd = os.popen(commandline, 'r') - data = fd.read() - xit = fd.close() - if xit is not None: - sys.stdout.write(data) - raise RuntimeError("command failed: %s"%(commandline,)) - - return data - -def getTclTkVersion(configfile, versionline): - """ - search Tcl or Tk configuration file for version line - """ - try: - f = open(configfile, "r") - except OSError: - fatal("Framework configuration file not found: %s" % configfile) - - for l in f: - if l.startswith(versionline): - f.close() - return l - - fatal("Version variable %s not found in framework configuration file: %s" - % (versionline, configfile)) - -def checkEnvironment(): - """ - Check that we're running on a supported system. - """ - - if sys.version_info[0:2] < (2, 7): - fatal("This script must be run with Python 2.7 (or later)") - - if platform.system() != 'Darwin': - fatal("This script should be run on a macOS 10.5 (or later) system") - - if int(platform.release().split('.')[0]) < 8: - fatal("This script should be run on a macOS 10.5 (or later) system") - - # Because we only support dynamic load of only one major/minor version of - # Tcl/Tk, if we are not using building and using our own private copy of - # Tcl/Tk, ensure: - # 1. there is a user-installed framework (usually ActiveTcl) in (or linked - # in) SDKROOT/Library/Frameworks. As of Python 3.7.0, we no longer - # enforce that the version of the user-installed framework also - # exists in the system-supplied Tcl/Tk frameworks. Time to support - # Tcl/Tk 8.6 even if Apple does not. - if not internalTk(): - frameworks = {} - for framework in ['Tcl', 'Tk']: - fwpth = 'Library/Frameworks/%s.framework/Versions/Current' % framework - libfw = os.path.join('/', fwpth) - usrfw = os.path.join(os.getenv('HOME'), fwpth) - frameworks[framework] = os.readlink(libfw) - if not os.path.exists(libfw): - fatal("Please install a link to a current %s %s as %s so " - "the user can override the system framework." - % (framework, frameworks[framework], libfw)) - if os.path.exists(usrfw): - fatal("Please rename %s to avoid possible dynamic load issues." - % usrfw) - - if frameworks['Tcl'] != frameworks['Tk']: - fatal("The Tcl and Tk frameworks are not the same version.") - - print(" -- Building with external Tcl/Tk %s frameworks" - % frameworks['Tk']) - - # add files to check after build - EXPECTED_SHARED_LIBS['_tkinter.so'] = [ - "/Library/Frameworks/Tcl.framework/Versions/%s/Tcl" - % frameworks['Tcl'], - "/Library/Frameworks/Tk.framework/Versions/%s/Tk" - % frameworks['Tk'], - ] - else: - print(" -- Building private copy of Tcl/Tk") - print("") - - # Remove inherited environment variables which might influence build - environ_var_prefixes = ['CPATH', 'C_INCLUDE_', 'DYLD_', 'LANG', 'LC_', - 'LD_', 'LIBRARY_', 'PATH', 'PYTHON'] - for ev in list(os.environ): - for prefix in environ_var_prefixes: - if ev.startswith(prefix) : - print("INFO: deleting environment variable %s=%s" % ( - ev, os.environ[ev])) - del os.environ[ev] - - base_path = '/bin:/sbin:/usr/bin:/usr/sbin' - if 'SDK_TOOLS_BIN' in os.environ: - base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path - # Xcode 2.5 on OS X 10.4 does not include SetFile in its usr/bin; - # add its fixed location here if it exists - OLD_DEVELOPER_TOOLS = '/Developer/Tools' - if os.path.isdir(OLD_DEVELOPER_TOOLS): - base_path = base_path + ':' + OLD_DEVELOPER_TOOLS - os.environ['PATH'] = base_path - print("Setting default PATH: %s"%(os.environ['PATH'])) - -def parseOptions(args=None): - """ - Parse arguments and update global settings. - """ - global WORKDIR, DEPSRC, SRCDIR, DEPTARGET - global UNIVERSALOPTS, UNIVERSALARCHS, ARCHLIST, CC, CXX - global FW_VERSION_PREFIX - global FW_SSL_DIRECTORY - - if args is None: - args = sys.argv[1:] - - try: - options, args = getopt.getopt(args, '?hb', - [ 'build-dir=', 'third-party=', 'sdk-path=' , 'src-dir=', - 'dep-target=', 'universal-archs=', 'help' ]) - except getopt.GetoptError: - print(sys.exc_info()[1]) - sys.exit(1) - - if args: - print("Additional arguments") - sys.exit(1) - - deptarget = None - for k, v in options: - if k in ('-h', '-?', '--help'): - print(USAGE) - sys.exit(0) - - elif k in ('-d', '--build-dir'): - WORKDIR=v - - elif k in ('--third-party',): - DEPSRC=v - - elif k in ('--sdk-path',): - print(" WARNING: --sdk-path is no longer supported") - - elif k in ('--src-dir',): - SRCDIR=v - - elif k in ('--dep-target', ): - DEPTARGET=v - deptarget=v - - elif k in ('--universal-archs', ): - if v in UNIVERSALOPTS: - UNIVERSALARCHS = v - ARCHLIST = universal_opts_map[UNIVERSALARCHS] - if deptarget is None: - # Select alternate default deployment - # target - DEPTARGET = default_target_map.get(v, '10.5') - else: - raise NotImplementedError(v) - - else: - raise NotImplementedError(k) - - SRCDIR=os.path.abspath(SRCDIR) - WORKDIR=os.path.abspath(WORKDIR) - DEPSRC=os.path.abspath(DEPSRC) - - CC, CXX = getTargetCompilers() - - FW_VERSION_PREFIX = FW_PREFIX[:] + ["Versions", getVersion()] - FW_SSL_DIRECTORY = FW_VERSION_PREFIX[:] + ["etc", "openssl"] - - print("-- Settings:") - print(" * Source directory: %s" % SRCDIR) - print(" * Build directory: %s" % WORKDIR) - print(" * Third-party source: %s" % DEPSRC) - print(" * Deployment target: %s" % DEPTARGET) - print(" * Universal archs: %s" % str(ARCHLIST)) - print(" * C compiler: %s" % CC) - print(" * C++ compiler: %s" % CXX) - print("") - print(" -- Building a Python %s framework at patch level %s" - % (getVersion(), getFullVersion())) - print("") - -def extractArchive(builddir, archiveName): - """ - Extract a source archive into 'builddir'. Returns the path of the - extracted archive. - - XXX: This function assumes that archives contain a toplevel directory - that is has the same name as the basename of the archive. This is - safe enough for almost anything we use. Unfortunately, it does not - work for current Tcl and Tk source releases where the basename of - the archive ends with "-src" but the uncompressed directory does not. - For now, just special case Tcl and Tk tar.gz downloads. - """ - curdir = os.getcwd() - try: - os.chdir(builddir) - if archiveName.endswith('.tar.gz'): - retval = os.path.basename(archiveName[:-7]) - if ((retval.startswith('tcl') or retval.startswith('tk')) - and retval.endswith('-src')): - retval = retval[:-4] - # Strip rcxx suffix from Tcl/Tk release candidates - retval_rc = retval.find('rc') - if retval_rc > 0: - retval = retval[:retval_rc] - if os.path.exists(retval): - shutil.rmtree(retval) - fp = os.popen("tar zxf %s 2>&1"%(shellQuote(archiveName),), 'r') - - elif archiveName.endswith('.tar.bz2'): - retval = os.path.basename(archiveName[:-8]) - if os.path.exists(retval): - shutil.rmtree(retval) - fp = os.popen("tar jxf %s 2>&1"%(shellQuote(archiveName),), 'r') - - elif archiveName.endswith('.tar'): - retval = os.path.basename(archiveName[:-4]) - if os.path.exists(retval): - shutil.rmtree(retval) - fp = os.popen("tar xf %s 2>&1"%(shellQuote(archiveName),), 'r') - - elif archiveName.endswith('.zip'): - retval = os.path.basename(archiveName[:-4]) - if os.path.exists(retval): - shutil.rmtree(retval) - fp = os.popen("unzip %s 2>&1"%(shellQuote(archiveName),), 'r') - - data = fp.read() - xit = fp.close() - if xit is not None: - sys.stdout.write(data) - raise RuntimeError("Cannot extract %s"%(archiveName,)) - - return os.path.join(builddir, retval) - - finally: - os.chdir(curdir) - -def downloadURL(url, fname): - """ - Download the contents of the url into the file. - """ - fpIn = urllib_request.urlopen(url) - fpOut = open(fname, 'wb') - block = fpIn.read(10240) - try: - while block: - fpOut.write(block) - block = fpIn.read(10240) - fpIn.close() - fpOut.close() - except: - try: - os.unlink(fname) - except OSError: - pass - -def verifyThirdPartyFile(url, checksum, fname): - """ - Download file from url to filename fname if it does not already exist. - Abort if file contents does not match supplied md5 checksum. - """ - name = os.path.basename(fname) - if os.path.exists(fname): - print("Using local copy of %s"%(name,)) - else: - print("Did not find local copy of %s"%(name,)) - print("Downloading %s"%(name,)) - downloadURL(url, fname) - print("Archive for %s stored as %s"%(name, fname)) - if len(checksum) == 32: - algo = 'md5' - elif len(checksum) == 64: - algo = 'sha256' - else: - raise ValueError(checksum) - if os.system( - 'CHECKSUM=$(openssl %s %s) ; test "${CHECKSUM##*= }" = "%s"' - % (algo, shellQuote(fname), checksum) ): - fatal('%s checksum mismatch for file %s' % (algo, fname)) - -def build_universal_openssl(basedir, archList): - """ - Special case build recipe for universal build of openssl. - - The upstream OpenSSL build system does not directly support - OS X universal builds. We need to build each architecture - separately then lipo them together into fat libraries. - """ - - # OpenSSL fails to build with Xcode 2.5 (on OS X 10.4). - # If we are building on a 10.4.x or earlier system, - # unilaterally disable assembly code building to avoid the problem. - no_asm = int(platform.release().split(".")[0]) < 9 - - def build_openssl_arch(archbase, arch): - "Build one architecture of openssl" - arch_opts = { - "i386": ["darwin-i386-cc"], - "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"], - "arm64": ["darwin64-arm64-cc"], - "ppc": ["darwin-ppc-cc"], - "ppc64": ["darwin64-ppc-cc"], - } - - # Somewhere between OpenSSL 1.1.0j and 1.1.1c, changes cause the - # "enable-ec_nistp_64_gcc_128" option to get compile errors when - # building on our 10.6 gcc-4.2 environment. There have been other - # reports of projects running into this when using older compilers. - # So, for now, do not try to use "enable-ec_nistp_64_gcc_128" when - # building for 10.6. - if getDeptargetTuple() == (10, 6): - arch_opts['x86_64'].remove('enable-ec_nistp_64_gcc_128') - - configure_opts = [ - "no-idea", - "no-mdc2", - "no-rc5", - "no-zlib", - "no-ssl3", - # "enable-unit-test", - "shared", - "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX), - "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY), - ] - if no_asm: - configure_opts.append("no-asm") - runCommand(" ".join(["perl", "Configure"] - + arch_opts[arch] + configure_opts)) - runCommand("make depend") - runCommand("make all") - runCommand("make install_sw DESTDIR=%s"%shellQuote(archbase)) - # runCommand("make test") - return - - srcdir = os.getcwd() - universalbase = os.path.join(srcdir, "..", - os.path.basename(srcdir) + "-universal") - os.mkdir(universalbase) - archbasefws = [] - for arch in archList: - # fresh copy of the source tree - archsrc = os.path.join(universalbase, arch, "src") - shutil.copytree(srcdir, archsrc, symlinks=True) - # install base for this arch - archbase = os.path.join(universalbase, arch, "root") - os.mkdir(archbase) - # Python framework base within install_prefix: - # the build will install into this framework.. - # This is to ensure that the resulting shared libs have - # the desired real install paths built into them. - archbasefw = os.path.join(archbase, *FW_VERSION_PREFIX) - - # build one architecture - os.chdir(archsrc) - build_openssl_arch(archbase, arch) - os.chdir(srcdir) - archbasefws.append(archbasefw) - - # copy arch-independent files from last build into the basedir framework - basefw = os.path.join(basedir, *FW_VERSION_PREFIX) - shutil.copytree( - os.path.join(archbasefw, "include", "openssl"), - os.path.join(basefw, "include", "openssl") - ) - - shlib_version_number = grepValue(os.path.join(archsrc, "Makefile"), - "SHLIB_VERSION_NUMBER") - # e.g. -> "1.0.0" - libcrypto = "libcrypto.dylib" - libcrypto_versioned = libcrypto.replace(".", "."+shlib_version_number+".") - # e.g. -> "libcrypto.1.0.0.dylib" - libssl = "libssl.dylib" - libssl_versioned = libssl.replace(".", "."+shlib_version_number+".") - # e.g. -> "libssl.1.0.0.dylib" - - try: - os.mkdir(os.path.join(basefw, "lib")) - except OSError: - pass - - # merge the individual arch-dependent shared libs into a fat shared lib - archbasefws.insert(0, basefw) - for (lib_unversioned, lib_versioned) in [ - (libcrypto, libcrypto_versioned), - (libssl, libssl_versioned) - ]: - runCommand("lipo -create -output " + - " ".join(shellQuote( - os.path.join(fw, "lib", lib_versioned)) - for fw in archbasefws)) - # and create an unversioned symlink of it - os.symlink(lib_versioned, os.path.join(basefw, "lib", lib_unversioned)) - - # Create links in the temp include and lib dirs that will be injected - # into the Python build so that setup.py can find them while building - # and the versioned links so that the setup.py post-build import test - # does not fail. - relative_path = os.path.join("..", "..", "..", *FW_VERSION_PREFIX) - for fn in [ - ["include", "openssl"], - ["lib", libcrypto], - ["lib", libssl], - ["lib", libcrypto_versioned], - ["lib", libssl_versioned], - ]: - os.symlink( - os.path.join(relative_path, *fn), - os.path.join(basedir, "usr", "local", *fn) - ) - - return - -def buildRecipe(recipe, basedir, archList): - """ - Build software using a recipe. This function does the - 'configure;make;make install' dance for C software, with a possibility - to customize this process, basically a poor-mans DarwinPorts. - """ - curdir = os.getcwd() - - name = recipe['name'] - THIRD_PARTY_LIBS.append(name) - url = recipe['url'] - configure = recipe.get('configure', './configure') - buildrecipe = recipe.get('buildrecipe', None) - install = recipe.get('install', 'make && make install DESTDIR=%s'%( - shellQuote(basedir))) - - archiveName = os.path.split(url)[-1] - sourceArchive = os.path.join(DEPSRC, archiveName) - - if not os.path.exists(DEPSRC): - os.mkdir(DEPSRC) - - verifyThirdPartyFile(url, recipe['checksum'], sourceArchive) - print("Extracting archive for %s"%(name,)) - buildDir=os.path.join(WORKDIR, '_bld') - if not os.path.exists(buildDir): - os.mkdir(buildDir) - - workDir = extractArchive(buildDir, sourceArchive) - os.chdir(workDir) - - for patch in recipe.get('patches', ()): - if isinstance(patch, tuple): - url, checksum = patch - fn = os.path.join(DEPSRC, os.path.basename(url)) - verifyThirdPartyFile(url, checksum, fn) - else: - # patch is a file in the source directory - fn = os.path.join(curdir, patch) - runCommand('patch -p%s < %s'%(recipe.get('patchlevel', 1), - shellQuote(fn),)) - - for patchscript in recipe.get('patchscripts', ()): - if isinstance(patchscript, tuple): - url, checksum = patchscript - fn = os.path.join(DEPSRC, os.path.basename(url)) - verifyThirdPartyFile(url, checksum, fn) - else: - # patch is a file in the source directory - fn = os.path.join(curdir, patchscript) - if fn.endswith('.bz2'): - runCommand('bunzip2 -fk %s' % shellQuote(fn)) - fn = fn[:-4] - runCommand('sh %s' % shellQuote(fn)) - os.unlink(fn) - - if 'buildDir' in recipe: - os.chdir(recipe['buildDir']) - - if configure is not None: - configure_args = [ - "--prefix=/usr/local", - "--enable-static", - "--disable-shared", - #"CPP=gcc -arch %s -E"%(' -arch '.join(archList,),), - ] - - if 'configure_pre' in recipe: - args = list(recipe['configure_pre']) - if '--disable-static' in args: - configure_args.remove('--enable-static') - if '--enable-shared' in args: - configure_args.remove('--disable-shared') - configure_args.extend(args) - - if recipe.get('useLDFlags', 1): - configure_args.extend([ - "CFLAGS=%s-mmacosx-version-min=%s -arch %s " - "-I%s/usr/local/include"%( - recipe.get('extra_cflags', ''), - DEPTARGET, - ' -arch '.join(archList), - shellQuote(basedir)[1:-1],), - "LDFLAGS=-mmacosx-version-min=%s -L%s/usr/local/lib -arch %s"%( - DEPTARGET, - shellQuote(basedir)[1:-1], - ' -arch '.join(archList)), - ]) - else: - configure_args.extend([ - "CFLAGS=%s-mmacosx-version-min=%s -arch %s " - "-I%s/usr/local/include"%( - recipe.get('extra_cflags', ''), - DEPTARGET, - ' -arch '.join(archList), - shellQuote(basedir)[1:-1],), - ]) - - if 'configure_post' in recipe: - configure_args = configure_args + list(recipe['configure_post']) - - configure_args.insert(0, configure) - configure_args = [ shellQuote(a) for a in configure_args ] - - print("Running configure for %s"%(name,)) - runCommand(' '.join(configure_args) + ' 2>&1') - - if buildrecipe is not None: - # call special-case build recipe, e.g. for openssl - buildrecipe(basedir, archList) - - if install is not None: - print("Running install for %s"%(name,)) - runCommand('{ ' + install + ' ;} 2>&1') - - print("Done %s"%(name,)) - print("") - - os.chdir(curdir) - -def buildLibraries(): - """ - Build our dependencies into $WORKDIR/libraries/usr/local - """ - print("") - print("Building required libraries") - print("") - universal = os.path.join(WORKDIR, 'libraries') - os.mkdir(universal) - os.makedirs(os.path.join(universal, 'usr', 'local', 'lib')) - os.makedirs(os.path.join(universal, 'usr', 'local', 'include')) - - for recipe in library_recipes(): - buildRecipe(recipe, universal, ARCHLIST) - - - -def buildPythonDocs(): - # This stores the documentation as Resources/English.lproj/Documentation - # inside the framework. pydoc and IDLE will pick it up there. - print("Install python documentation") - rootDir = os.path.join(WORKDIR, '_root') - buildDir = os.path.join('../../Doc') - docdir = os.path.join(rootDir, 'pydocs') - curDir = os.getcwd() - os.chdir(buildDir) - runCommand('make clean') - - # Search third-party source directory for a pre-built version of the docs. - # Use the naming convention of the docs.python.org html downloads: - # python-3.9.0b1-docs-html.tar.bz2 - doctarfiles = [ f for f in os.listdir(DEPSRC) - if f.startswith('python-'+getFullVersion()) - if f.endswith('-docs-html.tar.bz2') ] - if doctarfiles: - doctarfile = doctarfiles[0] - if not os.path.exists('build'): - os.mkdir('build') - # if build directory existed, it was emptied by make clean, above - os.chdir('build') - # Extract the first archive found for this version into build - runCommand('tar xjf %s'%shellQuote(os.path.join(DEPSRC, doctarfile))) - # see if tar extracted a directory ending in -docs-html - archivefiles = [ f for f in os.listdir('.') - if f.endswith('-docs-html') - if os.path.isdir(f) ] - if archivefiles: - archivefile = archivefiles[0] - # make it our 'Docs/build/html' directory - print(' -- using pre-built python documentation from %s'%archivefile) - os.rename(archivefile, 'html') - os.chdir(buildDir) - - htmlDir = os.path.join('build', 'html') - if not os.path.exists(htmlDir): - # Create virtual environment for docs builds with blurb and sphinx - runCommand('make venv') - runCommand('make html PYTHON=venv/bin/python') - os.rename(htmlDir, docdir) - os.chdir(curDir) - - -def buildPython(): - print("Building a universal python for %s architectures" % UNIVERSALARCHS) - - buildDir = os.path.join(WORKDIR, '_bld', 'python') - rootDir = os.path.join(WORKDIR, '_root') - - if os.path.exists(buildDir): - shutil.rmtree(buildDir) - if os.path.exists(rootDir): - shutil.rmtree(rootDir) - os.makedirs(buildDir) - os.makedirs(rootDir) - os.makedirs(os.path.join(rootDir, 'empty-dir')) - curdir = os.getcwd() - os.chdir(buildDir) - - # Extract the version from the configure file, needed to calculate - # several paths. - version = getVersion() - - # Since the extra libs are not in their installed framework location - # during the build, augment the library path so that the interpreter - # will find them during its extension import sanity checks. - - print("Running configure...") - print(" NOTE: --with-mimalloc=no pending resolution of weak linking issues") - runCommand("%s -C --enable-framework --enable-universalsdk=/ " - "--with-mimalloc=no " - "--with-system-libmpdec " - "--with-universal-archs=%s " - "%s " - "%s " - "%s " - "%s " - "%s " - "%s " - "LDFLAGS='-g -L%s/libraries/usr/local/lib' " - "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1"%( - shellQuote(os.path.join(SRCDIR, 'configure')), - UNIVERSALARCHS, - (' ', '--with-computed-gotos ')[PYTHON_3], - (' ', '--without-ensurepip ')[PYTHON_3], - (' ', "--with-openssl='%s/libraries/usr/local'"%( - shellQuote(WORKDIR)[1:-1],))[PYTHON_3], - (' ', "--enable-optimizations --with-lto")[compilerCanOptimize()], - (' ', "TCLTK_CFLAGS='-I%s/libraries/usr/local/include'"%( - shellQuote(WORKDIR)[1:-1],))[internalTk()], - (' ', "TCLTK_LIBS='-L%s/libraries/usr/local/lib -ltcl8.6 -ltk8.6'"%( - shellQuote(WORKDIR)[1:-1],))[internalTk()], - shellQuote(WORKDIR)[1:-1], - shellQuote(WORKDIR)[1:-1])) - - # As of macOS 10.11 with SYSTEM INTEGRITY PROTECTION, DYLD_* - # environment variables are no longer automatically inherited - # by child processes from their parents. We used to just set - # DYLD_LIBRARY_PATH, pointing to the third-party libs, - # in build-installer.py's process environment and it was - # passed through the make utility into the environment of - # setup.py. Instead, we now append DYLD_LIBRARY_PATH to - # the existing RUNSHARED configuration value when we call - # make for extension module builds. - - runshared_for_make = "".join([ - " RUNSHARED=", - "'", - grepValue("Makefile", "RUNSHARED"), - ' DYLD_LIBRARY_PATH=', - os.path.join(WORKDIR, 'libraries', 'usr', 'local', 'lib'), - "'" ]) - - # Look for environment value BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS - # and, if defined, append its value to the make command. This allows - # us to pass in version control tags, like GITTAG, to a build from a - # tarball rather than from a vcs checkout, thus eliminating the need - # to have a working copy of the vcs program on the build machine. - # - # A typical use might be: - # export BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS=" \ - # GITVERSION='echo 123456789a' \ - # GITTAG='echo v3.6.0' \ - # GITBRANCH='echo 3.6'" - - make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS") - if make_extras: - make_cmd = "make " + make_extras + runshared_for_make - else: - make_cmd = "make" + runshared_for_make - print("Running " + make_cmd) - runCommand(make_cmd) - - make_cmd = "make install DESTDIR=%s %s"%( - shellQuote(rootDir), - runshared_for_make) - print("Running " + make_cmd) - runCommand(make_cmd) - - make_cmd = "make frameworkinstallextras DESTDIR=%s %s"%( - shellQuote(rootDir), - runshared_for_make) - print("Running " + make_cmd) - runCommand(make_cmd) - - print("Copying required shared libraries") - if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')): - build_lib_dir = os.path.join( - WORKDIR, 'libraries', 'Library', 'Frameworks', - 'Python.framework', 'Versions', getVersion(), 'lib') - fw_lib_dir = os.path.join( - WORKDIR, '_root', 'Library', 'Frameworks', - 'Python.framework', 'Versions', getVersion(), 'lib') - if internalTk(): - # move Tcl and Tk pkgconfig files - runCommand("mv %s/pkgconfig/* %s/pkgconfig"%( - shellQuote(build_lib_dir), - shellQuote(fw_lib_dir) )) - runCommand("rm -r %s/pkgconfig"%( - shellQuote(build_lib_dir), )) - runCommand("mv %s/* %s"%( - shellQuote(build_lib_dir), - shellQuote(fw_lib_dir) )) - - frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework') - frmDirVersioned = os.path.join(frmDir, 'Versions', version) - path_to_lib = os.path.join(frmDirVersioned, 'lib', 'python%s'%(version,)) - # create directory for OpenSSL certificates - sslDir = os.path.join(frmDirVersioned, 'etc', 'openssl') - os.makedirs(sslDir) - - print("Fix file modes") - gid = grp.getgrnam('admin').gr_gid - - shared_lib_error = False - for dirpath, dirnames, filenames in os.walk(frmDir): - for dn in dirnames: - os.chmod(os.path.join(dirpath, dn), STAT_0o775) - os.chown(os.path.join(dirpath, dn), -1, gid) - - for fn in filenames: - if os.path.islink(fn): - continue - - # "chmod g+w $fn" - p = os.path.join(dirpath, fn) - st = os.stat(p) - os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP) - os.chown(p, -1, gid) - - if fn in EXPECTED_SHARED_LIBS: - # check to see that this file was linked with the - # expected library path and version - data = captureCommand("otool -L %s" % shellQuote(p)) - for sl in EXPECTED_SHARED_LIBS[fn]: - if ("\t%s " % sl) not in data: - print("Expected shared lib %s was not linked with %s" - % (sl, p)) - shared_lib_error = True - - if shared_lib_error: - fatal("Unexpected shared library errors.") - - if PYTHON_3: - LDVERSION=None - VERSION=None - ABIFLAGS=None - - fp = open(os.path.join(buildDir, 'Makefile'), 'r') - for ln in fp: - if ln.startswith('VERSION='): - VERSION=ln.split()[1] - if ln.startswith('ABIFLAGS='): - ABIFLAGS=ln.split() - ABIFLAGS=ABIFLAGS[1] if len(ABIFLAGS) > 1 else '' - if ln.startswith('LDVERSION='): - LDVERSION=ln.split()[1] - fp.close() - - LDVERSION = LDVERSION.replace('$(VERSION)', VERSION) - LDVERSION = LDVERSION.replace('$(ABIFLAGS)', ABIFLAGS) - config_suffix = '-' + LDVERSION - if getVersionMajorMinor() >= (3, 6): - config_suffix = config_suffix + '-darwin' - else: - config_suffix = '' # Python 2.x - - # We added some directories to the search path during the configure - # phase. Remove those because those directories won't be there on - # the end-users system. Also remove the directories from _sysconfigdata.py - # (added in 3.3) if it exists. - - include_path = '-I%s/libraries/usr/local/include' % (WORKDIR,) - lib_path = '-L%s/libraries/usr/local/lib' % (WORKDIR,) - - # fix Makefile - path = os.path.join(path_to_lib, 'config' + config_suffix, 'Makefile') - fp = open(path, 'r') - data = fp.read() - fp.close() - - for p in (include_path, lib_path): - data = data.replace(" " + p, '') - data = data.replace(p + " ", '') - - fp = open(path, 'w') - fp.write(data) - fp.close() - - # fix _sysconfigdata - # - # TODO: make this more robust! test_sysconfig_module of - # distutils.tests.test_sysconfig.SysconfigTestCase tests that - # the output from get_config_var in both sysconfig and - # distutils.sysconfig is exactly the same for both CFLAGS and - # LDFLAGS. The fixing up is now complicated by the pretty - # printing in _sysconfigdata.py. Also, we are using the - # pprint from the Python running the installer build which - # may not cosmetically format the same as the pprint in the Python - # being built (and which is used to originally generate - # _sysconfigdata.py). - - import pprint - if getVersionMajorMinor() >= (3, 6): - # XXX this is extra-fragile - path = os.path.join(path_to_lib, - '_sysconfigdata_%s_darwin_darwin.py' % (ABIFLAGS,)) - else: - path = os.path.join(path_to_lib, '_sysconfigdata.py') - fp = open(path, 'r') - data = fp.read() - fp.close() - # create build_time_vars dict - if RUNNING_ON_PYTHON2: - exec(data) - else: - g_dict = {} - l_dict = {} - exec(data, g_dict, l_dict) - build_time_vars = l_dict['build_time_vars'] - vars = {} - for k, v in build_time_vars.items(): - if isinstance(v, str): - for p in (include_path, lib_path): - v = v.replace(' ' + p, '') - v = v.replace(p + ' ', '') - vars[k] = v - - fp = open(path, 'w') - # duplicated from sysconfig._generate_posix_vars() - fp.write('# system configuration generated and used by' - ' the sysconfig module\n') - fp.write('build_time_vars = ') - pprint.pprint(vars, stream=fp) - fp.close() - - # Add symlinks in /usr/local/bin, using relative links - usr_local_bin = os.path.join(rootDir, 'usr', 'local', 'bin') - to_framework = os.path.join('..', '..', '..', 'Library', 'Frameworks', - 'Python.framework', 'Versions', version, 'bin') - if os.path.exists(usr_local_bin): - shutil.rmtree(usr_local_bin) - os.makedirs(usr_local_bin) - for fn in os.listdir( - os.path.join(frmDir, 'Versions', version, 'bin')): - os.symlink(os.path.join(to_framework, fn), - os.path.join(usr_local_bin, fn)) - - os.chdir(curdir) - -def patchFile(inPath, outPath): - data = fileContents(inPath) - data = data.replace('$FULL_VERSION', getFullVersion()) - data = data.replace('$VERSION', getVersion()) - data = data.replace('$MACOSX_DEPLOYMENT_TARGET', ''.join((DEPTARGET, ' or later'))) - data = data.replace('$ARCHITECTURES', ", ".join(universal_opts_map[UNIVERSALARCHS])) - data = data.replace('$INSTALL_SIZE', installSize()) - data = data.replace('$THIRD_PARTY_LIBS', "\\\n".join(THIRD_PARTY_LIBS)) - - # This one is not handy as a template variable - data = data.replace('$PYTHONFRAMEWORKINSTALLDIR', '/Library/Frameworks/Python.framework') - fp = open(outPath, 'w') - fp.write(data) - fp.close() - -def patchScript(inPath, outPath): - major, minor = getVersionMajorMinor() - data = fileContents(inPath) - data = data.replace('@PYMAJOR@', str(major)) - data = data.replace('@PYVER@', getVersion()) - fp = open(outPath, 'w') - fp.write(data) - fp.close() - os.chmod(outPath, STAT_0o755) - - - -def packageFromRecipe(targetDir, recipe): - curdir = os.getcwd() - try: - # The major version (such as 2.5) is included in the package name - # because having two version of python installed at the same time is - # common. - pkgname = '%s-%s'%(recipe['name'], getVersion()) - srcdir = recipe.get('source') - pkgroot = recipe.get('topdir', srcdir) - postflight = recipe.get('postflight') - readme = textwrap.dedent(recipe['readme']) - isRequired = recipe.get('required', True) - - print("- building package %s"%(pkgname,)) - - # Substitute some variables - textvars = dict( - VER=getVersion(), - FULLVER=getFullVersion(), - ) - readme = readme % textvars - - if pkgroot is not None: - pkgroot = pkgroot % textvars - else: - pkgroot = '/' - - if srcdir is not None: - srcdir = os.path.join(WORKDIR, '_root', srcdir[1:]) - srcdir = srcdir % textvars - - if postflight is not None: - postflight = os.path.abspath(postflight) - - packageContents = os.path.join(targetDir, pkgname + '.pkg', 'Contents') - os.makedirs(packageContents) - - if srcdir is not None: - os.chdir(srcdir) - runCommand("pax -wf %s . 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),)) - runCommand("gzip -9 %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.pax')),)) - runCommand("mkbom . %s 2>&1"%(shellQuote(os.path.join(packageContents, 'Archive.bom')),)) - - fn = os.path.join(packageContents, 'PkgInfo') - fp = open(fn, 'w') - fp.write('pmkrpkg1') - fp.close() - - rsrcDir = os.path.join(packageContents, "Resources") - os.mkdir(rsrcDir) - fp = open(os.path.join(rsrcDir, 'ReadMe.txt'), 'w') - fp.write(readme) - fp.close() - - if postflight is not None: - patchScript(postflight, os.path.join(rsrcDir, 'postflight')) - - vers = getFullVersion() - major, minor = getVersionMajorMinor() - pl = dict( - CFBundleGetInfoString="Python.%s %s"%(pkgname, vers,), - CFBundleIdentifier='org.python.Python.%s'%(pkgname,), - CFBundleName='Python.%s'%(pkgname,), - CFBundleShortVersionString=vers, - IFMajorVersion=major, - IFMinorVersion=minor, - IFPkgFormatVersion=0.10000000149011612, - IFPkgFlagAllowBackRev=False, - IFPkgFlagAuthorizationAction="RootAuthorization", - IFPkgFlagDefaultLocation=pkgroot, - IFPkgFlagFollowLinks=True, - IFPkgFlagInstallFat=True, - IFPkgFlagIsRequired=isRequired, - IFPkgFlagOverwritePermissions=False, - IFPkgFlagRelocatable=False, - IFPkgFlagRestartAction="NoRestart", - IFPkgFlagRootVolumeOnly=True, - IFPkgFlagUpdateInstalledLanguages=False, - ) - writePlist(pl, os.path.join(packageContents, 'Info.plist')) - - pl = dict( - IFPkgDescriptionDescription=readme, - IFPkgDescriptionTitle=recipe.get('long_name', "Python.%s"%(pkgname,)), - IFPkgDescriptionVersion=vers, - ) - writePlist(pl, os.path.join(packageContents, 'Resources', 'Description.plist')) - - finally: - os.chdir(curdir) - - -def makeMpkgPlist(path): - - vers = getFullVersion() - major, minor = getVersionMajorMinor() - - pl = dict( - CFBundleGetInfoString="Python %s"%(vers,), - CFBundleIdentifier='org.python.Python', - CFBundleName='Python', - CFBundleShortVersionString=vers, - IFMajorVersion=major, - IFMinorVersion=minor, - IFPkgFlagComponentDirectory="Contents/Packages", - IFPkgFlagPackageList=[ - dict( - IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()), - IFPkgFlagPackageSelection=item.get('selected', 'selected'), - ) - for item in pkg_recipes() - ], - IFPkgFormatVersion=0.10000000149011612, - IFPkgFlagBackgroundScaling="proportional", - IFPkgFlagBackgroundAlignment="left", - IFPkgFlagAuthorizationAction="RootAuthorization", - ) - - writePlist(pl, path) - - -def buildInstaller(): - - # Zap all compiled files - for dirpath, _, filenames in os.walk(os.path.join(WORKDIR, '_root')): - for fn in filenames: - if fn.endswith('.pyc') or fn.endswith('.pyo'): - os.unlink(os.path.join(dirpath, fn)) - - outdir = os.path.join(WORKDIR, 'installer') - if os.path.exists(outdir): - shutil.rmtree(outdir) - os.mkdir(outdir) - - pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents') - pkgcontents = os.path.join(pkgroot, 'Packages') - os.makedirs(pkgcontents) - for recipe in pkg_recipes(): - packageFromRecipe(pkgcontents, recipe) - - rsrcDir = os.path.join(pkgroot, 'Resources') - - fn = os.path.join(pkgroot, 'PkgInfo') - fp = open(fn, 'w') - fp.write('pmkrpkg1') - fp.close() - - os.mkdir(rsrcDir) - - makeMpkgPlist(os.path.join(pkgroot, 'Info.plist')) - pl = dict( - IFPkgDescriptionTitle="Python", - IFPkgDescriptionVersion=getVersion(), - ) - - writePlist(pl, os.path.join(pkgroot, 'Resources', 'Description.plist')) - for fn in os.listdir('resources'): - if fn == '.svn': continue - if fn.endswith('.jpg'): - shutil.copy(os.path.join('resources', fn), os.path.join(rsrcDir, fn)) - else: - patchFile(os.path.join('resources', fn), os.path.join(rsrcDir, fn)) - - -def installSize(clear=False, _saved=[]): - if clear: - del _saved[:] - if not _saved: - data = captureCommand("du -ks %s"%( - shellQuote(os.path.join(WORKDIR, '_root')))) - _saved.append("%d"%((0.5 + (int(data.split()[0]) / 1024.0)),)) - return _saved[0] - - -def buildDMG(): - """ - Create DMG containing the rootDir. - """ - outdir = os.path.join(WORKDIR, 'diskimage') - if os.path.exists(outdir): - shutil.rmtree(outdir) - - # We used to use the deployment target as the last characters of the - # installer file name. With the introduction of weaklinked installer - # variants, we may have two variants with the same file name, i.e. - # both ending in '10.9'. To avoid this, we now use the major/minor - # version numbers of the macOS version we are building on. - # Also, as of macOS 11, operating system version numbering has - # changed from three components to two, i.e. - # 10.14.1, 10.14.2, ... - # 10.15.1, 10.15.2, ... - # 11.1, 11.2, ... - # 12.1, 12.2, ... - # (A further twist is that, when running on macOS 11, binaries built - # on older systems may be shown an operating system version of 10.16 - # instead of 11. We should not run into that situation here.) - # Also we should use "macos" instead of "macosx" going forward. - # - # To maintain compatibility for legacy variants, the file name for - # builds on macOS 10.15 and earlier remains: - # python-3.x.y-macosx10.z.{dmg->pkg} - # e.g. python-3.9.4-macosx10.9.{dmg->pkg} - # and for builds on macOS 11+: - # python-3.x.y-macosz.{dmg->pkg} - # e.g. python-3.9.4-macos11.{dmg->pkg} - - build_tuple = getBuildTuple() - if build_tuple[0] < 11: - os_name = 'macosx' - build_system_version = '%s.%s' % build_tuple - else: - os_name = 'macos' - build_system_version = str(build_tuple[0]) - imagepath = os.path.join(outdir, - 'python-%s-%s%s'%(getFullVersion(),os_name,build_system_version)) - if INCLUDE_TIMESTAMP: - imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3]) - imagepath = imagepath + '.dmg' - - os.mkdir(outdir) - - # Try to mitigate race condition in certain versions of macOS, e.g. 10.9, - # when hdiutil create fails with "Resource busy". For now, just retry - # the create a few times and hope that it eventually works. - - volname='Python %s'%(getFullVersion()) - cmd = ("hdiutil create -format UDRW -volname %s -srcfolder %s -size 100m %s"%( - shellQuote(volname), - shellQuote(os.path.join(WORKDIR, 'installer')), - shellQuote(imagepath + ".tmp.dmg" ))) - for i in range(5): - fd = os.popen(cmd, 'r') - data = fd.read() - xit = fd.close() - if not xit: - break - sys.stdout.write(data) - print(" -- retrying hdiutil create") - time.sleep(5) - else: - raise RuntimeError("command failed: %s"%(cmd,)) - - if not os.path.exists(os.path.join(WORKDIR, "mnt")): - os.mkdir(os.path.join(WORKDIR, "mnt")) - runCommand("hdiutil attach %s -mountroot %s"%( - shellQuote(imagepath + ".tmp.dmg"), shellQuote(os.path.join(WORKDIR, "mnt")))) - - # Custom icon for the DMG, shown when the DMG is mounted. - shutil.copy("../Icons/Disk Image.icns", - os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns")) - runCommand("SetFile -a C %s/"%( - shellQuote(os.path.join(WORKDIR, "mnt", volname)),)) - - runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname)))) - - setIcon(imagepath + ".tmp.dmg", "../Icons/Disk Image.icns") - runCommand("hdiutil convert %s -format UDZO -o %s"%( - shellQuote(imagepath + ".tmp.dmg"), shellQuote(imagepath))) - setIcon(imagepath, "../Icons/Disk Image.icns") - - os.unlink(imagepath + ".tmp.dmg") - - return imagepath - - -def setIcon(filePath, icnsPath): - """ - Set the custom icon for the specified file or directory. - """ - - dirPath = os.path.normpath(os.path.dirname(__file__)) - toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon") - if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st_mtime: - # NOTE: The tool is created inside an .app bundle, otherwise it won't work due - # to connections to the window server. - appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS") - if not os.path.exists(appPath): - os.makedirs(appPath) - runCommand("cc -o %s %s/seticon.m -framework Cocoa"%( - shellQuote(toolPath), shellQuote(dirPath))) - - runCommand("%s %s %s"%(shellQuote(os.path.abspath(toolPath)), shellQuote(icnsPath), - shellQuote(filePath))) - -def main(): - # First parse options and check if we can perform our work - parseOptions() - checkEnvironment() - - os.environ['MACOSX_DEPLOYMENT_TARGET'] = DEPTARGET - os.environ['CC'] = CC - os.environ['CXX'] = CXX - - if os.path.exists(WORKDIR): - shutil.rmtree(WORKDIR) - os.mkdir(WORKDIR) - - os.environ['LC_ALL'] = 'C' - - # Then build third-party libraries such as sleepycat DB4. - buildLibraries() - - # Now build python itself - buildPython() - - # And then build the documentation - # Remove the Deployment Target from the shell - # environment, it's no longer needed and - # an unexpected build target can cause problems - # when Sphinx and its dependencies need to - # be (re-)installed. - del os.environ['MACOSX_DEPLOYMENT_TARGET'] - buildPythonDocs() - - - # Prepare the applications folder - folder = os.path.join(WORKDIR, "_root", "Applications", "Python %s"%( - getVersion(),)) - fn = os.path.join(folder, "License.rtf") - patchFile("resources/License.rtf", fn) - fn = os.path.join(folder, "ReadMe.rtf") - patchFile("resources/ReadMe.rtf", fn) - fn = os.path.join(folder, "Update Shell Profile.command") - patchScript("resources/update_shell_profile.command", fn) - fn = os.path.join(folder, "Install Certificates.command") - patchScript("resources/install_certificates.command", fn) - os.chmod(folder, STAT_0o755) - setIcon(folder, "../Icons/Python Folder.icns") - - # Create the installer - buildInstaller() - - # And copy the readme into the directory containing the installer - patchFile('resources/ReadMe.rtf', - os.path.join(WORKDIR, 'installer', 'ReadMe.rtf')) - - # Ditto for the license file. - patchFile('resources/License.rtf', - os.path.join(WORKDIR, 'installer', 'License.rtf')) - - fp = open(os.path.join(WORKDIR, 'installer', 'Build.txt'), 'w') - fp.write("# BUILD INFO\n") - fp.write("# Date: %s\n" % time.ctime()) - fp.write("# By: %s\n" % pwd.getpwuid(os.getuid()).pw_gecos) - fp.close() - - # And copy it to a DMG - buildDMG() - -if __name__ == "__main__": - main() diff --git a/Mac/BuildScript/resources/Conclusion.rtf b/Mac/BuildScript/resources/Conclusion.rtf deleted file mode 100644 index 9e0fa9fa6eeb73..00000000000000 --- a/Mac/BuildScript/resources/Conclusion.rtf +++ /dev/null @@ -1,20 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf200 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande-Bold;\f2\fnil\fcharset0 LucidaGrande; -\f3\fnil\fcharset0 Monaco;} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -\margl1440\margr1440\vieww10540\viewh8400\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\fs28 \cf0 Congratulations! -\fs24 -\f1\b\fs28 Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET -\f2\b0 was successfully installed. -\fs24 \ -\ -One more thing: to verify the identity of secure network connections, this Python needs a set of SSL root certificates. You can download and install a current curated set from {\field{\*\fldinst{HYPERLINK "https://pypi.org/project/certifi/"}}{\fldrslt the Certifi project}} by double-clicking on the -\f3 Install Certificates -\f2 icon in {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/"}}{\fldrslt the Finder window}}. See {\field{\*\fldinst{HYPERLINK "file://localhost/Applications/Python%20$VERSION/ReadMe.rtf"}}{\fldrslt the -\f3 ReadMe -\f2 file}} for more information.\ -} \ No newline at end of file diff --git a/Mac/BuildScript/resources/License.rtf b/Mac/BuildScript/resources/License.rtf deleted file mode 100644 index 1255d1ce48ed6c..00000000000000 --- a/Mac/BuildScript/resources/License.rtf +++ /dev/null @@ -1,164 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2513 -\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fmodern\fcharset0 CourierNewPS-BoldMT; -\f3\fmodern\fcharset0 CourierNewPSMT;} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -\margl1440\margr1440\vieww18500\viewh13520\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b\fs36 \cf0 \ul \ulc0 HISTORY AND LICENSE\ - -\fs24 \ -HISTORY OF THE SOFTWARE\ - -\f1\b0 \ulnone \ -Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others.\ -\ -In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see https://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software.\ -\ -In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see https://www.zope.dev). In 2001, the Python Software Foundation (PSF, see https://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.\ -\ -All Python releases are Open Source (see https://opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases.\ -\ - -\f2\b Release Derived Year Owner GPL-\ - from compatible?\ - -\f3\b0 \ -0.9.0 thru 1.2 n/a 1991-1995 CWI yes\ -1.3 thru 1.5.2 1.2 1995-1999 CNRI yes\ -1.6 1.5.2 2000 CNRI no\ -2.0 1.6 2000 BeOpen.com no\ -1.6.1 1.6 2001 CNRI no\ -2.1 2.0+1.6.1 2001 PSF no\ -2.0.1 2.0+1.6.1 2001 PSF yes\ -2.1.1 2.1+2.0.1 2001 PSF yes\ -2.1.2 2.1.1 2002 PSF yes\ -2.1.3 2.1.2 2002 PSF yes\ -2.2 and above 2.1.1 2001-now PSF yes\ - -\f1 \ - -\f0\b Note: -\f1\b0 GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.\ -\ -Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible.\ -\ -\ - -\f0\b \ul TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 \ulnone Python software and documentation are licensed under the Python Software Foundation License Version 2.\ -\ -Starting with Python 3.8.6, examples, recipes, and other code in the documentation are dual licensed under the PSF License Version 2 and the Zero-Clause BSD license.\ -\ -Some software incorporated into Python is under different licenses. The licenses are listed with code falling under that license.\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ - -\f0\b PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\ - -\f1\b0 \ -1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.\ -\ -2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright \'a9 2001-2020 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.\ -\ -3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.\ -\ -4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\ -\ -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\ -\ -6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\ -\ -7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.\ -\ -8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement.\ -\ -\ - -\f0\b BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\ - -\f1\b0 \ -BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\ -\ -1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software").\ -\ -2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee.\ -\ -3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\ -\ -4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\ -\ -5. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\ -\ -6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page.\ -\ -7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement.\ -\ -\ - -\f0\b CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\ - -\f1\b0 \ -1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation.\ -\ -2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the internet using the following URL: http://hdl.handle.net/1895.22/1013".\ -\ -3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1.\ -\ -4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\ -\ -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\ -\ -6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\ -\ -7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.\ -\ -8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement.\ -\ - ACCEPT\ -\ -\ - -\f0\b CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\ - -\f1\b0 \ -Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.\ -\ -Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.\ -\ -STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\ -\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b \cf0 ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 \ -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.\ -\ -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ -\ - -\f0\b \ul LICENSES AND ACKNOWLEDGEMENTS FOR INCORPORATED SOFTWARE\ - -\f1\b0 \ulnone \ -This installer incorporates portions of the following third-party software:\ -\ - -\f3 $THIRD_PARTY_LIBS\ -\ - -\f1 For licenses and acknowledgements for these and other third-party software incorporated in this Python distribution, please refer to the on-line documentation {\field{\*\fldinst{HYPERLINK "https://docs.python.org/$VERSION/license.html#licenses-and-acknowledgements-for-incorporated-software"}}{\fldrslt here}}.\ -\ -\ -\ -\ -} diff --git a/Mac/BuildScript/resources/ReadMe.rtf b/Mac/BuildScript/resources/ReadMe.rtf deleted file mode 100644 index ee5ba4707dfea4..00000000000000 --- a/Mac/BuildScript/resources/ReadMe.rtf +++ /dev/null @@ -1,87 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2761 -\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;\f2\fswiss\fcharset0 Helvetica-Oblique; -\f3\fmodern\fcharset0 CourierNewPSMT;\f4\fmodern\fcharset0 Courier;} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -\margl1440\margr1440\vieww13380\viewh14580\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\fs24 \cf0 This package will install Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0 - -\f1\b \cf0 NOTE: -\f0\b0 This is a beta preview of Python 3.13.0, the next feature release of Python 3. It is not intended for production use.\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1\b \cf0 \ul \ulc0 Certificate verification and OpenSSL\ - -\f0\b0 \ulnone \ -This package includes its own private copy of OpenSSL 3.0. The trust certificates in system and user keychains managed by the -\f2\i Keychain Access -\f0\i0 application and the -\f2\i security -\f0\i0 command line utility are not used as defaults by the Python -\f3 ssl -\f0 module. A sample command script is included in -\f3 /Applications/Python 3.13 -\f0 to install a curated bundle of default root certificates from the third-party -\f3 certifi -\f0 package ({\field{\*\fldinst{HYPERLINK "https://pypi.org/project/certifi/"}}{\fldrslt https://pypi.org/project/certifi/}}). Double-click on -\f3 Install Certificates -\f0 to run it.\ -\ -The bundled -\f3 pip -\f0 has its own default certificate store for verifying download connections.\ -\ - -\f1\b \ul Install Options\ - -\f0\b0 \ulnone \ -You can control some aspects of what is installed by this package. To see the options, click on the -\f4 Customize -\f0 button in the -\f4 Installation Type -\f0 step of the macOS installer app. Click on a package name in the list shown to see more information about that option,\ - \ - -\f1\b \ul Using IDLE or other Tk applications -\f0\b0 \ulnone \ -\ -This package includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.\ -\ -Due to new security checks on macOS 10.15 Catalina, when launching IDLE macOS may open a window with a message -\f1\b "Python" would like to access files in your Documents folder -\f0\b0 . This is normal as IDLE uses your -\f1\b Documents -\f0\b0 folder as its default when opening and saving files; you can still choose other locations in the -\f1\b Open -\f0\b0 and -\f1\b Save -\f0\b0 file dialog windows. Click on the -\f1\b OK -\f0\b0 button to proceed.\ -\ - -\f1\b \ul Apple Silicon Mac support\ - -\f0\b0 \ulnone \ -On Apple Silicon Macs, it is possible to run Python either with native ARM64 code or under Intel 64 emulation using Rosetta2. This option might be useful for testing or if binary wheels are not yet available with native ARM64 binaries. To easily force Python to run in emulation mode, invoke it from a command line shell with the -\f4 python3-intel64 -\f0 command instead of just -\f4 python3 -\f0 .\ - -\f1\b \ul \ -Other changes\ - -\f0\b0 \ulnone \ -For other changes in this release, see the -\f2\i What's new -\f0\i0 section in the {\field{\*\fldinst{HYPERLINK "https://www.python.org/doc/"}}{\fldrslt Documentation Set}} for this release and its -\f2\i Release Notes -\f0\i0 link at {\field{\*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt https://www.python.org/downloads/}}.\ -} \ No newline at end of file diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf deleted file mode 100644 index 49d6e22286be26..00000000000000 --- a/Mac/BuildScript/resources/Welcome.rtf +++ /dev/null @@ -1,30 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2761 -\cocoascreenfonts1\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;\f2\fmodern\fcharset0 CourierNewPSMT; -} -{\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} -\margl1440\margr1440\vieww12200\viewh10880\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0 - -\f0\fs24 \cf0 This package will install -\f1\b Python $FULL_VERSION -\f0\b0 for -\f1\b macOS $MACOSX_DEPLOYMENT_TARGET -\f0\b0 .\ -\ - -\f1\b Python for macOS -\f0\b0 consists of the {\field{\*\fldinst{HYPERLINK "https://www.python.org"}}{\fldrslt Python}} programming language interpreter and its batteries-included standard library to allow easy access to macOS features. It also includes the Python integrated development environment, -\f1\b IDLE -\f0\b0 . You can also use the included -\f1\b pip -\f0\b0 to download and install third-party packages from the {\field{\*\fldinst{HYPERLINK "https://pypi.org"}}{\fldrslt Python Package Index}}. \ -\ -At the end of this install, click on -\f2 Install Certificates -\f0 to install a set of current SSL root certificates.\ -\ - -\f1\b NOTE: -\f0\b0 This is a beta test preview of Python 3.13.0, the next feature release of Python 3. It is not intended for production use.\ -} \ No newline at end of file diff --git a/Mac/BuildScript/resources/background.jpg b/Mac/BuildScript/resources/background.jpg deleted file mode 100644 index b3c76406cf4a26..00000000000000 Binary files a/Mac/BuildScript/resources/background.jpg and /dev/null differ diff --git a/Mac/BuildScript/resources/install_certificates.command b/Mac/BuildScript/resources/install_certificates.command deleted file mode 100755 index 700eb462b68c18..00000000000000 --- a/Mac/BuildScript/resources/install_certificates.command +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -/Library/Frameworks/Python.framework/Versions/@PYVER@/bin/python@PYVER@ << "EOF" - -# install_certifi.py -# -# sample script to install or update a set of default Root Certificates -# for the ssl module. Uses the certificates provided by the certifi package: -# https://pypi.org/project/certifi/ - -import os -import os.path -import ssl -import stat -import subprocess -import sys - -STAT_0o775 = ( stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR - | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP - | stat.S_IROTH | stat.S_IXOTH ) - -def main(): - openssl_dir, openssl_cafile = os.path.split( - ssl.get_default_verify_paths().openssl_cafile) - - print(" -- pip install --upgrade certifi") - subprocess.check_call([sys.executable, - "-E", "-s", "-m", "pip", "install", "--upgrade", "certifi", - "--disable-pip-version-check"]) - - import certifi - - # change working directory to the default SSL directory - os.chdir(openssl_dir) - relpath_to_certifi_cafile = os.path.relpath(certifi.where()) - print(" -- removing any existing file or link") - try: - os.remove(openssl_cafile) - except FileNotFoundError: - pass - print(" -- creating symlink to certifi certificate bundle") - os.symlink(relpath_to_certifi_cafile, openssl_cafile) - print(" -- setting permissions") - os.chmod(openssl_cafile, STAT_0o775) - print(" -- update complete") - -if __name__ == '__main__': - main() -EOF diff --git a/Mac/BuildScript/resources/update_shell_profile.command b/Mac/BuildScript/resources/update_shell_profile.command deleted file mode 100755 index 3cf4d74de9f09a..00000000000000 --- a/Mac/BuildScript/resources/update_shell_profile.command +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh - -echo "This script will update your shell profile when the 'bin' directory" -echo "of python is not early enough of the PATH of your shell." -echo "These changes will be effective only in shell windows that you open" -echo "after running this script." - -PYVER=@PYVER@ -PYTHON_ROOT="/Library/Frameworks/Python.framework/Versions/@PYVER@" - -if [ `id -ur` = 0 ]; then - # Run from the installer, do some trickery to fetch the information - # we need. - theShell="`finger $USER | grep Shell: | head -1 | awk '{ print $NF }'`" - -else - theShell="${SHELL}" -fi - -# Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH. -BSH="`basename "${theShell}"`" -case "${BSH}" in -bash|ksh|sh|*csh|zsh|fish) - if [ `id -ur` = 0 ]; then - P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'` - else - P="`(exec -l ${theShell} -c 'echo $PATH')`" - fi - ;; -*) - echo "Sorry, I don't know how to patch $BSH shells" - exit 0 - ;; -esac - -# Now ensure that our bin directory is on $P and before /usr/bin at that -for elem in `echo $P | tr ':' ' '` -do - if [ "${elem}" = "${PYTHON_ROOT}/bin" ]; then - echo "All right, you're a python lover already" - exit 0 - elif [ "${elem}" = "/usr/bin" ]; then - break - fi -done - -echo "${PYTHON_ROOT}/bin is not on your PATH or at least not early enough" -case "${BSH}" in -*csh) - if [ -f "${HOME}/.tcshrc" ]; then - RC="${HOME}/.tcshrc" - else - RC="${HOME}/.cshrc" - fi - # Create backup copy before patching - if [ -f "${RC}" ]; then - cp -fp "${RC}" "${RC}.pysave" - fi - echo "" >> "${RC}" - echo "# Setting PATH for Python ${PYVER}" >> "${RC}" - echo "# The original version is saved in .cshrc.pysave" >> "${RC}" - echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${RC}" - if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${RC}" - fi - exit 0 - ;; -bash) - if [ -e "${HOME}/.bash_profile" ]; then - PR="${HOME}/.bash_profile" - elif [ -e "${HOME}/.bash_login" ]; then - PR="${HOME}/.bash_login" - elif [ -e "${HOME}/.profile" ]; then - PR="${HOME}/.profile" - else - PR="${HOME}/.bash_profile" - fi - ;; -fish) - CONFIG_DIR="${HOME}/.config/fish/conf.d/" - RC="${CONFIG_DIR}/python-${PYVER}.fish" - mkdir -p "$CONFIG_DIR" - if [ -f "${RC}" ]; then - cp -fp "${RC}" "${RC}.pysave" - fi - echo "# Setting PATH for Python ${PYVER}" > "${RC}" - if [ -f "${RC}.pysave" ]; then - echo "# The original version is saved in ${RC}.pysave" >> "${RC}" - fi - echo "fish_add_path -g \"${PYTHON_ROOT}/bin\"" >> "${RC}" - if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${RC}" - fi - exit 0 - ;; -zsh) - PR="${HOME}/.zprofile" - ;; -*sh) - PR="${HOME}/.profile" - ;; -esac - -# Create backup copy before patching -if [ -f "${PR}" ]; then - cp -fp "${PR}" "${PR}.pysave" -fi -echo "" >> "${PR}" -echo "# Setting PATH for Python ${PYVER}" >> "${PR}" -echo "# The original version is saved in `basename ${PR}`.pysave" >> "${PR}" -echo 'PATH="'"${PYTHON_ROOT}/bin"':${PATH}"' >> "${PR}" -echo 'export PATH' >> "${PR}" -if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${PR}" -fi -exit 0 diff --git a/Mac/BuildScript/scripts/postflight.documentation b/Mac/BuildScript/scripts/postflight.documentation deleted file mode 100755 index ec48599cba76e1..00000000000000 --- a/Mac/BuildScript/scripts/postflight.documentation +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -PYVER="@PYVER@" -FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" -FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation" -FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}" -APPDIR="/Applications/Python ${PYVER}" -SHARE_DIR="${FWK}/share" -SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}" -SHARE_DOCDIR_TO_FWK="../../.." - -# make link in /Applications/Python m.n/ for Finder users -if [ -d "${APPDIR}" ]; then - ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html" - if [ "${COMMAND_LINE_INSTALL}" != 1 ]; then - open "${APPDIR}" || true # open the applications folder - fi -fi - -# make share/doc link in framework for command line users -if [ -d "${SHARE_DIR}" ]; then - mkdir -m 775 -p "${SHARE_DOCDIR}" - # make relative link to html doc directory - ln -fhs "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html" -fi - diff --git a/Mac/BuildScript/scripts/postflight.ensurepip b/Mac/BuildScript/scripts/postflight.ensurepip deleted file mode 100755 index ce3c6c1c2bf9e6..00000000000000 --- a/Mac/BuildScript/scripts/postflight.ensurepip +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# Install/upgrade pip. -# - -PYVER="@PYVER@" -PYMAJOR="@PYMAJOR@" -FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" -RELFWKBIN="../../..${FWK}/bin" - -umask 022 - -"${FWK}/bin/python${PYVER}" -E -s -m ensurepip --upgrade - -# bpo-33290: An earlier "pip3 install --upgrade pip" may have installed -# a "pip" in the fw bin directory. For a py3 install, remove it. - -rm -f "${FWK}/bin/pip" - -"${FWK}/bin/python${PYVER}" -E -s -Wi \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x badsyntax \ - "${FWK}/lib/python${PYVER}/site-packages" - -"${FWK}/bin/python${PYVER}" -E -s -Wi -O \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x badsyntax \ - "${FWK}/lib/python${PYVER}/site-packages" - -chgrp -R admin "${FWK}/lib/python${PYVER}/site-packages" "${FWK}/bin" -chmod -R g+w "${FWK}/lib/python${PYVER}/site-packages" "${FWK}/bin" - -# We do not know if the user selected the Python command-line tools -# package that installs symlinks to /usr/local/bin. So we assume -# that the command-line tools package has already completed or was -# not selected and we will only install /usr/local/bin symlinks for -# pip et al if there are /usr/local/bin/python* symlinks to our -# framework bin directory. - -if [ -d /usr/local/bin ] ; then - ( - install_links_if_our_fw() { - if [ "$(readlink -n ./$1)" = "${RELFWKBIN}/$1" ] ; then - shift - for fn ; - do - if [ -e "${RELFWKBIN}/${fn}" ] ; then - rm -f ./${fn} - ln -s "${RELFWKBIN}/${fn}" "./${fn}" - chgrp -h admin "./${fn}" - chmod -h g+w "./${fn}" - fi - done - fi - } - - cd /usr/local/bin - - # Create pipx.y links if /usr/local/bin/pythonx.y - # is linked to this framework version - install_links_if_our_fw "python${PYVER}" \ - "pip${PYVER}" - - # Create pipx link if /usr/local/bin/pythonx is linked to this version - install_links_if_our_fw "python${PYMAJOR}" \ - "pip${PYMAJOR}" - - # Create pip link if /usr/local/bin/python - # is linked to this version - install_links_if_our_fw "python" \ - "pip" - ) -fi -exit 0 diff --git a/Mac/BuildScript/scripts/postflight.framework b/Mac/BuildScript/scripts/postflight.framework deleted file mode 100755 index 411fda13b89559..00000000000000 --- a/Mac/BuildScript/scripts/postflight.framework +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# Recompile the .py files. -# - -PYVER="@PYVER@" -FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" - -"${FWK}/bin/python@PYVER@" -E -s -Wi \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x 'bad_coding|badsyntax|site-packages' \ - "${FWK}/lib/python${PYVER}" - -"${FWK}/bin/python@PYVER@" -E -s -Wi -O \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x 'bad_coding|badsyntax|site-packages' \ - "${FWK}/lib/python${PYVER}" - -"${FWK}/bin/python@PYVER@" -E -s -Wi \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x badsyntax \ - "${FWK}/lib/python${PYVER}/site-packages" - -"${FWK}/bin/python@PYVER@" -E -s -Wi -O \ - "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \ - -f -x badsyntax \ - "${FWK}/lib/python${PYVER}/site-packages" - -chgrp -R admin "${FWK}" -chmod -R g+w "${FWK}" - -exit 0 diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile deleted file mode 100755 index ce8720f895d1b5..00000000000000 --- a/Mac/BuildScript/scripts/postflight.patch-profile +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -PYVER=@PYVER@ -PYTHON_ROOT="/Library/Frameworks/Python.framework/Versions/@PYVER@" - - -# Run from the installer, do some trickery to fetch the information -# we need. -theShell="`finger $USER | grep Shell: | head -1 | awk '{ print $NF }'`" - -# Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH. -BSH="`basename "${theShell}"`" -case "${BSH}" in -bash|ksh|sh|*csh|zsh|fish) - true - ;; -*) - exit 0 - ;; -esac - -case "${BSH}" in -*csh) - if [ -f "${HOME}/.tcshrc" ]; then - RC="${HOME}/.tcshrc" - else - RC="${HOME}/.cshrc" - fi - - # Drop privileges while writing files. - su -m ${USER} <> "${RC}" - echo "# Setting PATH for Python ${PYVER}" >> "${RC}" - echo "# The original version is saved in .cshrc.pysave" >> "${RC}" - echo "set path=(${PYTHON_ROOT}/bin "'\$path'")" >> "${RC}" -EOFC - - if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${RC}" - fi - exit 0 - ;; -bash) - if [ -e "${HOME}/.bash_profile" ]; then - PR="${HOME}/.bash_profile" - elif [ -e "${HOME}/.bash_login" ]; then - PR="${HOME}/.bash_login" - elif [ -e "${HOME}/.profile" ]; then - PR="${HOME}/.profile" - else - PR="${HOME}/.bash_profile" - fi - ;; -fish) - CONFIG_DIR="${HOME}/.config/fish/conf.d/" - RC="${CONFIG_DIR}/python-${PYVER}.fish" - - # Drop privileges while writing files. - su -m ${USER} < "${RC}" - if [ -f "${RC}.pysave" ]; then - echo "# The original version is saved in ${RC}.pysave" >> "${RC}" - fi - echo "fish_add_path -g \"${PYTHON_ROOT}/bin\"" >> "${RC}" -EOFF - - if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${RC}" - fi - exit 0 - ;; -zsh) - PR="${HOME}/.zprofile" - ;; -*sh) - PR="${HOME}/.profile" - ;; -esac - -# Drop privileges while writing files. -su -m ${USER} <> "${PR}" -echo "# Setting PATH for Python ${PYVER}" >> "${PR}" -echo "# The original version is saved in `basename ${PR}`.pysave" >> "${PR}" -echo 'PATH="'"${PYTHON_ROOT}/bin"':\${PATH}"' >> "${PR}" -echo 'export PATH' >> "${PR}" -EOFS - -if [ `id -ur` = 0 ]; then - chown -h "${USER}" "${PR}" -fi -exit 0 diff --git a/Mac/BuildScript/seticon.m b/Mac/BuildScript/seticon.m deleted file mode 100644 index 04e3d7dbdb468f..00000000000000 --- a/Mac/BuildScript/seticon.m +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Simple tool for setting an icon on a file. - */ -#import -#include - -int main(int argc, char** argv) -{ - if (argc != 3) { - fprintf(stderr, "Usage: seticon ICON TARGET"); - return 1; - } - - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSString* iconPath = [NSString stringWithUTF8String:argv[1]]; - NSString* filePath = [NSString stringWithUTF8String:argv[2]]; - - [NSApplication sharedApplication]; - - [[NSWorkspace sharedWorkspace] - setIcon: [[NSImage alloc] initWithContentsOfFile: iconPath] - forFile: filePath - options: 0]; - [pool release]; - return 0; -} diff --git a/Mac/BuildScript/tk868_on_10_8_10_9.patch b/Mac/BuildScript/tk868_on_10_8_10_9.patch deleted file mode 100644 index 8fe10604a68cb8..00000000000000 --- a/Mac/BuildScript/tk868_on_10_8_10_9.patch +++ /dev/null @@ -1,18 +0,0 @@ -Fix build failure with +quartz variant on OS X 10.8 and 10.9. -Even though Gestalt was deprecated in OS X 10.8, it should work fine -through OS X 10.9, and its replacement NSOperatingSystemVersion was -not introduced until OS X 10.10. - -Patch from MacPorts project and reported upstream: -https://trac.macports.org/ticket/55649 ---- tk8.6.8/macosx/tkMacOSXXStubs.c.orig 2017-12-06 09:25:08.000000000 -0600 -+++ tk8.6.8-patched/macosx/tkMacOSXXStubs.c 2018-01-06 19:34:17.000000000 -0600 -@@ -175,7 +175,7 @@ - { - int major, minor, patch; - --#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080 -+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000 - Gestalt(gestaltSystemVersionMajor, (SInt32*)&major); - Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor); - Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch); diff --git a/Mac/Extras.install.py b/Mac/Extras.install.py deleted file mode 100644 index 41bfa53d616307..00000000000000 --- a/Mac/Extras.install.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Recursively copy a directory but skip undesired files and -directories (CVS, backup files, pyc files, etc)""" - -import sys -import os -import shutil - -verbose = 1 -debug = 0 - -def isclean(name): - if name in ('CVS', '.cvsignore', '.svn'): - return 0 - if name.lower() == '.ds_store': return 0 - if name.endswith('~'): return 0 - if name.endswith('.BAK'): return 0 - if name.endswith('.pyc'): return 0 - if name.endswith('.pyo'): return 0 - if name.endswith('.orig'): return 0 - return 1 - -def copycleandir(src, dst): - for cursrc, dirs, files in os.walk(src): - assert cursrc.startswith(src) - curdst = dst + cursrc[len(src):] - if verbose: - print("mkdir", curdst) - if not debug: - if not os.path.exists(curdst): - os.makedirs(curdst) - for fn in files: - if isclean(fn): - if verbose: - print("copy", os.path.join(cursrc, fn), os.path.join(curdst, fn)) - if not debug: - shutil.copy2(os.path.join(cursrc, fn), os.path.join(curdst, fn)) - else: - if verbose: - print("skipfile", os.path.join(cursrc, fn)) - for i in range(len(dirs)-1, -1, -1): - if not isclean(dirs[i]): - if verbose: - print("skipdir", os.path.join(cursrc, dirs[i])) - del dirs[i] - -def main(): - if len(sys.argv) != 3: - sys.stderr.write("Usage: %s srcdir dstdir\n" % sys.argv[0]) - sys.exit(1) - copycleandir(sys.argv[1], sys.argv[2]) - -if __name__ == '__main__': - main() diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist deleted file mode 100644 index 8549e405e2a65a..00000000000000 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ /dev/null @@ -1,62 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - py - pyi - pyw - - CFBundleTypeIconFile - PythonSource.icns - CFBundleTypeName - Python Script - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - pyc - pyo - - CFBundleTypeIconFile - PythonCompiled.icns - CFBundleTypeName - Python Bytecode Document - CFBundleTypeRole - Editor - - - CFBundleExecutable - IDLE - CFBundleGetInfoString - %version%, © 2001-2024 Python Software Foundation - CFBundleIconFile - IDLE.icns - CFBundleIdentifier - org.python.IDLE - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - IDLE - CFBundlePackageType - APPL - CFBundleShortVersionString - %version% - CFBundleSignature - ???? - CFBundleVersion - %version% - NSHighResolutionCapable - - CFBundleAllowMixedLocalizations - - - diff --git a/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE b/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE deleted file mode 100755 index 61b02fff6bddb2..00000000000000 --- a/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE +++ /dev/null @@ -1,23 +0,0 @@ -#!%prefix%/Resources/Python.app/Contents/MacOS/%exe% - -import sys, os -execdir = os.path.dirname(sys.argv[0]) -executable = os.path.join(execdir, "Python") -resdir = os.path.join(os.path.dirname(execdir), "Resources") -libdir = os.path.join(os.path.dirname(execdir), "Frameworks") -mainprogram = os.path.join(resdir, "idlemain.py") - -sys.argv.insert(1, mainprogram) -if 0 or 0: - os.environ["PYTHONPATH"] = resdir - if 0: - os.environ["PYTHONHOME"] = resdir -else: - pypath = os.getenv("PYTHONPATH", "") - if pypath: - pypath = ":" + pypath - os.environ["PYTHONPATH"] = resdir + pypath -os.environ["PYTHONEXECUTABLE"] = executable -os.environ["DYLD_LIBRARY_PATH"] = libdir -os.environ["DYLD_FRAMEWORK_PATH"] = libdir -os.execve(executable, sys.argv, os.environ) diff --git a/Mac/IDLE/IDLE.app/Contents/PkgInfo b/Mac/IDLE/IDLE.app/Contents/PkgInfo deleted file mode 100644 index bd04210fb49f60..00000000000000 --- a/Mac/IDLE/IDLE.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns b/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns deleted file mode 100644 index c12c9da52aa655..00000000000000 Binary files a/Mac/IDLE/IDLE.app/Contents/Resources/IDLE.icns and /dev/null differ diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns b/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns deleted file mode 100644 index 7d9f3202c7e534..00000000000000 Binary files a/Mac/IDLE/IDLE.app/Contents/Resources/PythonCompiled.icns and /dev/null differ diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns b/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns deleted file mode 100644 index 9e35c1ecbe9507..00000000000000 Binary files a/Mac/IDLE/IDLE.app/Contents/Resources/PythonSource.icns and /dev/null differ diff --git a/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py b/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py deleted file mode 100644 index ccc18d4aee4386..00000000000000 --- a/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py +++ /dev/null @@ -1,73 +0,0 @@ -""" -Bootstrap script for IDLE as an application bundle. -""" -import sys, os - -# Change the current directory the user's home directory, that way we'll get -# a more useful default location in the open/save dialogs. -os.chdir(os.path.expanduser('~/Documents')) - - -# Make sure sys.executable points to the python interpreter inside the -# framework, instead of at the helper executable inside the application -# bundle (the latter works, but doesn't allow access to the window server) -# -# .../IDLE.app/ -# Contents/ -# MacOS/ -# IDLE (a python script) -# Python{-32} (symlink) -# Resources/ -# idlemain.py (this module) -# ... -# -# ../IDLE.app/Contents/MacOS/Python{-32} is symlinked to -# ..Library/Frameworks/Python.framework/Versions/m.n -# /Resources/Python.app/Contents/MacOS/Python{-32} -# which is the Python interpreter executable -# -# The flow of control is as follows: -# 1. IDLE.app is launched which starts python running the IDLE script -# 2. IDLE script exports -# PYTHONEXECUTABLE = .../IDLE.app/Contents/MacOS/Python{-32} -# (the symlink to the framework python) -# 3. IDLE script alters sys.argv and uses os.execve to replace itself with -# idlemain.py running under the symlinked python. -# This is the magic step. -# 4. During interpreter initialization, because PYTHONEXECUTABLE is defined, -# sys.executable may get set to an useless value. -# -# (Note that the IDLE script and the setting of PYTHONEXECUTABLE is -# generated automatically by bundlebuilder in the Python 2.x build. -# Also, IDLE invoked via command line, i.e. bin/idle, bypasses all of -# this.) -# -# Now fix up the execution environment before importing idlelib. - -# Reset sys.executable to its normal value, the actual path of -# the interpreter in the framework, by following the symlink -# exported in PYTHONEXECUTABLE. -pyex = os.environ['PYTHONEXECUTABLE'] -sys.executable = os.path.join(sys.prefix, 'bin', 'python%d.%d'%(sys.version_info[:2])) - -# Remove any sys.path entries for the Resources dir in the IDLE.app bundle. -p = pyex.partition('.app') -if p[2].startswith('/Contents/MacOS/Python'): - sys.path = [value for value in sys.path if - value.partition('.app') != (p[0], p[1], '/Contents/Resources')] - -# Unexport PYTHONEXECUTABLE so that the other Python processes started -# by IDLE have a normal sys.executable. -del os.environ['PYTHONEXECUTABLE'] - -# Look for the -psn argument that the launcher adds and remove it, it will -# only confuse the IDLE startup code. -for idx, value in enumerate(sys.argv): - if value.startswith('-psn_'): - del sys.argv[idx] - break - -# Now it is safe to import idlelib. -from idlelib.pyshell import main -if __name__ == '__main__': - main() diff --git a/Mac/Icons/Disk Image.icns b/Mac/Icons/Disk Image.icns deleted file mode 100644 index 35f16bf6e50758..00000000000000 Binary files a/Mac/Icons/Disk Image.icns and /dev/null differ diff --git a/Mac/Icons/IDLE.icns b/Mac/Icons/IDLE.icns deleted file mode 100644 index c12c9da52aa655..00000000000000 Binary files a/Mac/Icons/IDLE.icns and /dev/null differ diff --git a/Mac/Icons/Python Folder.icns b/Mac/Icons/Python Folder.icns deleted file mode 100644 index 3658f5e88a2ba7..00000000000000 Binary files a/Mac/Icons/Python Folder.icns and /dev/null differ diff --git a/Mac/Icons/PythonCompiled.icns b/Mac/Icons/PythonCompiled.icns deleted file mode 100644 index 7d9f3202c7e534..00000000000000 Binary files a/Mac/Icons/PythonCompiled.icns and /dev/null differ diff --git a/Mac/Icons/PythonLauncher.icns b/Mac/Icons/PythonLauncher.icns deleted file mode 100644 index e09fd381e4dfb8..00000000000000 Binary files a/Mac/Icons/PythonLauncher.icns and /dev/null differ diff --git a/Mac/Icons/PythonSource.icns b/Mac/Icons/PythonSource.icns deleted file mode 100644 index 9e35c1ecbe9507..00000000000000 Binary files a/Mac/Icons/PythonSource.icns and /dev/null differ diff --git a/Mac/Icons/ReadMe.txt b/Mac/Icons/ReadMe.txt deleted file mode 100644 index 226836abd73240..00000000000000 --- a/Mac/Icons/ReadMe.txt +++ /dev/null @@ -1,3 +0,0 @@ -The icons for use on MacOS X were created by Jacob Rus -with some feedback from the folks on pythonmac-sig@python.org. - diff --git a/Mac/Makefile.in b/Mac/Makefile.in deleted file mode 100644 index 32e3a0f55c5d71..00000000000000 --- a/Mac/Makefile.in +++ /dev/null @@ -1,276 +0,0 @@ -# This file can be invoked from the various frameworkinstall... targets in the -# main Makefile. The next couple of variables are overridden on the -# commandline in that case. - -VERSION=@VERSION@ -ABIFLAGS=@ABIFLAGS@ -LDVERSION=@LDVERSION@ -ENSUREPIP=@ENSUREPIP@ -builddir = .. -srcdir=@srcdir@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -LIBDEST=$(prefix)/lib/python$(VERSION) -RUNSHARED=@RUNSHARED@ -BUILDEXE=@BUILDEXEEXT@ -BUILDPYTHON=$(builddir)/python$(BUILDEXE) -DESTDIR= -LDFLAGS=@LDFLAGS@ -FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@ -PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ -PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ -LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ -LIPO_INTEL64_FLAGS=@LIPO_INTEL64_FLAGS@ -CC=@CC@ -MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ -export MACOSX_DEPLOYMENT_TARGET - - - -# These are normally glimpsed from the previous set -BINDIR= @bindir@ -PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) -APPINSTALLDIR=$(prefix)/Resources/Python.app - -# Variables for installing the "normal" unix binaries -INSTALLED_PYTHONAPP=$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK) - -# Items more-or-less copied from the main Makefile -DIRMODE=755 -FILEMODE=644 -INSTALL=@INSTALL@ -INSTALL_SYMLINK=ln -fsn -INSTALL_PROGRAM=@INSTALL_PROGRAM@ -INSTALL_SCRIPT= @INSTALL_SCRIPT@ -INSTALL_DATA=@INSTALL_DATA@ -LN=@LN@ -STRIPFLAG=-s -CPMAC=CpMac - -APPTEMPLATE=$(srcdir)/Resources/app -APPSUBDIRS=MacOS Resources -compileall=$(srcdir)/../Lib/compileall.py - -installapps: install_Python install_PythonLauncher install_IDLE - -# -# Install unix tools in /usr/local/bin. These are just aliases for the -# actual installation inside the framework. -# -installunixtools: - if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ - $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ - fi - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - idle3 \ - pydoc3 \ - python3 \ - python3-config \ - ; \ - do \ - rm -f $${fn} ; \ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done - -if test "x$(VERSION)" != "x$(LDVERSION)"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python$(VERSION)-config \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python3-32 \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(LIPO_INTEL64_FLAGS)" != "x"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python3-intel64 \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(ENSUREPIP)" != "xno" ; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - pip3 \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -# -# Like installunixtools, but only install links to the versioned binaries. -# -altinstallunixtools: - if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \ - $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\ - fi - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - idle$(VERSION) \ - pydoc$(VERSION) \ - python$(VERSION) \ - python$(LDVERSION)-config \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done - -if test "x$(VERSION)" != "x$(LDVERSION)"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python$(LDVERSION) \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python$(VERSION)-32 \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(LIPO_INTEL64_FLAGS)" != "x"; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - python$(VERSION)-intel64 \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -if test "x$(ENSUREPIP)" != "xno" ; then \ - cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \ - for fn in \ - pip$(VERSION) \ - ; \ - do \ - rm -f $${fn} ;\ - $(LN) -s $(BINDIR)/$${fn} $${fn} ;\ - done ;\ - fi - -pythonw: $(srcdir)/Tools/pythonw.c Makefile - $(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ \ - $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include \ - ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK) - -install_PythonLauncher: - cd PythonLauncher && make install DESTDIR=$(DESTDIR) - -install_Python: - @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \ - if test ! -d "$(DESTDIR)$$i"; then \ - echo "Creating directory $(DESTDIR)$$i"; \ - $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$$i"; \ - fi;\ - done - @for i in $(APPSUBDIRS); do \ - if test ! -d "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; then \ - echo "Creating directory $(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ - $(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(APPINSTALLDIR)/Contents/$$i"; \ - else true; \ - fi; \ - done - @for d in . $(APPSUBDIRS); \ - do \ - a=$(APPTEMPLATE)/$$d; \ - if test ! -d $$a; then continue; else true; fi; \ - b="$(DESTDIR)$(APPINSTALLDIR)/Contents/$$d"; \ - for i in $$a/*; \ - do \ - case $$i in \ - *CVS) ;; \ - *.svn) ;; \ - *.py[co]) ;; \ - *.orig) ;; \ - *~) ;; \ - *idx) \ - echo $(CPMAC) "$$i" $$b; \ - $(CPMAC) "$$i" "$$b"; \ - ;; \ - *) \ - if test -d $$i; then continue; fi; \ - if test -x $$i; then \ - echo $(INSTALL_SCRIPT) "$$i" "$$b"; \ - $(INSTALL_SCRIPT) "$$i" "$$b"; \ - else \ - echo $(INSTALL_DATA) "$$i" "$$b"; \ - $(INSTALL_DATA) "$$i" "$$b"; \ - fi;; \ - esac; \ - done; \ - done - $(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)" - sed -e "s!%bundleid%!$(PYTHONFRAMEWORKIDENTIFIER)!g" \ - -e "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) \ - -c 'import platform; print(platform.python_version())'`!g" \ - < "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" \ - > "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist" - rm "$(DESTDIR)$(APPINSTALLDIR)/Contents/Info.plist.in" - - -install_IDLE: - test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" - -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -rf "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" - /bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)" - ln -sf "$(INSTALLED_PYTHONAPP)" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" - sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" - sed "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`!g" < "$(srcdir)/IDLE/IDLE.app/Contents/Info.plist" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/Info.plist" - if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \ - /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" \ - "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ - sed -e 's!name= IDLE Classic Windows!name= IDLE Classic OSX!g' \ - < "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" \ - > "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ; \ - rm "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def~" ; \ - fi - if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ]; then \ - /bin/cp -p "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" \ - "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ - sed -e 's!zoom-height=!zoom-height=!g' \ - -e 's! "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def" ; \ - rm "$(DESTDIR)$(LIBDEST)/idlelib/config-extensions.def~" ; \ - fi - touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" - chmod -R ugo+rX,go-w "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" - chmod ugo+x "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE" - -$(INSTALLED_PYTHONAPP): install_Python - -installextras: $(srcdir)/Extras.install.py - $(INSTALL) -d "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples" - $(RUNSHARED) $(BUILDPYTHON) $(srcdir)/Extras.install.py $(srcdir)/../Tools \ - "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples/Tools" ; \ - chmod -R ugo+rX,go-w "$(DESTDIR)$(prefix)/share/doc/python$(VERSION)/examples/Tools" - -clean: - rm pythonw - cd PythonLauncher && make clean - -Makefile: $(srcdir)/Makefile.in ../config.status - cd .. && CONFIG_FILES=Mac/Makefile CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/Mac/PythonLauncher/English.lproj/Credits.rtf b/Mac/PythonLauncher/English.lproj/Credits.rtf deleted file mode 100644 index 930ca221a128b0..00000000000000 --- a/Mac/PythonLauncher/English.lproj/Credits.rtf +++ /dev/null @@ -1,30 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf100 -{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\f1\b0 \ - Jack Jansen\ -\ - -\f0\b Human Interface Design: -\f1\b0 \ - Jack Jansen\ -\ - -\f0\b Testing: -\f1\b0 \ - Jack Jansen\ - Pythonmac-SIG@python.org\ -\ - -\f0\b Documentation: -\f1\b0 \ - Missing\ -\ - -\f0\b With special thanks to: -\f1\b0 \ - Guido, of course\ -} \ No newline at end of file diff --git a/Mac/PythonLauncher/English.lproj/MainMenu.nib/classes.nib b/Mac/PythonLauncher/English.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 47b40aba31c185..00000000000000 --- a/Mac/PythonLauncher/English.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,12 +0,0 @@ -{ - IBClasses = ( - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - { - ACTIONS = {showPreferences = id; }; - CLASS = MyAppDelegate; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/Mac/PythonLauncher/English.lproj/MainMenu.nib/info.nib b/Mac/PythonLauncher/English.lproj/MainMenu.nib/info.nib deleted file mode 100644 index b96759af1c23c1..00000000000000 --- a/Mac/PythonLauncher/English.lproj/MainMenu.nib/info.nib +++ /dev/null @@ -1,21 +0,0 @@ - - - - - IBDocumentLocation - 99 33 356 240 0 0 800 578 - IBEditorPositions - - 29 - 82 396 318 44 0 0 800 578 - - IBFramework Version - 263.2 - IBOpenObjects - - 29 - - IBSystem Version - 5S66 - - diff --git a/Mac/PythonLauncher/English.lproj/MainMenu.nib/objects.nib b/Mac/PythonLauncher/English.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 532a5c82896745..00000000000000 Binary files a/Mac/PythonLauncher/English.lproj/MainMenu.nib/objects.nib and /dev/null differ diff --git a/Mac/PythonLauncher/English.lproj/MyDocument.nib/classes.nib b/Mac/PythonLauncher/English.lproj/MyDocument.nib/classes.nib deleted file mode 100644 index bcdc0cdf088803..00000000000000 --- a/Mac/PythonLauncher/English.lproj/MyDocument.nib/classes.nib +++ /dev/null @@ -1,26 +0,0 @@ -{ - IBClasses = ( - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - { - ACTIONS = {"do_apply" = id; "do_cancel" = id; "do_reset" = id; "do_run" = id; }; - CLASS = MyDocument; - LANGUAGE = ObjC; - OUTLETS = { - commandline = NSTextField; - debug = NSButton; - honourhashbang = NSButton; - inspect = NSButton; - interpreter = NSTextField; - nosite = NSButton; - optimize = NSButton; - others = NSTextField; - scriptargs = NSTextField; - tabs = NSButton; - verbose = NSButton; - "with_terminal" = NSButton; - }; - SUPERCLASS = NSDocument; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/Mac/PythonLauncher/English.lproj/MyDocument.nib/info.nib b/Mac/PythonLauncher/English.lproj/MyDocument.nib/info.nib deleted file mode 100644 index e258c7220a4795..00000000000000 --- a/Mac/PythonLauncher/English.lproj/MyDocument.nib/info.nib +++ /dev/null @@ -1,16 +0,0 @@ - - - - - IBDocumentLocation - 398 60 356 240 0 0 1024 746 - IBFramework Version - 291.0 - IBOpenObjects - - 5 - - IBSystem Version - 6L60 - - diff --git a/Mac/PythonLauncher/English.lproj/MyDocument.nib/objects.nib b/Mac/PythonLauncher/English.lproj/MyDocument.nib/objects.nib deleted file mode 100644 index 0473a31a21f113..00000000000000 Binary files a/Mac/PythonLauncher/English.lproj/MyDocument.nib/objects.nib and /dev/null differ diff --git a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib b/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib deleted file mode 100644 index 467aa8b26121d6..00000000000000 --- a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/classes.nib +++ /dev/null @@ -1,26 +0,0 @@ -{ - IBClasses = ( - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - { - ACTIONS = {"do_apply" = id; "do_filetype" = id; "do_reset" = id; }; - CLASS = PreferencesWindowController; - LANGUAGE = ObjC; - OUTLETS = { - commandline = NSTextField; - debug = NSButton; - filetype = NSPopUpButton; - honourhashbang = NSButton; - inspect = NSButton; - interpreter = NSTextField; - nosite = NSButton; - optimize = NSButton; - others = NSTextField; - tabs = NSButton; - verbose = NSButton; - "with_terminal" = NSButton; - }; - SUPERCLASS = NSWindowController; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib b/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib deleted file mode 100644 index bc558f7e8285eb..00000000000000 --- a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/info.nib +++ /dev/null @@ -1,16 +0,0 @@ - - - - - IBDocumentLocation - 565 235 519 534 0 0 1280 1002 - IBFramework Version - 364.0 - IBOpenObjects - - 5 - - IBSystem Version - 7H63 - - diff --git a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib b/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib deleted file mode 100644 index 3dfed33cbdb5b2..00000000000000 Binary files a/Mac/PythonLauncher/English.lproj/PreferenceWindow.nib/objects.nib and /dev/null differ diff --git a/Mac/PythonLauncher/FileSettings.h b/Mac/PythonLauncher/FileSettings.h deleted file mode 100644 index 3fadb7d614af11..00000000000000 --- a/Mac/PythonLauncher/FileSettings.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// FileSettings.h -// PythonLauncher -// -// Created by Jack Jansen on Sun Jul 21 2002. -// Copyright (c) 2002 __MyCompanyName__. All rights reserved. -// - -#import - -@protocol FileSettingsSource -- (NSString *) interpreter; -- (BOOL) honourhashbang; -- (BOOL) debug; -- (BOOL) verbose; -- (BOOL) inspect; -- (BOOL) optimize; -- (BOOL) nosite; -- (BOOL) tabs; -- (NSString *) others; -- (BOOL) with_terminal; -- (NSString *) scriptargs; -@end - -@interface FileSettings : NSObject -{ - NSString *interpreter; // The pathname of the interpreter to use - NSArray *interpreters; // List of known interpreters - BOOL honourhashbang; // #! line overrides interpreter - BOOL debug; // -d option: debug parser - BOOL verbose; // -v option: verbose import - BOOL inspect; // -i option: interactive mode after script - BOOL optimize; // -O option: optimize bytecode - BOOL nosite; // -S option: don't import site.py - BOOL tabs; // -t option: warn about inconsistent tabs - NSString *others; // other options - NSString *scriptargs; // script arguments (not for preferences) - BOOL with_terminal; // Run in terminal window - - FileSettings *origsource; - NSString *prefskey; -} - -+ (id)getDefaultsForFileType: (NSString *)filetype; -+ (id)getFactorySettingsForFileType: (NSString *)filetype; -+ (id)newSettingsForFileType: (NSString *)filetype; - -- (id)initForFileType: (NSString *)filetype; -- (id)initForFSDefaultFileType: (NSString *)filetype; -- (id)initForDefaultFileType: (NSString *)filetype; - -- (void)updateFromSource: (id )source; -- (NSString *)commandLineForScript: (NSString *)script; - -- (void)applyValuesFromDict: (NSDictionary *)dict; -- (void)reset; -- (NSArray *) interpreters; - -@end diff --git a/Mac/PythonLauncher/FileSettings.m b/Mac/PythonLauncher/FileSettings.m deleted file mode 100644 index 3438870b7484c4..00000000000000 --- a/Mac/PythonLauncher/FileSettings.m +++ /dev/null @@ -1,307 +0,0 @@ -// -// FileSettings.m -// PythonLauncher -// -// Created by Jack Jansen on Sun Jul 21 2002. -// Copyright (c) 2002 __MyCompanyName__. All rights reserved. -// - -#import "FileSettings.h" - -@implementation FileSettings - -+ (id)getFactorySettingsForFileType: (NSString *)filetype -{ - static FileSettings *fsdefault_py, *fsdefault_pyw, *fsdefault_pyc; - FileSettings **curdefault; - - if ([filetype isEqualToString: @"Python Script"]) { - curdefault = &fsdefault_py; - } else if ([filetype isEqualToString: @"Python GUI Script"]) { - curdefault = &fsdefault_pyw; - } else if ([filetype isEqualToString: @"Python Bytecode Document"]) { - curdefault = &fsdefault_pyc; - } else { - NSLog(@"Funny File Type: %@\n", filetype); - curdefault = &fsdefault_py; - filetype = @"Python Script"; - } - if (!*curdefault) { - *curdefault = [[FileSettings new] initForFSDefaultFileType: filetype]; - } - return *curdefault; -} - -+ (id)getDefaultsForFileType: (NSString *)filetype -{ - static FileSettings *default_py, *default_pyw, *default_pyc; - FileSettings **curdefault; - - if ([filetype isEqualToString: @"Python Script"]) { - curdefault = &default_py; - } else if ([filetype isEqualToString: @"Python GUI Script"]) { - curdefault = &default_pyw; - } else if ([filetype isEqualToString: @"Python Bytecode Document"]) { - curdefault = &default_pyc; - } else { - NSLog(@"Funny File Type: %@\n", filetype); - curdefault = &default_py; - filetype = @"Python Script"; - } - if (!*curdefault) { - *curdefault = [[FileSettings new] initForDefaultFileType: filetype]; - } - return *curdefault; -} - -+ (id)newSettingsForFileType: (NSString *)filetype -{ - FileSettings *cur; - - cur = [FileSettings new]; - [cur initForFileType: filetype]; - return [cur retain]; -} - -- (id)initWithFileSettings: (FileSettings *)source -{ - self = [super init]; - if (!self) return self; - - interpreter = [source->interpreter retain]; - honourhashbang = source->honourhashbang; - debug = source->debug; - verbose = source->verbose; - inspect = source->inspect; - optimize = source->optimize; - nosite = source->nosite; - tabs = source->tabs; - others = [source->others retain]; - scriptargs = [source->scriptargs retain]; - with_terminal = source->with_terminal; - prefskey = source->prefskey; - if (prefskey) [prefskey retain]; - - return self; -} - -- (id)initForFileType: (NSString *)filetype -{ - FileSettings *defaults; - - defaults = [FileSettings getDefaultsForFileType: filetype]; - self = [self initWithFileSettings: defaults]; - origsource = [defaults retain]; - return self; -} - -- (id)initForFSDefaultFileType: (NSString *)filetype -{ - int i; - NSString *filename; - NSDictionary *dict; - static NSDictionary *factorySettings; - - self = [super init]; - if (!self) return self; - - if (factorySettings == NULL) { - NSBundle *bdl = [NSBundle mainBundle]; - NSString *path = [ bdl pathForResource: @"factorySettings" - ofType: @"plist"]; - factorySettings = [[NSDictionary dictionaryWithContentsOfFile: - path] retain]; - if (factorySettings == NULL) { - NSLog(@"Missing %@", path); - return NULL; - } - } - dict = [factorySettings objectForKey: filetype]; - if (dict == NULL) { - NSLog(@"factorySettings.plist misses file type \"%@\"", filetype); - interpreter = [@"no default found" retain]; - return NULL; - } - [self applyValuesFromDict: dict]; - interpreters = [dict objectForKey: @"interpreter_list"]; - interpreter = NULL; - for (i=0; i < [interpreters count]; i++) { - filename = [interpreters objectAtIndex: i]; - filename = [filename stringByExpandingTildeInPath]; - if ([[NSFileManager defaultManager] fileExistsAtPath: filename]) { - interpreter = [filename retain]; - break; - } - } - if (interpreter == NULL) - interpreter = [@"no default found" retain]; - origsource = NULL; - return self; -} - -- (void)applyUserDefaults: (NSString *)filetype -{ - NSUserDefaults *defaults; - NSDictionary *dict; - - defaults = [NSUserDefaults standardUserDefaults]; - dict = [defaults dictionaryForKey: filetype]; - if (!dict) - return; - [self applyValuesFromDict: dict]; -} - -- (id)initForDefaultFileType: (NSString *)filetype -{ - FileSettings *fsdefaults; - - fsdefaults = [FileSettings getFactorySettingsForFileType: filetype]; - self = [self initWithFileSettings: fsdefaults]; - if (!self) return self; - interpreters = [fsdefaults->interpreters retain]; - scriptargs = [@"" retain]; - [self applyUserDefaults: filetype]; - prefskey = [filetype retain]; - return self; -} - -- (void)reset -{ - if (origsource) { - [self updateFromSource: origsource]; - } else { - FileSettings *fsdefaults; - fsdefaults = [FileSettings getFactorySettingsForFileType: prefskey]; - [self updateFromSource: fsdefaults]; - } -} - -- (void)updateFromSource: (id )source -{ - interpreter = [[source interpreter] retain]; - honourhashbang = [source honourhashbang]; - debug = [source debug]; - verbose = [source verbose]; - inspect = [source inspect]; - optimize = [source optimize]; - nosite = [source nosite]; - tabs = [source tabs]; - others = [[source others] retain]; - scriptargs = [[source scriptargs] retain]; - with_terminal = [source with_terminal]; - // And if this is a user defaults object we also save the - // values - if (!origsource) { - NSUserDefaults *defaults; - NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: - interpreter, @"interpreter", - [NSNumber numberWithBool: honourhashbang], @"honourhashbang", - [NSNumber numberWithBool: debug], @"debug", - [NSNumber numberWithBool: verbose], @"verbose", - [NSNumber numberWithBool: inspect], @"inspect", - [NSNumber numberWithBool: optimize], @"optimize", - [NSNumber numberWithBool: nosite], @"nosite", - [NSNumber numberWithBool: tabs], @"tabs", - others, @"others", - scriptargs, @"scriptargs", - [NSNumber numberWithBool: with_terminal], @"with_terminal", - nil]; - defaults = [NSUserDefaults standardUserDefaults]; - [defaults setObject: dict forKey: prefskey]; - } -} - -- (void)applyValuesFromDict: (NSDictionary *)dict -{ - id value; - - value = [dict objectForKey: @"interpreter"]; - if (value) interpreter = [value retain]; - value = [dict objectForKey: @"honourhashbang"]; - if (value) honourhashbang = [value boolValue]; - value = [dict objectForKey: @"debug"]; - if (value) debug = [value boolValue]; - value = [dict objectForKey: @"verbose"]; - if (value) verbose = [value boolValue]; - value = [dict objectForKey: @"inspect"]; - if (value) inspect = [value boolValue]; - value = [dict objectForKey: @"optimize"]; - if (value) optimize = [value boolValue]; - value = [dict objectForKey: @"nosite"]; - if (value) nosite = [value boolValue]; - value = [dict objectForKey: @"tabs"]; - if (value) tabs = [value boolValue]; - value = [dict objectForKey: @"others"]; - if (value) others = [value retain]; - value = [dict objectForKey: @"scriptargs"]; - if (value) scriptargs = [value retain]; - value = [dict objectForKey: @"with_terminal"]; - if (value) with_terminal = [value boolValue]; -} - -- (NSString*)_replaceSingleQuotes: (NSString*)string -{ - /* Replace all single-quotes by '"'"', that way shellquoting will - * be correct when the result value is delimited using single quotes. - */ - NSArray* components = [string componentsSeparatedByString:@"'"]; - - return [components componentsJoinedByString:@"'\"'\"'"]; -} - -- (NSString *)commandLineForScript: (NSString *)script -{ - NSString *cur_interp = NULL; - NSString* script_dir = NULL; - char hashbangbuf[1024]; - FILE *fp; - char *p; - - script_dir = [script substringToIndex: - [script length]-[[script lastPathComponent] length]]; - - if (honourhashbang && - (fp=fopen([script fileSystemRepresentation], "r")) && - fgets(hashbangbuf, sizeof(hashbangbuf), fp) && - strncmp(hashbangbuf, "#!", 2) == 0 && - (p=strchr(hashbangbuf, '\n'))) { - *p = '\0'; - p = hashbangbuf + 2; - while (*p == ' ') p++; - cur_interp = [NSString stringWithUTF8String: p]; - } - if (!cur_interp) - cur_interp = interpreter; - - return [NSString stringWithFormat: - @"cd '%@' && '%@'%s%s%s%s%s%s %@ '%@' %@ %s", - [self _replaceSingleQuotes:script_dir], - [self _replaceSingleQuotes:cur_interp], - debug?" -d":"", - verbose?" -v":"", - inspect?" -i":"", - optimize?" -O":"", - nosite?" -S":"", - tabs?" -t":"", - others, - [self _replaceSingleQuotes:script], - scriptargs ? scriptargs : @"", - with_terminal? "&& echo Exit status: $? && exit 1" : " &"]; -} - -- (NSArray *) interpreters { return interpreters;}; - -// FileSettingsSource protocol -- (NSString *) interpreter { return interpreter;}; -- (BOOL) honourhashbang { return honourhashbang; }; -- (BOOL) debug { return debug;}; -- (BOOL) verbose { return verbose;}; -- (BOOL) inspect { return inspect;}; -- (BOOL) optimize { return optimize;}; -- (BOOL) nosite { return nosite;}; -- (BOOL) tabs { return tabs;}; -- (NSString *) others { return others;}; -- (NSString *) scriptargs { return scriptargs;}; -- (BOOL) with_terminal { return with_terminal;}; - -@end diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in deleted file mode 100644 index 233694788ac2b7..00000000000000 --- a/Mac/PythonLauncher/Info.plist.in +++ /dev/null @@ -1,69 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - py - pyw - - CFBundleTypeIconFile - PythonSource.icns - CFBundleTypeName - Python Script - CFBundleTypeRole - Viewer - NSDocumentClass - MyDocument - - - CFBundleTypeExtensions - - pyc - pyo - - CFBundleTypeIconFile - PythonCompiled.icns - CFBundleTypeName - Python Bytecode Document - CFBundleTypeRole - Viewer - NSDocumentClass - MyDocument - - - CFBundleExecutable - Python Launcher - NSHumanReadableCopyright - Copyright © 2001-2024 Python Software Foundation - CFBundleGetInfoString - %VERSION%, © 2001-2024 Python Software Foundation - CFBundleIconFile - PythonLauncher.icns - CFBundleIdentifier - org.python.PythonLauncher - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Python Launcher - CFBundlePackageType - APPL - CFBundleShortVersionString - %VERSION% - CFBundleSignature - PytL - CFBundleVersion - %VERSION% - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - NSAppleEventsUsageDescription - Python Launcher uses Apple events to launch your Python script in a Terminal window. - - diff --git a/Mac/PythonLauncher/Makefile.in b/Mac/PythonLauncher/Makefile.in deleted file mode 100644 index 9decadbdc60f00..00000000000000 --- a/Mac/PythonLauncher/Makefile.in +++ /dev/null @@ -1,78 +0,0 @@ -CC=@CC@ -LD=@CC@ -BASECFLAGS=@BASECFLAGS@ -OPT=@OPT@ -CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT) -LDFLAGS=@LDFLAGS@ -srcdir= @srcdir@ -VERSION= @VERSION@ -UNIVERSALSDK=@UNIVERSALSDK@ -builddir= ../.. - -RUNSHARED= @RUNSHARED@ -BUILDEXE= @BUILDEXEEXT@ -BUILDPYTHON= $(builddir)/python$(BUILDEXE) -PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ - -# Deployment target selected during configure, to be checked -# by distutils -MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ -@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET - -PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) -OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o - -install: Python\ Launcher.app - test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" - -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" - /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)" - touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" - chmod -R ugo+rX,go-w "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" - chmod ugo+x "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app/Contents/MacOS/Python Launcher" - -clean: - rm -f *.o "Python Launcher" - rm -rf "Python Launcher.app" - rm -f Info.plist - -Python\ Launcher.app: Info.plist \ - Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \ - $(srcdir)/../Icons/PythonSource.icns \ - $(srcdir)/../Icons/PythonCompiled.icns \ - $(srcdir)/factorySettings.plist - rm -fr "Python Launcher.app" - mkdir "Python Launcher.app" - mkdir "Python Launcher.app/Contents" - mkdir "Python Launcher.app/Contents/MacOS" - mkdir "Python Launcher.app/Contents/Resources" - cp "Python Launcher" "Python Launcher.app/Contents/MacOS" - cp Info.plist "Python Launcher.app/Contents" - cp $(srcdir)/../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/factorySettings.plist "Python Launcher.app/Contents/Resources" - cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources" - -FileSettings.o: $(srcdir)/FileSettings.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m - -MyAppDelegate.o: $(srcdir)/MyAppDelegate.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m - -MyDocument.o: $(srcdir)/MyDocument.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m - -PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m - -doscript.o: $(srcdir)/doscript.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m - -main.o: $(srcdir)/main.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m - -Python\ Launcher: $(OBJECTS) - $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon - -Info.plist: $(srcdir)/Info.plist.in - sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist diff --git a/Mac/PythonLauncher/MyAppDelegate.h b/Mac/PythonLauncher/MyAppDelegate.h deleted file mode 100644 index 7252072aa95605..00000000000000 --- a/Mac/PythonLauncher/MyAppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -/* MyAppDelegate */ - -#import - -@interface MyAppDelegate : NSObject -{ - BOOL initial_action_done; - BOOL should_terminate; -} -- (id)init; -- (IBAction)showPreferences:(id)sender; -- (BOOL)shouldShowUI; -- (BOOL)shouldTerminate; -- (void)testFileTypeBinding; -@end diff --git a/Mac/PythonLauncher/MyAppDelegate.m b/Mac/PythonLauncher/MyAppDelegate.m deleted file mode 100644 index 9cc2aa0ad90982..00000000000000 --- a/Mac/PythonLauncher/MyAppDelegate.m +++ /dev/null @@ -1,96 +0,0 @@ -#import "MyAppDelegate.h" -#import "PreferencesWindowController.h" -#import -#import - -@implementation MyAppDelegate - -- (id)init -{ - self = [super init]; - initial_action_done = NO; - should_terminate = NO; - return self; -} - -- (IBAction)showPreferences:(id)sender -{ - [PreferencesWindowController getPreferencesWindow]; -} - -- (void)applicationDidFinishLaunching:(NSNotification *)notification -{ - // Test that the file mappings are correct - [self testFileTypeBinding]; - // If we were opened because of a file drag or double-click - // we've set initial_action_done in shouldShowUI - // Otherwise we open a preferences dialog. - if (!initial_action_done) { - initial_action_done = YES; - [self showPreferences: self]; - } -} - -- (BOOL)shouldShowUI -{ - // if this call comes before applicationDidFinishLaunching: we - // should terminate immediately after starting the script. - if (!initial_action_done) - should_terminate = YES; - initial_action_done = YES; - if( GetCurrentKeyModifiers() & optionKey ) - return YES; - return NO; -} - -- (BOOL)shouldTerminate -{ - return should_terminate; -} - -- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender -{ - return NO; -} - -- (void)testFileTypeBinding -{ - NSURL *ourUrl; - OSStatus err; - FSRef appRef; - NSURL *appUrl; - static NSString *extensions[] = { @"py", @"pyw", @"pyc", NULL}; - NSString **ext_p; - int i; - - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"SkipFileBindingTest"]) - return; - ourUrl = [NSURL fileURLWithPath: [[NSBundle mainBundle] bundlePath]]; - for( ext_p = extensions; *ext_p; ext_p++ ) { - err = LSGetApplicationForInfo( - kLSUnknownType, - kLSUnknownCreator, - (CFStringRef)*ext_p, - kLSRolesViewer, - &appRef, - (CFURLRef *)&appUrl); - if (err || ![appUrl isEqual: ourUrl] ) { - i = NSRunAlertPanel(@"File type binding", - @"PythonLauncher is not the default application for all " \ - @"Python script types. You should fix this with the " \ - @"Finder's \"Get Info\" command.\n\n" \ - @"See \"Changing the application that opens a file\" in " \ - @"Mac Help for details.", - @"OK", - @"Don't show this warning again", - NULL); - if ( i == 0 ) { // Don't show again - [[NSUserDefaults standardUserDefaults] - setObject:@"YES" forKey:@"SkipFileBindingTest"]; - } - return; - } - } -} - -@end diff --git a/Mac/PythonLauncher/MyDocument.h b/Mac/PythonLauncher/MyDocument.h deleted file mode 100644 index 00c1bae54e2492..00000000000000 --- a/Mac/PythonLauncher/MyDocument.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// MyDocument.h -// PythonLauncher -// -// Created by Jack Jansen on Fri Jul 19 2002. -// Copyright (c) 2002 __MyCompanyName__. All rights reserved. -// - - -#import - -#import "FileSettings.h" - -@interface MyDocument : NSDocument -{ - IBOutlet NSTextField *interpreter; - IBOutlet NSButton *honourhashbang; - IBOutlet NSButton *debug; - IBOutlet NSButton *verbose; - IBOutlet NSButton *inspect; - IBOutlet NSButton *optimize; - IBOutlet NSButton *nosite; - IBOutlet NSButton *tabs; - IBOutlet NSTextField *others; - IBOutlet NSButton *with_terminal; - IBOutlet NSTextField *scriptargs; - IBOutlet NSTextField *commandline; - - NSString *script; - NSString *filetype; - FileSettings *settings; -} - -- (IBAction)do_run:(id)sender; -- (IBAction)do_cancel:(id)sender; -- (IBAction)do_reset:(id)sender; -- (IBAction)do_apply:(id)sender; - -- (void)controlTextDidChange:(NSNotification *)aNotification; - -@end diff --git a/Mac/PythonLauncher/MyDocument.m b/Mac/PythonLauncher/MyDocument.m deleted file mode 100644 index 90c5db9dc5b60d..00000000000000 --- a/Mac/PythonLauncher/MyDocument.m +++ /dev/null @@ -1,171 +0,0 @@ -// -// MyDocument.m -// PythonLauncher -// -// Created by Jack Jansen on Fri Jul 19 2002. -// Copyright (c) 2002 __MyCompanyName__. All rights reserved. -// - -#import "MyDocument.h" -#import "MyAppDelegate.h" -#import "doscript.h" - -@implementation MyDocument - -- (id)init -{ - self = [super init]; - if (self) { - - // Add your subclass-specific initialization here. - // If an error occurs here, send a [self dealloc] message and return nil. - script = [@".py" retain]; - filetype = [@"Python Script" retain]; - settings = NULL; - } - return self; -} - -- (NSString *)windowNibName -{ - // Override returning the nib file name of the document - // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. - return @"MyDocument"; -} - -- (void)close -{ - NSApplication *app = [NSApplication sharedApplication]; - [super close]; - if ([(MyAppDelegate*)[app delegate] shouldTerminate]) - [app terminate: self]; -} - -- (void)load_defaults -{ - settings = [FileSettings newSettingsForFileType: filetype]; -} - -- (void)update_display -{ - [interpreter setStringValue: [settings interpreter]]; - [honourhashbang setState: [settings honourhashbang]]; - [debug setState: [settings debug]]; - [verbose setState: [settings verbose]]; - [inspect setState: [settings inspect]]; - [optimize setState: [settings optimize]]; - [nosite setState: [settings nosite]]; - [tabs setState: [settings tabs]]; - [others setStringValue: [settings others]]; - [scriptargs setStringValue: [settings scriptargs]]; - [with_terminal setState: [settings with_terminal]]; - - [commandline setStringValue: [settings commandLineForScript: script]]; -} - -- (void)update_settings -{ - [settings updateFromSource: self]; -} - -- (BOOL)run -{ - const char *cmdline; - int sts; - - cmdline = [[settings commandLineForScript: script] UTF8String]; - if ([settings with_terminal]) { - sts = doscript(cmdline); - } else { - sts = system(cmdline); - } - if (sts) { - NSLog(@"Exit status: %d\n", sts); - return NO; - } - return YES; -} - -- (void)windowControllerDidLoadNib:(NSWindowController *) aController -{ - [super windowControllerDidLoadNib:aController]; - // Add any code here that need to be executed once the windowController has loaded the document's window. - [self load_defaults]; - [self update_display]; -} - -- (NSData *)dataRepresentationOfType:(NSString *)aType -{ - // Insert code here to write your document from the given data. You can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead. - return nil; -} - -- (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)type; -{ - // Insert code here to read your document from the given data. You can also choose to override -loadFileWrapperRepresentation:ofType: or -readFromFile:ofType: instead. - BOOL show_ui; - - // ask the app delegate whether we should show the UI or not. - show_ui = [(MyAppDelegate*)[[NSApplication sharedApplication] delegate] shouldShowUI]; - [script release]; - script = [fileName retain]; - [filetype release]; - filetype = [type retain]; - settings = [FileSettings newSettingsForFileType: filetype]; - if (show_ui) { - [self update_display]; - return YES; - } else { - [self run]; - [self performSelector:@selector(close) withObject:nil afterDelay:0.0]; - return YES; - } -} - -- (IBAction)do_run:(id)sender -{ - [self update_settings]; - [self update_display]; - if ([self run]) - [self close]; -} - -- (IBAction)do_cancel:(id)sender -{ - [self close]; -} - - -- (IBAction)do_reset:(id)sender -{ - [settings reset]; - [self update_display]; -} - -- (IBAction)do_apply:(id)sender -{ - [self update_settings]; - [self update_display]; -} - -// FileSettingsSource protocol -- (NSString *) interpreter { return [interpreter stringValue];}; -- (BOOL) honourhashbang { return [honourhashbang state];}; -- (BOOL) debug { return [debug state];}; -- (BOOL) verbose { return [verbose state];}; -- (BOOL) inspect { return [inspect state];}; -- (BOOL) optimize { return [optimize state];}; -- (BOOL) nosite { return [nosite state];}; -- (BOOL) tabs { return [tabs state];}; -- (NSString *) others { return [others stringValue];}; -- (NSString *) scriptargs { return [scriptargs stringValue];}; -- (BOOL) with_terminal { return [with_terminal state];}; - -// Delegates -- (void)controlTextDidChange:(NSNotification *)aNotification -{ - [self update_settings]; - [self update_display]; -}; - -@end diff --git a/Mac/PythonLauncher/PreferencesWindowController.h b/Mac/PythonLauncher/PreferencesWindowController.h deleted file mode 100644 index 63469968c1e3e7..00000000000000 --- a/Mac/PythonLauncher/PreferencesWindowController.h +++ /dev/null @@ -1,38 +0,0 @@ -/* PreferencesWindowController */ - -#import - -#import "FileSettings.h" - -@interface PreferencesWindowController : NSWindowController -{ - IBOutlet NSPopUpButton *filetype; - IBOutlet NSComboBox *interpreter; - IBOutlet NSButton *honourhashbang; - IBOutlet NSButton *debug; - IBOutlet NSButton *verbose; - IBOutlet NSButton *inspect; - IBOutlet NSButton *optimize; - IBOutlet NSButton *nosite; - IBOutlet NSButton *tabs; - IBOutlet NSTextField *others; - IBOutlet NSButton *with_terminal; - IBOutlet NSTextField *commandline; - - FileSettings *settings; -} - -+ getPreferencesWindow; - -- (IBAction)do_reset:(id)sender; -- (IBAction)do_apply:(id)sender; -- (IBAction)do_filetype:(id)sender; - -- (void)controlTextDidChange:(NSNotification *)aNotification; - -- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString; -- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index; -- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox; - - -@end diff --git a/Mac/PythonLauncher/PreferencesWindowController.m b/Mac/PythonLauncher/PreferencesWindowController.m deleted file mode 100644 index dc65064463c48d..00000000000000 --- a/Mac/PythonLauncher/PreferencesWindowController.m +++ /dev/null @@ -1,118 +0,0 @@ -#import "PreferencesWindowController.h" - -@implementation PreferencesWindowController - -+ getPreferencesWindow -{ - static PreferencesWindowController *_singleton; - - if (!_singleton) - _singleton = [[PreferencesWindowController alloc] init]; - [_singleton showWindow: _singleton]; - return _singleton; -} - -- (id) init -{ - self = [self initWithWindowNibName: @"PreferenceWindow"]; - return self; -} - -- (void)load_defaults -{ - NSString *title = [filetype titleOfSelectedItem]; - - settings = [FileSettings getDefaultsForFileType: title]; -} - -- (void)update_display -{ - [interpreter reloadData]; - [interpreter setStringValue: [settings interpreter]]; - [honourhashbang setState: [settings honourhashbang]]; - [debug setState: [settings debug]]; - [verbose setState: [settings verbose]]; - [inspect setState: [settings inspect]]; - [optimize setState: [settings optimize]]; - [nosite setState: [settings nosite]]; - [tabs setState: [settings tabs]]; - [others setStringValue: [settings others]]; - [with_terminal setState: [settings with_terminal]]; - // Not scriptargs, it isn't for preferences - [commandline setStringValue: [settings commandLineForScript: @""]]; -} - -- (void) windowDidLoad -{ - [super windowDidLoad]; - [self load_defaults]; - [self update_display]; -} - -- (void)update_settings -{ - [settings updateFromSource: self]; -} - -- (IBAction)do_filetype:(id)sender -{ - [self load_defaults]; - [self update_display]; -} - -- (IBAction)do_reset:(id)sender -{ - [settings reset]; - [self update_display]; -} - -- (IBAction)do_apply:(id)sender -{ - [self update_settings]; - [self update_display]; -} - -// FileSettingsSource protocol -- (NSString *) interpreter { return [interpreter stringValue];}; -- (BOOL) honourhashbang { return [honourhashbang state]; }; -- (BOOL) debug { return [debug state];}; -- (BOOL) verbose { return [verbose state];}; -- (BOOL) inspect { return [inspect state];}; -- (BOOL) optimize { return [optimize state];}; -- (BOOL) nosite { return [nosite state];}; -- (BOOL) tabs { return [tabs state];}; -- (NSString *) others { return [others stringValue];}; -- (BOOL) with_terminal { return [with_terminal state];}; -- (NSString *) scriptargs { return @"";}; - -// Delegates -- (void)controlTextDidChange:(NSNotification *)aNotification -{ - [self update_settings]; - [self update_display]; -}; - -// NSComboBoxDataSource protocol -- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString -{ - NSArray *interp_list = [settings interpreters]; - unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString]; - return rv; -} - -- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index -{ - NSArray *interp_list = [settings interpreters]; - id rv = [interp_list objectAtIndex: index]; - return rv; -} - -- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox -{ - NSArray *interp_list = [settings interpreters]; - int rv = [interp_list count]; - return rv; -} - - -@end diff --git a/Mac/PythonLauncher/doscript.h b/Mac/PythonLauncher/doscript.h deleted file mode 100644 index 3fd3187cd4a578..00000000000000 --- a/Mac/PythonLauncher/doscript.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * doscript.h - * PythonLauncher - * - * Created by Jack Jansen on Wed Jul 31 2002. - * Copyright (c) 2002 __MyCompanyName__. All rights reserved. - * - */ - -#include - -extern int doscript(const char *command); diff --git a/Mac/PythonLauncher/doscript.m b/Mac/PythonLauncher/doscript.m deleted file mode 100644 index f07326bce46fb8..00000000000000 --- a/Mac/PythonLauncher/doscript.m +++ /dev/null @@ -1,59 +0,0 @@ -/* - * doscript.c - * PythonLauncher - * - * Created by Jack Jansen on Wed Jul 31 2002. - * Copyright (c) 2002 __MyCompanyName__. All rights reserved. - * - */ - -#import -#import -#import "doscript.h" - -extern int -doscript(const char *command) -{ - char *bundleID = "com.apple.Terminal"; - AppleEvent evt, res; - AEDesc desc; - OSStatus err; - - [[NSWorkspace sharedWorkspace] launchApplication:@"Terminal.app"]; - - // Build event - err = AEBuildAppleEvent(kAECoreSuite, kAEDoScript, - typeApplicationBundleID, - bundleID, strlen(bundleID), - kAutoGenerateReturnID, - kAnyTransactionID, - &evt, NULL, - "'----':utf8(@)", strlen(command), - command); - if (err) { - NSLog(@"AEBuildAppleEvent failed: %ld\n", (long)err); - return err; - } - - // Send event and check for any Apple Event Manager errors - err = AESendMessage(&evt, &res, kAEWaitReply, kAEDefaultTimeout); - AEDisposeDesc(&evt); - if (err) { - NSLog(@"AESendMessage failed: %ld\n", (long)err); - return err; - } - // Check for any application errors - err = AEGetParamDesc(&res, keyErrorNumber, typeSInt32, &desc); - AEDisposeDesc(&res); - if (!err) { - AEGetDescData(&desc, &err, sizeof(err)); - NSLog(@"Terminal returned an error: %ld", (long)err); - AEDisposeDesc(&desc); - } else if (err == errAEDescNotFound) { - err = noErr; - } else { - NSLog(@"AEGetPArmDesc returned an error: %ld", (long)err); - } - - return err; -} diff --git a/Mac/PythonLauncher/factorySettings.plist b/Mac/PythonLauncher/factorySettings.plist deleted file mode 100644 index 6f650ae761614c..00000000000000 --- a/Mac/PythonLauncher/factorySettings.plist +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Python GUI Script - - debug - - inspect - - interpreter_list - - /usr/local/bin/python3 - /opt/local/bin/python3 - /sw/bin/python3 - - honourhashbang - - nosite - - optimize - - others - - verbose - - with_terminal - - - Python Script - - debug - - inspect - - interpreter_list - - /usr/local/bin/python3 - /opt/local/bin/python3 - /sw/bin/python3 - - honourhashbang - - nosite - - optimize - - others - - verbose - - with_terminal - - - Python Bytecode Document - - debug - - inspect - - interpreter_list - - /usr/local/bin/python3 - /opt/local/bin/python3 - /sw/bin/python3 - - honourhashbang - - nosite - - optimize - - others - - verbose - - with_terminal - - - - diff --git a/Mac/PythonLauncher/main.m b/Mac/PythonLauncher/main.m deleted file mode 100644 index 04b4d7321f74eb..00000000000000 --- a/Mac/PythonLauncher/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// PythonLauncher -// -// Created by Jack Jansen on Fri Jul 19 2002. -// Copyright (c) 2002 __MyCompanyName__. All rights reserved. -// - -#import -#include - -int main(int argc, const char *argv[]) -{ - char *home = getenv("HOME"); - if (home) chdir(home); - return NSApplicationMain(argc, argv); -} diff --git a/Mac/README.rst b/Mac/README.rst deleted file mode 100644 index 8a6e52725615aa..00000000000000 --- a/Mac/README.rst +++ /dev/null @@ -1,429 +0,0 @@ -====================== -Python on macOS README -====================== - -:Authors: - Jack Jansen (2004-07), - Ronald Oussoren (2010-04), - Ned Deily (2012-06) - -This document provides a quick overview of some macOS specific features in -the Python distribution. - -Compilers for building on macOS -=============================== - -The core developers primarily test builds on macOS with Apple's compiler tools, -either Xcode or the Command Line Tools. For these we only support building with -a compiler that includes an SDK that targets the OS on the build machine, that is -the version of Xcode that shipped with the OS version or one newer. - -For example, for macOS 12 we support Xcode 13 and Xcode 14 (or the corresponding -Command Line Tools). - -Building with other compilers, such as GCC, likely works, but is not actively supported. - -macOS specific arguments to configure -===================================== - -* ``--enable-framework[=DIR]`` - - If this argument is specified the build will create a Python.framework rather - than a traditional Unix install. See the section - _`Building and using a framework-based Python on macOS` for more - information on frameworks. - - If the optional directory argument is specified the framework is installed - into that directory. This can be used to install a python framework into - your home directory:: - - $ ./configure --enable-framework=/Users/ronald/Library/Frameworks - $ make && make install - - This will install the framework itself in ``/Users/ronald/Library/Frameworks``, - the applications in a subdirectory of ``/Users/ronald/Applications`` and the - command-line tools in ``/Users/ronald/bin``. - -* ``--with-framework-name=NAME`` - - Specify the name for the python framework, defaults to ``Python``. This option - is only valid when ``--enable-framework`` is specified. - -* ``--enable-universalsdk[=PATH]`` - - Create a universal binary build of Python. This can be used with both - regular and framework builds. - - The optional argument specifies which macOS SDK should be used to perform the - build. In most cases on current systems, you do not need to specify PATH or - you can just use ``/``; the default MacOSX SDK for the active Xcode or Command - Line Tools developer directory will be used. See the macOS ``xcrun`` man page - for more information. Current versions of macOS and Xcode no longer install - system header files in their traditional locations, like ``/usr/include`` and - ``/System/Library/Frameworks``; instead they are found within a MacOSX SDK. - The Apple-supplied build tools handle this transparently and current - versions of Python now handle this as well. So it is no longer necessary, - and since macOS 10.14, no longer possible to force the installation of system - headers with ``xcode-select``. - -* ``--with-universal-archs=VALUE`` - - Specify the kind of universal binary that should be created. This option is - only valid when ``--enable-universalsdk`` is specified. The default is - ``32-bit`` if building with a SDK that supports PPC, otherwise defaults - to ``intel``. Note that ``intel`` means a universal build of both 32-bit - and 64-bit binaries and that may not be what you want; for example, - as of macOS 10.15 Catalina, 32-bit execution is no longer supported by - the operating system. Thus it is best to either explicitly specify - values for ``--with-universal-archs``: - - ``--enable-universalsdk --with-universal-archs=intel-64`` - - or avoid using either. - - -Building and using a universal binary of Python on macOS -======================================================== - -1. What is a universal binary ------------------------------ - -A universal binary build of Python contains object code for more than one -CPU architecture. A universal macOS executable file or library combines the -architecture-specific code into one file and can therefore run at native -speed on all supported architectures. Universal files were introduced in -macOS 10.4 to add support for Intel-based Macs to the existing PowerPC (PPC) -machines. In macOS 10.5 support was extended to 64-bit Intel and 64-bit PPC -architectures. It is possible to build Python with various combinations -of architectures depending on the build tools and macOS version in use. -Note that PPC support was removed in macOS 10.7 and 32-bit Intel support -was removed in macOS 10.15. So currently as of macOS 10.15, macOS only -supports one execution architecture, 64-bit Intel (``x86_64``). - -2. How do I build a universal binary ------------------------------------- - -You can enable universal binaries by specifying the "--enable-universalsdk" -flag to configure:: - - $ ./configure --enable-universalsdk - $ make - $ make install - -This flag can be used with a framework build of python, but also with a classic -unix build. Universal builds were first supported with macOS 10.4 with Xcode 2.1 -and the 10.4u SDK. Starting with Xcode 3 and macOS 10.5, more configurations are -available. - -In general, universal builds depend on specific features provided by the -Apple-supplied compilers and other build tools included in Apple's Xcode -development tools. You should install Xcode or the command line tools -component appropriate for the macOS release you are running on. See the -Python Developer's Guide (https://devguide.python.org/setup/) -for more information. - -2.1 Flavors of universal binaries -................................. - -It is possible to build a number of flavors of the universal binary build, -the default is a 32-bit only binary (i386 and ppc) in build environments that -support ppc (10.4 with Xcode 2, 10.5 and 10.6 with Xcode 3) or an -Intel-32/-64-bit binary (i386 and X86_64) in build environments that do not -support ppc (Xcode 4 on 10.6 and later systems). The flavor can be specified -using the configure option ``--with-universal-archs=VALUE``. The following -values are available: - - * ``universal2``: ``arm64``, ``x86_64`` - - * ``intel``: ``i386``, ``x86_64`` - - * ``intel-32``: ``i386`` - - * ``intel-64``: ``x86_64`` - - * ``32-bit``: ``ppc``, ``i386`` - - * ``3-way``: ``i386``, ``x86_64``, ``ppc`` - - * ``64-bit``: ``ppc64``, ``x86_64`` - - * ``all``: ``ppc``, ``ppc64``, ``i386``, ``x86_64`` - -To build a universal binary that includes a 64-bit architecture, you must build -on a system running macOS 10.5 or later. The ``all`` and ``64-bit`` flavors can -only be built with a 10.5 SDK because ``ppc64`` support was only included with -macOS 10.5. Although legacy ``ppc`` support was included with Xcode 3 on macOS -10.6, it was removed in Xcode 4, versions of which were released on macOS 10.6 -and which is the standard for macOS 10.7. To summarize, the -following combinations of SDKs and universal-archs flavors are available: - - * 10.4u SDK with Xcode 2 supports ``32-bit`` only - - * 10.5 SDK with Xcode 3.1.x supports all flavors - - * 10.6 SDK with Xcode 3.2.x supports ``intel``, ``intel-32``, - ``intel-64``, ``3-way``, and ``32-bit`` - - * 10.6 SDK with Xcode 4 supports ``intel``, ``intel-32``, and ``intel-64`` - - * 10.7 through 10.14 SDKs support ``intel``, ``intel-32``, and ``intel-64`` - - * 10.15 and later SDKs support ``intel-64`` only - - * 11.0 and later SDKs support ``universal2`` - -The makefile for a framework build will also install ``python3.x-32`` -binaries when the universal architecture includes at least one 32-bit -architecture (that is, for all flavors but ``64-bit`` and ``intel-64``). -It will also install ``python3.x-intel64`` binaries in the ``universal2`` -case to allow easy execution with the Rosetta 2 Intel emulator on Apple -Silicon Macs. - -Running a specific architecture -............................... - -You can run code using a specific architecture using the ``arch`` command:: - - $ arch -i386 python - -Or to explicitly run in 32-bit mode, regardless of the machine hardware:: - - $ arch -i386 -ppc python - -Using ``arch`` is not a perfect solution as the selected architecture will -not automatically carry through to subprocesses launched by programs and tests -under that Python. If you want to ensure that Python interpreters launched in -subprocesses also run in 32-bit-mode if the main interpreter does, use -a ``python3.x-32`` binary and use the value of ``sys.executable`` as the -``subprocess`` ``Popen`` executable value. - -Likewise, use ``python3.x-intel64`` to force execution in ``x86_64`` mode -with ``universal2`` binaries. - -3. How do I specify binary universal wheels -------------------------------------------- - -Binary wheels can also be universal. The platform tag name used to identify -universal binary wheels differs from the naming scheme used when configuring a -universal build with ``--with-universal-archs``. See the Python Packaging User -Guide for details on the `packaging platform compatibility tags used on macOS -`_. - - -Building and using a framework-based Python on macOS -==================================================== - - -1. Why would I want a framework Python instead of a normal static Python? -------------------------------------------------------------------------- - -The main reason is because you want to create GUI programs in Python. With the -exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run -from a macOS application bundle (".app"). - -While it is technically possible to create a .app without using frameworks you -will have to do the work yourself if you really want this. - -A second reason for using frameworks is that they put Python-related items in -only two places: "/Library/Framework/Python.framework" and -"/Applications/Python " where ```` can be e.g. "3.8", -"2.7", etc. This simplifies matters for users installing -Python from a binary distribution if they want to get rid of it again. Moreover, -due to the way frameworks work, users without admin privileges can install a -binary distribution in their home directory without recompilation. - -2. How does a framework Python differ from a normal static Python? ------------------------------------------------------------------- - -In everyday use there is no difference, except that things are stored in -a different place. If you look in /Library/Frameworks/Python.framework -you will see lots of relative symlinks, see the Apple documentation for -details. If you are used to a normal unix Python file layout go down to -Versions/Current and you will see the familiar bin and lib directories. - -3. Do I need extra packages? ----------------------------- - -Yes, probably. If you want Tkinter support you need to get the macOS AquaTk -distribution, this is installed by default on macOS 10.4 or later. Be -aware, though, that the Cocoa-based AquaTk's supplied starting with macOS -10.6 have proven to be unstable. If possible, you should consider -installing a newer version before building on macOS 10.6 or later, such as -the ActiveTcl 8.6. See https://www.python.org/download/mac/tcltk/. If you -are building with an SDK, ensure that the newer Tcl and Tk frameworks are -seen in the SDK's ``Library/Frameworks`` directory; you may need to -manually create symlinks to their installed location, ``/Library/Frameworks``. -If you want wxPython you need to get that. -If you want Cocoa you need to get PyObjC. - -4. How do I build a framework Python? -------------------------------------- - -This directory contains a Makefile that will create a couple of python-related -applications (full-blown macOS .app applications, that is) in -"/Applications/Python ", and a hidden helper application Python.app -inside the Python.framework, and unix tools including "python" into -/usr/local/bin. In addition it has a target "installmacsubtree" that installs -the relevant portions of the Mac subtree into the Python.framework. - -It is normally invoked indirectly through the main Makefile, as the last step -in the sequence - - 1. ./configure --enable-framework - - 2. make - - 3. make install - -This sequence will put the framework in ``/Library/Framework/Python.framework``, -the applications in ``/Applications/Python `` and the unix tools in -``/usr/local/bin``. - -Installing in another place, for instance ``$HOME/Library/Frameworks`` if you -have no admin privileges on your machine, is possible. This can be accomplished -by configuring with ``--enable-framework=$HOME/Library/Frameworks``. -The other two directories will then also be installed in your home directory, -at ``$HOME/Applications/Python-`` and ``$HOME/bin``. - -If you want to install some part, but not all, read the main Makefile. The -frameworkinstall is composed of a couple of sub-targets that install the -framework itself, the Mac subtree, the applications and the unix tools. - -There is an extra target frameworkinstallextras that is not part of the -normal frameworkinstall which installs the Tools directory into -"/Applications/Python ", this is useful for binary -distributions. - -What do all these programs do? -============================== - -"IDLE.app" is an integrated development environment for Python: editor, -debugger, etc. - -"Python Launcher.app" is a helper application that will handle things when you -double-click a .py, .pyc or .pyw file. For the first two it creates a Terminal -window and runs the scripts with the normal command-line Python. For the -latter it runs the script in the Python.app interpreter so the script can do -GUI-things. Keep the ``Option`` key depressed while dragging or double-clicking -a script to set runtime options. These options can be set persistently -through Python Launcher's preferences dialog. - -The program ``pythonx.x`` runs python scripts from the command line. -Previously, various compatibility aliases were also installed, including -``pythonwx.x`` which in early releases of Python on macOS was required to run -GUI programs. As of 3.4.0, the ``pythonwx.x`` aliases are no longer installed. - -How do I create a binary distribution? -====================================== - -Download and unpack the source release from https://www.python.org/download/. -Go to the directory ``Mac/BuildScript``. There you will find a script -``build-installer.py`` that does all the work. This will download and build -a number of 3rd-party libraries, configures and builds a framework Python, -installs it, creates the installer package files and then packs this in a -DMG image. The script also builds an HTML copy of the current Python -documentation set for this release for inclusion in the framework. The -installer package will create links to the documentation for use by IDLE, -pydoc, shell users, and Finder user. - -The script will build a universal binary so you'll therefore have to run this -script on macOS 10.4 or later and with Xcode 2.1 or later installed. -However, the Python build process itself has several build dependencies not -available out of the box with macOS 10.4 so you may have to install -additional software beyond what is provided with Xcode 2. -It should be possible to use SDKs and/or older -versions of Xcode to build installers that are compatible with older systems -on a newer system but this may not be completely foolproof so the resulting -executables, shared libraries, and ``.so`` bundles should be carefully -examined and tested on all supported systems for proper dynamic linking -dependencies. It is safest to build the distribution on a system running the -minimum macOS version supported. - -All of this is normally done completely isolated in /tmp/_py, so it does not -use your normal build directory nor does it install into /. - -Because of the way the script locates the files it needs you have to run it -from within the BuildScript directory. The script accepts a number of -command-line arguments, run it with --help for more information. - -Configure warnings -================== - -The configure script sometimes emits warnings like the one below:: - - configure: WARNING: libintl.h: present but cannot be compiled - configure: WARNING: libintl.h: check for missing prerequisite headers? - configure: WARNING: libintl.h: see the Autoconf documentation - configure: WARNING: libintl.h: section "Present But Cannot Be Compiled" - configure: WARNING: libintl.h: proceeding with the preprocessor's result - configure: WARNING: libintl.h: in the future, the compiler will take precedence - configure: WARNING: ## -------------------------------------------------------- ## - configure: WARNING: ## Report this to https://github.com/python/cpython/issues/ ## - configure: WARNING: ## -------------------------------------------------------- ## - -This almost always means you are trying to build a universal binary for -Python and have libraries in ``/usr/local`` that don't contain the required -architectures. Temporarily move ``/usr/local`` aside to finish the build. - - -Uninstalling a framework install, including the binary installer -================================================================ - -Uninstalling a framework can be done by manually removing all bits that got installed. -That's true for both installations from source and installations using the binary installer. -macOS does not provide a central uninstaller. - -The main bit of a framework install is the framework itself, installed in -``/Library/Frameworks/Python.framework``. This can contain multiple versions -of Python, if you want to remove just one version you have to remove the -version-specific subdirectory: ``/Library/Frameworks/Python.framework/Versions/X.Y``. -If you do that, ensure that ``/Library/Frameworks/Python.framework/Versions/Current`` -is a symlink that points to an installed version of Python. - -A framework install also installs some applications in ``/Applications/Python X.Y``, - -And lastly a framework installation installs files in ``/usr/local/bin``, all of -them symbolic links to files in ``/Library/Frameworks/Python.framework/Versions/X.Y/bin``. - -Weak linking support -==================== - -The CPython sources support building with the latest SDK while targeting deployment -to macOS 10.9. This is done through weak linking of symbols introduced in macOS -10.10 or later and checking for their availability at runtime. - -This requires the use of Apple's compiler toolchain on macOS 10.13 or later. - -The basic implementation pattern is: - -* ``HAVE_`` is a macro defined (or not) by the configure script - -* ``HAVE__RUNTIME`` is a macro defined in the relevant source - files. This expands to a call to ``__builtin_available`` when using - a new enough Apple compiler, and to a true value otherwise. - -* Use ``HAVE__RUNTIME`` before calling ````. This macro - *must* be used a the sole expression in an if statement:: - - if (HAVE__RUNTIME) { - /* is available */ - } - - Or: - - if (HAVE__RUNTIME) {} else { - /* is not available */ - } - - Using other patterns (such as ``!HAVE__RUNTIME``) is not supported - by Apple's compilers. - - -Resources -========= - - * https://www.python.org/downloads/macos/ - - * https://www.python.org/community/sigs/current/pythonmac-sig/ - - * https://devguide.python.org/ diff --git a/Mac/Resources/app-store-compliance.patch b/Mac/Resources/app-store-compliance.patch deleted file mode 100644 index f4b7decc01cf1f..00000000000000 --- a/Mac/Resources/app-store-compliance.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py -index d6c83a75c1c..19ed4e01091 100644 ---- a/Lib/test/test_urlparse.py -+++ b/Lib/test/test_urlparse.py -@@ -237,11 +237,6 @@ def test_roundtrips(self): - '','',''), - ('git+ssh', 'git@github.com','/user/project.git', - '', '')), -- ('itms-services://?action=download-manifest&url=https://example.com/app', -- ('itms-services', '', '', '', -- 'action=download-manifest&url=https://example.com/app', ''), -- ('itms-services', '', '', -- 'action=download-manifest&url=https://example.com/app', '')), - ('+scheme:path/to/file', - ('', '', '+scheme:path/to/file', '', '', ''), - ('', '', '+scheme:path/to/file', '', '')), -diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py -index 8f724f907d4..148caf742c9 100644 ---- a/Lib/urllib/parse.py -+++ b/Lib/urllib/parse.py -@@ -59,7 +59,7 @@ - 'imap', 'wais', 'file', 'mms', 'https', 'shttp', - 'snews', 'prospero', 'rtsp', 'rtsps', 'rtspu', 'rsync', - 'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh', -- 'ws', 'wss', 'itms-services'] -+ 'ws', 'wss'] - - uses_params = ['', 'ftp', 'hdl', 'prospero', 'http', 'imap', - 'https', 'shttp', 'rtsp', 'rtsps', 'rtspu', 'sip', diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in deleted file mode 100644 index a1fc1511c40e96..00000000000000 --- a/Mac/Resources/app/Info.plist.in +++ /dev/null @@ -1,64 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeOSTypes - - **** - fold - disk - - CFBundleTypeRole - Viewer - - - CFBundleExecutable - Python - CFBundleGetInfoString - %version%, (c) 2001-2024 Python Software Foundation. - CFBundleHelpBookFolder - - Documentation - PythonDocumentation - - CFBundleHelpBookName - MacPython Help - CFBundleHelpTOCFile - index.html - CFBundleIconFile - PythonInterpreter.icns - CFBundleIdentifier - %bundleid% - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLongVersionString - %version%, (c) 2001-2024 Python Software Foundation. - CFBundleName - Python - CFBundlePackageType - APPL - CFBundleShortVersionString - %version% - CFBundleSignature - PytX - CFBundleVersion - %version% - CSResourcesFileMapped - - LSRequiresCarbon - - NSAppleScriptEnabled - - NSHumanReadableCopyright - (c) 2001-2024 Python Software Foundation. - NSHighResolutionCapable - - CFBundleAllowMixedLocalizations - - - diff --git a/Mac/Resources/app/PkgInfo b/Mac/Resources/app/PkgInfo deleted file mode 100644 index 67c491a8fcaf69..00000000000000 --- a/Mac/Resources/app/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPLPytX \ No newline at end of file diff --git a/Mac/Resources/app/Resources/PythonApplet.icns b/Mac/Resources/app/Resources/PythonApplet.icns deleted file mode 100644 index c8aad9fc37a278..00000000000000 Binary files a/Mac/Resources/app/Resources/PythonApplet.icns and /dev/null differ diff --git a/Mac/Resources/app/Resources/PythonInterpreter.icns b/Mac/Resources/app/Resources/PythonInterpreter.icns deleted file mode 100644 index e09fd381e4dfb8..00000000000000 Binary files a/Mac/Resources/app/Resources/PythonInterpreter.icns and /dev/null differ diff --git a/Mac/Resources/framework/Info.plist.in b/Mac/Resources/framework/Info.plist.in deleted file mode 100644 index 4c42971ed90ee4..00000000000000 --- a/Mac/Resources/framework/Info.plist.in +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Python - CFBundleGetInfoString - Python Runtime and Library - CFBundleIdentifier - @PYTHONFRAMEWORKIDENTIFIER@ - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Python - CFBundlePackageType - FMWK - CFBundleShortVersionString - %VERSION%, (c) 2001-2024 Python Software Foundation. - CFBundleLongVersionString - %VERSION%, (c) 2001-2024 Python Software Foundation. - CFBundleSignature - ???? - CFBundleVersion - %VERSION% - CFBundleAllowMixedLocalizations - - - diff --git a/Mac/Resources/iconsrc/IDE.psd b/Mac/Resources/iconsrc/IDE.psd deleted file mode 100644 index b9637b993f4cde..00000000000000 Binary files a/Mac/Resources/iconsrc/IDE.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PackageManager.psd b/Mac/Resources/iconsrc/PackageManager.psd deleted file mode 100644 index 42f41b125ffdd8..00000000000000 Binary files a/Mac/Resources/iconsrc/PackageManager.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PythonApplet.psd b/Mac/Resources/iconsrc/PythonApplet.psd deleted file mode 100644 index 7458b52c573b3b..00000000000000 Binary files a/Mac/Resources/iconsrc/PythonApplet.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PythonCompiled.psd b/Mac/Resources/iconsrc/PythonCompiled.psd deleted file mode 100644 index 61fc4d18ae2b45..00000000000000 Binary files a/Mac/Resources/iconsrc/PythonCompiled.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PythonIcon.psd b/Mac/Resources/iconsrc/PythonIcon.psd deleted file mode 100644 index d818dc6a143860..00000000000000 Binary files a/Mac/Resources/iconsrc/PythonIcon.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PythonSource.psd b/Mac/Resources/iconsrc/PythonSource.psd deleted file mode 100644 index eba8f28d378cf5..00000000000000 Binary files a/Mac/Resources/iconsrc/PythonSource.psd and /dev/null differ diff --git a/Mac/Resources/iconsrc/PythonWSource.psd b/Mac/Resources/iconsrc/PythonWSource.psd deleted file mode 100644 index 2b84d9485139a5..00000000000000 Binary files a/Mac/Resources/iconsrc/PythonWSource.psd and /dev/null differ diff --git a/Mac/Tools/plistlib_generate_testdata.py b/Mac/Tools/plistlib_generate_testdata.py deleted file mode 100755 index 3349c604a37a4c..00000000000000 --- a/Mac/Tools/plistlib_generate_testdata.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python3 - -from Cocoa import NSMutableDictionary, NSMutableArray, NSString, NSDate, NSNumber -from Cocoa import NSPropertyListSerialization, NSPropertyListOpenStepFormat -from Cocoa import NSPropertyListXMLFormat_v1_0, NSPropertyListBinaryFormat_v1_0 -from Cocoa import CFUUIDCreateFromString, NSNull, NSUUID, CFPropertyListCreateData -from Cocoa import NSURL -from Cocoa import NSKeyedArchiver - -import datetime -from collections import OrderedDict -import binascii - -FORMATS=[ -# ('openstep', NSPropertyListOpenStepFormat), - ('plistlib.FMT_XML', NSPropertyListXMLFormat_v1_0), - ('plistlib.FMT_BINARY', NSPropertyListBinaryFormat_v1_0), -] - -def nsstr(value): - return NSString.alloc().initWithString_(value) - - -def main(): - pl = OrderedDict() - - # Note: pl is an OrderedDict to control the order - # of keys, and hence have some control on the structure - # of the output file. - # New keys should be added in alphabetical order. - - seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp() - pl[nsstr('aBigInt')] = 2 ** 63 - 44 - pl[nsstr('aBigInt2')] = NSNumber.numberWithUnsignedLongLong_(2 ** 63 + 44) - pl[nsstr('aDate')] = NSDate.dateWithTimeIntervalSince1970_(seconds) - - pl[nsstr('aDict')] = d = OrderedDict() - d[nsstr('aFalseValue')] = False - d[nsstr('aTrueValue')] = True - d[nsstr('aUnicodeValue')] = "M\xe4ssig, Ma\xdf" - d[nsstr('anotherString')] = "" - d[nsstr('deeperDict')] = dd = OrderedDict() - dd[nsstr('a')] = 17 - dd[nsstr('b')] = 32.5 - dd[nsstr('c')] = a = NSMutableArray.alloc().init() - a.append(1) - a.append(2) - a.append(nsstr('text')) - - pl[nsstr('aFloat')] = 0.5 - - pl[nsstr('aList')] = a = NSMutableArray.alloc().init() - a.append(nsstr('A')) - a.append(nsstr('B')) - a.append(12) - a.append(32.5) - aa = NSMutableArray.alloc().init() - a.append(aa) - aa.append(1) - aa.append(2) - aa.append(3) - - pl[nsstr('aNegativeBigInt')] = -80000000000 - pl[nsstr('aNegativeInt')] = -5 - pl[nsstr('aString')] = nsstr('Doodah') - - pl[nsstr('anEmptyDict')] = NSMutableDictionary.alloc().init() - - pl[nsstr('anEmptyList')] = NSMutableArray.alloc().init() - - pl[nsstr('anInt')] = 728 - - pl[nsstr('nestedData')] = a = NSMutableArray.alloc().init() - a.append(b'''\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03''') - - - pl[nsstr('someData')] = b'' - - pl[nsstr('someMoreData')] = b'''\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03\x00\x01\x02\x03''' - - pl[nsstr('\xc5benraa')] = nsstr("That was a unicode key.") - - print("TESTDATA={") - for fmt_name, fmt_key in FORMATS: - data, error = NSPropertyListSerialization.dataWithPropertyList_format_options_error_( - pl, fmt_key, 0, None) - if data is None: - print("Cannot serialize", fmt_name, error) - - else: - print(" %s: binascii.a2b_base64(b'''\n %s'''),"%(fmt_name, _encode_base64(bytes(data)).decode('ascii')[:-1])) - - keyed_archive_data = NSKeyedArchiver.archivedDataWithRootObject_("KeyArchive UID Test") - print(" 'KEYED_ARCHIVE': binascii.a2b_base64(b'''\n %s''')," % (_encode_base64(bytes(keyed_archive_data)).decode('ascii')[:-1])) - print("}") - print() - -def _encode_base64(s, maxlinelength=60): - maxbinsize = (maxlinelength//4)*3 - pieces = [] - for i in range(0, len(s), maxbinsize): - chunk = s[i : i + maxbinsize] - pieces.append(binascii.b2a_base64(chunk)) - return b' '.join(pieces) - -main() diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c deleted file mode 100644 index 9dfb77f6ff41c3..00000000000000 --- a/Mac/Tools/pythonw.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * This wrapper program executes a python executable hidden inside an - * application bundle inside the Python framework. This is needed to run - * GUI code: some GUI API's don't work unless the program is inside an - * application bundle. - * - * This program uses posix_spawn rather than plain execv because we need - * slightly more control over how the "real" interpreter is executed. - * - * On OSX 10.4 (and earlier) this falls back to using exec because the - * posix_spawnv functions aren't available there. - */ - -#pragma weak_import posix_spawnattr_init -#pragma weak_import posix_spawnattr_setbinpref_np -#pragma weak_import posix_spawnattr_setflags -#pragma weak_import posix_spawn - -#include -#include -#ifdef HAVE_SPAWN_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include - - -extern char** environ; - -/* - * Locate the python framework by looking for the - * library that contains Py_Initialize. - * - * In a regular framework the structure is: - * - * Python.framework/Versions/2.7 - * /Python - * /Resources/Python.app/Contents/MacOS/Python - * - * In a virtualenv style structure the expected - * structure is: - * - * ROOT - * /bin/pythonw - * /.Python <- the dylib - * /.Resources/Python.app/Contents/MacOS/Python - * - * NOTE: virtualenv's are not an officially supported - * feature, support for that structure is provided as - * a convenience. - */ -static char* get_python_path(void) -{ - size_t len; - Dl_info info; - char* end; - char* g_path; - - if (dladdr(Py_Initialize, &info) == 0) { - return NULL; - } - - len = strlen(info.dli_fname); - - g_path = malloc(len+60); - if (g_path == NULL) { - return NULL; - } - - strcpy(g_path, info.dli_fname); - end = g_path + len - 1; - while (end != g_path && *end != '/') { - end --; - } - end++; - if (*end == '.') { - end++; - } - strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK); - - return g_path; -} - -#ifdef HAVE_SPAWN_H -static void -setup_spawnattr(posix_spawnattr_t* spawnattr) -{ - size_t ocount; - size_t count; - cpu_type_t cpu_types[1]; - short flags = 0; - - if ((errno = posix_spawnattr_init(spawnattr)) != 0) { - err(2, "posix_spawnattr_int"); - /* NOTREACHTED */ - } - - count = 1; - - /* Run the real python executable using the same architecture as this - * executable, this allows users to control the architecture using - * "arch -ppc python" - */ - -#if defined(__ppc64__) - cpu_types[0] = CPU_TYPE_POWERPC64; - -#elif defined(__x86_64__) - cpu_types[0] = CPU_TYPE_X86_64; - -#elif defined(__ppc__) - cpu_types[0] = CPU_TYPE_POWERPC; - -#elif defined(__i386__) - cpu_types[0] = CPU_TYPE_X86; - -#elif defined(__arm64__) - cpu_types[0] = CPU_TYPE_ARM64; - -#else -# error "Unknown CPU" - -#endif - - if (posix_spawnattr_setbinpref_np(spawnattr, count, - cpu_types, &ocount) == -1) { - err(1, "posix_spawnattr_setbinpref"); - /* NOTREACHTED */ - } - if (count != ocount) { - fprintf(stderr, "posix_spawnattr_setbinpref failed to copy\n"); - exit(1); - /* NOTREACHTED */ - } - - - /* - * Set flag that causes posix_spawn to behave like execv - */ - flags |= POSIX_SPAWN_SETEXEC; - if ((errno = posix_spawnattr_setflags(spawnattr, flags)) != 0) { - err(1, "posix_spawnattr_setflags"); - /* NOTREACHTED */ - } -} -#endif - -int -main(int argc, char **argv) { - char* exec_path = get_python_path(); - static char path[PATH_MAX * 2]; - static char real_path[PATH_MAX * 2]; - int status; - uint32_t size = PATH_MAX * 2; - - /* Set the original executable path in the environment. */ - status = _NSGetExecutablePath(path, &size); - if (status == 0) { - /* - * Note: don't call 'realpath', that will - * erase symlink information, and that - * breaks "pyvenv --symlink" - * - * It is nice to have the directory name - * as a cleaned up absolute path though, - * therefore call realpath on dirname(path) - */ - char* slash = strrchr(path, '/'); - if (slash) { - char replaced; - replaced = slash[1]; - slash[1] = 0; - if (realpath(path, real_path) == NULL) { - err(1, "realpath: %s", path); - } - slash[1] = replaced; - if (strlcat(real_path, slash, sizeof(real_path)) > sizeof(real_path)) { - errno = EINVAL; - err(1, "realpath: %s", path); - } - - } else { - if (realpath(".", real_path) == NULL) { - err(1, "realpath: %s", path); - } - if (strlcat(real_path, "/", sizeof(real_path)) > sizeof(real_path)) { - errno = EINVAL; - err(1, "realpath: %s", path); - } - if (strlcat(real_path, path, sizeof(real_path)) > sizeof(real_path)) { - errno = EINVAL; - err(1, "realpath: %s", path); - } - } - - /* - * The environment variable is used to pass the value of real_path - * to the actual python interpreter, and is read by code in - * Python/coreconfig.c. - * - * This way the real interpreter knows how the user invoked the - * interpreter and can behave as if this launcher is the real - * interpreter (looking for pyvenv configuration, ...) - */ - setenv("__PYVENV_LAUNCHER__", real_path, 1); - } - - /* - * Let argv[0] refer to the new interpreter. This is needed to - * get the effect we want on OSX 10.5 or earlier. That is, without - * changing argv[0] the real interpreter won't have access to - * the Window Server. - */ - argv[0] = exec_path; - -#ifdef HAVE_SPAWN_H - /* We're weak-linking to posix-spawnv to ensure that - * an executable build on 10.5 can work on 10.4. - */ - - if (&posix_spawn != NULL) { - posix_spawnattr_t spawnattr = NULL; - - setup_spawnattr(&spawnattr); - posix_spawn(NULL, exec_path, NULL, - &spawnattr, argv, environ); - err(1, "posix_spawn: %s", exec_path); - } -#endif - execve(exec_path, argv, environ); - err(1, "execve: %s", argv[0]); - /* NOTREACHED */ -} diff --git a/PC/WinMain.c b/PC/WinMain.c deleted file mode 100644 index 07e21ce3e9f2d5..00000000000000 --- a/PC/WinMain.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Minimal main program -- everything is loaded from the library. */ - -#include "Python.h" - -#define WIN32_LEAN_AND_MEAN -#include -#include /* __argc, __wargv */ - -int WINAPI wWinMain( - HINSTANCE hInstance, /* handle to current instance */ - HINSTANCE hPrevInstance, /* handle to previous instance */ - LPWSTR lpCmdLine, /* pointer to command line */ - int nCmdShow /* show state of window */ -) -{ - return Py_Main(__argc, __wargv); -} diff --git a/PC/_testconsole.c b/PC/_testconsole.c deleted file mode 100644 index 0dcea866f65d35..00000000000000 --- a/PC/_testconsole.c +++ /dev/null @@ -1,169 +0,0 @@ -/* Testing module for multi-phase initialization of extension modules (PEP 489) - */ - -// Need limited C API version 3.13 for Py_mod_gil -#include "pyconfig.h" // Py_GIL_DISABLED -#ifndef Py_GIL_DISABLED -# define Py_LIMITED_API 0x030d0000 -#endif - -#include "Python.h" - -#ifdef MS_WINDOWS - -#define WIN32_LEAN_AND_MEAN -#include -#include - - /* The full definition is in iomodule. We reproduce - enough here to get the fd, which is all we want. */ -typedef struct { - PyObject_HEAD - int fd; -} winconsoleio; - - -static int execfunc(PyObject *m) -{ - return 0; -} - -PyModuleDef_Slot testconsole_slots[] = { - {Py_mod_exec, execfunc}, - {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, - {Py_mod_gil, Py_MOD_GIL_NOT_USED}, - {0, NULL}, -}; - -/*[python input] -class HANDLE_converter(CConverter): - type = 'void *' - format_unit = '"_Py_PARSE_UINTPTR"' - - def parse_arg(self, argname, displayname, *, limited_capi): - return self.format_code(""" - {paramname} = PyLong_AsVoidPtr({argname}); - if (!{paramname} && PyErr_Occurred()) {{{{ - goto exit; - }}}} - """, - argname=argname) -[python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=380aa5c91076742b]*/ -/*[python end generated code:]*/ - -/*[clinic input] -module _testconsole - -_testconsole.write_input - file: object - s: Py_buffer - -Writes UTF-16-LE encoded bytes to the console as if typed by a user. -[clinic start generated code]*/ - -static PyObject * -_testconsole_write_input_impl(PyObject *module, PyObject *file, Py_buffer *s) -/*[clinic end generated code: output=58631a8985426ad3 input=68062f1bb2e52206]*/ -{ - INPUT_RECORD *rec = NULL; - - PyObject *mod = PyImport_ImportModule("_io"); - if (mod == NULL) { - return NULL; - } - - PyTypeObject *winconsoleio_type = (PyTypeObject *)PyObject_GetAttrString(mod, "_WindowsConsoleIO"); - Py_DECREF(mod); - if (winconsoleio_type == NULL) { - return NULL; - } - int is_subclass = PyObject_TypeCheck(file, winconsoleio_type); - Py_DECREF(winconsoleio_type); - if (!is_subclass) { - PyErr_SetString(PyExc_TypeError, "expected raw console object"); - return NULL; - } - - const wchar_t *p = (const wchar_t *)s->buf; - DWORD size = (DWORD)s->len / sizeof(wchar_t); - - rec = (INPUT_RECORD*)PyMem_Calloc(size, sizeof(INPUT_RECORD)); - if (!rec) - goto error; - - INPUT_RECORD *prec = rec; - for (DWORD i = 0; i < size; ++i, ++p, ++prec) { - prec->EventType = KEY_EVENT; - prec->Event.KeyEvent.bKeyDown = TRUE; - prec->Event.KeyEvent.wRepeatCount = 1; - prec->Event.KeyEvent.uChar.UnicodeChar = *p; - } - - HANDLE hInput = (HANDLE)_get_osfhandle(((winconsoleio*)file)->fd); - if (hInput == INVALID_HANDLE_VALUE) { - PyErr_SetFromErrno(PyExc_OSError); - goto error; - } - - DWORD total = 0; - while (total < size) { - DWORD wrote; - if (!WriteConsoleInputW(hInput, &rec[total], (size - total), &wrote)) { - PyErr_SetFromWindowsErr(0); - goto error; - } - total += wrote; - } - - PyMem_Free((void*)rec); - - Py_RETURN_NONE; -error: - if (rec) - PyMem_Free((void*)rec); - return NULL; -} - -/*[clinic input] -_testconsole.read_output - file: object - -Reads a str from the console as written to stdout. -[clinic start generated code]*/ - -static PyObject * -_testconsole_read_output_impl(PyObject *module, PyObject *file) -/*[clinic end generated code: output=876310d81a73e6d2 input=b3521f64b1b558e3]*/ -{ - Py_RETURN_NONE; -} - - -#include "clinic\_testconsole.c.h" - -PyMethodDef testconsole_methods[] = { - _TESTCONSOLE_WRITE_INPUT_METHODDEF - _TESTCONSOLE_READ_OUTPUT_METHODDEF - {NULL, NULL} -}; - -static PyModuleDef testconsole_def = { - PyModuleDef_HEAD_INIT, /* m_base */ - "_testconsole", /* m_name */ - PyDoc_STR("Test module for the Windows console"), /* m_doc */ - 0, /* m_size */ - testconsole_methods, /* m_methods */ - testconsole_slots, /* m_slots */ - NULL, /* m_traverse */ - NULL, /* m_clear */ - NULL, /* m_free */ -}; - -PyMODINIT_FUNC -PyInit__testconsole(PyObject *spec) -{ - return PyModuleDef_Init(&testconsole_def); -} - -#endif /* MS_WINDOWS */ diff --git a/PC/_wmimodule.cpp b/PC/_wmimodule.cpp deleted file mode 100644 index 251088253f66a5..00000000000000 --- a/PC/_wmimodule.cpp +++ /dev/null @@ -1,392 +0,0 @@ -// -// Helper library for querying WMI using its COM-based query API. -// -// Copyright (c) Microsoft Corporation -// Licensed to PSF under a contributor agreement -// - -// Version history -// 2022-08: Initial contribution (Steve Dower) - -// clinic/_wmimodule.cpp.h uses internal pycore_modsupport.h API -#ifndef Py_BUILD_CORE_BUILTIN -# define Py_BUILD_CORE_MODULE 1 -#endif - -#define _WIN32_DCOM -#include -#include -#include -#include - -#include - - -#if _MSVC_LANG >= 202002L -// We can use clinic directly when the C++ compiler supports C++20 -#include "clinic/_wmimodule.cpp.h" -#else -// Cannot use clinic because of missing C++20 support, so create a simpler -// API instead. This won't impact releases, so fine to omit the docstring. -static PyObject *_wmi_exec_query_impl(PyObject *module, PyObject *query); -#define _WMI_EXEC_QUERY_METHODDEF {"exec_query", _wmi_exec_query_impl, METH_O, NULL}, -#endif - - -/*[clinic input] -module _wmi -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=7ca95dad1453d10d]*/ - - - -struct _query_data { - LPCWSTR query; - HANDLE writePipe; - HANDLE readPipe; - HANDLE initEvent; - HANDLE connectEvent; -}; - - -static DWORD WINAPI -_query_thread(LPVOID param) -{ - IWbemLocator *locator = NULL; - IWbemServices *services = NULL; - IEnumWbemClassObject* enumerator = NULL; - HRESULT hr = S_OK; - BSTR bstrQuery = NULL; - _query_data data = *(struct _query_data*)param; - - // gh-125315: Copy the query string first, so that if the main thread gives - // up on waiting we aren't left with a dangling pointer (and a likely crash) - bstrQuery = SysAllocString(data.query); - if (!bstrQuery) { - hr = HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY); - } - - if (SUCCEEDED(hr)) { - hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - } - - if (FAILED(hr)) { - CloseHandle(data.writePipe); - if (bstrQuery) { - SysFreeString(bstrQuery); - } - return (DWORD)hr; - } - - hr = CoInitializeSecurity( - NULL, -1, NULL, NULL, - RPC_C_AUTHN_LEVEL_DEFAULT, - RPC_C_IMP_LEVEL_IMPERSONATE, - NULL, EOAC_NONE, NULL - ); - // gh-96684: CoInitializeSecurity will fail if another part of the app has - // already called it. Hopefully they passed lenient enough settings that we - // can complete the WMI query, so keep going. - if (hr == RPC_E_TOO_LATE) { - hr = 0; - } - if (SUCCEEDED(hr)) { - hr = CoCreateInstance( - CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, - IID_IWbemLocator, (LPVOID *)&locator - ); - } - if (SUCCEEDED(hr) && !SetEvent(data.initEvent)) { - hr = HRESULT_FROM_WIN32(GetLastError()); - } - if (SUCCEEDED(hr)) { - hr = locator->ConnectServer( - bstr_t(L"ROOT\\CIMV2"), - NULL, NULL, 0, NULL, 0, 0, &services - ); - } - if (SUCCEEDED(hr) && !SetEvent(data.connectEvent)) { - hr = HRESULT_FROM_WIN32(GetLastError()); - } - if (SUCCEEDED(hr)) { - hr = CoSetProxyBlanket( - services, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, - RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, - NULL, EOAC_NONE - ); - } - if (SUCCEEDED(hr)) { - hr = services->ExecQuery( - bstr_t("WQL"), - bstrQuery, - WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, - NULL, - &enumerator - ); - } - - // Okay, after all that, at this stage we should have an enumerator - // to the query results and can start writing them to the pipe! - IWbemClassObject *value = NULL; - int startOfEnum = TRUE; - int endOfEnum = FALSE; - while (SUCCEEDED(hr) && !endOfEnum) { - ULONG got = 0; - DWORD written; - hr = enumerator->Next(WBEM_INFINITE, 1, &value, &got); - if (hr == WBEM_S_FALSE) { - // Could be at the end, but still got a result this time - endOfEnum = TRUE; - hr = 0; - break; - } - if (FAILED(hr) || got != 1 || !value) { - continue; - } - if (!startOfEnum && !WriteFile(data.writePipe, (LPVOID)L"\0", 2, &written, NULL)) { - hr = HRESULT_FROM_WIN32(GetLastError()); - break; - } - startOfEnum = FALSE; - // Okay, now we have each resulting object it's time to - // enumerate its members - hr = value->BeginEnumeration(0); - if (FAILED(hr)) { - value->Release(); - break; - } - while (SUCCEEDED(hr)) { - BSTR propName; - VARIANT propValue; - long flavor; - hr = value->Next(0, &propName, &propValue, NULL, &flavor); - if (hr == WBEM_S_NO_MORE_DATA) { - hr = 0; - break; - } - if (SUCCEEDED(hr) && (flavor & WBEM_FLAVOR_MASK_ORIGIN) != WBEM_FLAVOR_ORIGIN_SYSTEM) { - WCHAR propStr[8192]; - hr = VariantToString(propValue, propStr, sizeof(propStr) / sizeof(propStr[0])); - if (SUCCEEDED(hr)) { - DWORD cbStr1, cbStr2; - cbStr1 = (DWORD)(wcslen(propName) * sizeof(propName[0])); - cbStr2 = (DWORD)(wcslen(propStr) * sizeof(propStr[0])); - if (!WriteFile(data.writePipe, propName, cbStr1, &written, NULL) || - !WriteFile(data.writePipe, (LPVOID)L"=", 2, &written, NULL) || - !WriteFile(data.writePipe, propStr, cbStr2, &written, NULL) || - !WriteFile(data.writePipe, (LPVOID)L"\0", 2, &written, NULL) - ) { - hr = HRESULT_FROM_WIN32(GetLastError()); - } - } - VariantClear(&propValue); - SysFreeString(propName); - } - } - value->EndEnumeration(); - value->Release(); - } - - if (bstrQuery) { - SysFreeString(bstrQuery); - } - if (enumerator) { - enumerator->Release(); - } - if (services) { - services->Release(); - } - if (locator) { - locator->Release(); - } - CoUninitialize(); - CloseHandle(data.writePipe); - return (DWORD)hr; -} - - -static DWORD -wait_event(HANDLE event, DWORD timeout) -{ - DWORD err = 0; - switch (WaitForSingleObject(event, timeout)) { - case WAIT_OBJECT_0: - break; - case WAIT_TIMEOUT: - err = WAIT_TIMEOUT; - break; - default: - err = GetLastError(); - break; - } - return err; -} - - -/*[clinic input] -_wmi.exec_query - - query: unicode - -Runs a WMI query against the local machine. - -This returns a single string with 'name=value' pairs in a flat array -separated by null characters. -[clinic start generated code]*/ - -static PyObject * -_wmi_exec_query_impl(PyObject *module, PyObject *query) -/*[clinic end generated code: output=a62303d5bb5e003f input=a8d5710acdfbf515]*/ - -/*[clinic end generated code]*/ -{ - PyObject *result = NULL; - HANDLE hThread = NULL; - int err = 0; - WCHAR buffer[8192]; - DWORD offset = 0; - DWORD bytesRead; - struct _query_data data = {0}; - - if (PySys_Audit("_wmi.exec_query", "O", query) < 0) { - return NULL; - } - - data.query = PyUnicode_AsWideCharString(query, NULL); - if (!data.query) { - return NULL; - } - - if (0 != _wcsnicmp(data.query, L"select ", 7)) { - PyMem_Free((void *)data.query); - PyErr_SetString(PyExc_ValueError, "only SELECT queries are supported"); - return NULL; - } - - Py_BEGIN_ALLOW_THREADS - - data.initEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - data.connectEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!data.initEvent || !data.connectEvent || - !CreatePipe(&data.readPipe, &data.writePipe, NULL, 0)) - { - err = GetLastError(); - } else { - hThread = CreateThread(NULL, 0, _query_thread, (LPVOID*)&data, 0, NULL); - if (!hThread) { - err = GetLastError(); - // Normally the thread proc closes this handle, but since we never started - // we need to close it here. - CloseHandle(data.writePipe); - } - } - - // gh-112278: If current user doesn't have permission to query the WMI, the - // function IWbemLocator::ConnectServer will hang for 5 seconds, and there - // is no way to specify the timeout. So we use an Event object to simulate - // a timeout. The initEvent will be set after COM initialization, it will - // take a longer time when first initialized. The connectEvent will be set - // after connected to WMI. - if (!err) { - err = wait_event(data.initEvent, 1000); - if (!err) { - err = wait_event(data.connectEvent, 100); - } - } - - while (!err) { - if (ReadFile( - data.readPipe, - (LPVOID)&buffer[offset / sizeof(buffer[0])], - sizeof(buffer) - offset, - &bytesRead, - NULL - )) { - offset += bytesRead; - if (offset >= sizeof(buffer)) { - err = ERROR_MORE_DATA; - } - } else { - err = GetLastError(); - } - } - - if (data.readPipe) { - CloseHandle(data.readPipe); - } - - if (hThread) { - // Allow the thread some time to clean up - int thread_err; - switch (WaitForSingleObject(hThread, 100)) { - case WAIT_OBJECT_0: - // Thread ended cleanly - if (!GetExitCodeThread(hThread, (LPDWORD)&thread_err)) { - thread_err = GetLastError(); - } - break; - case WAIT_TIMEOUT: - // Probably stuck - there's not much we can do, unfortunately - thread_err = WAIT_TIMEOUT; - break; - default: - thread_err = GetLastError(); - break; - } - // An error on our side is more likely to be relevant than one from - // the thread, but if we don't have one on our side we'll take theirs. - if (err == 0 || err == ERROR_BROKEN_PIPE) { - err = thread_err; - } - - CloseHandle(hThread); - } - - CloseHandle(data.initEvent); - CloseHandle(data.connectEvent); - hThread = NULL; - - Py_END_ALLOW_THREADS - - PyMem_Free((void *)data.query); - - if (err == ERROR_MORE_DATA) { - PyErr_Format(PyExc_OSError, "Query returns more than %zd characters", Py_ARRAY_LENGTH(buffer)); - return NULL; - } else if (err) { - PyErr_SetFromWindowsErr(err); - return NULL; - } - - if (!offset) { - return PyUnicode_FromStringAndSize(NULL, 0); - } - return PyUnicode_FromWideChar(buffer, offset / sizeof(buffer[0]) - 1); -} - - -static PyMethodDef wmi_functions[] = { - _WMI_EXEC_QUERY_METHODDEF - { NULL, NULL, 0, NULL } -}; - -static PyModuleDef_Slot wmi_slots[] = { - {Py_mod_gil, Py_MOD_GIL_NOT_USED}, - {0, NULL}, -}; - -static PyModuleDef wmi_def = { - PyModuleDef_HEAD_INIT, - "_wmi", - NULL, // doc - 0, // m_size - wmi_functions, // m_methods - wmi_slots, // m_slots -}; - -extern "C" { - PyMODINIT_FUNC PyInit__wmi(void) - { - return PyModuleDef_Init(&wmi_def); - } -} diff --git a/PC/classicAppCompat.can.xml b/PC/classicAppCompat.can.xml deleted file mode 100644 index df361f8e3e2cd3..00000000000000 --- a/PC/classicAppCompat.can.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/classicAppCompat.cat b/PC/classicAppCompat.cat deleted file mode 100644 index 3d213596accffa..00000000000000 Binary files a/PC/classicAppCompat.cat and /dev/null differ diff --git a/PC/classicAppCompat.sccd b/PC/classicAppCompat.sccd deleted file mode 100644 index d7a70cdd0533c3..00000000000000 --- a/PC/classicAppCompat.sccd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MIIucgYJKoZIhvcNAQcCoIIuYzCCLl8CAQExDzANBglghkgBZQMEAgEFADCCARAGCSsGAQQBgjcKAaCCAQEwgf4wDAYKKwYBBAGCNwwBAQQQ293slyDTMUOmVyeQqmcNSBcNMjIwMjA0MDkwNjU2WjAOBgorBgEEAYI3DAEDBQAwgbwwKgQUdgFpbn9QXi/ly4CZFKA2Eimoq6YxEjAQBgorBgEEAYI3DAIDMQKCADCBjQQg3YHMbvV3unL0mx/RJ8ihTJd1C/SYSnMHbN0yMrWijuQxaTAQBgorBgEEAYI3DAIDMQKCADBVBgorBgEEAYI3AgEEMUcwRTAQBgorBgEEAYI3AgEZogKAADAxMA0GCWCGSAFlAwQCAQUABCDdgcxu9Xe6cvSbH9EnyKFMl3UL9JhKcwds3TIytaKO5KCCE8owggYEMIID7KADAgECAhMzAA/d9uEraWrDsxZGAAAAD932MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMQwwCgYDVQQLEwNBT0MxJzAlBgNVBAMTHk1pY3Jvc29mdCBNYXJrZXRwbGFjZSBDQSBHIDAyMjAeFw0yMjAyMDQwODU5MzZaFw0yMjAyMDcwODU5MzZaMC8xLTArBgNVBAMTJDQ2ZTIwYzY2LTUxNTEtNDNhOS05MWQ4LTMwNDY0ZGZhMDg4ZjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALaMR5Ajlp2POidTxT0N47z5sukiE9fqMuI1QimTXIfB2/gPdMsNUbVCD57ha8J1DUJQpO5nuunbk3SONwfDTdWKx9u7zWubpEmgG7hZ8LTKFlF+xhS6lS/FBSSHyXpdScWPg62BMnDysqHMH/AjLw26HNPRWK8A0vx9jsalFwLg15u4MPuKN3Bpawr/OL0B+7eh/dGO3PutAqJ4aZs2lUCIyODg0q3Tzhgi7SIvFacFWJ8Qj6+D3AfasOv8oanfpNLLPhPlxXGEK9sMKHOOb8mTU9V/ibERqEKTHkJ24Vu+BwrXq5eVedtwmHT2WWR7teaIvrUT9AiPmMhx4hIF/0MCAwEAAaOCAbowggG2MBgGA1UdJQEB/wQOMAwGCisGAQQBgjdMHAEwHQYDVR0OBBYEFB4NpkpeSLk/j691tPw97rB4XKDJMA0GA1UdEQQGMASCAlVTMB8GA1UdIwQYMBaAFPeC7EkBPjJR1eFAcP4hAMeQ72IPMF8GA1UdHwRYMFYwVKBSoFCGTmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY3Jvc29mdCUyME1hcmtldHBsYWNlJTIwQ0ElMjBHJTIwMDIyLmNybDBsBggrBgEFBQcBAQRgMF4wXAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2VydHMvTWljcm9zb2Z0JTIwTWFya2V0cGxhY2UlMjBDQSUyMEclMjAwMjIuY3J0MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgXgMDwGCSsGAQQBgjcVBwQvMC0GJSsGAQQBgjcVCIOS9kTqrxCDkY0wgqzgLIKinDE0g+6NOIaE7wACAWQCARcwIAYJKwYBBAGCNxUKAQH/BBAwDjAMBgorBgEEAYI3TBwBMA0GCSqGSIb3DQEBCwUAA4ICAQBAiJuIJeMS+PMrxG+kwPWT7yy7A6P8trchwtXyYep/WXu7xT2tH2ys3wuP4DYG5CY4nKekjTKraQhZGuYj4r4KrUviShe8ZWMIcK4MRduXAU81UOd/fsCq5djQ6NDN4Bzq1TxjwZKiEMEWmXaunj6XAlDSX3SgyyMb/ywmur8VVKO+xFVkOxAqCjNo1VaCv3zEvr3Y6dUwO9gYQui1bAQVQzdxRYUPEJlsFBmbNL1AnZ39r4/9K/6orxavU4qwkj4cXnhtMYKDjTIIbTBrfD4glP6mnmkcZpN0ItfEAVgU9rGpXg84hQLeP83nBs2Y8DrF3bBF9867dJCl90c5rK1DMcelmH3oUAwqZ3U+jIIj3HGyfefAQ6HPL0yiY9OYLXQZUxcZF13m92l5s7dy2C21cIh0W0iTcWPIhNn9cia4Hr7FabTC0RoQkO1bg0PKvPMnoe0AqEVmPKImNDncg538AjPy2qeUxn7+0kcuZWEdKVAPwWfzh5qvSAmYKk4XNBfN2E40GQ0ruRdvMVMFeYBLXKm4SJR6zoiBa5v7qzt1uQqZf6GD4BNFZivBp0P2B9lTubEAU6SmUsazRnEVmekIO+x7gDuXbMS8tv6mb1pbGCtIV/wRcIYNcDkHKTHMbW5xR/OmGTM3mPRxoMQtaWtxIeagZkU2nl+pElA/0h7pIjCCBtcwggS/oAMCAQICCmESRKIAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAyMDExMB4XDTExMDMyODIxMDkzOVoXDTMxMDMyODIxMTkzOVowfTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEnMCUGA1UEAxMeTWljcm9zb2Z0IE1hcmtldFBsYWNlIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAubUaSwGYVsE3MAnPfvmozUhAB3qxBABgJRW1vDp4+tVinXxD32f7k1K89JQ6zDOgS/iDgULC+yFK1K/1Qjac/0M7P6c8v5LSjnWGlERLa/qY32j46S7SLQcit3g2jgoTTO03eUG+9yHZUTGV/FJdRYB8uXhrznJBa+Y+yGwiQKF+m6XFeBH/KORoKFx+dmMoy9EWJ/m/o9IiUj2kzm9C691+vZ/I2w0Bj93W9SPPkV2PCNHlzgfIAoeajWpHmi38Wi3xZHonkzAVBHxPsCBppOoNsWvmAfUM7eBthkSPvFruekyDCPNEYhfGqgqtqLkoBebXLZCOVybF7wTQaLvse60//3P003icRcCoQYgY4NAqrF7j80o5U7DkeXxcB0xvengsaKgiAaV1DKkRbpe98wCqr1AASvm5rAJUYMU+mXmOieV2EelY2jGrenWe9FQpNXYV1NoWBh0WKoFxttoWYAnF705bIWtSZsz08ZfK6WLX4GXNLcPBlgCzfTm1sdKYASWdBbH2haaNhPapFhQQBJHKwnVW2iXErImhuPi45W3MVTZ5D9ASshZx69cLYY6xAdIa+89Kf/uRrsGOVZfahDuDw+NI183iAyzC8z/QRt2P32LYxP0xrCdqVh+DJo2i4NoE8Uk1usCdbVRuBMBQl/AwpOTq7IMvHGElf65CqzUCAwEAAaOCAUswggFHMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBQPU8s/FmEl/mCJHdO5fOiQrbOU0TAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCjuZmM8ZVNDgp9wHsL4RY8KJ8nLinvxFTphNGCrxaLknkYG5pmMhVlX+UB/tSiW8W13W60nggz9u5xwMx7v/1t/Tgm6g2brVyOKI5A7u6/2SIJwkJKFw953K0YIKVT28w9zl8dSJnmRnyR0G86ncWbF6CLQ6A6lBQ9o2mTGVqDr4m35WKAnc6YxUUM1y74mbzFFZr63VHsCcOp3pXWnUqAY1rb6Q6NX1b3clncKqLFm0EjKHcQ56grTbwuuB7pMdh/IFCJR01MQzQbDtpEisbOeZUi43YVAAHKqI1EO9bRwg3frCjwAbml9MmI4utMW94gWFgvrMxIX+n42RBDIjf3Ot3jkT6gt3XeTTmO9bptgblZimhERdkFRUFpVtkocJeLoGuuzP93uH/Yp032wzRH+XmMgujfZv+vnfllJqxdowoQLx55FxLLeTeYfwi/xMSjZO2gNven3U/3KeSCd1kUOFS3AOrwZ0UNOXJeW5JQC6Vfd1BavFZ6FAta1fMLu3WFvNB+FqeHUaU3ya7rmtxJnzk29DeSqXgGNmVSywBS4NajI5jJIKAA6UhNJlsg8CHYwUOKf5ej8OoQCkbadUxXygAfxCfW2YBbujtI+PoyejRFxWUjYFWO5LeTI62UMyqfOEiqugoYjNxmQZla2s4YHVuqIC34R85FQlg9pKQBsDCCBuMwggTLoAMCAQICEzMAAABLZz0Eed1JFCkAAAAAAEswDQYJKoZIhvcNAQELBQAwfTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEnMCUGA1UEAxMeTWljcm9zb2Z0IE1hcmtldFBsYWNlIFBDQSAyMDExMB4XDTE5MDQxODIwNDUwNFoXDTI0MDQxODIwNDUwNFowgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xDDAKBgNVBAsTA0FPQzEnMCUGA1UEAxMeTWljcm9zb2Z0IE1hcmtldHBsYWNlIENBIEcgMDIyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAzGfV5tDxZ3oPG8aq2OwrBLSRFC61lYvWtkqOdKswlBHVncuoOIzekLIFNsMwluoK0plNZ5w/JPmwkGTGIrt9ftbWQz0k7XRfacXvQQfhCaBgjkybvvDx7CTL0UDEUiXfEEkylUcQKOdm9LApPDP4oO/V8RS4ugkqkjsuVaOyfYv0TytjVVQon72W+wR/AyrBAXgfwzzEb85403GTJRzQMlTw1YqdgS/o9SCsvH9dRZTGlWCatIl+a00eTG5zgeu0xCtqwgERhw9UT6mlPqmp6RqJ8XMgKylh9Ss+jI53EmraAFlelph16kuqF6n3vNnRBfhQ+gmNdtKi9s3jI8Di7ip8hYGPHGGhtcw0AYUg5r/VQhIfXxO45zO7SFvjujX0ji0b3WKB/xD9Sg1KO1fiTpj82ifyPqHvL+iwn5dV98C4ru0dQ0hfK7tA4K5qkW+2gym0fBjGYWq81/smrj6LbPdNqCotgTMU4dCMBhmSJOD9fSiPUybrbHJrHGR5YNs5VJbHH5u1ia8UrgsSrGTb1bh38Tb10matJpBI7NwDWTkV7kMvgNRQsGO/1+dg47PLW3X7TbiZniTPC+oAqOh1CiF+ODnem4Nw1iRw854LN3yqibLHgTi093mCBtPGWZxg2sTcHUX4fo/UHNbSh8bERJznnennm4gEJXAYtpnEFSUCAwEAAaOCAUswggFHMA4GA1UdDwEB/wQEAwIBhjAQBgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU94LsSQE+MlHV4UBw/iEAx5DvYg8wGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwEgYDVR0TAQH/BAgwBgEB/wIBADAfBgNVHSMEGDAWgBQPU8s/FmEl/mCJHdO5fOiQrbOU0TBXBgNVHR8EUDBOMEygSqBIhkZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNNYXJQQ0EyMDExXzIwMTEtMDMtMjguY3JsMFsGCCsGAQUFBwEBBE8wTTBLBggrBgEFBQcwAoY/aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNNYXJQQ0EyMDExXzIwMTEtMDMtMjguY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQAbTWps31OnBv77EVpCaU68drubToSKtpw9fYt4MvAhorXGRrRRfS6qou5o45QZAKjwzbOrr33dWxF4P3gCGqZxCotW32p6hlXGP7BnYlVw6242nlX0PahgpyWVWBmi0ElKH8N6HYhJqAW74tUNCzY7ALNMwk/JVEMKpWq+5XqutAEmtP0SdoSZPRwPtdiRjMLS8yyjP4HVAiKJ+m0wV3bLBtCG20BttEGkly7fYa2/E0ps41PLeX3T2yKRgmnGjhD16NUcMDdRpBh7MCXktwpISDEanB8QySJNdErU+NaKukgOW68+Oyk7lGiiZcG3boCGNec9JkM7dQdpA4tneQg0FI/o0mkDZR5aVItbAjRfMgAXpm6Hfu9DqOP+/R0K9v+CwyhwEjF3+SeL8YBAijXHD5YaiWzwZzBDtNQpuOXc91NmF7ifdHVy9IE1EhuIIQsMio3l0Uo87vGdwQ50po8o1F72zi1vfvKfDmszVezk6fF7cy7fZYh8I0ceVbZ4XY4xJ76TdYMItUAoPkvVdDq5B/d4oI7/xHfomRsEw08fuLxCRE8/BcvzSlDpnxu4wL6IULqVwHE+fbQ82Lr5ZDLxa1dYUw8zBGgCnx/ObVPj1RO1CaVi13wCxm8yaHeflKJWw7ZHOLeOGQyMRT+f9cFFk+5fzCA9GcwiSlEyYj4ilzGCGWUwghlhAgEBMIGjMIGLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMQwwCgYDVQQLEwNBT0MxJzAlBgNVBAMTHk1pY3Jvc29mdCBNYXJrZXRwbGFjZSBDQSBHIDAyMgITMwAP3fbhK2lqw7MWRgAAAA/d9jANBglghkgBZQMEAgEFAKCBjzAYBgkqhkiG9w0BCQMxCwYJKwYBBAGCNwoBMC8GCSqGSIb3DQEJBDEiBCBDgOMhvMousTIzk/P1eC2qGiSJLdSm3brGanFMLa41+DBCBgorBgEEAYI3AgEMMTQwMqAUgBIATQBpAGMAcgBvAHMAbwBmAHShGoAYaHR0cDovL3d3dy5taWNyb3NvZnQuY29tMA0GCSqGSIb3DQEBAQUABIIBAJ8LEwzLh2rDfLOOOodKT10yXoCzHPaQLv9sMwei+650mqV0iHaw9bUolBZAdBnF7JBRjY+yb9AIF7M/Av9pHRKvuLHWDntlo49RrfvNucHaJqPjCMm81h/GAuimPSBMpRtTCW+HHDWrw+HoGbRWQ+N/Vpt//pzj9gAzOzs8W9gU0RMz3ub4Hfgunm/CGACjFu5Hi2sjJbgigNlyRnxjI4+h3J7dGVOfR8hlhRB9YjXDB700F0bzaKqxC9LH7kZbAjiHPgLLCWz7OQ/rTo7wV5/e6v9GCKpamydPy/0MObq4TDi0fn75aVHTJJrzlwt1BJKyVPdAsOhiFUH3Mq4WheKhghcAMIIW/AYKKwYBBAGCNwMDATGCFuwwghboBgkqhkiG9w0BBwKgghbZMIIW1QIBAzEPMA0GCWCGSAFlAwQCAQUAMIIBUQYLKoZIhvcNAQkQAQSgggFABIIBPDCCATgCAQEGCisGAQQBhFkKAwEwMTANBglghkgBZQMEAgEFAAQgr34HNu5gF3j5DAITqq38vc6sNxs6ZqLz9i9zU2oQDtoCBmH66bcTCRgTMjAyMjAyMDQwOTA5NDkuNTkxWjAEgAIB9KCB0KSBzTCByjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046REQ4Qy1FMzM3LTJGQUUxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2WgghFXMIIHDDCCBPSgAwIBAgITMwAAAZwPpk1h0p5LKAABAAABnDANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAeFw0yMTEyMDIxOTA1MTlaFw0yMzAyMjgxOTA1MTlaMIHKMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpERDhDLUUzMzctMkZBRTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANtSKgwZXUkWP6zrXazTaYq7bco9Q2zvU6MN4ka3GRMX2tJZOK4DxeBiQACL/n7YV/sKTslwpD0f9cPU4rCDX9sfcTWo7XPxdHLQ+WkaGbKKWATsqw69bw8hkJ/bjcp2V2A6vGsvwcqJCh07BK3JPmUtZikyy5PZ8fyTyiKGN7hOWlaIU9oIoucUNoAHQJzLq8h20eNgHUh7eI5k+Kyq4v6810LHuA6EHyKJOZN2xTw5JSkLy0FN5Mhg/OaFrFBl3iag2Tqp4InKLt+Jbh/Jd0etnei2aDHFrmlfPmlRSv5wSNX5zAhgEyRpjmQcz1zp0QaSAefRkMm923/ngU51IbrVbAeHj569SHC9doHgsIxkh0K3lpw582+0ONXcIfIU6nkBT+qADAZ+0dT1uu/gRTBy614QAofjo258TbSX9aOU1SHuAC+3bMoyM7jNdHEJROH+msFDBcmJRl4VKsReI5+S69KUGeLIBhhmnmQ6drF8Ip0ZiO+vhAsD3e9AnqnY7Hcge850I9oKvwuwpVwWnKnwwSGElMz7UvCocmoUMXk7Vn2aNti+bdH28+GQb5EMsqhOmvuZOCRpOWN33G+b3g5unwEP0eTiY+LnWa2AuK43z/pplURJVle29K42QPkOcglB6sjLmNpEpb9basJ72eA0Mlp1LtH3oYZGXsggTfuXAgMBAAGjggE2MIIBMjAdBgNVHQ4EFgQUu2kJZ1Ndjl2112SynL6jGMID+rIwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYDVR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jcmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwGCCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDANBgkqhkiG9w0BAQsFAAOCAgEApwAqpiMYRzNNYyz3PSbtijbeyCpUXcvIrqA4zPtMIcAk34W9u9mRDndWS+tlR3WwTpr1OgaV1wmc6YFzqK6EGWm903UEsFE7xBJMPXjfdVOPhcJB3vfvA0PX56oobcF2OvNsOSwTB8bi/ns+Cs39Puzs+QSNQZd8iAVBCSvxNCL78dln2RGU1xyB4AKqV9vi4Y/Gfmx2FA+jF0y+YLeob0M40nlSxL0q075t7L6iFRMNr0u8ROhzhDPLl+4ePYfUmyYJoobvydel9anAEsHFlhKl+aXb2ic3yNwbsoPycZJL/vo8OVvYYxCy+/5FrQmAvoW0ZEaBiYcKkzrNWt/hX9r5KgdwL61x0ZiTZopTko6W/58UTefTbhX7Pni0MApH3Pvyt6N0IFap+/LlwFRD1zn7e6ccPTwESnuo/auCmgPznq80OATA7vufsRZPvqeX8jKtsraSNscvNQymEWlcqdXV9hYkjb4T/Qse9cUYaoXg68wFHFuslWfTdPYPLl1vqzlPMnNJpC8KtdioDgcq+y1BaSqSm8EdNfwzT37+/JFtVc3Gs915fDqgPZDgOSzKQIV+fw3aPYt2LET3AbmKKW/r13Oy8cg3+D0D362GQBAJVv0NRI5NowgaCw6oNgWOFPrN72WSEcca/8QQiTGP2XpLiGpRDJZ6sWRpRYNdydkwggdxMIIFWaADAgECAhMzAAAAFcXna54Cm0mZAAAAAAAVMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgMjAxMDAeFw0yMTA5MzAxODIyMjVaFw0zMDA5MzAxODMyMjVaMHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5OGmTOe0ciELeaLL1yR5vQ7VgtP97pwHB9KpbE51yMo1V/YBf2xK4OK9uT4XYDP/XE/HZveVU3Fa4n5KWv64NmeFRiMMtY0Tz3cywBAY6GB9alKDRLemjkZrBxTzxXb1hlDcwUTIcVxRMTegCjhuje3XD9gmU3w5YQJ6xKr9cmmvHaus9ja+NSZk2pg7uhp7M62AW36MEBydUv626GIl3GoPz130/o5Tz9bshVZN7928jaTjkY+yOSxRnOlwaQ3KNi1wjjHINSi947SHJMPgyY9+tVSP3PoFVZhtaDuaRr3tpK56KTesy+uDRedGbsoy1cCGMFxPLOJiss254o2I5JasAUq7vnGpF1tnYN74kpEeHT39IM9zfUGaRnXNxF803RKJ1v2lIH1+/NmeRd+2ci/bfV+AutuqfjbsNkz2K26oElHovwUDo9Fzpk03dJQcNIIP8BDyt0cY7afomXw/TNuvXsLz1dhzPUNOwTM5TI4CvEJoLhDqhFFG4tG9ahhaYQFzymeiXtcodgLiMxhy16cg8ML6EgrXY28MyTZki1ugpoMhXV8wdJGUlNi5UPkLiWHzNgY1GIRH29wb0f2y1BzFa/ZcUlFdEtsluq9QBXpsxREdcu+N+VLEhReTwDwV2xo3xwgVGD94q0W29R6HXtqPnhZyacaue7e3PmriLq0CAwEAAaOCAd0wggHZMBIGCSsGAQQBgjcVAQQFAgMBAAEwIwYJKwYBBAGCNxUCBBYEFCqnUv5kxJq+gpE8RjUpzxD/LwTuMB0GA1UdDgQWBBSfpxVdAF5iXYP05dJlpxtTNRnpcjBcBgNVHSAEVTBTMFEGDCsGAQQBgjdMg30BATBBMD8GCCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL0RvY3MvUmVwb3NpdG9yeS5odG0wEwYDVR0lBAwwCgYIKwYBBQUHAwgwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZWy4/oolxiaNE9lJBb186aGMQwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcnQwDQYJKoZIhvcNAQELBQADggIBAJ1VffwqreEsH2cBMSRb4Z5yS/ypb+pcFLY+TkdkeLEGk5c9MTO1OdfCcTY/2mRsfNB1OW27DzHkwo/7bNGhlBgi7ulmZzpTTd2YurYeeNg2LpypglYAA7AFvonoaeC6Ce5732pvvinLbtg/SHUB2RjebYIM9W0jVOR4U3UkV7ndn/OOPcbzaN9l9qRWqveVtihVJ9AkvUCgvxm2EhIRXT0n4ECWOKz3+SmJw7wXsFSFQrP8DJ6LGYnn8AtqgcKBGUIZUnWKNsIdw2FzLixre24/LAl4FOmRsqlb30mjdAy87JGA0j3mSj5mO0+7hvoyGtmW9I/2kQH2zsZ0/fZMcm8Qq3UwxTSwethQ/gpY3UA8x1RtnWN0SCyxTkctwRQEcb9k+SS+c23Kjgm9swFXSVRk2XPXfx5bRAGOWhmRaw2fpCjcZxkoJLo4S5pu+yFUa2pFEUep8beuyOiJXk+d0tBMdrVXVAmxaQFEfnyhYWxz/gq77EFmPWn9y8FBSX5+k77L+DvktxW/tM4+pTFRhLy/AsGConsXHRWJjXD+57XQKBqJC4822rpM+Zv/Cuk0+CQ1ZyvgDbjmjJnW4SLq8CdCPSWU5nR0W2rRnj7tfqAxM328y+l7vzhwRNGQ8cirOoo6CGJ/2XBjU02N7oJtpQUQwXEGahC0HVUzWLOhcGbyoYICzjCCAjcCAQEwgfihgdCkgc0wgcoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1pY3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNOOkREOEMtRTMzNy0yRkFFMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMKAQEwBwYFKw4DAhoDFQDN2Wnq3fCz9ucStub1zQz7129TQKCBgzCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMA0GCSqGSIb3DQEBBQUAAgUA5adiZjAiGA8yMDIyMDIwNDE2MjkyNloYDzIwMjIwMjA1MTYyOTI2WjB3MD0GCisGAQQBhFkKBAExLzAtMAoCBQDlp2JmAgEAMAoCAQACAh92AgH/MAcCAQACAhFfMAoCBQDlqLPmAgEAMDYGCisGAQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSChCjAIAgEAAgMBhqAwDQYJKoZIhvcNAQEFBQADgYEAbKzHReDTwgAKGSkgO/zxCAV/RcxwGpZK4M2bWgwqHVIi+/xiAKdQOSKeMz3UwRO4LI4EN4BjeK+ATpruzOtVGkyA8yzwdJFPv99j4O/Hc5kJSvovfECah62tBB3siNIFaAYNK+BF76k3j4+y9q9lF5yjQ8ZylVYbOfOjlJ2uevsxggQNMIIECQIBATCBkzB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAAAZwPpk1h0p5LKAABAAABnDANBglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMC8GCSqGSIb3DQEJBDEiBCD10XWSucJFd8jLe5PaC9h9/GHXK7ZZ0kb4BGFNqgWk9DCB+gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EIDcPRYUgjSzKOhF39d4QgbRZQgrPO7Lo/qE5GtvSeqa8MIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAGcD6ZNYdKeSygAAQAAAZwwIgQgPTEmgx6rn5xpH+xmlpYkcn0dL16GyYRqyG8uRajrfTYwDQYJKoZIhvcNAQELBQAEggIAxmSLisdd5cs+7liXX7vsF8zX3Y1rbtyPZ0M466WBaVULlfeuu9RMzOhWha7bkfYmKs5hXOQNBJrIHxnHbWeDu/V7EVF80IQ7/6qWiVPNcLtMnS8+uyw3Tby2gEhshO/HHOJRqllrgtUGuPl8FoAAPbPKV7X7jrg1kqOWoqpwyiSzt5cN/qijwfTcTIaPeON5wMd8wRT2l5F9e/JDBSq0WuzYb2r0kifv9wq21orm4sQkbg5GgDa/oCr3PQVCNSvPb2G7HANcqJXHeRKyoCeVhX5UaFrCQbdxGFytOc5GzptQKNn18yGg4VYrFpigUcglLbuREqqlPabwZh/QfgKdp4b4uVA6On5HIV5e9XdJ9TXhvDArEQ+Kgyao5xlgb4MkvPO9Thh9UIbw9r3JhQ+uKnCvXyiE2SpTLq1OXTjt/RrLZb+qsZW4nrDRBlBswa4G5OVW/svvI8N2/+YYrSdaCWt4unWSnSxeVUWZkugBmWdeoEJpfs5Qy8NwC+g1TyXcMjolOFTfBB6JYpHCbk6Euh2gKxq5weBb7puxVN4cvawYY2zorp6ZXtAmQGflZTl02nWld+nvDoF/zi6IUmP7PTKvbEVs8T+QkCiIM7cpLMs4NFK29f33lu1iZeGwJAxCYsV/P7geuRfA++bpDutTXjLKMqUTgf00sqJ/5HGuwLE= diff --git a/PC/clinic/_testconsole.c.h b/PC/clinic/_testconsole.c.h deleted file mode 100644 index 4c11e545499ac5..00000000000000 --- a/PC/clinic/_testconsole.c.h +++ /dev/null @@ -1,82 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -#if defined(MS_WINDOWS) - -PyDoc_STRVAR(_testconsole_write_input__doc__, -"write_input($module, /, file, s)\n" -"--\n" -"\n" -"Writes UTF-16-LE encoded bytes to the console as if typed by a user."); - -#define _TESTCONSOLE_WRITE_INPUT_METHODDEF \ - {"write_input", (PyCFunction)(void(*)(void))_testconsole_write_input, METH_VARARGS|METH_KEYWORDS, _testconsole_write_input__doc__}, - -static PyObject * -_testconsole_write_input_impl(PyObject *module, PyObject *file, Py_buffer *s); - -static PyObject * -_testconsole_write_input(PyObject *module, PyObject *args, PyObject *kwargs) -{ - PyObject *return_value = NULL; - static char *_keywords[] = {"file", "s", NULL}; - PyObject *file; - Py_buffer s = {NULL, NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oy*:write_input", _keywords, - &file, &s)) - goto exit; - return_value = _testconsole_write_input_impl(module, file, &s); - -exit: - /* Cleanup for s */ - if (s.obj) { - PyBuffer_Release(&s); - } - - return return_value; -} - -#endif /* defined(MS_WINDOWS) */ - -#if defined(MS_WINDOWS) - -PyDoc_STRVAR(_testconsole_read_output__doc__, -"read_output($module, /, file)\n" -"--\n" -"\n" -"Reads a str from the console as written to stdout."); - -#define _TESTCONSOLE_READ_OUTPUT_METHODDEF \ - {"read_output", (PyCFunction)(void(*)(void))_testconsole_read_output, METH_VARARGS|METH_KEYWORDS, _testconsole_read_output__doc__}, - -static PyObject * -_testconsole_read_output_impl(PyObject *module, PyObject *file); - -static PyObject * -_testconsole_read_output(PyObject *module, PyObject *args, PyObject *kwargs) -{ - PyObject *return_value = NULL; - static char *_keywords[] = {"file", NULL}; - PyObject *file; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:read_output", _keywords, - &file)) - goto exit; - return_value = _testconsole_read_output_impl(module, file); - -exit: - return return_value; -} - -#endif /* defined(MS_WINDOWS) */ - -#ifndef _TESTCONSOLE_WRITE_INPUT_METHODDEF - #define _TESTCONSOLE_WRITE_INPUT_METHODDEF -#endif /* !defined(_TESTCONSOLE_WRITE_INPUT_METHODDEF) */ - -#ifndef _TESTCONSOLE_READ_OUTPUT_METHODDEF - #define _TESTCONSOLE_READ_OUTPUT_METHODDEF -#endif /* !defined(_TESTCONSOLE_READ_OUTPUT_METHODDEF) */ -/*[clinic end generated code: output=d60ce07157e3741a input=a9049054013a1b77]*/ diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h deleted file mode 100644 index 73d93ed9eafc45..00000000000000 --- a/PC/clinic/_wmimodule.cpp.h +++ /dev/null @@ -1,72 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -# include "pycore_gc.h" // PyGC_Head -# include "pycore_runtime.h" // _Py_ID() -#endif -#include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - -PyDoc_STRVAR(_wmi_exec_query__doc__, -"exec_query($module, /, query)\n" -"--\n" -"\n" -"Runs a WMI query against the local machine.\n" -"\n" -"This returns a single string with \'name=value\' pairs in a flat array\n" -"separated by null characters."); - -#define _WMI_EXEC_QUERY_METHODDEF \ - {"exec_query", _PyCFunction_CAST(_wmi_exec_query), METH_FASTCALL|METH_KEYWORDS, _wmi_exec_query__doc__}, - -static PyObject * -_wmi_exec_query_impl(PyObject *module, PyObject *query); - -static PyObject * -_wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) -{ - PyObject *return_value = NULL; - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - #define NUM_KEYWORDS 1 - static struct { - PyGC_Head _this_is_not_used; - PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; - } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(query), }, - }; - #undef NUM_KEYWORDS - #define KWTUPLE (&_kwtuple.ob_base.ob_base) - - #else // !Py_BUILD_CORE - # define KWTUPLE NULL - #endif // !Py_BUILD_CORE - - static const char * const _keywords[] = {"query", NULL}; - static _PyArg_Parser _parser = { - .keywords = _keywords, - .fname = "exec_query", - .kwtuple = KWTUPLE, - }; - #undef KWTUPLE - PyObject *argsbuf[1]; - PyObject *query; - - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); - if (!args) { - goto exit; - } - if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("exec_query", "argument 'query'", "str", args[0]); - goto exit; - } - query = args[0]; - return_value = _wmi_exec_query_impl(module, query); - -exit: - return return_value; -} -/*[clinic end generated code: output=fefbbab59fa1584b input=a9049054013a1b77]*/ diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h deleted file mode 100644 index e3f7ea43f38211..00000000000000 --- a/PC/clinic/msvcrtmodule.c.h +++ /dev/null @@ -1,700 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -#include "pycore_modsupport.h" // _PyArg_CheckPositional() - -PyDoc_STRVAR(msvcrt_heapmin__doc__, -"heapmin($module, /)\n" -"--\n" -"\n" -"Minimize the malloc() heap.\n" -"\n" -"Force the malloc() heap to clean itself up and return unused blocks\n" -"to the operating system. On failure, this raises OSError."); - -#define MSVCRT_HEAPMIN_METHODDEF \ - {"heapmin", (PyCFunction)msvcrt_heapmin, METH_NOARGS, msvcrt_heapmin__doc__}, - -static PyObject * -msvcrt_heapmin_impl(PyObject *module); - -static PyObject * -msvcrt_heapmin(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - return msvcrt_heapmin_impl(module); -} - -PyDoc_STRVAR(msvcrt_locking__doc__, -"locking($module, fd, mode, nbytes, /)\n" -"--\n" -"\n" -"Lock part of a file based on file descriptor fd from the C runtime.\n" -"\n" -"Raises OSError on failure. The locked region of the file extends from\n" -"the current file position for nbytes bytes, and may continue beyond\n" -"the end of the file. mode must be one of the LK_* constants listed\n" -"below. Multiple regions in a file may be locked at the same time, but\n" -"may not overlap. Adjacent regions are not merged; they must be unlocked\n" -"individually."); - -#define MSVCRT_LOCKING_METHODDEF \ - {"locking", _PyCFunction_CAST(msvcrt_locking), METH_FASTCALL, msvcrt_locking__doc__}, - -static PyObject * -msvcrt_locking_impl(PyObject *module, int fd, int mode, long nbytes); - -static PyObject * -msvcrt_locking(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - int fd; - int mode; - long nbytes; - - if (!_PyArg_CheckPositional("locking", nargs, 3, 3)) { - goto exit; - } - fd = PyLong_AsInt(args[0]); - if (fd == -1 && PyErr_Occurred()) { - goto exit; - } - mode = PyLong_AsInt(args[1]); - if (mode == -1 && PyErr_Occurred()) { - goto exit; - } - nbytes = PyLong_AsLong(args[2]); - if (nbytes == -1 && PyErr_Occurred()) { - goto exit; - } - return_value = msvcrt_locking_impl(module, fd, mode, nbytes); - -exit: - return return_value; -} - -PyDoc_STRVAR(msvcrt_setmode__doc__, -"setmode($module, fd, mode, /)\n" -"--\n" -"\n" -"Set the line-end translation mode for the file descriptor fd.\n" -"\n" -"To set it to text mode, flags should be os.O_TEXT; for binary, it\n" -"should be os.O_BINARY.\n" -"\n" -"Return value is the previous mode."); - -#define MSVCRT_SETMODE_METHODDEF \ - {"setmode", _PyCFunction_CAST(msvcrt_setmode), METH_FASTCALL, msvcrt_setmode__doc__}, - -static long -msvcrt_setmode_impl(PyObject *module, int fd, int flags); - -static PyObject * -msvcrt_setmode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - int fd; - int flags; - long _return_value; - - if (!_PyArg_CheckPositional("setmode", nargs, 2, 2)) { - goto exit; - } - fd = PyLong_AsInt(args[0]); - if (fd == -1 && PyErr_Occurred()) { - goto exit; - } - flags = PyLong_AsInt(args[1]); - if (flags == -1 && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_setmode_impl(module, fd, flags); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong(_return_value); - -exit: - return return_value; -} - -PyDoc_STRVAR(msvcrt_open_osfhandle__doc__, -"open_osfhandle($module, handle, flags, /)\n" -"--\n" -"\n" -"Create a C runtime file descriptor from the file handle handle.\n" -"\n" -"The flags parameter should be a bitwise OR of os.O_APPEND, os.O_RDONLY,\n" -"and os.O_TEXT. The returned file descriptor may be used as a parameter\n" -"to os.fdopen() to create a file object."); - -#define MSVCRT_OPEN_OSFHANDLE_METHODDEF \ - {"open_osfhandle", _PyCFunction_CAST(msvcrt_open_osfhandle), METH_FASTCALL, msvcrt_open_osfhandle__doc__}, - -static long -msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags); - -static PyObject * -msvcrt_open_osfhandle(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - void *handle; - int flags; - long _return_value; - - if (!_PyArg_CheckPositional("open_osfhandle", nargs, 2, 2)) { - goto exit; - } - handle = PyLong_AsVoidPtr(args[0]); - if (!handle && PyErr_Occurred()) { - goto exit; - } - flags = PyLong_AsInt(args[1]); - if (flags == -1 && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_open_osfhandle_impl(module, handle, flags); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong(_return_value); - -exit: - return return_value; -} - -PyDoc_STRVAR(msvcrt_get_osfhandle__doc__, -"get_osfhandle($module, fd, /)\n" -"--\n" -"\n" -"Return the file handle for the file descriptor fd.\n" -"\n" -"Raises OSError if fd is not recognized."); - -#define MSVCRT_GET_OSFHANDLE_METHODDEF \ - {"get_osfhandle", (PyCFunction)msvcrt_get_osfhandle, METH_O, msvcrt_get_osfhandle__doc__}, - -static void * -msvcrt_get_osfhandle_impl(PyObject *module, int fd); - -static PyObject * -msvcrt_get_osfhandle(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - int fd; - void *_return_value; - - fd = PyLong_AsInt(arg); - if (fd == -1 && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_get_osfhandle_impl(module, fd); - if ((_return_value == NULL || _return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromVoidPtr(_return_value); - -exit: - return return_value; -} - -PyDoc_STRVAR(msvcrt_kbhit__doc__, -"kbhit($module, /)\n" -"--\n" -"\n" -"Returns a nonzero value if a keypress is waiting to be read. Otherwise, return 0."); - -#define MSVCRT_KBHIT_METHODDEF \ - {"kbhit", (PyCFunction)msvcrt_kbhit, METH_NOARGS, msvcrt_kbhit__doc__}, - -static long -msvcrt_kbhit_impl(PyObject *module); - -static PyObject * -msvcrt_kbhit(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - long _return_value; - - _return_value = msvcrt_kbhit_impl(module); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong(_return_value); - -exit: - return return_value; -} - -PyDoc_STRVAR(msvcrt_getch__doc__, -"getch($module, /)\n" -"--\n" -"\n" -"Read a keypress and return the resulting character as a byte string.\n" -"\n" -"Nothing is echoed to the console. This call will block if a keypress is\n" -"not already available, but will not wait for Enter to be pressed. If the\n" -"pressed key was a special function key, this will return \'\\000\' or\n" -"\'\\xe0\'; the next call will return the keycode. The Control-C keypress\n" -"cannot be read with this function."); - -#define MSVCRT_GETCH_METHODDEF \ - {"getch", (PyCFunction)msvcrt_getch, METH_NOARGS, msvcrt_getch__doc__}, - -static int -msvcrt_getch_impl(PyObject *module); - -static PyObject * -msvcrt_getch(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - char s[1]; - - s[0] = msvcrt_getch_impl(module); - return_value = PyBytes_FromStringAndSize(s, 1); - - return return_value; -} - -#if defined(MS_WINDOWS_DESKTOP) - -PyDoc_STRVAR(msvcrt_getwch__doc__, -"getwch($module, /)\n" -"--\n" -"\n" -"Wide char variant of getch(), returning a Unicode value."); - -#define MSVCRT_GETWCH_METHODDEF \ - {"getwch", (PyCFunction)msvcrt_getwch, METH_NOARGS, msvcrt_getwch__doc__}, - -static wchar_t -msvcrt_getwch_impl(PyObject *module); - -static PyObject * -msvcrt_getwch(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - wchar_t _return_value; - - _return_value = msvcrt_getwch_impl(module); - return_value = PyUnicode_FromOrdinal(_return_value); - - return return_value; -} - -#endif /* defined(MS_WINDOWS_DESKTOP) */ - -PyDoc_STRVAR(msvcrt_getche__doc__, -"getche($module, /)\n" -"--\n" -"\n" -"Similar to getch(), but the keypress will be echoed if possible."); - -#define MSVCRT_GETCHE_METHODDEF \ - {"getche", (PyCFunction)msvcrt_getche, METH_NOARGS, msvcrt_getche__doc__}, - -static int -msvcrt_getche_impl(PyObject *module); - -static PyObject * -msvcrt_getche(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - char s[1]; - - s[0] = msvcrt_getche_impl(module); - return_value = PyBytes_FromStringAndSize(s, 1); - - return return_value; -} - -#if defined(MS_WINDOWS_DESKTOP) - -PyDoc_STRVAR(msvcrt_getwche__doc__, -"getwche($module, /)\n" -"--\n" -"\n" -"Wide char variant of getche(), returning a Unicode value."); - -#define MSVCRT_GETWCHE_METHODDEF \ - {"getwche", (PyCFunction)msvcrt_getwche, METH_NOARGS, msvcrt_getwche__doc__}, - -static wchar_t -msvcrt_getwche_impl(PyObject *module); - -static PyObject * -msvcrt_getwche(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - wchar_t _return_value; - - _return_value = msvcrt_getwche_impl(module); - return_value = PyUnicode_FromOrdinal(_return_value); - - return return_value; -} - -#endif /* defined(MS_WINDOWS_DESKTOP) */ - -PyDoc_STRVAR(msvcrt_putch__doc__, -"putch($module, char, /)\n" -"--\n" -"\n" -"Print the byte string char to the console without buffering."); - -#define MSVCRT_PUTCH_METHODDEF \ - {"putch", (PyCFunction)msvcrt_putch, METH_O, msvcrt_putch__doc__}, - -static PyObject * -msvcrt_putch_impl(PyObject *module, char char_value); - -static PyObject * -msvcrt_putch(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - char char_value; - - if (PyBytes_Check(arg) && PyBytes_GET_SIZE(arg) == 1) { - char_value = PyBytes_AS_STRING(arg)[0]; - } - else if (PyByteArray_Check(arg) && PyByteArray_GET_SIZE(arg) == 1) { - char_value = PyByteArray_AS_STRING(arg)[0]; - } - else { - _PyArg_BadArgument("putch", "argument", "a byte string of length 1", arg); - goto exit; - } - return_value = msvcrt_putch_impl(module, char_value); - -exit: - return return_value; -} - -#if defined(MS_WINDOWS_DESKTOP) - -PyDoc_STRVAR(msvcrt_putwch__doc__, -"putwch($module, unicode_char, /)\n" -"--\n" -"\n" -"Wide char variant of putch(), accepting a Unicode value."); - -#define MSVCRT_PUTWCH_METHODDEF \ - {"putwch", (PyCFunction)msvcrt_putwch, METH_O, msvcrt_putwch__doc__}, - -static PyObject * -msvcrt_putwch_impl(PyObject *module, int unicode_char); - -static PyObject * -msvcrt_putwch(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - int unicode_char; - - if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("putwch", "argument", "a unicode character", arg); - goto exit; - } - if (PyUnicode_GET_LENGTH(arg) != 1) { - _PyArg_BadArgument("putwch", "argument", "a unicode character", arg); - goto exit; - } - unicode_char = PyUnicode_READ_CHAR(arg, 0); - return_value = msvcrt_putwch_impl(module, unicode_char); - -exit: - return return_value; -} - -#endif /* defined(MS_WINDOWS_DESKTOP) */ - -PyDoc_STRVAR(msvcrt_ungetch__doc__, -"ungetch($module, char, /)\n" -"--\n" -"\n" -"Opposite of getch.\n" -"\n" -"Cause the byte string char to be \"pushed back\" into the\n" -"console buffer; it will be the next character read by\n" -"getch() or getche()."); - -#define MSVCRT_UNGETCH_METHODDEF \ - {"ungetch", (PyCFunction)msvcrt_ungetch, METH_O, msvcrt_ungetch__doc__}, - -static PyObject * -msvcrt_ungetch_impl(PyObject *module, char char_value); - -static PyObject * -msvcrt_ungetch(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - char char_value; - - if (PyBytes_Check(arg) && PyBytes_GET_SIZE(arg) == 1) { - char_value = PyBytes_AS_STRING(arg)[0]; - } - else if (PyByteArray_Check(arg) && PyByteArray_GET_SIZE(arg) == 1) { - char_value = PyByteArray_AS_STRING(arg)[0]; - } - else { - _PyArg_BadArgument("ungetch", "argument", "a byte string of length 1", arg); - goto exit; - } - return_value = msvcrt_ungetch_impl(module, char_value); - -exit: - return return_value; -} - -#if defined(MS_WINDOWS_DESKTOP) - -PyDoc_STRVAR(msvcrt_ungetwch__doc__, -"ungetwch($module, unicode_char, /)\n" -"--\n" -"\n" -"Wide char variant of ungetch(), accepting a Unicode value."); - -#define MSVCRT_UNGETWCH_METHODDEF \ - {"ungetwch", (PyCFunction)msvcrt_ungetwch, METH_O, msvcrt_ungetwch__doc__}, - -static PyObject * -msvcrt_ungetwch_impl(PyObject *module, int unicode_char); - -static PyObject * -msvcrt_ungetwch(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - int unicode_char; - - if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("ungetwch", "argument", "a unicode character", arg); - goto exit; - } - if (PyUnicode_GET_LENGTH(arg) != 1) { - _PyArg_BadArgument("ungetwch", "argument", "a unicode character", arg); - goto exit; - } - unicode_char = PyUnicode_READ_CHAR(arg, 0); - return_value = msvcrt_ungetwch_impl(module, unicode_char); - -exit: - return return_value; -} - -#endif /* defined(MS_WINDOWS_DESKTOP) */ - -#if defined(_DEBUG) - -PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__, -"CrtSetReportFile($module, type, file, /)\n" -"--\n" -"\n" -"Wrapper around _CrtSetReportFile.\n" -"\n" -"Only available on Debug builds."); - -#define MSVCRT_CRTSETREPORTFILE_METHODDEF \ - {"CrtSetReportFile", _PyCFunction_CAST(msvcrt_CrtSetReportFile), METH_FASTCALL, msvcrt_CrtSetReportFile__doc__}, - -static void * -msvcrt_CrtSetReportFile_impl(PyObject *module, int type, void *file); - -static PyObject * -msvcrt_CrtSetReportFile(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - int type; - void *file; - void *_return_value; - - if (!_PyArg_CheckPositional("CrtSetReportFile", nargs, 2, 2)) { - goto exit; - } - type = PyLong_AsInt(args[0]); - if (type == -1 && PyErr_Occurred()) { - goto exit; - } - file = PyLong_AsVoidPtr(args[1]); - if (!file && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_CrtSetReportFile_impl(module, type, file); - if ((_return_value == NULL || _return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromVoidPtr(_return_value); - -exit: - return return_value; -} - -#endif /* defined(_DEBUG) */ - -#if defined(_DEBUG) - -PyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__, -"CrtSetReportMode($module, type, mode, /)\n" -"--\n" -"\n" -"Wrapper around _CrtSetReportMode.\n" -"\n" -"Only available on Debug builds."); - -#define MSVCRT_CRTSETREPORTMODE_METHODDEF \ - {"CrtSetReportMode", _PyCFunction_CAST(msvcrt_CrtSetReportMode), METH_FASTCALL, msvcrt_CrtSetReportMode__doc__}, - -static long -msvcrt_CrtSetReportMode_impl(PyObject *module, int type, int mode); - -static PyObject * -msvcrt_CrtSetReportMode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - int type; - int mode; - long _return_value; - - if (!_PyArg_CheckPositional("CrtSetReportMode", nargs, 2, 2)) { - goto exit; - } - type = PyLong_AsInt(args[0]); - if (type == -1 && PyErr_Occurred()) { - goto exit; - } - mode = PyLong_AsInt(args[1]); - if (mode == -1 && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_CrtSetReportMode_impl(module, type, mode); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong(_return_value); - -exit: - return return_value; -} - -#endif /* defined(_DEBUG) */ - -#if defined(_DEBUG) - -PyDoc_STRVAR(msvcrt_set_error_mode__doc__, -"set_error_mode($module, mode, /)\n" -"--\n" -"\n" -"Wrapper around _set_error_mode.\n" -"\n" -"Only available on Debug builds."); - -#define MSVCRT_SET_ERROR_MODE_METHODDEF \ - {"set_error_mode", (PyCFunction)msvcrt_set_error_mode, METH_O, msvcrt_set_error_mode__doc__}, - -static long -msvcrt_set_error_mode_impl(PyObject *module, int mode); - -static PyObject * -msvcrt_set_error_mode(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - int mode; - long _return_value; - - mode = PyLong_AsInt(arg); - if (mode == -1 && PyErr_Occurred()) { - goto exit; - } - _return_value = msvcrt_set_error_mode_impl(module, mode); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong(_return_value); - -exit: - return return_value; -} - -#endif /* defined(_DEBUG) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(msvcrt_GetErrorMode__doc__, -"GetErrorMode($module, /)\n" -"--\n" -"\n" -"Wrapper around GetErrorMode."); - -#define MSVCRT_GETERRORMODE_METHODDEF \ - {"GetErrorMode", (PyCFunction)msvcrt_GetErrorMode, METH_NOARGS, msvcrt_GetErrorMode__doc__}, - -static PyObject * -msvcrt_GetErrorMode_impl(PyObject *module); - -static PyObject * -msvcrt_GetErrorMode(PyObject *module, PyObject *Py_UNUSED(ignored)) -{ - return msvcrt_GetErrorMode_impl(module); -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) */ - -PyDoc_STRVAR(msvcrt_SetErrorMode__doc__, -"SetErrorMode($module, mode, /)\n" -"--\n" -"\n" -"Wrapper around SetErrorMode."); - -#define MSVCRT_SETERRORMODE_METHODDEF \ - {"SetErrorMode", (PyCFunction)msvcrt_SetErrorMode, METH_O, msvcrt_SetErrorMode__doc__}, - -static PyObject * -msvcrt_SetErrorMode_impl(PyObject *module, unsigned int mode); - -static PyObject * -msvcrt_SetErrorMode(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - unsigned int mode; - - mode = (unsigned int)PyLong_AsUnsignedLongMask(arg); - if (mode == (unsigned int)-1 && PyErr_Occurred()) { - goto exit; - } - return_value = msvcrt_SetErrorMode_impl(module, mode); - -exit: - return return_value; -} - -#ifndef MSVCRT_GETWCH_METHODDEF - #define MSVCRT_GETWCH_METHODDEF -#endif /* !defined(MSVCRT_GETWCH_METHODDEF) */ - -#ifndef MSVCRT_GETWCHE_METHODDEF - #define MSVCRT_GETWCHE_METHODDEF -#endif /* !defined(MSVCRT_GETWCHE_METHODDEF) */ - -#ifndef MSVCRT_PUTWCH_METHODDEF - #define MSVCRT_PUTWCH_METHODDEF -#endif /* !defined(MSVCRT_PUTWCH_METHODDEF) */ - -#ifndef MSVCRT_UNGETWCH_METHODDEF - #define MSVCRT_UNGETWCH_METHODDEF -#endif /* !defined(MSVCRT_UNGETWCH_METHODDEF) */ - -#ifndef MSVCRT_CRTSETREPORTFILE_METHODDEF - #define MSVCRT_CRTSETREPORTFILE_METHODDEF -#endif /* !defined(MSVCRT_CRTSETREPORTFILE_METHODDEF) */ - -#ifndef MSVCRT_CRTSETREPORTMODE_METHODDEF - #define MSVCRT_CRTSETREPORTMODE_METHODDEF -#endif /* !defined(MSVCRT_CRTSETREPORTMODE_METHODDEF) */ - -#ifndef MSVCRT_SET_ERROR_MODE_METHODDEF - #define MSVCRT_SET_ERROR_MODE_METHODDEF -#endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */ - -#ifndef MSVCRT_GETERRORMODE_METHODDEF - #define MSVCRT_GETERRORMODE_METHODDEF -#endif /* !defined(MSVCRT_GETERRORMODE_METHODDEF) */ -/*[clinic end generated code: output=de9687b46212c2ed input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h deleted file mode 100644 index 7e5545e113e718..00000000000000 --- a/PC/clinic/winreg.c.h +++ /dev/null @@ -1,1765 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -# include "pycore_gc.h" // PyGC_Head -# include "pycore_runtime.h" // _Py_ID() -#endif -#include "pycore_long.h" // _PyLong_UnsignedLong_Converter() -#include "pycore_modsupport.h" // _PyArg_CheckPositional() - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_HKEYType_Close__doc__, -"Close($self, /)\n" -"--\n" -"\n" -"Closes the underlying Windows handle.\n" -"\n" -"If the handle is already closed, no error is raised."); - -#define WINREG_HKEYTYPE_CLOSE_METHODDEF \ - {"Close", (PyCFunction)winreg_HKEYType_Close, METH_NOARGS, winreg_HKEYType_Close__doc__}, - -static PyObject * -winreg_HKEYType_Close_impl(PyHKEYObject *self); - -static PyObject * -winreg_HKEYType_Close(PyHKEYObject *self, PyObject *Py_UNUSED(ignored)) -{ - return winreg_HKEYType_Close_impl(self); -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_HKEYType_Detach__doc__, -"Detach($self, /)\n" -"--\n" -"\n" -"Detaches the Windows handle from the handle object.\n" -"\n" -"The result is the value of the handle before it is detached. If the\n" -"handle is already detached, this will return zero.\n" -"\n" -"After calling this function, the handle is effectively invalidated,\n" -"but the handle is not closed. You would call this function when you\n" -"need the underlying win32 handle to exist beyond the lifetime of the\n" -"handle object."); - -#define WINREG_HKEYTYPE_DETACH_METHODDEF \ - {"Detach", (PyCFunction)winreg_HKEYType_Detach, METH_NOARGS, winreg_HKEYType_Detach__doc__}, - -static PyObject * -winreg_HKEYType_Detach_impl(PyHKEYObject *self); - -static PyObject * -winreg_HKEYType_Detach(PyHKEYObject *self, PyObject *Py_UNUSED(ignored)) -{ - return winreg_HKEYType_Detach_impl(self); -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_HKEYType___enter____doc__, -"__enter__($self, /)\n" -"--\n" -"\n"); - -#define WINREG_HKEYTYPE___ENTER___METHODDEF \ - {"__enter__", (PyCFunction)winreg_HKEYType___enter__, METH_NOARGS, winreg_HKEYType___enter____doc__}, - -static PyHKEYObject * -winreg_HKEYType___enter___impl(PyHKEYObject *self); - -static PyObject * -winreg_HKEYType___enter__(PyHKEYObject *self, PyObject *Py_UNUSED(ignored)) -{ - PyObject *return_value = NULL; - PyHKEYObject *_return_value; - - _return_value = winreg_HKEYType___enter___impl(self); - return_value = (PyObject *)_return_value; - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_HKEYType___exit____doc__, -"__exit__($self, exc_type, exc_value, traceback, /)\n" -"--\n" -"\n"); - -#define WINREG_HKEYTYPE___EXIT___METHODDEF \ - {"__exit__", _PyCFunction_CAST(winreg_HKEYType___exit__), METH_FASTCALL, winreg_HKEYType___exit____doc__}, - -static PyObject * -winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, - PyObject *exc_value, PyObject *traceback); - -static PyObject * -winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *exc_type; - PyObject *exc_value; - PyObject *traceback; - - if (!_PyArg_CheckPositional("__exit__", nargs, 3, 3)) { - goto exit; - } - exc_type = args[0]; - exc_value = args[1]; - traceback = args[2]; - return_value = winreg_HKEYType___exit___impl(self, exc_type, exc_value, traceback); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_CloseKey__doc__, -"CloseKey($module, hkey, /)\n" -"--\n" -"\n" -"Closes a previously opened registry key.\n" -"\n" -" hkey\n" -" A previously opened key.\n" -"\n" -"Note that if the key is not closed using this method, it will be\n" -"closed when the hkey object is destroyed by Python."); - -#define WINREG_CLOSEKEY_METHODDEF \ - {"CloseKey", (PyCFunction)winreg_CloseKey, METH_O, winreg_CloseKey__doc__}, - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_ConnectRegistry__doc__, -"ConnectRegistry($module, computer_name, key, /)\n" -"--\n" -"\n" -"Establishes a connection to the registry on another computer.\n" -"\n" -" computer_name\n" -" The name of the remote computer, of the form r\"\\\\computername\". If\n" -" None, the local computer is used.\n" -" key\n" -" The predefined key to connect to.\n" -"\n" -"The return value is the handle of the opened key.\n" -"If the function fails, an OSError exception is raised."); - -#define WINREG_CONNECTREGISTRY_METHODDEF \ - {"ConnectRegistry", _PyCFunction_CAST(winreg_ConnectRegistry), METH_FASTCALL, winreg_ConnectRegistry__doc__}, - -static HKEY -winreg_ConnectRegistry_impl(PyObject *module, const wchar_t *computer_name, - HKEY key); - -static PyObject * -winreg_ConnectRegistry(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - const wchar_t *computer_name = NULL; - HKEY key; - HKEY _return_value; - - if (!_PyArg_CheckPositional("ConnectRegistry", nargs, 2, 2)) { - goto exit; - } - if (args[0] == Py_None) { - computer_name = NULL; - } - else if (PyUnicode_Check(args[0])) { - computer_name = PyUnicode_AsWideCharString(args[0], NULL); - if (computer_name == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("ConnectRegistry", "argument 1", "str or None", args[0]); - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[1], &key)) { - goto exit; - } - _return_value = winreg_ConnectRegistry_impl(module, computer_name, key); - if (_return_value == NULL) { - goto exit; - } - return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value); - -exit: - /* Cleanup for computer_name */ - PyMem_Free((void *)computer_name); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_CreateKey__doc__, -"CreateKey($module, key, sub_key, /)\n" -"--\n" -"\n" -"Creates or opens the specified key.\n" -"\n" -" key\n" -" An already open key, or one of the predefined HKEY_* constants.\n" -" sub_key\n" -" The name of the key this method opens or creates.\n" -"\n" -"If key is one of the predefined keys, sub_key may be None. In that case,\n" -"the handle returned is the same key handle passed in to the function.\n" -"\n" -"If the key already exists, this function opens the existing key.\n" -"\n" -"The return value is the handle of the opened key.\n" -"If the function fails, an OSError exception is raised."); - -#define WINREG_CREATEKEY_METHODDEF \ - {"CreateKey", _PyCFunction_CAST(winreg_CreateKey), METH_FASTCALL, winreg_CreateKey__doc__}, - -static HKEY -winreg_CreateKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key); - -static PyObject * -winreg_CreateKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *sub_key = NULL; - HKEY _return_value; - - if (!_PyArg_CheckPositional("CreateKey", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("CreateKey", "argument 2", "str or None", args[1]); - goto exit; - } - _return_value = winreg_CreateKey_impl(module, key, sub_key); - if (_return_value == NULL) { - goto exit; - } - return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_CreateKeyEx__doc__, -"CreateKeyEx($module, /, key, sub_key, reserved=0,\n" -" access=winreg.KEY_WRITE)\n" -"--\n" -"\n" -"Creates or opens the specified key.\n" -"\n" -" key\n" -" An already open key, or one of the predefined HKEY_* constants.\n" -" sub_key\n" -" The name of the key this method opens or creates.\n" -" reserved\n" -" A reserved integer, and must be zero. Default is zero.\n" -" access\n" -" An integer that specifies an access mask that describes the\n" -" desired security access for the key. Default is KEY_WRITE.\n" -"\n" -"If key is one of the predefined keys, sub_key may be None. In that case,\n" -"the handle returned is the same key handle passed in to the function.\n" -"\n" -"If the key already exists, this function opens the existing key\n" -"\n" -"The return value is the handle of the opened key.\n" -"If the function fails, an OSError exception is raised."); - -#define WINREG_CREATEKEYEX_METHODDEF \ - {"CreateKeyEx", _PyCFunction_CAST(winreg_CreateKeyEx), METH_FASTCALL|METH_KEYWORDS, winreg_CreateKeyEx__doc__}, - -static HKEY -winreg_CreateKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access); - -static PyObject * -winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) -{ - PyObject *return_value = NULL; - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - #define NUM_KEYWORDS 4 - static struct { - PyGC_Head _this_is_not_used; - PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; - } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, - }; - #undef NUM_KEYWORDS - #define KWTUPLE (&_kwtuple.ob_base.ob_base) - - #else // !Py_BUILD_CORE - # define KWTUPLE NULL - #endif // !Py_BUILD_CORE - - static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; - static _PyArg_Parser _parser = { - .keywords = _keywords, - .fname = "CreateKeyEx", - .kwtuple = KWTUPLE, - }; - #undef KWTUPLE - PyObject *argsbuf[4]; - Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2; - HKEY key; - const wchar_t *sub_key = NULL; - int reserved = 0; - REGSAM access = KEY_WRITE; - HKEY _return_value; - - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); - if (!args) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("CreateKeyEx", "argument 'sub_key'", "str or None", args[1]); - goto exit; - } - if (!noptargs) { - goto skip_optional_pos; - } - if (args[2]) { - reserved = PyLong_AsInt(args[2]); - if (reserved == -1 && PyErr_Occurred()) { - goto exit; - } - if (!--noptargs) { - goto skip_optional_pos; - } - } - access = PyLong_AsInt(args[3]); - if (access == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional_pos: - _return_value = winreg_CreateKeyEx_impl(module, key, sub_key, reserved, access); - if (_return_value == NULL) { - goto exit; - } - return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_DeleteKey__doc__, -"DeleteKey($module, key, sub_key, /)\n" -"--\n" -"\n" -"Deletes the specified key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that must be the name of a subkey of the key identified by\n" -" the key parameter. This value must not be None, and the key may not\n" -" have subkeys.\n" -"\n" -"This method can not delete keys with subkeys.\n" -"\n" -"If the function succeeds, the entire key, including all of its values,\n" -"is removed. If the function fails, an OSError exception is raised."); - -#define WINREG_DELETEKEY_METHODDEF \ - {"DeleteKey", _PyCFunction_CAST(winreg_DeleteKey), METH_FASTCALL, winreg_DeleteKey__doc__}, - -static PyObject * -winreg_DeleteKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key); - -static PyObject * -winreg_DeleteKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *sub_key = NULL; - - if (!_PyArg_CheckPositional("DeleteKey", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("DeleteKey", "argument 2", "str", args[1]); - goto exit; - } - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - return_value = winreg_DeleteKey_impl(module, key, sub_key); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_DeleteKeyEx__doc__, -"DeleteKeyEx($module, /, key, sub_key, access=winreg.KEY_WOW64_64KEY,\n" -" reserved=0)\n" -"--\n" -"\n" -"Deletes the specified key (intended for 64-bit OS).\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that must be the name of a subkey of the key identified by\n" -" the key parameter. This value must not be None, and the key may not\n" -" have subkeys.\n" -" access\n" -" An integer that specifies an access mask that describes the\n" -" desired security access for the key. Default is KEY_WOW64_64KEY.\n" -" reserved\n" -" A reserved integer, and must be zero. Default is zero.\n" -"\n" -"While this function is intended to be used for 64-bit OS, it is also\n" -" available on 32-bit systems.\n" -"\n" -"This method can not delete keys with subkeys.\n" -"\n" -"If the function succeeds, the entire key, including all of its values,\n" -"is removed. If the function fails, an OSError exception is raised.\n" -"On unsupported Windows versions, NotImplementedError is raised."); - -#define WINREG_DELETEKEYEX_METHODDEF \ - {"DeleteKeyEx", _PyCFunction_CAST(winreg_DeleteKeyEx), METH_FASTCALL|METH_KEYWORDS, winreg_DeleteKeyEx__doc__}, - -static PyObject * -winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - REGSAM access, int reserved); - -static PyObject * -winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) -{ - PyObject *return_value = NULL; - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - #define NUM_KEYWORDS 4 - static struct { - PyGC_Head _this_is_not_used; - PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; - } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(access), &_Py_ID(reserved), }, - }; - #undef NUM_KEYWORDS - #define KWTUPLE (&_kwtuple.ob_base.ob_base) - - #else // !Py_BUILD_CORE - # define KWTUPLE NULL - #endif // !Py_BUILD_CORE - - static const char * const _keywords[] = {"key", "sub_key", "access", "reserved", NULL}; - static _PyArg_Parser _parser = { - .keywords = _keywords, - .fname = "DeleteKeyEx", - .kwtuple = KWTUPLE, - }; - #undef KWTUPLE - PyObject *argsbuf[4]; - Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2; - HKEY key; - const wchar_t *sub_key = NULL; - REGSAM access = KEY_WOW64_64KEY; - int reserved = 0; - - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); - if (!args) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("DeleteKeyEx", "argument 'sub_key'", "str", args[1]); - goto exit; - } - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - if (!noptargs) { - goto skip_optional_pos; - } - if (args[2]) { - access = PyLong_AsInt(args[2]); - if (access == -1 && PyErr_Occurred()) { - goto exit; - } - if (!--noptargs) { - goto skip_optional_pos; - } - } - reserved = PyLong_AsInt(args[3]); - if (reserved == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional_pos: - return_value = winreg_DeleteKeyEx_impl(module, key, sub_key, access, reserved); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_DeleteValue__doc__, -"DeleteValue($module, key, value, /)\n" -"--\n" -"\n" -"Removes a named value from a registry key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" value\n" -" A string that identifies the value to remove."); - -#define WINREG_DELETEVALUE_METHODDEF \ - {"DeleteValue", _PyCFunction_CAST(winreg_DeleteValue), METH_FASTCALL, winreg_DeleteValue__doc__}, - -static PyObject * -winreg_DeleteValue_impl(PyObject *module, HKEY key, const wchar_t *value); - -static PyObject * -winreg_DeleteValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *value = NULL; - - if (!_PyArg_CheckPositional("DeleteValue", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - value = NULL; - } - else if (PyUnicode_Check(args[1])) { - value = PyUnicode_AsWideCharString(args[1], NULL); - if (value == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("DeleteValue", "argument 2", "str or None", args[1]); - goto exit; - } - return_value = winreg_DeleteValue_impl(module, key, value); - -exit: - /* Cleanup for value */ - PyMem_Free((void *)value); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_EnumKey__doc__, -"EnumKey($module, key, index, /)\n" -"--\n" -"\n" -"Enumerates subkeys of an open registry key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" index\n" -" An integer that identifies the index of the key to retrieve.\n" -"\n" -"The function retrieves the name of one subkey each time it is called.\n" -"It is typically called repeatedly until an OSError exception is\n" -"raised, indicating no more values are available."); - -#define WINREG_ENUMKEY_METHODDEF \ - {"EnumKey", _PyCFunction_CAST(winreg_EnumKey), METH_FASTCALL, winreg_EnumKey__doc__}, - -static PyObject * -winreg_EnumKey_impl(PyObject *module, HKEY key, int index); - -static PyObject * -winreg_EnumKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - int index; - - if (!_PyArg_CheckPositional("EnumKey", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - index = PyLong_AsInt(args[1]); - if (index == -1 && PyErr_Occurred()) { - goto exit; - } - return_value = winreg_EnumKey_impl(module, key, index); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_EnumValue__doc__, -"EnumValue($module, key, index, /)\n" -"--\n" -"\n" -"Enumerates values of an open registry key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" index\n" -" An integer that identifies the index of the value to retrieve.\n" -"\n" -"The function retrieves the name of one subkey each time it is called.\n" -"It is typically called repeatedly, until an OSError exception\n" -"is raised, indicating no more values.\n" -"\n" -"The result is a tuple of 3 items:\n" -" value_name\n" -" A string that identifies the value.\n" -" value_data\n" -" An object that holds the value data, and whose type depends\n" -" on the underlying registry type.\n" -" data_type\n" -" An integer that identifies the type of the value data."); - -#define WINREG_ENUMVALUE_METHODDEF \ - {"EnumValue", _PyCFunction_CAST(winreg_EnumValue), METH_FASTCALL, winreg_EnumValue__doc__}, - -static PyObject * -winreg_EnumValue_impl(PyObject *module, HKEY key, int index); - -static PyObject * -winreg_EnumValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - int index; - - if (!_PyArg_CheckPositional("EnumValue", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - index = PyLong_AsInt(args[1]); - if (index == -1 && PyErr_Occurred()) { - goto exit; - } - return_value = winreg_EnumValue_impl(module, key, index); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_ExpandEnvironmentStrings__doc__, -"ExpandEnvironmentStrings($module, string, /)\n" -"--\n" -"\n" -"Expand environment vars."); - -#define WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF \ - {"ExpandEnvironmentStrings", (PyCFunction)winreg_ExpandEnvironmentStrings, METH_O, winreg_ExpandEnvironmentStrings__doc__}, - -static PyObject * -winreg_ExpandEnvironmentStrings_impl(PyObject *module, const wchar_t *string); - -static PyObject * -winreg_ExpandEnvironmentStrings(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - const wchar_t *string = NULL; - - if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("ExpandEnvironmentStrings", "argument", "str", arg); - goto exit; - } - string = PyUnicode_AsWideCharString(arg, NULL); - if (string == NULL) { - goto exit; - } - return_value = winreg_ExpandEnvironmentStrings_impl(module, string); - -exit: - /* Cleanup for string */ - PyMem_Free((void *)string); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_FlushKey__doc__, -"FlushKey($module, key, /)\n" -"--\n" -"\n" -"Writes all the attributes of a key to the registry.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -"\n" -"It is not necessary to call FlushKey to change a key. Registry changes\n" -"are flushed to disk by the registry using its lazy flusher. Registry\n" -"changes are also flushed to disk at system shutdown. Unlike\n" -"CloseKey(), the FlushKey() method returns only when all the data has\n" -"been written to the registry.\n" -"\n" -"An application should only call FlushKey() if it requires absolute\n" -"certainty that registry changes are on disk. If you don\'t know whether\n" -"a FlushKey() call is required, it probably isn\'t."); - -#define WINREG_FLUSHKEY_METHODDEF \ - {"FlushKey", (PyCFunction)winreg_FlushKey, METH_O, winreg_FlushKey__doc__}, - -static PyObject * -winreg_FlushKey_impl(PyObject *module, HKEY key); - -static PyObject * -winreg_FlushKey(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - HKEY key; - - if (!clinic_HKEY_converter(_PyModule_GetState(module), arg, &key)) { - goto exit; - } - return_value = winreg_FlushKey_impl(module, key); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_LoadKey__doc__, -"LoadKey($module, key, sub_key, file_name, /)\n" -"--\n" -"\n" -"Insert data into the registry from a file.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that identifies the sub-key to load.\n" -" file_name\n" -" The name of the file to load registry data from. This file must\n" -" have been created with the SaveKey() function. Under the file\n" -" allocation table (FAT) file system, the filename may not have an\n" -" extension.\n" -"\n" -"Creates a subkey under the specified key and stores registration\n" -"information from a specified file into that subkey.\n" -"\n" -"A call to LoadKey() fails if the calling process does not have the\n" -"SE_RESTORE_PRIVILEGE privilege.\n" -"\n" -"If key is a handle returned by ConnectRegistry(), then the path\n" -"specified in fileName is relative to the remote computer.\n" -"\n" -"The MSDN docs imply key must be in the HKEY_USER or HKEY_LOCAL_MACHINE\n" -"tree."); - -#define WINREG_LOADKEY_METHODDEF \ - {"LoadKey", _PyCFunction_CAST(winreg_LoadKey), METH_FASTCALL, winreg_LoadKey__doc__}, - -static PyObject * -winreg_LoadKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - const wchar_t *file_name); - -static PyObject * -winreg_LoadKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *sub_key = NULL; - const wchar_t *file_name = NULL; - - if (!_PyArg_CheckPositional("LoadKey", nargs, 3, 3)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("LoadKey", "argument 2", "str", args[1]); - goto exit; - } - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - if (!PyUnicode_Check(args[2])) { - _PyArg_BadArgument("LoadKey", "argument 3", "str", args[2]); - goto exit; - } - file_name = PyUnicode_AsWideCharString(args[2], NULL); - if (file_name == NULL) { - goto exit; - } - return_value = winreg_LoadKey_impl(module, key, sub_key, file_name); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - /* Cleanup for file_name */ - PyMem_Free((void *)file_name); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_OpenKey__doc__, -"OpenKey($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n" -"--\n" -"\n" -"Opens the specified key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that identifies the sub_key to open.\n" -" reserved\n" -" A reserved integer that must be zero. Default is zero.\n" -" access\n" -" An integer that specifies an access mask that describes the desired\n" -" security access for the key. Default is KEY_READ.\n" -"\n" -"The result is a new handle to the specified key.\n" -"If the function fails, an OSError exception is raised."); - -#define WINREG_OPENKEY_METHODDEF \ - {"OpenKey", _PyCFunction_CAST(winreg_OpenKey), METH_FASTCALL|METH_KEYWORDS, winreg_OpenKey__doc__}, - -static HKEY -winreg_OpenKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access); - -static PyObject * -winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) -{ - PyObject *return_value = NULL; - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - #define NUM_KEYWORDS 4 - static struct { - PyGC_Head _this_is_not_used; - PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; - } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, - }; - #undef NUM_KEYWORDS - #define KWTUPLE (&_kwtuple.ob_base.ob_base) - - #else // !Py_BUILD_CORE - # define KWTUPLE NULL - #endif // !Py_BUILD_CORE - - static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; - static _PyArg_Parser _parser = { - .keywords = _keywords, - .fname = "OpenKey", - .kwtuple = KWTUPLE, - }; - #undef KWTUPLE - PyObject *argsbuf[4]; - Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2; - HKEY key; - const wchar_t *sub_key = NULL; - int reserved = 0; - REGSAM access = KEY_READ; - HKEY _return_value; - - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); - if (!args) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("OpenKey", "argument 'sub_key'", "str or None", args[1]); - goto exit; - } - if (!noptargs) { - goto skip_optional_pos; - } - if (args[2]) { - reserved = PyLong_AsInt(args[2]); - if (reserved == -1 && PyErr_Occurred()) { - goto exit; - } - if (!--noptargs) { - goto skip_optional_pos; - } - } - access = PyLong_AsInt(args[3]); - if (access == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional_pos: - _return_value = winreg_OpenKey_impl(module, key, sub_key, reserved, access); - if (_return_value == NULL) { - goto exit; - } - return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_OpenKeyEx__doc__, -"OpenKeyEx($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n" -"--\n" -"\n" -"Opens the specified key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that identifies the sub_key to open.\n" -" reserved\n" -" A reserved integer that must be zero. Default is zero.\n" -" access\n" -" An integer that specifies an access mask that describes the desired\n" -" security access for the key. Default is KEY_READ.\n" -"\n" -"The result is a new handle to the specified key.\n" -"If the function fails, an OSError exception is raised."); - -#define WINREG_OPENKEYEX_METHODDEF \ - {"OpenKeyEx", _PyCFunction_CAST(winreg_OpenKeyEx), METH_FASTCALL|METH_KEYWORDS, winreg_OpenKeyEx__doc__}, - -static HKEY -winreg_OpenKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access); - -static PyObject * -winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) -{ - PyObject *return_value = NULL; - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - #define NUM_KEYWORDS 4 - static struct { - PyGC_Head _this_is_not_used; - PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; - } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) - .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, - }; - #undef NUM_KEYWORDS - #define KWTUPLE (&_kwtuple.ob_base.ob_base) - - #else // !Py_BUILD_CORE - # define KWTUPLE NULL - #endif // !Py_BUILD_CORE - - static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; - static _PyArg_Parser _parser = { - .keywords = _keywords, - .fname = "OpenKeyEx", - .kwtuple = KWTUPLE, - }; - #undef KWTUPLE - PyObject *argsbuf[4]; - Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2; - HKEY key; - const wchar_t *sub_key = NULL; - int reserved = 0; - REGSAM access = KEY_READ; - HKEY _return_value; - - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); - if (!args) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("OpenKeyEx", "argument 'sub_key'", "str or None", args[1]); - goto exit; - } - if (!noptargs) { - goto skip_optional_pos; - } - if (args[2]) { - reserved = PyLong_AsInt(args[2]); - if (reserved == -1 && PyErr_Occurred()) { - goto exit; - } - if (!--noptargs) { - goto skip_optional_pos; - } - } - access = PyLong_AsInt(args[3]); - if (access == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional_pos: - _return_value = winreg_OpenKeyEx_impl(module, key, sub_key, reserved, access); - if (_return_value == NULL) { - goto exit; - } - return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_QueryInfoKey__doc__, -"QueryInfoKey($module, key, /)\n" -"--\n" -"\n" -"Returns information about a key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -"\n" -"The result is a tuple of 3 items:\n" -"An integer that identifies the number of sub keys this key has.\n" -"An integer that identifies the number of values this key has.\n" -"An integer that identifies when the key was last modified (if available)\n" -"as 100\'s of nanoseconds since Jan 1, 1600."); - -#define WINREG_QUERYINFOKEY_METHODDEF \ - {"QueryInfoKey", (PyCFunction)winreg_QueryInfoKey, METH_O, winreg_QueryInfoKey__doc__}, - -static PyObject * -winreg_QueryInfoKey_impl(PyObject *module, HKEY key); - -static PyObject * -winreg_QueryInfoKey(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - HKEY key; - - if (!clinic_HKEY_converter(_PyModule_GetState(module), arg, &key)) { - goto exit; - } - return_value = winreg_QueryInfoKey_impl(module, key); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_QueryValue__doc__, -"QueryValue($module, key, sub_key, /)\n" -"--\n" -"\n" -"Retrieves the unnamed value for a key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that holds the name of the subkey with which the value\n" -" is associated. If this parameter is None or empty, the function\n" -" retrieves the value set by the SetValue() method for the key\n" -" identified by key.\n" -"\n" -"Values in the registry have name, type, and data components. This method\n" -"retrieves the data for a key\'s first value that has a NULL name.\n" -"But since the underlying API call doesn\'t return the type, you\'ll\n" -"probably be happier using QueryValueEx; this function is just here for\n" -"completeness."); - -#define WINREG_QUERYVALUE_METHODDEF \ - {"QueryValue", _PyCFunction_CAST(winreg_QueryValue), METH_FASTCALL, winreg_QueryValue__doc__}, - -static PyObject * -winreg_QueryValue_impl(PyObject *module, HKEY key, const wchar_t *sub_key); - -static PyObject * -winreg_QueryValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *sub_key = NULL; - - if (!_PyArg_CheckPositional("QueryValue", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("QueryValue", "argument 2", "str or None", args[1]); - goto exit; - } - return_value = winreg_QueryValue_impl(module, key, sub_key); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_QueryValueEx__doc__, -"QueryValueEx($module, key, name, /)\n" -"--\n" -"\n" -"Retrieves the type and value of a specified sub-key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" name\n" -" A string indicating the value to query.\n" -"\n" -"Behaves mostly like QueryValue(), but also returns the type of the\n" -"specified value name associated with the given open registry key.\n" -"\n" -"The return value is a tuple of the value and the type_id."); - -#define WINREG_QUERYVALUEEX_METHODDEF \ - {"QueryValueEx", _PyCFunction_CAST(winreg_QueryValueEx), METH_FASTCALL, winreg_QueryValueEx__doc__}, - -static PyObject * -winreg_QueryValueEx_impl(PyObject *module, HKEY key, const wchar_t *name); - -static PyObject * -winreg_QueryValueEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *name = NULL; - - if (!_PyArg_CheckPositional("QueryValueEx", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - name = NULL; - } - else if (PyUnicode_Check(args[1])) { - name = PyUnicode_AsWideCharString(args[1], NULL); - if (name == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("QueryValueEx", "argument 2", "str or None", args[1]); - goto exit; - } - return_value = winreg_QueryValueEx_impl(module, key, name); - -exit: - /* Cleanup for name */ - PyMem_Free((void *)name); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_SaveKey__doc__, -"SaveKey($module, key, file_name, /)\n" -"--\n" -"\n" -"Saves the specified key, and all its subkeys to the specified file.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" file_name\n" -" The name of the file to save registry data to. This file cannot\n" -" already exist. If this filename includes an extension, it cannot be\n" -" used on file allocation table (FAT) file systems by the LoadKey(),\n" -" ReplaceKey() or RestoreKey() methods.\n" -"\n" -"If key represents a key on a remote computer, the path described by\n" -"file_name is relative to the remote computer.\n" -"\n" -"The caller of this method must possess the SeBackupPrivilege\n" -"security privilege. This function passes NULL for security_attributes\n" -"to the API."); - -#define WINREG_SAVEKEY_METHODDEF \ - {"SaveKey", _PyCFunction_CAST(winreg_SaveKey), METH_FASTCALL, winreg_SaveKey__doc__}, - -static PyObject * -winreg_SaveKey_impl(PyObject *module, HKEY key, const wchar_t *file_name); - -static PyObject * -winreg_SaveKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *file_name = NULL; - - if (!_PyArg_CheckPositional("SaveKey", nargs, 2, 2)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("SaveKey", "argument 2", "str", args[1]); - goto exit; - } - file_name = PyUnicode_AsWideCharString(args[1], NULL); - if (file_name == NULL) { - goto exit; - } - return_value = winreg_SaveKey_impl(module, key, file_name); - -exit: - /* Cleanup for file_name */ - PyMem_Free((void *)file_name); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_SetValue__doc__, -"SetValue($module, key, sub_key, type, value, /)\n" -"--\n" -"\n" -"Associates a value with a specified key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" sub_key\n" -" A string that names the subkey with which the value is associated.\n" -" type\n" -" An integer that specifies the type of the data. Currently this must\n" -" be REG_SZ, meaning only strings are supported.\n" -" value\n" -" A string that specifies the new value.\n" -"\n" -"If the key specified by the sub_key parameter does not exist, the\n" -"SetValue function creates it.\n" -"\n" -"Value lengths are limited by available memory. Long values (more than\n" -"2048 bytes) should be stored as files with the filenames stored in\n" -"the configuration registry to help the registry perform efficiently.\n" -"\n" -"The key identified by the key parameter must have been opened with\n" -"KEY_SET_VALUE access."); - -#define WINREG_SETVALUE_METHODDEF \ - {"SetValue", _PyCFunction_CAST(winreg_SetValue), METH_FASTCALL, winreg_SetValue__doc__}, - -static PyObject * -winreg_SetValue_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - DWORD type, PyObject *value_obj); - -static PyObject * -winreg_SetValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *sub_key = NULL; - DWORD type; - PyObject *value_obj; - - if (!_PyArg_CheckPositional("SetValue", nargs, 4, 4)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - sub_key = NULL; - } - else if (PyUnicode_Check(args[1])) { - sub_key = PyUnicode_AsWideCharString(args[1], NULL); - if (sub_key == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("SetValue", "argument 2", "str or None", args[1]); - goto exit; - } - if (!_PyLong_UnsignedLong_Converter(args[2], &type)) { - goto exit; - } - if (!PyUnicode_Check(args[3])) { - _PyArg_BadArgument("SetValue", "argument 4", "str", args[3]); - goto exit; - } - value_obj = args[3]; - return_value = winreg_SetValue_impl(module, key, sub_key, type, value_obj); - -exit: - /* Cleanup for sub_key */ - PyMem_Free((void *)sub_key); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) - -PyDoc_STRVAR(winreg_SetValueEx__doc__, -"SetValueEx($module, key, value_name, reserved, type, value, /)\n" -"--\n" -"\n" -"Stores data in the value field of an open registry key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -" value_name\n" -" A string containing the name of the value to set, or None.\n" -" reserved\n" -" Can be anything - zero is always passed to the API.\n" -" type\n" -" An integer that specifies the type of the data, one of:\n" -" REG_BINARY -- Binary data in any form.\n" -" REG_DWORD -- A 32-bit number.\n" -" REG_DWORD_LITTLE_ENDIAN -- A 32-bit number in little-endian format. Equivalent to REG_DWORD\n" -" REG_DWORD_BIG_ENDIAN -- A 32-bit number in big-endian format.\n" -" REG_EXPAND_SZ -- A null-terminated string that contains unexpanded\n" -" references to environment variables (for example,\n" -" %PATH%).\n" -" REG_LINK -- A Unicode symbolic link.\n" -" REG_MULTI_SZ -- A sequence of null-terminated strings, terminated\n" -" by two null characters. Note that Python handles\n" -" this termination automatically.\n" -" REG_NONE -- No defined value type.\n" -" REG_QWORD -- A 64-bit number.\n" -" REG_QWORD_LITTLE_ENDIAN -- A 64-bit number in little-endian format. Equivalent to REG_QWORD.\n" -" REG_RESOURCE_LIST -- A device-driver resource list.\n" -" REG_SZ -- A null-terminated string.\n" -" value\n" -" A string that specifies the new value.\n" -"\n" -"This method can also set additional value and type information for the\n" -"specified key. The key identified by the key parameter must have been\n" -"opened with KEY_SET_VALUE access.\n" -"\n" -"To open the key, use the CreateKeyEx() or OpenKeyEx() methods.\n" -"\n" -"Value lengths are limited by available memory. Long values (more than\n" -"2048 bytes) should be stored as files with the filenames stored in\n" -"the configuration registry to help the registry perform efficiently."); - -#define WINREG_SETVALUEEX_METHODDEF \ - {"SetValueEx", _PyCFunction_CAST(winreg_SetValueEx), METH_FASTCALL, winreg_SetValueEx__doc__}, - -static PyObject * -winreg_SetValueEx_impl(PyObject *module, HKEY key, const wchar_t *value_name, - PyObject *reserved, DWORD type, PyObject *value); - -static PyObject * -winreg_SetValueEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - HKEY key; - const wchar_t *value_name = NULL; - PyObject *reserved; - DWORD type; - PyObject *value; - - if (!_PyArg_CheckPositional("SetValueEx", nargs, 5, 5)) { - goto exit; - } - if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { - goto exit; - } - if (args[1] == Py_None) { - value_name = NULL; - } - else if (PyUnicode_Check(args[1])) { - value_name = PyUnicode_AsWideCharString(args[1], NULL); - if (value_name == NULL) { - goto exit; - } - } - else { - _PyArg_BadArgument("SetValueEx", "argument 2", "str or None", args[1]); - goto exit; - } - reserved = args[2]; - if (!_PyLong_UnsignedLong_Converter(args[3], &type)) { - goto exit; - } - value = args[4]; - return_value = winreg_SetValueEx_impl(module, key, value_name, reserved, type, value); - -exit: - /* Cleanup for value_name */ - PyMem_Free((void *)value_name); - - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_DisableReflectionKey__doc__, -"DisableReflectionKey($module, key, /)\n" -"--\n" -"\n" -"Disables registry reflection for 32bit processes running on a 64bit OS.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -"\n" -"Will generally raise NotImplementedError if executed on a 32bit OS.\n" -"\n" -"If the key is not on the reflection list, the function succeeds but has\n" -"no effect. Disabling reflection for a key does not affect reflection\n" -"of any subkeys."); - -#define WINREG_DISABLEREFLECTIONKEY_METHODDEF \ - {"DisableReflectionKey", (PyCFunction)winreg_DisableReflectionKey, METH_O, winreg_DisableReflectionKey__doc__}, - -static PyObject * -winreg_DisableReflectionKey_impl(PyObject *module, HKEY key); - -static PyObject * -winreg_DisableReflectionKey(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - HKEY key; - - if (!clinic_HKEY_converter(_PyModule_GetState(module), arg, &key)) { - goto exit; - } - return_value = winreg_DisableReflectionKey_impl(module, key); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_EnableReflectionKey__doc__, -"EnableReflectionKey($module, key, /)\n" -"--\n" -"\n" -"Restores registry reflection for the specified disabled key.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -"\n" -"Will generally raise NotImplementedError if executed on a 32bit OS.\n" -"Restoring reflection for a key does not affect reflection of any\n" -"subkeys."); - -#define WINREG_ENABLEREFLECTIONKEY_METHODDEF \ - {"EnableReflectionKey", (PyCFunction)winreg_EnableReflectionKey, METH_O, winreg_EnableReflectionKey__doc__}, - -static PyObject * -winreg_EnableReflectionKey_impl(PyObject *module, HKEY key); - -static PyObject * -winreg_EnableReflectionKey(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - HKEY key; - - if (!clinic_HKEY_converter(_PyModule_GetState(module), arg, &key)) { - goto exit; - } - return_value = winreg_EnableReflectionKey_impl(module, key); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) - -PyDoc_STRVAR(winreg_QueryReflectionKey__doc__, -"QueryReflectionKey($module, key, /)\n" -"--\n" -"\n" -"Returns the reflection state for the specified key as a bool.\n" -"\n" -" key\n" -" An already open key, or any one of the predefined HKEY_* constants.\n" -"\n" -"Will generally raise NotImplementedError if executed on a 32bit OS."); - -#define WINREG_QUERYREFLECTIONKEY_METHODDEF \ - {"QueryReflectionKey", (PyCFunction)winreg_QueryReflectionKey, METH_O, winreg_QueryReflectionKey__doc__}, - -static PyObject * -winreg_QueryReflectionKey_impl(PyObject *module, HKEY key); - -static PyObject * -winreg_QueryReflectionKey(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - HKEY key; - - if (!clinic_HKEY_converter(_PyModule_GetState(module), arg, &key)) { - goto exit; - } - return_value = winreg_QueryReflectionKey_impl(module, key); - -exit: - return return_value; -} - -#endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) */ - -#ifndef WINREG_HKEYTYPE_CLOSE_METHODDEF - #define WINREG_HKEYTYPE_CLOSE_METHODDEF -#endif /* !defined(WINREG_HKEYTYPE_CLOSE_METHODDEF) */ - -#ifndef WINREG_HKEYTYPE_DETACH_METHODDEF - #define WINREG_HKEYTYPE_DETACH_METHODDEF -#endif /* !defined(WINREG_HKEYTYPE_DETACH_METHODDEF) */ - -#ifndef WINREG_HKEYTYPE___ENTER___METHODDEF - #define WINREG_HKEYTYPE___ENTER___METHODDEF -#endif /* !defined(WINREG_HKEYTYPE___ENTER___METHODDEF) */ - -#ifndef WINREG_HKEYTYPE___EXIT___METHODDEF - #define WINREG_HKEYTYPE___EXIT___METHODDEF -#endif /* !defined(WINREG_HKEYTYPE___EXIT___METHODDEF) */ - -#ifndef WINREG_CLOSEKEY_METHODDEF - #define WINREG_CLOSEKEY_METHODDEF -#endif /* !defined(WINREG_CLOSEKEY_METHODDEF) */ - -#ifndef WINREG_CONNECTREGISTRY_METHODDEF - #define WINREG_CONNECTREGISTRY_METHODDEF -#endif /* !defined(WINREG_CONNECTREGISTRY_METHODDEF) */ - -#ifndef WINREG_CREATEKEY_METHODDEF - #define WINREG_CREATEKEY_METHODDEF -#endif /* !defined(WINREG_CREATEKEY_METHODDEF) */ - -#ifndef WINREG_CREATEKEYEX_METHODDEF - #define WINREG_CREATEKEYEX_METHODDEF -#endif /* !defined(WINREG_CREATEKEYEX_METHODDEF) */ - -#ifndef WINREG_DELETEKEY_METHODDEF - #define WINREG_DELETEKEY_METHODDEF -#endif /* !defined(WINREG_DELETEKEY_METHODDEF) */ - -#ifndef WINREG_DELETEKEYEX_METHODDEF - #define WINREG_DELETEKEYEX_METHODDEF -#endif /* !defined(WINREG_DELETEKEYEX_METHODDEF) */ - -#ifndef WINREG_DELETEVALUE_METHODDEF - #define WINREG_DELETEVALUE_METHODDEF -#endif /* !defined(WINREG_DELETEVALUE_METHODDEF) */ - -#ifndef WINREG_ENUMKEY_METHODDEF - #define WINREG_ENUMKEY_METHODDEF -#endif /* !defined(WINREG_ENUMKEY_METHODDEF) */ - -#ifndef WINREG_ENUMVALUE_METHODDEF - #define WINREG_ENUMVALUE_METHODDEF -#endif /* !defined(WINREG_ENUMVALUE_METHODDEF) */ - -#ifndef WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF - #define WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF -#endif /* !defined(WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF) */ - -#ifndef WINREG_FLUSHKEY_METHODDEF - #define WINREG_FLUSHKEY_METHODDEF -#endif /* !defined(WINREG_FLUSHKEY_METHODDEF) */ - -#ifndef WINREG_LOADKEY_METHODDEF - #define WINREG_LOADKEY_METHODDEF -#endif /* !defined(WINREG_LOADKEY_METHODDEF) */ - -#ifndef WINREG_OPENKEY_METHODDEF - #define WINREG_OPENKEY_METHODDEF -#endif /* !defined(WINREG_OPENKEY_METHODDEF) */ - -#ifndef WINREG_OPENKEYEX_METHODDEF - #define WINREG_OPENKEYEX_METHODDEF -#endif /* !defined(WINREG_OPENKEYEX_METHODDEF) */ - -#ifndef WINREG_QUERYINFOKEY_METHODDEF - #define WINREG_QUERYINFOKEY_METHODDEF -#endif /* !defined(WINREG_QUERYINFOKEY_METHODDEF) */ - -#ifndef WINREG_QUERYVALUE_METHODDEF - #define WINREG_QUERYVALUE_METHODDEF -#endif /* !defined(WINREG_QUERYVALUE_METHODDEF) */ - -#ifndef WINREG_QUERYVALUEEX_METHODDEF - #define WINREG_QUERYVALUEEX_METHODDEF -#endif /* !defined(WINREG_QUERYVALUEEX_METHODDEF) */ - -#ifndef WINREG_SAVEKEY_METHODDEF - #define WINREG_SAVEKEY_METHODDEF -#endif /* !defined(WINREG_SAVEKEY_METHODDEF) */ - -#ifndef WINREG_SETVALUE_METHODDEF - #define WINREG_SETVALUE_METHODDEF -#endif /* !defined(WINREG_SETVALUE_METHODDEF) */ - -#ifndef WINREG_SETVALUEEX_METHODDEF - #define WINREG_SETVALUEEX_METHODDEF -#endif /* !defined(WINREG_SETVALUEEX_METHODDEF) */ - -#ifndef WINREG_DISABLEREFLECTIONKEY_METHODDEF - #define WINREG_DISABLEREFLECTIONKEY_METHODDEF -#endif /* !defined(WINREG_DISABLEREFLECTIONKEY_METHODDEF) */ - -#ifndef WINREG_ENABLEREFLECTIONKEY_METHODDEF - #define WINREG_ENABLEREFLECTIONKEY_METHODDEF -#endif /* !defined(WINREG_ENABLEREFLECTIONKEY_METHODDEF) */ - -#ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF - #define WINREG_QUERYREFLECTIONKEY_METHODDEF -#endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=1ee4098b2f143b6a input=a9049054013a1b77]*/ diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h deleted file mode 100644 index 6cc989565b638e..00000000000000 --- a/PC/clinic/winsound.c.h +++ /dev/null @@ -1,103 +0,0 @@ -/*[clinic input] -preserve -[clinic start generated code]*/ - -PyDoc_STRVAR(winsound_PlaySound__doc__, -"PlaySound($module, /, sound, flags)\n" -"--\n" -"\n" -"A wrapper around the Windows PlaySound API.\n" -"\n" -" sound\n" -" The sound to play; a filename, data, or None.\n" -" flags\n" -" Flag values, ored together. See module documentation."); - -#define WINSOUND_PLAYSOUND_METHODDEF \ - {"PlaySound", (PyCFunction)(void(*)(void))winsound_PlaySound, METH_VARARGS|METH_KEYWORDS, winsound_PlaySound__doc__}, - -static PyObject * -winsound_PlaySound_impl(PyObject *module, PyObject *sound, int flags); - -static PyObject * -winsound_PlaySound(PyObject *module, PyObject *args, PyObject *kwargs) -{ - PyObject *return_value = NULL; - static char *_keywords[] = {"sound", "flags", NULL}; - PyObject *sound; - int flags; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi:PlaySound", _keywords, - &sound, &flags)) - goto exit; - return_value = winsound_PlaySound_impl(module, sound, flags); - -exit: - return return_value; -} - -PyDoc_STRVAR(winsound_Beep__doc__, -"Beep($module, /, frequency, duration)\n" -"--\n" -"\n" -"A wrapper around the Windows Beep API.\n" -"\n" -" frequency\n" -" Frequency of the sound in hertz.\n" -" Must be in the range 37 through 32,767.\n" -" duration\n" -" How long the sound should play, in milliseconds."); - -#define WINSOUND_BEEP_METHODDEF \ - {"Beep", (PyCFunction)(void(*)(void))winsound_Beep, METH_VARARGS|METH_KEYWORDS, winsound_Beep__doc__}, - -static PyObject * -winsound_Beep_impl(PyObject *module, int frequency, int duration); - -static PyObject * -winsound_Beep(PyObject *module, PyObject *args, PyObject *kwargs) -{ - PyObject *return_value = NULL; - static char *_keywords[] = {"frequency", "duration", NULL}; - int frequency; - int duration; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:Beep", _keywords, - &frequency, &duration)) - goto exit; - return_value = winsound_Beep_impl(module, frequency, duration); - -exit: - return return_value; -} - -PyDoc_STRVAR(winsound_MessageBeep__doc__, -"MessageBeep($module, /, type=MB_OK)\n" -"--\n" -"\n" -"Call Windows MessageBeep(x).\n" -"\n" -"x defaults to MB_OK."); - -#define WINSOUND_MESSAGEBEEP_METHODDEF \ - {"MessageBeep", (PyCFunction)(void(*)(void))winsound_MessageBeep, METH_VARARGS|METH_KEYWORDS, winsound_MessageBeep__doc__}, - -static PyObject * -winsound_MessageBeep_impl(PyObject *module, int type); - -static PyObject * -winsound_MessageBeep(PyObject *module, PyObject *args, PyObject *kwargs) -{ - PyObject *return_value = NULL; - static char *_keywords[] = {"type", NULL}; - int type = MB_OK; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:MessageBeep", _keywords, - &type)) - goto exit; - return_value = winsound_MessageBeep_impl(module, type); - -exit: - return return_value; -} -/*[clinic end generated code: output=18a3771b34cdf97d input=a9049054013a1b77]*/ diff --git a/PC/config.c b/PC/config.c deleted file mode 100644 index 873f93063057dc..00000000000000 --- a/PC/config.c +++ /dev/null @@ -1,185 +0,0 @@ -/* Module configuration */ - -/* This file contains the table of built-in modules. - See create_builtin() in import.c. */ - -#include "Python.h" - -extern PyObject* PyInit__abc(void); -extern PyObject* PyInit_array(void); -extern PyObject* PyInit_binascii(void); -extern PyObject* PyInit_cmath(void); -extern PyObject* PyInit_errno(void); -extern PyObject* PyInit_faulthandler(void); -extern PyObject* PyInit__tracemalloc(void); -extern PyObject* PyInit_gc(void); -extern PyObject* PyInit_math(void); -extern PyObject* PyInit__md5(void); -extern PyObject* PyInit_nt(void); -extern PyObject* PyInit__operator(void); -extern PyObject* PyInit__signal(void); -extern PyObject* PyInit__sha1(void); -extern PyObject* PyInit__sha2(void); -extern PyObject* PyInit__sha3(void); -extern PyObject* PyInit__statistics(void); -extern PyObject* PyInit__sysconfig(void); -extern PyObject* PyInit__typing(void); -extern PyObject* PyInit__blake2(void); -extern PyObject* PyInit_time(void); -extern PyObject* PyInit__thread(void); -#ifdef WIN32 -extern PyObject* PyInit_msvcrt(void); -extern PyObject* PyInit__locale(void); -#endif -extern PyObject* PyInit__codecs(void); -extern PyObject* PyInit__weakref(void); -/* XXX: These two should really be extracted to standalone extensions. */ -extern PyObject* PyInit_xxsubtype(void); -extern PyObject* PyInit__interpreters(void); -extern PyObject* PyInit__interpchannels(void); -extern PyObject* PyInit__interpqueues(void); -extern PyObject* PyInit__random(void); -extern PyObject* PyInit_itertools(void); -extern PyObject* PyInit__collections(void); -extern PyObject* PyInit__heapq(void); -extern PyObject* PyInit__bisect(void); -extern PyObject* PyInit__symtable(void); -extern PyObject* PyInit_mmap(void); -extern PyObject* PyInit__csv(void); -extern PyObject* PyInit__sre(void); -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES) -extern PyObject* PyInit_winreg(void); -#endif -extern PyObject* PyInit__struct(void); -extern PyObject* PyInit__datetime(void); -extern PyObject* PyInit__functools(void); -extern PyObject* PyInit__json(void); -#ifdef _Py_HAVE_ZLIB -extern PyObject* PyInit_zlib(void); -#endif - -extern PyObject* PyInit__multibytecodec(void); -extern PyObject* PyInit__codecs_cn(void); -extern PyObject* PyInit__codecs_hk(void); -extern PyObject* PyInit__codecs_iso2022(void); -extern PyObject* PyInit__codecs_jp(void); -extern PyObject* PyInit__codecs_kr(void); -extern PyObject* PyInit__codecs_tw(void); -extern PyObject* PyInit__winapi(void); -extern PyObject* PyInit__lsprof(void); -extern PyObject* PyInit__ast(void); -extern PyObject* PyInit__io(void); -extern PyObject* PyInit__pickle(void); -extern PyObject* PyInit_atexit(void); -extern PyObject* _PyWarnings_Init(void); -extern PyObject* PyInit__string(void); -extern PyObject* PyInit__stat(void); -extern PyObject* PyInit__opcode(void); -extern PyObject* PyInit__contextvars(void); -extern PyObject* PyInit__tokenize(void); -extern PyObject* PyInit__suggestions(void); - -/* tools/freeze/makeconfig.py marker for additional "extern" */ -/* -- ADDMODULE MARKER 1 -- */ - -extern PyObject* PyMarshal_Init(void); -extern PyObject* PyInit__imp(void); - -struct _inittab _PyImport_Inittab[] = { - {"_abc", PyInit__abc}, - {"array", PyInit_array}, - {"_ast", PyInit__ast}, - {"binascii", PyInit_binascii}, - {"cmath", PyInit_cmath}, - {"errno", PyInit_errno}, - {"faulthandler", PyInit_faulthandler}, - {"gc", PyInit_gc}, - {"math", PyInit_math}, - {"nt", PyInit_nt}, /* Use the NT os functions, not posix */ - {"_operator", PyInit__operator}, - {"_signal", PyInit__signal}, - {"_md5", PyInit__md5}, - {"_sha1", PyInit__sha1}, - {"_sha2", PyInit__sha2}, - {"_sha3", PyInit__sha3}, - {"_blake2", PyInit__blake2}, - {"_sysconfig", PyInit__sysconfig}, - {"time", PyInit_time}, - {"_thread", PyInit__thread}, - {"_tokenize", PyInit__tokenize}, - {"_typing", PyInit__typing}, - {"_statistics", PyInit__statistics}, -#ifdef WIN32 - {"msvcrt", PyInit_msvcrt}, - {"_locale", PyInit__locale}, -#endif - {"_tracemalloc", PyInit__tracemalloc}, - /* XXX Should _winapi go in a WIN32 block? not WIN64? */ - {"_winapi", PyInit__winapi}, - - {"_codecs", PyInit__codecs}, - {"_weakref", PyInit__weakref}, - {"_random", PyInit__random}, - {"_bisect", PyInit__bisect}, - {"_heapq", PyInit__heapq}, - {"_lsprof", PyInit__lsprof}, - {"itertools", PyInit_itertools}, - {"_collections", PyInit__collections}, - {"_symtable", PyInit__symtable}, -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) - {"mmap", PyInit_mmap}, -#endif - {"_csv", PyInit__csv}, - {"_sre", PyInit__sre}, -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES) - {"winreg", PyInit_winreg}, -#endif - {"_struct", PyInit__struct}, - {"_datetime", PyInit__datetime}, - {"_functools", PyInit__functools}, - {"_json", PyInit__json}, - {"_suggestions", PyInit__suggestions}, - - {"xxsubtype", PyInit_xxsubtype}, - {"_interpreters", PyInit__interpreters}, - {"_interpchannels", PyInit__interpchannels}, - {"_interpqueues", PyInit__interpqueues}, -#ifdef _Py_HAVE_ZLIB - {"zlib", PyInit_zlib}, -#endif - - /* CJK codecs */ - {"_multibytecodec", PyInit__multibytecodec}, - {"_codecs_cn", PyInit__codecs_cn}, - {"_codecs_hk", PyInit__codecs_hk}, - {"_codecs_iso2022", PyInit__codecs_iso2022}, - {"_codecs_jp", PyInit__codecs_jp}, - {"_codecs_kr", PyInit__codecs_kr}, - {"_codecs_tw", PyInit__codecs_tw}, - -/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */ -/* -- ADDMODULE MARKER 2 -- */ - - /* This module "lives in" with marshal.c */ - {"marshal", PyMarshal_Init}, - - /* This lives it with import.c */ - {"_imp", PyInit__imp}, - - /* These entries are here for sys.builtin_module_names */ - {"builtins", NULL}, - {"sys", NULL}, - {"_warnings", _PyWarnings_Init}, - {"_string", PyInit__string}, - - {"_io", PyInit__io}, - {"_pickle", PyInit__pickle}, - {"atexit", PyInit_atexit}, - {"_stat", PyInit__stat}, - {"_opcode", PyInit__opcode}, - - {"_contextvars", PyInit__contextvars}, - - /* Sentinel */ - {0, 0} -}; diff --git a/PC/config_minimal.c b/PC/config_minimal.c deleted file mode 100644 index 9a66ea1d1cd348..00000000000000 --- a/PC/config_minimal.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Module configuration */ - -/* This file contains the table of built-in modules. - See create_builtin() in import.c. */ - -#include "Python.h" - -#ifdef Py_ENABLE_SHARED -/* Define extern variables omitted from minimal builds */ -void *PyWin_DLLhModule = NULL; -#endif - - -extern PyObject* PyInit_faulthandler(void); -extern PyObject* PyInit__tracemalloc(void); -extern PyObject* PyInit_gc(void); -extern PyObject* PyInit_nt(void); -extern PyObject* PyInit__signal(void); -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES) -extern PyObject* PyInit_winreg(void); -#endif - -extern PyObject* PyInit__ast(void); -extern PyObject* PyInit__io(void); -extern PyObject* PyInit_atexit(void); -extern PyObject* _PyWarnings_Init(void); -extern PyObject* PyInit__string(void); -extern PyObject* PyInit__tokenize(void); - -extern PyObject* PyMarshal_Init(void); -extern PyObject* PyInit__imp(void); - -struct _inittab _PyImport_Inittab[] = { - {"_ast", PyInit__ast}, - {"faulthandler", PyInit_faulthandler}, - {"gc", PyInit_gc}, - {"nt", PyInit_nt}, /* Use the NT os functions, not posix */ - {"_signal", PyInit__signal}, - {"_tokenize", PyInit__tokenize}, - {"_tracemalloc", PyInit__tracemalloc}, - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES) - {"winreg", PyInit_winreg}, -#endif - - /* This module "lives in" with marshal.c */ - {"marshal", PyMarshal_Init}, - - /* This lives it with import.c */ - {"_imp", PyInit__imp}, - - /* These entries are here for sys.builtin_module_names */ - {"builtins", NULL}, - {"sys", NULL}, - {"_warnings", _PyWarnings_Init}, - {"_string", PyInit__string}, - - {"_io", PyInit__io}, - {"atexit", PyInit_atexit}, - - /* Sentinel */ - {0, 0} -}; diff --git a/PC/crtlicense.txt b/PC/crtlicense.txt deleted file mode 100644 index f86841f263efe8..00000000000000 --- a/PC/crtlicense.txt +++ /dev/null @@ -1,41 +0,0 @@ - - -Additional Conditions for this Windows binary build ---------------------------------------------------- - -This program is linked with and uses Microsoft Distributable Code, -copyrighted by Microsoft Corporation. The Microsoft Distributable Code -is embedded in each .exe, .dll and .pyd file as a result of running -the code through a linker. - -If you further distribute programs that include the Microsoft -Distributable Code, you must comply with the restrictions on -distribution specified by Microsoft. In particular, you must require -distributors and external end users to agree to terms that protect the -Microsoft Distributable Code at least as much as Microsoft's own -requirements for the Distributable Code. See Microsoft's documentation -(included in its developer tools and on its website at microsoft.com) -for specific details. - -Redistribution of the Windows binary build of the Python interpreter -complies with this agreement, provided that you do not: - -- alter any copyright, trademark or patent notice in Microsoft's -Distributable Code; - -- use Microsoft's trademarks in your programs' names or in a way that -suggests your programs come from or are endorsed by Microsoft; - -- distribute Microsoft's Distributable Code to run on a platform other -than Microsoft operating systems, run-time technologies or application -platforms; or - -- include Microsoft Distributable Code in malicious, deceptive or -unlawful programs. - -These restrictions apply only to the Microsoft Distributable Code as -defined above, not to Python itself or any programs running on the -Python interpreter. The redistribution of the Python interpreter and -libraries is governed by the Python Software License included with this -file, or by other licenses as marked. - diff --git a/PC/dl_nt.c b/PC/dl_nt.c deleted file mode 100644 index 7f17ee168727f0..00000000000000 --- a/PC/dl_nt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - -Entry point for the Windows NT DLL. - -About the only reason for having this, is so initall() can automatically -be called, removing that burden (and possible source of frustration if -forgotten) from the programmer. - -*/ - -#include "Python.h" -#include "windows.h" - -#ifdef Py_ENABLE_SHARED - -// Python Globals -HMODULE PyWin_DLLhModule = NULL; -const char *PyWin_DLLVersionString = MS_DLL_ID; - -BOOL WINAPI DllMain (HANDLE hInst, - ULONG ul_reason_for_call, - LPVOID lpReserved) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - PyWin_DLLhModule = hInst; - break; - - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - -#endif /* Py_ENABLE_SHARED */ diff --git a/PC/errmap.h b/PC/errmap.h deleted file mode 100644 index a064ecb80b1ed9..00000000000000 --- a/PC/errmap.h +++ /dev/null @@ -1,143 +0,0 @@ -int -winerror_to_errno(int winerror) -{ - // Unwrap FACILITY_WIN32 HRESULT errors. - if ((winerror & 0xFFFF0000) == 0x80070000) { - winerror &= 0x0000FFFF; - } - - // Winsock error codes (10000-11999) are errno values. - if (winerror >= 10000 && winerror < 12000) { - switch (winerror) { - case WSAEINTR: - case WSAEBADF: - case WSAEACCES: - case WSAEFAULT: - case WSAEINVAL: - case WSAEMFILE: - // Winsock definitions of errno values. See WinSock2.h - return winerror - 10000; - default: - return winerror; - } - } - - switch (winerror) { - case ERROR_FILE_NOT_FOUND: // 2 - case ERROR_PATH_NOT_FOUND: // 3 - case ERROR_INVALID_DRIVE: // 15 - case ERROR_NO_MORE_FILES: // 18 - case ERROR_BAD_NETPATH: // 53 - case ERROR_BAD_NET_NAME: // 67 - case ERROR_BAD_PATHNAME: // 161 - case ERROR_FILENAME_EXCED_RANGE: // 206 - return ENOENT; - - case ERROR_BAD_ENVIRONMENT: // 10 - return E2BIG; - - case ERROR_BAD_FORMAT: // 11 - case ERROR_INVALID_STARTING_CODESEG: // 188 - case ERROR_INVALID_STACKSEG: // 189 - case ERROR_INVALID_MODULETYPE: // 190 - case ERROR_INVALID_EXE_SIGNATURE: // 191 - case ERROR_EXE_MARKED_INVALID: // 192 - case ERROR_BAD_EXE_FORMAT: // 193 - case ERROR_ITERATED_DATA_EXCEEDS_64k: // 194 - case ERROR_INVALID_MINALLOCSIZE: // 195 - case ERROR_DYNLINK_FROM_INVALID_RING: // 196 - case ERROR_IOPL_NOT_ENABLED: // 197 - case ERROR_INVALID_SEGDPL: // 198 - case ERROR_AUTODATASEG_EXCEEDS_64k: // 199 - case ERROR_RING2SEG_MUST_BE_MOVABLE: // 200 - case ERROR_RELOC_CHAIN_XEEDS_SEGLIM: // 201 - case ERROR_INFLOOP_IN_RELOC_CHAIN: // 202 - return ENOEXEC; - - case ERROR_INVALID_HANDLE: // 6 - case ERROR_INVALID_TARGET_HANDLE: // 114 - case ERROR_DIRECT_ACCESS_HANDLE: // 130 - return EBADF; - - case ERROR_WAIT_NO_CHILDREN: // 128 - case ERROR_CHILD_NOT_COMPLETE: // 129 - return ECHILD; - - case ERROR_NO_PROC_SLOTS: // 89 - case ERROR_MAX_THRDS_REACHED: // 164 - case ERROR_NESTING_NOT_ALLOWED: // 215 - return EAGAIN; - - case ERROR_ARENA_TRASHED: // 7 - case ERROR_NOT_ENOUGH_MEMORY: // 8 - case ERROR_INVALID_BLOCK: // 9 - case ERROR_NOT_ENOUGH_QUOTA: // 1816 - return ENOMEM; - - case ERROR_ACCESS_DENIED: // 5 - case ERROR_CURRENT_DIRECTORY: // 16 - case ERROR_WRITE_PROTECT: // 19 - case ERROR_BAD_UNIT: // 20 - case ERROR_NOT_READY: // 21 - case ERROR_BAD_COMMAND: // 22 - case ERROR_CRC: // 23 - case ERROR_BAD_LENGTH: // 24 - case ERROR_SEEK: // 25 - case ERROR_NOT_DOS_DISK: // 26 - case ERROR_SECTOR_NOT_FOUND: // 27 - case ERROR_OUT_OF_PAPER: // 28 - case ERROR_WRITE_FAULT: // 29 - case ERROR_READ_FAULT: // 30 - case ERROR_GEN_FAILURE: // 31 - case ERROR_SHARING_VIOLATION: // 32 - case ERROR_LOCK_VIOLATION: // 33 - case ERROR_WRONG_DISK: // 34 - case ERROR_SHARING_BUFFER_EXCEEDED: // 36 - case ERROR_NETWORK_ACCESS_DENIED: // 65 - case ERROR_CANNOT_MAKE: // 82 - case ERROR_FAIL_I24: // 83 - case ERROR_DRIVE_LOCKED: // 108 - case ERROR_SEEK_ON_DEVICE: // 132 - case ERROR_NOT_LOCKED: // 158 - case ERROR_LOCK_FAILED: // 167 - case 35: // 35 (undefined) - return EACCES; - - case ERROR_FILE_EXISTS: // 80 - case ERROR_ALREADY_EXISTS: // 183 - return EEXIST; - - case ERROR_NOT_SAME_DEVICE: // 17 - return EXDEV; - - case ERROR_DIRECTORY: // 267 (bpo-12802) - return ENOTDIR; - - case ERROR_TOO_MANY_OPEN_FILES: // 4 - return EMFILE; - - case ERROR_DISK_FULL: // 112 - return ENOSPC; - - case ERROR_BROKEN_PIPE: // 109 - case ERROR_NO_DATA: // 232 (bpo-13063) - return EPIPE; - - case ERROR_DIR_NOT_EMPTY: // 145 - return ENOTEMPTY; - - case ERROR_NO_UNICODE_TRANSLATION: // 1113 - return EILSEQ; - - case WAIT_TIMEOUT: // 258 - return ETIMEDOUT; - - case ERROR_INVALID_FUNCTION: // 1 - case ERROR_INVALID_ACCESS: // 12 - case ERROR_INVALID_DATA: // 13 - case ERROR_INVALID_PARAMETER: // 87 - case ERROR_NEGATIVE_SEEK: // 131 - default: - return EINVAL; - } -} diff --git a/PC/frozen_dllmain.c b/PC/frozen_dllmain.c deleted file mode 100644 index 0156c5008bc93a..00000000000000 --- a/PC/frozen_dllmain.c +++ /dev/null @@ -1,134 +0,0 @@ -/* FreezeDLLMain.cpp - -This is a DLLMain suitable for frozen applications/DLLs on -a Windows platform. - -The general problem is that many Python extension modules may define -DLL main functions, but when statically linked together to form -a frozen application, this DLLMain symbol exists multiple times. - -The solution is: -* Each module checks for a frozen build, and if so, defines its DLLMain - function as "__declspec(dllexport) DllMain%module%" - (eg, DllMainpythoncom, or DllMainpywintypes) - -* The frozen .EXE/.DLL links against this module, which provides - the single DllMain. - -* This DllMain attempts to locate and call the DllMain for each - of the extension modules. - -* This code also has hooks to "simulate" DllMain when used from - a frozen .EXE. - -At this stage, there is a static table of "possibly embedded modules". -This should change to something better, but it will work OK for now. - -Note that this scheme does not handle dependencies in the order -of DllMain calls - except it does call pywintypes first :-) - -As an example of how an extension module with a DllMain should be -changed, here is a snippet from the pythoncom extension module. - - // end of example code from pythoncom's DllMain.cpp - #ifndef BUILD_FREEZE - #define DLLMAIN DllMain - #define DLLMAIN_DECL - #else - #define DLLMAIN DllMainpythoncom - #define DLLMAIN_DECL __declspec(dllexport) - #endif - - extern "C" DLLMAIN_DECL - BOOL WINAPI DLLMAIN(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) - // end of example code from pythoncom's DllMain.cpp - -***************************************************************************/ -#include "windows.h" - -static char *possibleModules[] = { - "pywintypes", - "pythoncom", - "win32ui", - NULL, -}; - -BOOL CallModuleDllMain(char *modName, DWORD dwReason); - - -/* - Called by a frozen .EXE only, so that built-in extension - modules are initialized correctly -*/ -void PyWinFreeze_ExeInit(void) -{ - char **modName; - for (modName = possibleModules;*modName;*modName++) { -/* printf("Initialising '%s'\n", *modName); */ - CallModuleDllMain(*modName, DLL_PROCESS_ATTACH); - } -} - -/* - Called by a frozen .EXE only, so that built-in extension - modules are cleaned up -*/ -void PyWinFreeze_ExeTerm(void) -{ - // Must go backwards - char **modName; - for (modName = possibleModules+Py_ARRAY_LENGTH(possibleModules)-2; - modName >= possibleModules; - *modName--) { -/* printf("Terminating '%s'\n", *modName);*/ - CallModuleDllMain(*modName, DLL_PROCESS_DETACH); - } -} - -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) -{ - BOOL ret = TRUE; - switch (dwReason) { - case DLL_PROCESS_ATTACH: - { - char **modName; - for (modName = possibleModules;*modName;*modName++) { - BOOL ok = CallModuleDllMain(*modName, dwReason); - if (!ok) - ret = FALSE; - } - break; - } - case DLL_PROCESS_DETACH: - { - // Must go backwards - char **modName; - for (modName = possibleModules+Py_ARRAY_LENGTH(possibleModules)-2; - modName >= possibleModules; - *modName--) - CallModuleDllMain(*modName, DLL_PROCESS_DETACH); - break; - } - } - return ret; -} - -BOOL CallModuleDllMain(char *modName, DWORD dwReason) -{ - BOOL (WINAPI * pfndllmain)(HINSTANCE, DWORD, LPVOID); - - char funcName[255]; - HMODULE hmod = GetModuleHandleW(NULL); - strcpy(funcName, "_DllMain"); - strcat(funcName, modName); - strcat(funcName, "@12"); // stdcall convention. - pfndllmain = (BOOL (WINAPI *)(HINSTANCE, DWORD, LPVOID))GetProcAddress(hmod, funcName); - if (pfndllmain==NULL) { - /* No function by that name exported - then that module does - not appear in our frozen program - return OK - */ - return TRUE; - } - return (*pfndllmain)(hmod, dwReason, NULL); -} - diff --git a/PC/icons/idlex150.png b/PC/icons/idlex150.png deleted file mode 100644 index dbdca5b00f8812..00000000000000 Binary files a/PC/icons/idlex150.png and /dev/null differ diff --git a/PC/icons/idlex44.png b/PC/icons/idlex44.png deleted file mode 100644 index 3ef66e6c68e6bb..00000000000000 Binary files a/PC/icons/idlex44.png and /dev/null differ diff --git a/PC/icons/launcher.icns b/PC/icons/launcher.icns deleted file mode 100644 index 59a917f20d37ca..00000000000000 Binary files a/PC/icons/launcher.icns and /dev/null differ diff --git a/PC/icons/launcher.ico b/PC/icons/launcher.ico deleted file mode 100644 index c4e3c693dcb4a9..00000000000000 Binary files a/PC/icons/launcher.ico and /dev/null differ diff --git a/PC/icons/launcher.svg b/PC/icons/launcher.svg deleted file mode 100644 index 0590b0d2d0d5d4..00000000000000 --- a/PC/icons/launcher.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/logo.svg b/PC/icons/logo.svg deleted file mode 100644 index 6f521503a38328..00000000000000 --- a/PC/icons/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/logox128.png b/PC/icons/logox128.png deleted file mode 100644 index a403de5818cfec..00000000000000 Binary files a/PC/icons/logox128.png and /dev/null differ diff --git a/PC/icons/py.icns b/PC/icons/py.icns deleted file mode 100644 index 2dc4e296f81e82..00000000000000 Binary files a/PC/icons/py.icns and /dev/null differ diff --git a/PC/icons/py.ico b/PC/icons/py.ico deleted file mode 100644 index 1d8a79bfb310c7..00000000000000 Binary files a/PC/icons/py.ico and /dev/null differ diff --git a/PC/icons/py.png b/PC/icons/py.png deleted file mode 100644 index 629022a70bdc44..00000000000000 Binary files a/PC/icons/py.png and /dev/null differ diff --git a/PC/icons/py.svg b/PC/icons/py.svg deleted file mode 100644 index 0924e83fbc711e..00000000000000 --- a/PC/icons/py.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/pyc.icns b/PC/icons/pyc.icns deleted file mode 100644 index 50da9a161501d9..00000000000000 Binary files a/PC/icons/pyc.icns and /dev/null differ diff --git a/PC/icons/pyc.ico b/PC/icons/pyc.ico deleted file mode 100644 index 74dde81b649eed..00000000000000 Binary files a/PC/icons/pyc.ico and /dev/null differ diff --git a/PC/icons/pyc.svg b/PC/icons/pyc.svg deleted file mode 100644 index 5c3e9e7920bd30..00000000000000 --- a/PC/icons/pyc.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/pyd.icns b/PC/icons/pyd.icns deleted file mode 100644 index 5d3d24ee256794..00000000000000 Binary files a/PC/icons/pyd.icns and /dev/null differ diff --git a/PC/icons/pyd.ico b/PC/icons/pyd.ico deleted file mode 100644 index 9f6cb601afb65a..00000000000000 Binary files a/PC/icons/pyd.ico and /dev/null differ diff --git a/PC/icons/pyd.svg b/PC/icons/pyd.svg deleted file mode 100644 index 17eff6a30770f7..00000000000000 --- a/PC/icons/pyd.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/python.icns b/PC/icons/python.icns deleted file mode 100644 index fc53e02f4a9198..00000000000000 Binary files a/PC/icons/python.icns and /dev/null differ diff --git a/PC/icons/python.ico b/PC/icons/python.ico deleted file mode 100644 index b8a38ef15994ff..00000000000000 Binary files a/PC/icons/python.ico and /dev/null differ diff --git a/PC/icons/python.svg b/PC/icons/python.svg deleted file mode 100644 index e23e5a3f636121..00000000000000 --- a/PC/icons/python.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/pythonw.icns b/PC/icons/pythonw.icns deleted file mode 100644 index 9354cf870a9f6a..00000000000000 Binary files a/PC/icons/pythonw.icns and /dev/null differ diff --git a/PC/icons/pythonw.ico b/PC/icons/pythonw.ico deleted file mode 100644 index 6195d433475e06..00000000000000 Binary files a/PC/icons/pythonw.ico and /dev/null differ diff --git a/PC/icons/pythonw.svg b/PC/icons/pythonw.svg deleted file mode 100644 index 7cb26074744e3f..00000000000000 --- a/PC/icons/pythonw.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/icons/pythonwx150.png b/PC/icons/pythonwx150.png deleted file mode 100644 index 589873aeb100b2..00000000000000 Binary files a/PC/icons/pythonwx150.png and /dev/null differ diff --git a/PC/icons/pythonwx44.png b/PC/icons/pythonwx44.png deleted file mode 100644 index 8cd8dd0286f681..00000000000000 Binary files a/PC/icons/pythonwx44.png and /dev/null differ diff --git a/PC/icons/pythonx150.png b/PC/icons/pythonx150.png deleted file mode 100644 index e00aa758edcd47..00000000000000 Binary files a/PC/icons/pythonx150.png and /dev/null differ diff --git a/PC/icons/pythonx44.png b/PC/icons/pythonx44.png deleted file mode 100644 index db0e9b91d40fe5..00000000000000 Binary files a/PC/icons/pythonx44.png and /dev/null differ diff --git a/PC/icons/pythonx50.png b/PC/icons/pythonx50.png deleted file mode 100644 index 8eb5ffce221fae..00000000000000 Binary files a/PC/icons/pythonx50.png and /dev/null differ diff --git a/PC/icons/setup.icns b/PC/icons/setup.icns deleted file mode 100644 index 6f0e6b01a0da4b..00000000000000 Binary files a/PC/icons/setup.icns and /dev/null differ diff --git a/PC/icons/setup.ico b/PC/icons/setup.ico deleted file mode 100644 index e54364b3af11d3..00000000000000 Binary files a/PC/icons/setup.ico and /dev/null differ diff --git a/PC/icons/setup.svg b/PC/icons/setup.svg deleted file mode 100644 index 06138568f2cebc..00000000000000 --- a/PC/icons/setup.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/PC/invalid_parameter_handler.c b/PC/invalid_parameter_handler.c deleted file mode 100644 index d634710cbec714..00000000000000 --- a/PC/invalid_parameter_handler.c +++ /dev/null @@ -1,22 +0,0 @@ -#ifdef _MSC_VER - -#include - -#if _MSC_VER >= 1900 -/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH - * macros. It does not need to be defined when building using MSVC - * earlier than 14.0 (_MSC_VER == 1900). - */ - -static void __cdecl _silent_invalid_parameter_handler( - wchar_t const* expression, - wchar_t const* function, - wchar_t const* file, - unsigned int line, - uintptr_t pReserved) { } - -_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler; - -#endif - -#endif diff --git a/PC/launcher-usage.txt b/PC/launcher-usage.txt deleted file mode 100644 index aad103509daa28..00000000000000 --- a/PC/launcher-usage.txt +++ /dev/null @@ -1,31 +0,0 @@ -Python Launcher for Windows Version %s - -usage: -%s [launcher-args] [python-args] [script [script-args]] - -Launcher arguments: --2 : Launch the latest Python 2.x version --3 : Launch the latest Python 3.x version --X.Y : Launch the specified Python version - -The above default to an architecture native runtime, but will select any -available. Add a "-32" to the argument to only launch 32-bit runtimes, -or add "-64" to omit 32-bit runtimes (this latter option is deprecated). - -To select a specific runtime, use the -V: options. - --V:TAG : Launch a Python runtime with the specified tag --V:COMPANY/TAG : Launch a Python runtime from the specified company and - with the specified tag - --0 --list : List the available pythons --0p --list-paths : List with paths - -If no options are given but a script is specified, the script is checked for a -shebang line. Otherwise, an active virtual environment or global default will -be selected. - -See https://docs.python.org/using/windows.html#python-launcher-for-windows for -additional configuration. - -The following help text is from Python: diff --git a/PC/launcher.c b/PC/launcher.c deleted file mode 100644 index 8e60ab9303cb95..00000000000000 --- a/PC/launcher.c +++ /dev/null @@ -1,2044 +0,0 @@ -/* - * Copyright (C) 2011-2013 Vinay Sajip. - * Licensed to PSF under a contributor agreement. - * - * Based on the work of: - * - * Mark Hammond (original author of Python version) - * Curt Hagenlocher (job management) - */ - -#include -#include -#include -#include - -#define BUFSIZE 256 -#define MSGSIZE 1024 - -/* Build options. */ -#define SKIP_PREFIX -#define SEARCH_PATH - -/* Error codes */ - -#define RC_NO_STD_HANDLES 100 -#define RC_CREATE_PROCESS 101 -#define RC_BAD_VIRTUAL_PATH 102 -#define RC_NO_PYTHON 103 -#define RC_NO_MEMORY 104 -/* - * SCRIPT_WRAPPER is used to choose one of the variants of an executable built - * from this source file. If not defined, the PEP 397 Python launcher is built; - * if defined, a script launcher of the type used by setuptools is built, which - * looks for a script name related to the executable name and runs that script - * with the appropriate Python interpreter. - * - * SCRIPT_WRAPPER should be undefined in the source, and defined in a VS project - * which builds the setuptools-style launcher. - */ -#if defined(SCRIPT_WRAPPER) -#define RC_NO_SCRIPT 105 -#endif -/* - * VENV_REDIRECT is used to choose the variant that looks for an adjacent or - * one-level-higher pyvenv.cfg, and uses its "home" property to locate and - * launch the original python.exe. - */ -#if defined(VENV_REDIRECT) -#define RC_NO_VENV_CFG 106 -#define RC_BAD_VENV_CFG 107 -#endif - -/* Just for now - static definition */ - -static FILE * log_fp = NULL; - -static wchar_t * -skip_whitespace(wchar_t * p) -{ - while (*p && isspace(*p)) - ++p; - return p; -} - -static void -debug(wchar_t * format, ...) -{ - va_list va; - - if (log_fp != NULL) { - va_start(va, format); - vfwprintf_s(log_fp, format, va); - va_end(va); - } -} - -static void -winerror(int rc, wchar_t * message, int size) -{ - FormatMessageW( - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, rc, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - message, size, NULL); -} - -static void -error(int rc, wchar_t * format, ... ) -{ - va_list va; - wchar_t message[MSGSIZE]; - wchar_t win_message[MSGSIZE]; - int len; - - va_start(va, format); - len = _vsnwprintf_s(message, MSGSIZE, _TRUNCATE, format, va); - va_end(va); - - if (rc == 0) { /* a Windows error */ - winerror(GetLastError(), win_message, MSGSIZE); - if (len >= 0) { - _snwprintf_s(&message[len], MSGSIZE - len, _TRUNCATE, L": %ls", - win_message); - } - } - -#if !defined(_WINDOWS) - fwprintf(stderr, L"%ls\n", message); -#else - MessageBoxW(NULL, message, L"Python Launcher is sorry to say ...", - MB_OK); -#endif - exit(rc); -} - -/* - * This function is here to simplify memory management - * and to treat blank values as if they are absent. - */ -static wchar_t * get_env(wchar_t * key) -{ - /* This is not thread-safe, just like getenv */ - static wchar_t buf[BUFSIZE]; - DWORD result = GetEnvironmentVariableW(key, buf, BUFSIZE); - - if (result >= BUFSIZE) { - /* Large environment variable. Accept some leakage */ - wchar_t *buf2 = (wchar_t*)malloc(sizeof(wchar_t) * (result+1)); - if (buf2 == NULL) { - error(RC_NO_MEMORY, L"Could not allocate environment buffer"); - } - GetEnvironmentVariableW(key, buf2, result); - return buf2; - } - - if (result == 0) - /* Either some error, e.g. ERROR_ENVVAR_NOT_FOUND, - or an empty environment variable. */ - return NULL; - - return buf; -} - -#if defined(_DEBUG) -/* Do not define EXECUTABLEPATH_VALUE in debug builds as it'll - never point to the debug build. */ -#if defined(_WINDOWS) - -#define PYTHON_EXECUTABLE L"pythonw_d.exe" - -#else - -#define PYTHON_EXECUTABLE L"python_d.exe" - -#endif -#else -#if defined(_WINDOWS) - -#define PYTHON_EXECUTABLE L"pythonw.exe" -#define EXECUTABLEPATH_VALUE L"WindowedExecutablePath" - -#else - -#define PYTHON_EXECUTABLE L"python.exe" -#define EXECUTABLEPATH_VALUE L"ExecutablePath" - -#endif -#endif - -#define MAX_VERSION_SIZE 8 - -typedef struct { - wchar_t version[MAX_VERSION_SIZE]; /* m.n */ - int bits; /* 32 or 64 */ - wchar_t executable[MAX_PATH]; - wchar_t exe_display[MAX_PATH]; -} INSTALLED_PYTHON; - -/* - * To avoid messing about with heap allocations, just assume we can allocate - * statically and never have to deal with more versions than this. - */ -#define MAX_INSTALLED_PYTHONS 100 - -static INSTALLED_PYTHON installed_pythons[MAX_INSTALLED_PYTHONS]; - -static size_t num_installed_pythons = 0; - -/* - * To hold SOFTWARE\Python\PythonCore\X.Y...\InstallPath - * The version name can be longer than MAX_VERSION_SIZE, but will be - * truncated to just X.Y for comparisons. - */ -#define IP_BASE_SIZE 80 -#define IP_VERSION_SIZE 8 -#define IP_SIZE (IP_BASE_SIZE + IP_VERSION_SIZE) -#define CORE_PATH L"SOFTWARE\\Python\\PythonCore" -/* - * Installations from the Microsoft Store will set the same registry keys, - * but because of a limitation in Windows they cannot be enumerated normally - * (unless you have no other Python installations... which is probably false - * because that's the most likely way to get this launcher!) - * This key is under HKEY_LOCAL_MACHINE - */ -#define LOOKASIDE_PATH L"SOFTWARE\\Microsoft\\AppModel\\Lookaside\\user\\Software\\Python\\PythonCore" - -static wchar_t * location_checks[] = { - L"\\", - L"\\PCbuild\\win32\\", - L"\\PCbuild\\amd64\\", - /* To support early 32bit versions of Python that stuck the build binaries - * directly in PCbuild... */ - L"\\PCbuild\\", - NULL -}; - -static INSTALLED_PYTHON * -find_existing_python(const wchar_t * path) -{ - INSTALLED_PYTHON * result = NULL; - size_t i; - INSTALLED_PYTHON * ip; - - for (i = 0, ip = installed_pythons; i < num_installed_pythons; i++, ip++) { - if (_wcsicmp(path, ip->executable) == 0) { - result = ip; - break; - } - } - return result; -} - -static INSTALLED_PYTHON * -find_existing_python2(int bits, const wchar_t * version) -{ - INSTALLED_PYTHON * result = NULL; - size_t i; - INSTALLED_PYTHON * ip; - - for (i = 0, ip = installed_pythons; i < num_installed_pythons; i++, ip++) { - if (bits == ip->bits && _wcsicmp(version, ip->version) == 0) { - result = ip; - break; - } - } - return result; -} - -static void -_locate_pythons_for_key(HKEY root, LPCWSTR subkey, REGSAM flags, int bits, - int display_name_only) -{ - HKEY core_root, ip_key; - LSTATUS status = RegOpenKeyExW(root, subkey, 0, flags, &core_root); - wchar_t message[MSGSIZE]; - DWORD i; - size_t n; - BOOL ok, append_name; - DWORD type, data_size, attrs; - INSTALLED_PYTHON * ip, * pip; - wchar_t ip_version[IP_VERSION_SIZE]; - wchar_t ip_path[IP_SIZE]; - wchar_t * check; - wchar_t ** checkp; - wchar_t *key_name = (root == HKEY_LOCAL_MACHINE) ? L"HKLM" : L"HKCU"; - - if (status != ERROR_SUCCESS) - debug(L"locate_pythons_for_key: unable to open PythonCore key in %ls\n", - key_name); - else { - ip = &installed_pythons[num_installed_pythons]; - for (i = 0; num_installed_pythons < MAX_INSTALLED_PYTHONS; i++) { - status = RegEnumKeyW(core_root, i, ip_version, IP_VERSION_SIZE); - if (status != ERROR_SUCCESS) { - if (status != ERROR_NO_MORE_ITEMS) { - /* unexpected error */ - winerror(status, message, MSGSIZE); - debug(L"Can't enumerate registry key for version %ls: %ls\n", - ip_version, message); - } - break; - } - else { - wcsncpy_s(ip->version, MAX_VERSION_SIZE, ip_version, - MAX_VERSION_SIZE-1); - /* Still treating version as "x.y" rather than sys.winver - * When PEP 514 tags are properly used, we shouldn't need - * to strip this off here. - */ - check = wcsrchr(ip->version, L'-'); - if (check && !wcscmp(check, L"-32")) { - *check = L'\0'; - } - _snwprintf_s(ip_path, IP_SIZE, _TRUNCATE, - L"%ls\\%ls\\InstallPath", subkey, ip_version); - status = RegOpenKeyExW(root, ip_path, 0, flags, &ip_key); - if (status != ERROR_SUCCESS) { - winerror(status, message, MSGSIZE); - /* Note: 'message' already has a trailing \n*/ - debug(L"%ls\\%ls: %ls", key_name, ip_path, message); - continue; - } - data_size = sizeof(ip->executable) - 1; - append_name = FALSE; -#ifdef EXECUTABLEPATH_VALUE - status = RegQueryValueExW(ip_key, EXECUTABLEPATH_VALUE, NULL, &type, - (LPBYTE)ip->executable, &data_size); -#else - status = ERROR_FILE_NOT_FOUND; /* actual error doesn't matter */ -#endif - if (status != ERROR_SUCCESS || type != REG_SZ || !data_size) { - append_name = TRUE; - data_size = sizeof(ip->executable) - 1; - status = RegQueryValueExW(ip_key, NULL, NULL, &type, - (LPBYTE)ip->executable, &data_size); - if (status != ERROR_SUCCESS) { - winerror(status, message, MSGSIZE); - debug(L"%ls\\%ls: %ls\n", key_name, ip_path, message); - RegCloseKey(ip_key); - continue; - } - } - RegCloseKey(ip_key); - if (type != REG_SZ) { - continue; - } - - data_size = data_size / sizeof(wchar_t) - 1; /* for NUL */ - if (ip->executable[data_size - 1] == L'\\') - --data_size; /* reg value ended in a backslash */ - /* ip->executable is data_size long */ - for (checkp = location_checks; *checkp; ++checkp) { - check = *checkp; - if (append_name) { - _snwprintf_s(&ip->executable[data_size], - MAX_PATH - data_size, - MAX_PATH - data_size, - L"%ls%ls", check, PYTHON_EXECUTABLE); - } - attrs = GetFileAttributesW(ip->executable); - if (attrs == INVALID_FILE_ATTRIBUTES) { - winerror(GetLastError(), message, MSGSIZE); - debug(L"locate_pythons_for_key: %ls: %ls", - ip->executable, message); - } - else if (attrs & FILE_ATTRIBUTE_DIRECTORY) { - debug(L"locate_pythons_for_key: '%ls' is a directory\n", - ip->executable); - } - else if (find_existing_python(ip->executable)) { - debug(L"locate_pythons_for_key: %ls: already found\n", - ip->executable); - } - else { - /* check the executable type. */ - if (bits) { - ip->bits = bits; - } else { - ok = GetBinaryTypeW(ip->executable, &attrs); - if (!ok) { - debug(L"Failure getting binary type: %ls\n", - ip->executable); - } - else { - if (attrs == SCS_64BIT_BINARY) - ip->bits = 64; - else if (attrs == SCS_32BIT_BINARY) - ip->bits = 32; - else - ip->bits = 0; - } - } - if (ip->bits == 0) { - debug(L"locate_pythons_for_key: %ls: \ -invalid binary type: %X\n", - ip->executable, attrs); - } - else { - if (display_name_only) { - /* display just the executable name. This is - * primarily for the Store installs */ - const wchar_t *name = wcsrchr(ip->executable, L'\\'); - if (name) { - wcscpy_s(ip->exe_display, MAX_PATH, name+1); - } - } - if (wcschr(ip->executable, L' ') != NULL) { - /* has spaces, so quote, and set original as - * the display name */ - if (!ip->exe_display[0]) { - wcscpy_s(ip->exe_display, MAX_PATH, ip->executable); - } - n = wcslen(ip->executable); - memmove(&ip->executable[1], - ip->executable, n * sizeof(wchar_t)); - ip->executable[0] = L'\"'; - ip->executable[n + 1] = L'\"'; - ip->executable[n + 2] = L'\0'; - } - debug(L"locate_pythons_for_key: %ls \ -is a %dbit executable\n", - ip->executable, ip->bits); - if (find_existing_python2(ip->bits, ip->version)) { - debug(L"locate_pythons_for_key: %ls-%i: already \ -found\n", ip->version, ip->bits); - } - else { - ++num_installed_pythons; - pip = ip++; - if (num_installed_pythons >= - MAX_INSTALLED_PYTHONS) - break; - } - } - } - } - } - } - RegCloseKey(core_root); - } -} - -static int -compare_pythons(const void * p1, const void * p2) -{ - INSTALLED_PYTHON * ip1 = (INSTALLED_PYTHON *) p1; - INSTALLED_PYTHON * ip2 = (INSTALLED_PYTHON *) p2; - /* note reverse sorting on version */ - int result = CompareStringW(LOCALE_INVARIANT, SORT_DIGITSASNUMBERS, - ip2->version, -1, ip1->version, -1); - switch (result) { - case 0: - error(0, L"CompareStringW failed"); - return 0; - case CSTR_LESS_THAN: - return -1; - case CSTR_EQUAL: - return ip2->bits - ip1->bits; /* 64 before 32 */ - case CSTR_GREATER_THAN: - return 1; - default: - return 0; // This should never be reached. - } -} - -static void -locate_pythons_for_key(HKEY root, REGSAM flags) -{ - _locate_pythons_for_key(root, CORE_PATH, flags, 0, FALSE); -} - -static void -locate_store_pythons(void) -{ -#if defined(_M_X64) - /* 64bit process, so look in native registry */ - _locate_pythons_for_key(HKEY_LOCAL_MACHINE, LOOKASIDE_PATH, - KEY_READ, 64, TRUE); -#else - /* 32bit process, so check that we're on 64bit OS */ - BOOL f64 = FALSE; - if (IsWow64Process(GetCurrentProcess(), &f64) && f64) { - _locate_pythons_for_key(HKEY_LOCAL_MACHINE, LOOKASIDE_PATH, - KEY_READ | KEY_WOW64_64KEY, 64, TRUE); - } -#endif -} - -static void -locate_venv_python(void) -{ - static wchar_t venv_python[MAX_PATH]; - INSTALLED_PYTHON * ip; - wchar_t *virtual_env = get_env(L"VIRTUAL_ENV"); - DWORD attrs; - - /* Check for VIRTUAL_ENV environment variable */ - if (virtual_env == NULL || virtual_env[0] == L'\0') { - return; - } - - /* Check for a python executable in the venv */ - debug(L"Checking for Python executable in virtual env '%ls'\n", virtual_env); - _snwprintf_s(venv_python, MAX_PATH, _TRUNCATE, - L"%ls\\Scripts\\%ls", virtual_env, PYTHON_EXECUTABLE); - attrs = GetFileAttributesW(venv_python); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"Python executable %ls missing from virtual env\n", venv_python); - return; - } - - ip = &installed_pythons[num_installed_pythons++]; - wcscpy_s(ip->executable, MAX_PATH, venv_python); - ip->bits = 0; - wcscpy_s(ip->version, MAX_VERSION_SIZE, L"venv"); -} - -static void -locate_all_pythons(void) -{ - /* venv Python is highest priority */ - locate_venv_python(); -#if defined(_M_X64) - /* If we are a 64bit process, first hit the 32bit keys. */ - debug(L"locating Pythons in 32bit registry\n"); - locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_32KEY); - locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_32KEY); -#else - /* If we are a 32bit process on a 64bit Windows, first hit the 64bit keys.*/ - BOOL f64 = FALSE; - if (IsWow64Process(GetCurrentProcess(), &f64) && f64) { - debug(L"locating Pythons in 64bit registry\n"); - locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY); - locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY); - } -#endif - /* now hit the "native" key for this process bittedness. */ - debug(L"locating Pythons in native registry\n"); - locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ); - locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ); - /* Store-installed Python is lowest priority */ - locate_store_pythons(); - qsort(installed_pythons, num_installed_pythons, sizeof(INSTALLED_PYTHON), - compare_pythons); -} - -static INSTALLED_PYTHON * -find_python_by_version(wchar_t const * wanted_ver) -{ - INSTALLED_PYTHON * result = NULL; - INSTALLED_PYTHON * ip = installed_pythons; - size_t i, n; - size_t wlen = wcslen(wanted_ver); - int bits = 0; - - if (wcsstr(wanted_ver, L"-32")) { - bits = 32; - wlen -= wcslen(L"-32"); - } - else if (wcsstr(wanted_ver, L"-64")) { /* Added option to select 64 bit explicitly */ - bits = 64; - wlen -= wcslen(L"-64"); - } - for (i = 0; i < num_installed_pythons; i++, ip++) { - n = wcslen(ip->version); - /* - * If wlen is greater than 1, we're probably trying to find a specific - * version and thus want an exact match: 3.1 != 3.10. Otherwise, we - * just want a prefix match. - */ - if ((wlen > 1) && (n != wlen)) { - continue; - } - if (n > wlen) { - n = wlen; - } - if ((wcsncmp(ip->version, wanted_ver, n) == 0) && - /* bits == 0 => don't care */ - ((bits == 0) || (ip->bits == bits))) { - result = ip; - break; - } - } - return result; -} - - -static wchar_t appdata_ini_path[MAX_PATH]; -static wchar_t launcher_ini_path[MAX_PATH]; - -/* - * Get a value either from the environment or a configuration file. - * The key passed in will either be "python", "python2" or "python3". - */ -static wchar_t * -get_configured_value(wchar_t * key) -{ -/* - * Note: this static value is used to return a configured value - * obtained either from the environment or configuration file. - * This should be OK since there wouldn't be any concurrent calls. - */ - static wchar_t configured_value[MSGSIZE]; - wchar_t * result = NULL; - wchar_t * found_in = L"environment"; - DWORD size; - - /* First, search the environment. */ - _snwprintf_s(configured_value, MSGSIZE, _TRUNCATE, L"py_%ls", key); - result = get_env(configured_value); - if (result == NULL && appdata_ini_path[0]) { - /* Not in environment: check local configuration. */ - size = GetPrivateProfileStringW(L"defaults", key, NULL, - configured_value, MSGSIZE, - appdata_ini_path); - if (size > 0) { - result = configured_value; - found_in = appdata_ini_path; - } - } - if (result == NULL && launcher_ini_path[0]) { - /* Not in environment or local: check global configuration. */ - size = GetPrivateProfileStringW(L"defaults", key, NULL, - configured_value, MSGSIZE, - launcher_ini_path); - if (size > 0) { - result = configured_value; - found_in = launcher_ini_path; - } - } - if (result) { - debug(L"found configured value '%ls=%ls' in %ls\n", - key, result, found_in ? found_in : L"(unknown)"); - } else { - debug(L"found no configured value for '%ls'\n", key); - } - return result; -} - -static INSTALLED_PYTHON * -locate_python(wchar_t * wanted_ver, BOOL from_shebang) -{ - static wchar_t config_key [] = { L"pythonX" }; - static wchar_t * last_char = &config_key[sizeof(config_key) / - sizeof(wchar_t) - 2]; - INSTALLED_PYTHON * result = NULL; - size_t n = wcslen(wanted_ver); - wchar_t * configured_value; - - if (num_installed_pythons == 0) - locate_all_pythons(); - - if (n == 1) { /* just major version specified */ - *last_char = *wanted_ver; - configured_value = get_configured_value(config_key); - if (configured_value != NULL) - wanted_ver = configured_value; - } - if (*wanted_ver) { - result = find_python_by_version(wanted_ver); - debug(L"search for Python version '%ls' found ", wanted_ver); - if (result) { - debug(L"'%ls'\n", result->executable); - } else { - debug(L"no interpreter\n"); - } - } - else { - *last_char = L'\0'; /* look for an overall default */ - result = find_python_by_version(L"venv"); - if (result == NULL) { - configured_value = get_configured_value(config_key); - if (configured_value) - result = find_python_by_version(configured_value); - } - /* Not found a value yet - try by major version. - * If we're looking for an interpreter specified in a shebang line, - * we want to try Python 2 first, then Python 3 (for Unix and backward - * compatibility). If we're being called interactively, assume the user - * wants the latest version available, so try Python 3 first, then - * Python 2. - */ - if (result == NULL) - result = find_python_by_version(from_shebang ? L"2" : L"3"); - if (result == NULL) - result = find_python_by_version(from_shebang ? L"3" : L"2"); - debug(L"search for default Python found "); - if (result) { - debug(L"version %ls at '%ls'\n", - result->version, result->executable); - } else { - debug(L"no interpreter\n"); - } - } - return result; -} - -#if defined(SCRIPT_WRAPPER) -/* - * Check for a script located alongside the executable - */ - -#if defined(_WINDOWS) -#define SCRIPT_SUFFIX L"-script.pyw" -#else -#define SCRIPT_SUFFIX L"-script.py" -#endif - -static wchar_t wrapped_script_path[MAX_PATH]; - -/* Locate the script being wrapped. - * - * This code should store the name of the wrapped script in - * wrapped_script_path, or terminate the program with an error if there is no - * valid wrapped script file. - */ -static void -locate_wrapped_script(void) -{ - wchar_t * p; - size_t plen; - DWORD attrs; - - plen = GetModuleFileNameW(NULL, wrapped_script_path, MAX_PATH); - p = wcsrchr(wrapped_script_path, L'.'); - if (p == NULL) { - debug(L"GetModuleFileNameW returned value has no extension: %ls\n", - wrapped_script_path); - error(RC_NO_SCRIPT, L"Wrapper name '%ls' is not valid.", wrapped_script_path); - } - - wcsncpy_s(p, MAX_PATH - (p - wrapped_script_path) + 1, SCRIPT_SUFFIX, _TRUNCATE); - attrs = GetFileAttributesW(wrapped_script_path); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"File '%ls' non-existent\n", wrapped_script_path); - error(RC_NO_SCRIPT, L"Script file '%ls' is not present.", wrapped_script_path); - } - - debug(L"Using wrapped script file '%ls'\n", wrapped_script_path); -} -#endif - -/* - * Process creation code - */ - -static BOOL -safe_duplicate_handle(HANDLE in, HANDLE * pout) -{ - BOOL ok; - HANDLE process = GetCurrentProcess(); - DWORD rc; - - *pout = NULL; - ok = DuplicateHandle(process, in, process, pout, 0, TRUE, - DUPLICATE_SAME_ACCESS); - if (!ok) { - rc = GetLastError(); - if (rc == ERROR_INVALID_HANDLE) { - debug(L"DuplicateHandle returned ERROR_INVALID_HANDLE\n"); - ok = TRUE; - } - else { - debug(L"DuplicateHandle returned %d\n", rc); - } - } - return ok; -} - -static BOOL WINAPI -ctrl_c_handler(DWORD code) -{ - return TRUE; /* We just ignore all control events. */ -} - -static void -run_child(wchar_t * cmdline) -{ - HANDLE job; - JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - DWORD rc; - BOOL ok; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - -#if defined(_WINDOWS) - /* - When explorer launches a Windows (GUI) application, it displays - the "app starting" (the "pointer + hourglass") cursor for a number - of seconds, or until the app does something UI-ish (eg, creating a - window, or fetching a message). As this launcher doesn't do this - directly, that cursor remains even after the child process does these - things. We avoid that by doing a simple post+get message. - See http://bugs.python.org/issue17290 - */ - MSG msg; - - PostMessage(0, 0, 0, 0); - GetMessage(&msg, 0, 0, 0); -#endif - - debug(L"run_child: about to run '%ls'\n", cmdline); - job = CreateJobObject(NULL, NULL); - ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation, - &info, sizeof(info), &rc); - if (!ok || (rc != sizeof(info)) || !job) - error(RC_CREATE_PROCESS, L"Job information querying failed"); - info.BasicLimitInformation.LimitFlags |= JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | - JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK; - ok = SetInformationJobObject(job, JobObjectExtendedLimitInformation, &info, - sizeof(info)); - if (!ok) - error(RC_CREATE_PROCESS, L"Job information setting failed"); - memset(&si, 0, sizeof(si)); - GetStartupInfoW(&si); - ok = safe_duplicate_handle(GetStdHandle(STD_INPUT_HANDLE), &si.hStdInput); - if (!ok) - error(RC_NO_STD_HANDLES, L"stdin duplication failed"); - ok = safe_duplicate_handle(GetStdHandle(STD_OUTPUT_HANDLE), &si.hStdOutput); - if (!ok) - error(RC_NO_STD_HANDLES, L"stdout duplication failed"); - ok = safe_duplicate_handle(GetStdHandle(STD_ERROR_HANDLE), &si.hStdError); - if (!ok) - error(RC_NO_STD_HANDLES, L"stderr duplication failed"); - - ok = SetConsoleCtrlHandler(ctrl_c_handler, TRUE); - if (!ok) - error(RC_CREATE_PROCESS, L"control handler setting failed"); - - si.dwFlags = STARTF_USESTDHANDLES; - ok = CreateProcessW(NULL, cmdline, NULL, NULL, TRUE, - 0, NULL, NULL, &si, &pi); - if (!ok) - error(RC_CREATE_PROCESS, L"Unable to create process using '%ls'", cmdline); - AssignProcessToJobObject(job, pi.hProcess); - CloseHandle(pi.hThread); - WaitForSingleObjectEx(pi.hProcess, INFINITE, FALSE); - ok = GetExitCodeProcess(pi.hProcess, &rc); - if (!ok) - error(RC_CREATE_PROCESS, L"Failed to get exit code of process"); - debug(L"child process exit code: %d\n", rc); - exit(rc); -} - -static void -invoke_child(wchar_t * executable, wchar_t * suffix, wchar_t * cmdline) -{ - wchar_t * child_command; - size_t child_command_size; - BOOL no_suffix = (suffix == NULL) || (*suffix == L'\0'); - BOOL no_cmdline = (*cmdline == L'\0'); - - if (no_suffix && no_cmdline) - run_child(executable); - else { - if (no_suffix) { - /* add 2 for space separator + terminating NUL. */ - child_command_size = wcslen(executable) + wcslen(cmdline) + 2; - } - else { - /* add 3 for 2 space separators + terminating NUL. */ - child_command_size = wcslen(executable) + wcslen(suffix) + - wcslen(cmdline) + 3; - } - child_command = calloc(child_command_size, sizeof(wchar_t)); - if (child_command == NULL) - error(RC_CREATE_PROCESS, L"unable to allocate %zd bytes for child command.", - child_command_size); - if (no_suffix) - _snwprintf_s(child_command, child_command_size, - child_command_size - 1, L"%ls %ls", - executable, cmdline); - else - _snwprintf_s(child_command, child_command_size, - child_command_size - 1, L"%ls %ls %ls", - executable, suffix, cmdline); - run_child(child_command); - free(child_command); - } -} - -typedef struct { - wchar_t *shebang; - BOOL search; -} SHEBANG; - -static SHEBANG builtin_virtual_paths [] = { - { L"/usr/bin/env python", TRUE }, - { L"/usr/bin/python", FALSE }, - { L"/usr/local/bin/python", FALSE }, - { L"python", FALSE }, - { NULL, FALSE }, -}; - -/* For now, a static array of commands. */ - -#define MAX_COMMANDS 100 - -typedef struct { - wchar_t key[MAX_PATH]; - wchar_t value[MSGSIZE]; -} COMMAND; - -static COMMAND commands[MAX_COMMANDS]; -static int num_commands = 0; - -#if defined(SKIP_PREFIX) - -static wchar_t * builtin_prefixes [] = { - /* These must be in an order that the longest matches should be found, - * i.e. if the prefix is "/usr/bin/env ", it should match that entry - * *before* matching "/usr/bin/". - */ - L"/usr/bin/env ", - L"/usr/bin/", - L"/usr/local/bin/", - NULL -}; - -static wchar_t * skip_prefix(wchar_t * name) -{ - wchar_t ** pp = builtin_prefixes; - wchar_t * result = name; - wchar_t * p; - size_t n; - - for (; p = *pp; pp++) { - n = wcslen(p); - if (_wcsnicmp(p, name, n) == 0) { - result += n; /* skip the prefix */ - if (p[n - 1] == L' ') /* No empty strings in table, so n > 1 */ - result = skip_whitespace(result); - break; - } - } - return result; -} - -#endif - -#if defined(SEARCH_PATH) - -static COMMAND path_command; - -static COMMAND * find_on_path(wchar_t * name) -{ - wchar_t * pathext; - size_t varsize; - wchar_t * context = NULL; - wchar_t * extension; - COMMAND * result = NULL; - DWORD len; - errno_t rc; - - wcscpy_s(path_command.key, MAX_PATH, name); - if (wcschr(name, L'.') != NULL) { - /* assume it has an extension. */ - len = SearchPathW(NULL, name, NULL, MSGSIZE, path_command.value, NULL); - if (len) { - result = &path_command; - } - } - else { - /* No extension - search using registered extensions. */ - rc = _wdupenv_s(&pathext, &varsize, L"PATHEXT"); - if (rc == 0) { - extension = wcstok_s(pathext, L";", &context); - while (extension) { - len = SearchPathW(NULL, name, extension, MSGSIZE, path_command.value, NULL); - if (len) { - result = &path_command; - break; - } - extension = wcstok_s(NULL, L";", &context); - } - free(pathext); - } - } - return result; -} - -#endif - -static COMMAND * find_command(wchar_t * name) -{ - COMMAND * result = NULL; - COMMAND * cp = commands; - int i; - - for (i = 0; i < num_commands; i++, cp++) { - if (_wcsicmp(cp->key, name) == 0) { - result = cp; - break; - } - } -#if defined(SEARCH_PATH) - if (result == NULL) - result = find_on_path(name); -#endif - return result; -} - -static void -update_command(COMMAND * cp, wchar_t * name, wchar_t * cmdline) -{ - wcsncpy_s(cp->key, MAX_PATH, name, _TRUNCATE); - wcsncpy_s(cp->value, MSGSIZE, cmdline, _TRUNCATE); -} - -static void -add_command(wchar_t * name, wchar_t * cmdline) -{ - if (num_commands >= MAX_COMMANDS) { - debug(L"can't add %ls = '%ls': no room\n", name, cmdline); - } - else { - COMMAND * cp = &commands[num_commands++]; - - update_command(cp, name, cmdline); - } -} - -static void -read_config_file(wchar_t * config_path) -{ - wchar_t keynames[MSGSIZE]; - wchar_t value[MSGSIZE]; - DWORD read; - wchar_t * key; - COMMAND * cp; - wchar_t * cmdp; - - read = GetPrivateProfileStringW(L"commands", NULL, NULL, keynames, MSGSIZE, - config_path); - if (read == MSGSIZE - 1) { - debug(L"read_commands: %ls: not enough space for names\n", config_path); - } - key = keynames; - while (*key) { - read = GetPrivateProfileStringW(L"commands", key, NULL, value, MSGSIZE, - config_path); - if (read == MSGSIZE - 1) { - debug(L"read_commands: %ls: not enough space for %ls\n", - config_path, key); - } - cmdp = skip_whitespace(value); - if (*cmdp) { - cp = find_command(key); - if (cp == NULL) - add_command(key, value); - else - update_command(cp, key, value); - } - key += wcslen(key) + 1; - } -} - -static void read_commands(void) -{ - if (launcher_ini_path[0]) - read_config_file(launcher_ini_path); - if (appdata_ini_path[0]) - read_config_file(appdata_ini_path); -} - -static BOOL -parse_shebang(wchar_t * shebang_line, int nchars, wchar_t ** command, - wchar_t ** suffix, BOOL *search) -{ - BOOL rc = FALSE; - SHEBANG * vpp; - size_t plen; - wchar_t * p; - wchar_t zapped; - wchar_t * endp = shebang_line + nchars - 1; - COMMAND * cp; - wchar_t * skipped; - - *command = NULL; /* failure return */ - *suffix = NULL; - *search = FALSE; - - if ((*shebang_line++ == L'#') && (*shebang_line++ == L'!')) { - shebang_line = skip_whitespace(shebang_line); - if (*shebang_line) { - *command = shebang_line; - for (vpp = builtin_virtual_paths; vpp->shebang; ++vpp) { - plen = wcslen(vpp->shebang); - if (wcsncmp(shebang_line, vpp->shebang, plen) == 0) { - rc = TRUE; - *search = vpp->search; - /* We can do this because all builtin commands contain - * "python". - */ - *command = wcsstr(shebang_line, L"python"); - break; - } - } - if (vpp->shebang == NULL) { - /* - * Not found in builtins - look in customized commands. - * - * We can't permanently modify the shebang line in case - * it's not a customized command, but we can temporarily - * stick a NUL after the command while searching for it, - * then put back the char we zapped. - */ -#if defined(SKIP_PREFIX) - skipped = skip_prefix(shebang_line); -#else - skipped = shebang_line; -#endif - p = wcspbrk(skipped, L" \t\r\n"); - if (p != NULL) { - zapped = *p; - *p = L'\0'; - } - cp = find_command(skipped); - if (p != NULL) - *p = zapped; - if (cp != NULL) { - *command = cp->value; - if (p != NULL) - *suffix = skip_whitespace(p); - } - } - /* remove trailing whitespace */ - while ((endp > shebang_line) && isspace(*endp)) - --endp; - if (endp > shebang_line) - endp[1] = L'\0'; - } - } - return rc; -} - -/* #define CP_UTF8 65001 defined in winnls.h */ -#define CP_UTF16LE 1200 -#define CP_UTF16BE 1201 -#define CP_UTF32LE 12000 -#define CP_UTF32BE 12001 - -typedef struct { - int length; - char sequence[4]; - UINT code_page; -} BOM; - -/* - * Strictly, we don't need to handle UTF-16 and UTF-32, since Python itself - * doesn't. Never mind, one day it might - there's no harm leaving it in. - */ -static BOM BOMs[] = { - { 3, { 0xEF, 0xBB, 0xBF }, CP_UTF8 }, /* UTF-8 - keep first */ - /* Test UTF-32LE before UTF-16LE since UTF-16LE BOM is a prefix - * of UTF-32LE BOM. */ - { 4, { 0xFF, 0xFE, 0x00, 0x00 }, CP_UTF32LE }, /* UTF-32LE */ - { 4, { 0x00, 0x00, 0xFE, 0xFF }, CP_UTF32BE }, /* UTF-32BE */ - { 2, { 0xFF, 0xFE }, CP_UTF16LE }, /* UTF-16LE */ - { 2, { 0xFE, 0xFF }, CP_UTF16BE }, /* UTF-16BE */ - { 0 } /* sentinel */ -}; - -static BOM * -find_BOM(char * buffer) -{ -/* - * Look for a BOM in the input and return a pointer to the - * corresponding structure, or NULL if not found. - */ - BOM * result = NULL; - BOM *bom; - - for (bom = BOMs; bom->length; bom++) { - if (strncmp(bom->sequence, buffer, bom->length) == 0) { - result = bom; - break; - } - } - return result; -} - -static char * -find_terminator(char * buffer, int len, BOM *bom) -{ - char * result = NULL; - char * end = buffer + len; - char * p; - char c; - int cp; - - for (p = buffer; p < end; p++) { - c = *p; - if (c == '\r') { - result = p; - break; - } - if (c == '\n') { - result = p; - break; - } - } - if (result != NULL) { - cp = bom->code_page; - - /* adjustments to include all bytes of the char */ - /* no adjustment needed for UTF-8 or big endian */ - if (cp == CP_UTF16LE) - ++result; - else if (cp == CP_UTF32LE) - result += 3; - ++result; /* point just past terminator */ - } - return result; -} - -static BOOL -validate_version(wchar_t * p) -{ - /* - Version information should start with the major version, - Optionally followed by a period and a minor version, - Optionally followed by a minus and one of 32 or 64. - Valid examples: - 2 - 3 - 2.7 - 3.6 - 2.7-32 - The intent is to add to the valid patterns: - 3.10 - 3-32 - 3.6-64 - 3-64 - */ - BOOL result = (p != NULL); /* Default to False if null pointer. */ - - result = result && iswdigit(*p); /* Result = False if first string element is not a digit. */ - - while (result && iswdigit(*p)) /* Require a major version */ - ++p; /* Skip all leading digit(s) */ - if (result && (*p == L'.')) /* Allow . for major minor separator.*/ - { - result = iswdigit(*++p); /* Must be at least one digit */ - while (result && iswdigit(*++p)) ; /* Skip any more Digits */ - } - if (result && (*p == L'-')) { /* Allow - for Bits Separator */ - switch(*++p){ - case L'3': /* 3 is OK */ - result = (*++p == L'2') && !*++p; /* only if followed by 2 and ended.*/ - break; - case L'6': /* 6 is OK */ - result = (*++p == L'4') && !*++p; /* only if followed by 4 and ended.*/ - break; - default: - result = FALSE; - break; - } - } - result = result && !*p; /* Must have reached EOS */ - return result; - -} - -typedef struct { - unsigned short min; - unsigned short max; - wchar_t version[MAX_VERSION_SIZE]; -} PYC_MAGIC; - -static PYC_MAGIC magic_values[] = { - { 50823, 50823, L"2.0" }, - { 60202, 60202, L"2.1" }, - { 60717, 60717, L"2.2" }, - { 62011, 62021, L"2.3" }, - { 62041, 62061, L"2.4" }, - { 62071, 62131, L"2.5" }, - { 62151, 62161, L"2.6" }, - { 62171, 62211, L"2.7" }, - { 3000, 3131, L"3.0" }, - { 3141, 3151, L"3.1" }, - { 3160, 3180, L"3.2" }, - { 3190, 3230, L"3.3" }, - { 3250, 3310, L"3.4" }, - { 3320, 3351, L"3.5" }, - { 3360, 3379, L"3.6" }, - { 3390, 3399, L"3.7" }, - { 3400, 3419, L"3.8" }, - { 3420, 3429, L"3.9" }, - { 3430, 3449, L"3.10" }, - /* Allow 50 magic numbers per version from here on */ - { 3450, 3499, L"3.11" }, - { 3500, 3549, L"3.12" }, - { 3550, 3599, L"3.13" }, - { 0 } -}; - -static INSTALLED_PYTHON * -find_by_magic(unsigned short magic) -{ - INSTALLED_PYTHON * result = NULL; - PYC_MAGIC * mp; - - for (mp = magic_values; mp->min; mp++) { - if ((magic >= mp->min) && (magic <= mp->max)) { - result = locate_python(mp->version, FALSE); - if (result != NULL) - break; - } - } - return result; -} - -static void -maybe_handle_shebang(wchar_t ** argv, wchar_t * cmdline) -{ -/* - * Look for a shebang line in the first argument. If found - * and we spawn a child process, this never returns. If it - * does return then we process the args "normally". - * - * argv[0] might be a filename with a shebang. - */ - FILE * fp; - errno_t rc = _wfopen_s(&fp, *argv, L"rb"); - char buffer[BUFSIZE]; - wchar_t shebang_line[BUFSIZE + 1]; - size_t read; - char *p; - char * start; - char * shebang_alias = (char *) shebang_line; - BOM* bom; - int i, j, nchars = 0; - int header_len; - BOOL is_virt; - BOOL search; - wchar_t * command; - wchar_t * suffix; - COMMAND *cmd = NULL; - INSTALLED_PYTHON * ip; - - if (rc == 0) { - read = fread(buffer, sizeof(char), BUFSIZE, fp); - debug(L"maybe_handle_shebang: read %zd bytes\n", read); - fclose(fp); - - if ((read >= 4) && (buffer[3] == '\n') && (buffer[2] == '\r')) { - ip = find_by_magic((((unsigned char)buffer[1]) << 8 | - (unsigned char)buffer[0]) & 0xFFFF); - if (ip != NULL) { - debug(L"script file is compiled against Python %ls\n", - ip->version); - invoke_child(ip->executable, NULL, cmdline); - } - } - /* Look for BOM */ - bom = find_BOM(buffer); - if (bom == NULL) { - start = buffer; - debug(L"maybe_handle_shebang: BOM not found, using UTF-8\n"); - bom = BOMs; /* points to UTF-8 entry - the default */ - } - else { - debug(L"maybe_handle_shebang: BOM found, code page %u\n", - bom->code_page); - start = &buffer[bom->length]; - } - p = find_terminator(start, BUFSIZE, bom); - /* - * If no CR or LF was found in the heading, - * we assume it's not a shebang file. - */ - if (p == NULL) { - debug(L"maybe_handle_shebang: No line terminator found\n"); - } - else { - /* - * Found line terminator - parse the shebang. - * - * Strictly, we don't need to handle UTF-16 anf UTF-32, - * since Python itself doesn't. - * Never mind, one day it might. - */ - header_len = (int) (p - start); - switch(bom->code_page) { - case CP_UTF8: - nchars = MultiByteToWideChar(bom->code_page, - 0, - start, header_len, shebang_line, - BUFSIZE); - break; - case CP_UTF16BE: - if (header_len % 2 != 0) { - debug(L"maybe_handle_shebang: UTF-16BE, but an odd number \ -of bytes: %d\n", header_len); - /* nchars = 0; Not needed - initialised to 0. */ - } - else { - for (i = header_len; i > 0; i -= 2) { - shebang_alias[i - 1] = start[i - 2]; - shebang_alias[i - 2] = start[i - 1]; - } - nchars = header_len / sizeof(wchar_t); - } - break; - case CP_UTF16LE: - if ((header_len % 2) != 0) { - debug(L"UTF-16LE, but an odd number of bytes: %d\n", - header_len); - /* nchars = 0; Not needed - initialised to 0. */ - } - else { - /* no actual conversion needed. */ - memcpy(shebang_line, start, header_len); - nchars = header_len / sizeof(wchar_t); - } - break; - case CP_UTF32BE: - if (header_len % 4 != 0) { - debug(L"UTF-32BE, but not divisible by 4: %d\n", - header_len); - /* nchars = 0; Not needed - initialised to 0. */ - } - else { - for (i = header_len, j = header_len / 2; i > 0; i -= 4, - j -= 2) { - shebang_alias[j - 1] = start[i - 2]; - shebang_alias[j - 2] = start[i - 1]; - } - nchars = header_len / sizeof(wchar_t); - } - break; - case CP_UTF32LE: - if (header_len % 4 != 0) { - debug(L"UTF-32LE, but not divisible by 4: %d\n", - header_len); - /* nchars = 0; Not needed - initialised to 0. */ - } - else { - for (i = header_len, j = header_len / 2; i > 0; i -= 4, - j -= 2) { - shebang_alias[j - 1] = start[i - 3]; - shebang_alias[j - 2] = start[i - 4]; - } - nchars = header_len / sizeof(wchar_t); - } - break; - } - if (nchars > 0) { - shebang_line[--nchars] = L'\0'; - is_virt = parse_shebang(shebang_line, nchars, &command, - &suffix, &search); - if (command != NULL) { - debug(L"parse_shebang: found command: %ls\n", command); - if (!is_virt) { - invoke_child(command, suffix, cmdline); - } - else { - suffix = wcschr(command, L' '); - if (suffix != NULL) { - *suffix++ = L'\0'; - suffix = skip_whitespace(suffix); - } - if (wcsncmp(command, L"python", 6)) - error(RC_BAD_VIRTUAL_PATH, L"Unknown virtual \ -path '%ls'", command); - command += 6; /* skip past "python" */ - if (search && ((*command == L'\0') || isspace(*command))) { - /* Command is eligible for path search, and there - * is no version specification. - */ - debug(L"searching PATH for python executable\n"); - cmd = find_on_path(PYTHON_EXECUTABLE); - debug(L"Python on path: %ls\n", cmd ? cmd->value : L""); - if (cmd) { - debug(L"located python on PATH: %ls\n", cmd->value); - invoke_child(cmd->value, suffix, cmdline); - /* Exit here, as we have found the command */ - return; - } - /* FALL THROUGH: No python found on PATH, so fall - * back to locating the correct installed python. - */ - } - if (*command && !validate_version(command)) - error(RC_BAD_VIRTUAL_PATH, L"Invalid version \ -specification: '%ls'.\nIn the first line of the script, 'python' needs to be \ -followed by a valid version specifier.\nPlease check the documentation.", - command); - /* TODO could call validate_version(command) */ - ip = locate_python(command, TRUE); - if (ip == NULL) { - error(RC_NO_PYTHON, L"Requested Python version \ -(%ls) is not installed", command); - } - else { - invoke_child(ip->executable, suffix, cmdline); - } - } - } - } - } - } -} - -static wchar_t * -skip_me(wchar_t * cmdline) -{ - BOOL quoted; - wchar_t c; - wchar_t * result = cmdline; - - quoted = cmdline[0] == L'\"'; - if (!quoted) - c = L' '; - else { - c = L'\"'; - ++result; - } - result = wcschr(result, c); - if (result == NULL) /* when, for example, just exe name on command line */ - result = L""; - else { - ++result; /* skip past space or closing quote */ - result = skip_whitespace(result); - } - return result; -} - -static DWORD version_high = 0; -static DWORD version_low = 0; - -static void -get_version_info(wchar_t * version_text, size_t size) -{ - WORD maj, min, rel, bld; - - if (!version_high && !version_low) - wcsncpy_s(version_text, size, L"0.1", _TRUNCATE); /* fallback */ - else { - maj = HIWORD(version_high); - min = LOWORD(version_high); - rel = HIWORD(version_low); - bld = LOWORD(version_low); - _snwprintf_s(version_text, size, _TRUNCATE, L"%d.%d.%d.%d", maj, - min, rel, bld); - } -} - -static void -show_help_text(wchar_t ** argv) -{ - wchar_t version_text [MAX_PATH]; -#if defined(_M_X64) - BOOL canDo64bit = TRUE; -#else - /* If we are a 32bit process on a 64bit Windows, first hit the 64bit keys. */ - BOOL canDo64bit = FALSE; - IsWow64Process(GetCurrentProcess(), &canDo64bit); -#endif - - get_version_info(version_text, MAX_PATH); - fwprintf(stdout, L"\ -Python Launcher for Windows Version %ls\n\n", version_text); - fwprintf(stdout, L"\ -usage:\n\ -%ls [launcher-args] [python-args] [script [script-args]]\n\n", argv[0]); - fputws(L"\ -Launcher arguments:\n\n\ --2 : Launch the latest Python 2.x version\n\ --3 : Launch the latest Python 3.x version\n\ --X.Y : Launch the specified Python version\n", stdout); - if (canDo64bit) { - fputws(L"\ - The above all default to 64 bit if a matching 64 bit python is present.\n\ --X.Y-32: Launch the specified 32bit Python version\n\ --X-32 : Launch the latest 32bit Python X version\n\ --X.Y-64: Launch the specified 64bit Python version\n\ --X-64 : Launch the latest 64bit Python X version", stdout); - } - fputws(L"\n-0 --list : List the available pythons", stdout); - fputws(L"\n-0p --list-paths : List with paths", stdout); - fputws(L"\n\n If no script is specified the specified interpreter is opened.", stdout); - fputws(L"\nIf an exact version is not given, using the latest version can be overridden by", stdout); - fputws(L"\nany of the following, (in priority order):", stdout); - fputws(L"\n An active virtual environment", stdout); - fputws(L"\n A shebang line in the script (if present)", stdout); - fputws(L"\n With -2 or -3 flag a matching PY_PYTHON2 or PY_PYTHON3 Environment variable", stdout); - fputws(L"\n A PY_PYTHON Environment variable", stdout); - fputws(L"\n From [defaults] in py.ini in your %LOCALAPPDATA%\\py.ini", stdout); - fputws(L"\n From [defaults] in py.ini beside py.exe (use `where py` to locate)", stdout); - fputws(L"\n\nThe following help text is from Python:\n\n", stdout); - fflush(stdout); -} - -static BOOL -show_python_list(wchar_t ** argv) -{ - /* - * Display options -0 - */ - INSTALLED_PYTHON * result = NULL; - INSTALLED_PYTHON * ip = installed_pythons; /* List of installed pythons */ - INSTALLED_PYTHON * defpy = locate_python(L"", FALSE); - size_t i = 0; - wchar_t *p = argv[1]; - wchar_t *ver_fmt = L"-%ls-%d"; - wchar_t *fmt = L"\n %ls"; - wchar_t *defind = L" *"; /* Default indicator */ - - /* - * Output informational messages to stderr to keep output - * clean for use in pipes, etc. - */ - fwprintf(stderr, - L"Installed Pythons found by %s Launcher for Windows", argv[0]); - if (!_wcsicmp(p, L"-0p") || !_wcsicmp(p, L"--list-paths")) - fmt = L"\n %-15ls%ls"; /* include path */ - - if (num_installed_pythons == 0) /* We have somehow got here without searching for pythons */ - locate_all_pythons(); /* Find them, Populates installed_pythons */ - - if (num_installed_pythons == 0) /* No pythons found */ - fwprintf(stderr, L"\nNo Installed Pythons Found!"); - else - { - for (i = 0; i < num_installed_pythons; i++, ip++) { - wchar_t version[BUFSIZ]; - if (wcscmp(ip->version, L"venv") == 0) { - wcscpy_s(version, BUFSIZ, L"(venv)"); - } - else { - swprintf_s(version, BUFSIZ, ver_fmt, ip->version, ip->bits); - } - - if (ip->exe_display[0]) { - fwprintf(stdout, fmt, version, ip->exe_display); - } - else { - fwprintf(stdout, fmt, version, ip->executable); - } - /* If there is a default indicate it */ - if (defpy == ip) - fwprintf(stderr, defind); - } - } - - if ((defpy == NULL) && (num_installed_pythons > 0)) - /* We have pythons but none is the default */ - fwprintf(stderr, L"\n\nCan't find a Default Python.\n\n"); - else - fwprintf(stderr, L"\n\n"); /* End with a blank line */ - return FALSE; /* If this has been called we cannot continue */ -} - -#if defined(VENV_REDIRECT) - -static int -find_home_value(const char *buffer, const char **start, DWORD *length) -{ - for (const char *s = strstr(buffer, "home"); s; s = strstr(s + 1, "\nhome")) { - if (*s == '\n') { - ++s; - } - for (int i = 4; i > 0 && *s; --i, ++s); - - while (*s && iswspace(*s)) { - ++s; - } - if (*s != L'=') { - continue; - } - - do { - ++s; - } while (*s && iswspace(*s)); - - *start = s; - char *nl = strchr(s, '\n'); - if (nl) { - *length = (DWORD)((ptrdiff_t)nl - (ptrdiff_t)s); - } else { - *length = (DWORD)strlen(s); - } - return 1; - } - return 0; -} -#endif - -static wchar_t * -wcsdup_pad(const wchar_t *s, int padding, int *newlen) -{ - size_t len = wcslen(s); - len += 1 + padding; - wchar_t *r = (wchar_t *)malloc(len * sizeof(wchar_t)); - if (!r) { - return NULL; - } - if (wcscpy_s(r, len, s)) { - free(r); - return NULL; - } - *newlen = len < MAXINT ? (int)len : MAXINT; - return r; -} - -static wchar_t * -get_process_name(void) -{ - DWORD bufferLen = MAX_PATH; - DWORD len = bufferLen; - wchar_t *r = NULL; - - while (!r) { - r = (wchar_t *)malloc(bufferLen * sizeof(wchar_t)); - if (!r) { - error(RC_NO_MEMORY, L"out of memory"); - return NULL; - } - len = GetModuleFileNameW(NULL, r, bufferLen); - if (len == 0) { - free(r); - error(0, L"Failed to get module name"); - return NULL; - } else if (len == bufferLen && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - free(r); - r = NULL; - bufferLen *= 2; - } - } - - return r; -} - -static int -process(int argc, wchar_t ** argv) -{ - wchar_t * wp; - wchar_t * command; - wchar_t * executable; - wchar_t * p; - wchar_t * argv0; - int rc = 0; - INSTALLED_PYTHON * ip; - BOOL valid; - DWORD size, attrs; - wchar_t message[MSGSIZE]; - void * version_data; - VS_FIXEDFILEINFO * file_info; - UINT block_size; -#if defined(VENV_REDIRECT) - wchar_t * venv_cfg_path; - int newlen; -#elif defined(SCRIPT_WRAPPER) - wchar_t * newcommand; - wchar_t * av[2]; - int newlen; - HRESULT hr; - int index; -#else - HRESULT hr; - int index; -#endif - - setvbuf(stderr, (char *)NULL, _IONBF, 0); - wp = get_env(L"PYLAUNCH_DEBUG"); - if ((wp != NULL) && (*wp != L'\0')) - log_fp = stderr; - -#if defined(_M_X64) - debug(L"launcher build: 64bit\n"); -#else - debug(L"launcher build: 32bit\n"); -#endif -#if defined(_WINDOWS) - debug(L"launcher executable: Windows\n"); -#else - debug(L"launcher executable: Console\n"); -#endif -#if !defined(VENV_REDIRECT) - /* Get the local appdata folder (non-roaming) */ - hr = SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, - NULL, 0, appdata_ini_path); - if (hr != S_OK) { - debug(L"SHGetFolderPath failed: %X\n", hr); - appdata_ini_path[0] = L'\0'; - } - else { - wcsncat_s(appdata_ini_path, MAX_PATH, L"\\py.ini", _TRUNCATE); - attrs = GetFileAttributesW(appdata_ini_path); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"File '%ls' non-existent\n", appdata_ini_path); - appdata_ini_path[0] = L'\0'; - } else { - debug(L"Using local configuration file '%ls'\n", appdata_ini_path); - } - } -#endif - argv0 = get_process_name(); - size = GetFileVersionInfoSizeW(argv0, &size); - if (size == 0) { - winerror(GetLastError(), message, MSGSIZE); - debug(L"GetFileVersionInfoSize failed: %ls\n", message); - } - else { - version_data = malloc(size); - if (version_data) { - valid = GetFileVersionInfoW(argv0, 0, size, - version_data); - if (!valid) - debug(L"GetFileVersionInfo failed: %X\n", GetLastError()); - else { - valid = VerQueryValueW(version_data, L"\\", - (LPVOID *) &file_info, &block_size); - if (!valid) - debug(L"VerQueryValue failed: %X\n", GetLastError()); - else { - version_high = file_info->dwFileVersionMS; - version_low = file_info->dwFileVersionLS; - } - } - free(version_data); - } - } - -#if defined(VENV_REDIRECT) - /* Allocate some extra space for new filenames */ - venv_cfg_path = wcsdup_pad(argv0, 32, &newlen); - if (!venv_cfg_path) { - error(RC_NO_MEMORY, L"Failed to copy module name"); - } - p = wcsrchr(venv_cfg_path, L'\\'); - - if (p == NULL) { - error(RC_NO_VENV_CFG, L"No pyvenv.cfg file"); - } - p[0] = L'\0'; - wcscat_s(venv_cfg_path, newlen, L"\\pyvenv.cfg"); - attrs = GetFileAttributesW(venv_cfg_path); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"File '%ls' non-existent\n", venv_cfg_path); - p[0] = '\0'; - p = wcsrchr(venv_cfg_path, L'\\'); - if (p != NULL) { - p[0] = '\0'; - wcscat_s(venv_cfg_path, newlen, L"\\pyvenv.cfg"); - attrs = GetFileAttributesW(venv_cfg_path); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"File '%ls' non-existent\n", venv_cfg_path); - error(RC_NO_VENV_CFG, L"No pyvenv.cfg file"); - } - } - } - debug(L"Using venv configuration file '%ls'\n", venv_cfg_path); -#else - /* Allocate some extra space for new filenames */ - if (wcscpy_s(launcher_ini_path, MAX_PATH, argv0)) { - error(RC_NO_MEMORY, L"Failed to copy module name"); - } - p = wcsrchr(launcher_ini_path, L'\\'); - - if (p == NULL) { - debug(L"GetModuleFileNameW returned value has no backslash: %ls\n", - launcher_ini_path); - launcher_ini_path[0] = L'\0'; - } - else { - p[0] = L'\0'; - wcscat_s(launcher_ini_path, MAX_PATH, L"\\py.ini"); - attrs = GetFileAttributesW(launcher_ini_path); - if (attrs == INVALID_FILE_ATTRIBUTES) { - debug(L"File '%ls' non-existent\n", launcher_ini_path); - launcher_ini_path[0] = L'\0'; - } else { - debug(L"Using global configuration file '%ls'\n", launcher_ini_path); - } - } -#endif - - command = skip_me(GetCommandLineW()); - debug(L"Called with command line: %ls\n", command); - -#if !defined(VENV_REDIRECT) - /* bpo-35811: The __PYVENV_LAUNCHER__ variable is used to - * override sys.executable and locate the original prefix path. - * However, if it is silently inherited by a non-venv Python - * process, that process will believe it is running in the venv - * still. This is the only place where *we* can clear it (that is, - * when py.exe is being used to launch Python), so we do. - */ - SetEnvironmentVariableW(L"__PYVENV_LAUNCHER__", NULL); -#endif - -#if defined(SCRIPT_WRAPPER) - /* The launcher is being used in "script wrapper" mode. - * There should therefore be a Python script named -script.py in - * the same directory as the launcher executable. - * Put the script name into argv as the first (script name) argument. - */ - - /* Get the wrapped script name - if the script is not present, this will - * terminate the program with an error. - */ - locate_wrapped_script(); - - /* Add the wrapped script to the start of command */ - newlen = wcslen(wrapped_script_path) + wcslen(command) + 2; /* ' ' + NUL */ - newcommand = malloc(sizeof(wchar_t) * newlen); - if (!newcommand) { - error(RC_NO_MEMORY, L"Could not allocate new command line"); - } - else { - wcscpy_s(newcommand, newlen, wrapped_script_path); - wcscat_s(newcommand, newlen, L" "); - wcscat_s(newcommand, newlen, command); - debug(L"Running wrapped script with command line '%ls'\n", newcommand); - read_commands(); - av[0] = wrapped_script_path; - av[1] = NULL; - maybe_handle_shebang(av, newcommand); - /* Returns if no shebang line - pass to default processing */ - command = newcommand; - valid = FALSE; - } -#elif defined(VENV_REDIRECT) - { - FILE *f; - char buffer[4096]; /* 4KB should be enough for anybody */ - char *start; - DWORD len, cch, cch_actual; - size_t cb; - if (_wfopen_s(&f, venv_cfg_path, L"r")) { - error(RC_BAD_VENV_CFG, L"Cannot read '%ls'", venv_cfg_path); - } - cb = fread_s(buffer, sizeof(buffer), sizeof(buffer[0]), - sizeof(buffer) / sizeof(buffer[0]), f); - fclose(f); - - if (!find_home_value(buffer, &start, &len)) { - error(RC_BAD_VENV_CFG, L"Cannot find home in '%ls'", - venv_cfg_path); - } - - cch = MultiByteToWideChar(CP_UTF8, 0, start, len, NULL, 0); - if (!cch) { - error(0, L"Cannot determine memory for home path"); - } - cch += (DWORD)wcslen(PYTHON_EXECUTABLE) + 4; /* include sep, null and quotes */ - executable = (wchar_t *)malloc(cch * sizeof(wchar_t)); - if (executable == NULL) { - error(RC_NO_MEMORY, L"A memory allocation failed"); - } - /* start with a quote - we'll skip this ahead, but want it for the final string */ - executable[0] = L'"'; - cch_actual = MultiByteToWideChar(CP_UTF8, 0, start, len, &executable[1], cch - 1); - if (!cch_actual) { - error(RC_BAD_VENV_CFG, L"Cannot decode home path in '%ls'", - venv_cfg_path); - } - cch_actual += 1; /* account for the first quote */ - executable[cch_actual] = L'\0'; - if (executable[cch_actual - 1] != L'\\') { - executable[cch_actual++] = L'\\'; - executable[cch_actual] = L'\0'; - } - if (wcscat_s(&executable[1], cch - 1, PYTHON_EXECUTABLE)) { - error(RC_BAD_VENV_CFG, L"Cannot create executable path from '%ls'", - venv_cfg_path); - } - /* there's no trailing quote, so we only have to skip one character for the test */ - if (GetFileAttributesW(&executable[1]) == INVALID_FILE_ATTRIBUTES) { - error(RC_NO_PYTHON, L"No Python at '%ls'", executable); - } - /* now append the final quote */ - wcscat_s(executable, cch, L"\""); - /* smuggle our original path through */ - if (!SetEnvironmentVariableW(L"__PYVENV_LAUNCHER__", argv0)) { - error(0, L"Failed to set launcher environment"); - } - valid = 1; - } -#else - if (argc <= 1) { - valid = FALSE; - p = NULL; - } - else { - p = argv[1]; - if ((argc == 2) && // list version args - (!wcsncmp(p, L"-0", wcslen(L"-0")) || - !wcsncmp(p, L"--list", wcslen(L"--list")))) - { - show_python_list(argv); - return rc; - } - valid = valid && (*p == L'-') && validate_version(&p[1]); - if (valid) { - ip = locate_python(&p[1], FALSE); - if (ip == NULL) - { - fwprintf(stdout, \ - L"Python %ls not found!\n", &p[1]); - valid = show_python_list(argv); - error(RC_NO_PYTHON, L"Requested Python version (%ls) not \ -installed, use -0 for available pythons", &p[1]); - } - executable = ip->executable; - command += wcslen(p); - command = skip_whitespace(command); - } - else { - for (index = 1; index < argc; ++index) { - if (*argv[index] != L'-') - break; - } - if (index < argc) { - read_commands(); - maybe_handle_shebang(&argv[index], command); - } - } - } -#endif - - if (!valid) { - if ((argc == 2) && (!_wcsicmp(p, L"-h") || !_wcsicmp(p, L"--help"))) - show_help_text(argv); - if ((argc == 2) && - (!_wcsicmp(p, L"-0") || !_wcsicmp(p, L"--list") || - !_wcsicmp(p, L"-0p") || !_wcsicmp(p, L"--list-paths"))) - { - executable = NULL; /* Info call only */ - } - else { - /* look for the default Python */ - ip = locate_python(L"", FALSE); - if (ip == NULL) - error(RC_NO_PYTHON, L"Can't find a default Python."); - executable = ip->executable; - } - } - if (executable != NULL) - invoke_child(executable, NULL, command); - else - rc = RC_NO_PYTHON; - return rc; -} - -#if defined(_WINDOWS) - -int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPWSTR lpstrCmd, int nShow) -{ - return process(__argc, __wargv); -} - -#else - -int cdecl wmain(int argc, wchar_t ** argv) -{ - return process(argc, argv); -} - -#endif diff --git a/PC/launcher2.c b/PC/launcher2.c deleted file mode 100644 index 31271dc2e62f8a..00000000000000 --- a/PC/launcher2.c +++ /dev/null @@ -1,2858 +0,0 @@ -/* - * Rewritten Python launcher for Windows - * - * This new rewrite properly handles PEP 514 and allows any registered Python - * runtime to be launched. It also enables auto-install of versions when they - * are requested but no installation can be found. - */ - -#define __STDC_WANT_LIB_EXT1__ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MS_WINDOWS -#include "patchlevel.h" - -#define MAXLEN PATHCCH_MAX_CCH -#define MSGSIZE 1024 - -#define RC_NO_STD_HANDLES 100 -#define RC_CREATE_PROCESS 101 -#define RC_BAD_VIRTUAL_PATH 102 -#define RC_NO_PYTHON 103 -#define RC_NO_MEMORY 104 -#define RC_NO_SCRIPT 105 -#define RC_NO_VENV_CFG 106 -#define RC_BAD_VENV_CFG 107 -#define RC_NO_COMMANDLINE 108 -#define RC_INTERNAL_ERROR 109 -#define RC_DUPLICATE_ITEM 110 -#define RC_INSTALLING 111 -#define RC_NO_PYTHON_AT_ALL 112 -#define RC_NO_SHEBANG 113 -#define RC_RECURSIVE_SHEBANG 114 - -static FILE * log_fp = NULL; - -void -debug(wchar_t * format, ...) -{ - va_list va; - - if (log_fp != NULL) { - wchar_t buffer[MAXLEN]; - int r = 0; - va_start(va, format); - r = vswprintf_s(buffer, MAXLEN, format, va); - va_end(va); - - if (r <= 0) { - return; - } - fputws(buffer, log_fp); - while (r && isspace(buffer[r])) { - buffer[r--] = L'\0'; - } - if (buffer[0]) { - OutputDebugStringW(buffer); - } - } -} - - -void -formatWinerror(int rc, wchar_t * message, int size) -{ - FormatMessageW( - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, rc, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - message, size, NULL); -} - - -void -winerror(int err, wchar_t * format, ... ) -{ - va_list va; - wchar_t message[MSGSIZE]; - wchar_t win_message[MSGSIZE]; - int len; - - if (err == 0) { - err = GetLastError(); - } - - va_start(va, format); - len = _vsnwprintf_s(message, MSGSIZE, _TRUNCATE, format, va); - va_end(va); - - formatWinerror(err, win_message, MSGSIZE); - if (len >= 0) { - _snwprintf_s(&message[len], MSGSIZE - len, _TRUNCATE, L": %s", - win_message); - } - -#if !defined(_WINDOWS) - fwprintf(stderr, L"%s\n", message); -#else - MessageBoxW(NULL, message, L"Python Launcher is sorry to say ...", - MB_OK); -#endif -} - - -void -error(wchar_t * format, ... ) -{ - va_list va; - wchar_t message[MSGSIZE]; - - va_start(va, format); - _vsnwprintf_s(message, MSGSIZE, _TRUNCATE, format, va); - va_end(va); - -#if !defined(_WINDOWS) - fwprintf(stderr, L"%s\n", message); -#else - MessageBoxW(NULL, message, L"Python Launcher is sorry to say ...", - MB_OK); -#endif -} - - -typedef BOOL (*PIsWow64Process2)(HANDLE, USHORT*, USHORT*); - - -USHORT -_getNativeMachine(void) -{ - static USHORT _nativeMachine = IMAGE_FILE_MACHINE_UNKNOWN; - if (_nativeMachine == IMAGE_FILE_MACHINE_UNKNOWN) { - USHORT processMachine; - HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll"); - PIsWow64Process2 IsWow64Process2 = kernel32 ? - (PIsWow64Process2)GetProcAddress(kernel32, "IsWow64Process2") : - NULL; - if (!IsWow64Process2) { - BOOL wow64Process; - if (!IsWow64Process(NULL, &wow64Process)) { - winerror(0, L"Checking process type"); - } else if (wow64Process) { - // We should always be a 32-bit executable, so if running - // under emulation, it must be a 64-bit host. - _nativeMachine = IMAGE_FILE_MACHINE_AMD64; - } else { - // Not running under emulation, and an old enough OS to not - // have IsWow64Process2, so assume it's x86. - _nativeMachine = IMAGE_FILE_MACHINE_I386; - } - } else if (!IsWow64Process2(NULL, &processMachine, &_nativeMachine)) { - winerror(0, L"Checking process type"); - } - } - return _nativeMachine; -} - - -bool -isAMD64Host(void) -{ - return _getNativeMachine() == IMAGE_FILE_MACHINE_AMD64; -} - - -bool -isARM64Host(void) -{ - return _getNativeMachine() == IMAGE_FILE_MACHINE_ARM64; -} - - -bool -isEnvVarSet(const wchar_t *name) -{ - /* only looking for non-empty, which means at least one character - and the null terminator */ - return GetEnvironmentVariableW(name, NULL, 0) >= 2; -} - - -bool -join(wchar_t *buffer, size_t bufferLength, const wchar_t *fragment) -{ - if (SUCCEEDED(PathCchCombineEx(buffer, bufferLength, buffer, fragment, PATHCCH_ALLOW_LONG_PATHS))) { - return true; - } - return false; -} - - -bool -split_parent(wchar_t *buffer, size_t bufferLength) -{ - return SUCCEEDED(PathCchRemoveFileSpec(buffer, bufferLength)); -} - - -int -_compare(const wchar_t *x, int xLen, const wchar_t *y, int yLen) -{ - // Empty strings sort first - if (!x || !xLen) { - return (!y || !yLen) ? 0 : -1; - } else if (!y || !yLen) { - return 1; - } - switch (CompareStringEx( - LOCALE_NAME_INVARIANT, NORM_IGNORECASE | SORT_DIGITSASNUMBERS, - x, xLen, y, yLen, - NULL, NULL, 0 - )) { - case CSTR_LESS_THAN: - return -1; - case CSTR_EQUAL: - return 0; - case CSTR_GREATER_THAN: - return 1; - default: - winerror(0, L"Error comparing '%.*s' and '%.*s' (compare)", xLen, x, yLen, y); - return -1; - } -} - - -int -_compareArgument(const wchar_t *x, int xLen, const wchar_t *y, int yLen) -{ - // Empty strings sort first - if (!x || !xLen) { - return (!y || !yLen) ? 0 : -1; - } else if (!y || !yLen) { - return 1; - } - switch (CompareStringEx( - LOCALE_NAME_INVARIANT, 0, - x, xLen, y, yLen, - NULL, NULL, 0 - )) { - case CSTR_LESS_THAN: - return -1; - case CSTR_EQUAL: - return 0; - case CSTR_GREATER_THAN: - return 1; - default: - winerror(0, L"Error comparing '%.*s' and '%.*s' (compareArgument)", xLen, x, yLen, y); - return -1; - } -} - -int -_comparePath(const wchar_t *x, int xLen, const wchar_t *y, int yLen) -{ - // Empty strings sort first - if (!x || !xLen) { - return !y || !yLen ? 0 : -1; - } else if (!y || !yLen) { - return 1; - } - switch (CompareStringOrdinal(x, xLen, y, yLen, TRUE)) { - case CSTR_LESS_THAN: - return -1; - case CSTR_EQUAL: - return 0; - case CSTR_GREATER_THAN: - return 1; - default: - winerror(0, L"Error comparing '%.*s' and '%.*s' (comparePath)", xLen, x, yLen, y); - return -1; - } -} - - -bool -_startsWith(const wchar_t *x, int xLen, const wchar_t *y, int yLen) -{ - if (!x || !y) { - return false; - } - yLen = yLen < 0 ? (int)wcsnlen_s(y, MAXLEN) : yLen; - xLen = xLen < 0 ? (int)wcsnlen_s(x, MAXLEN) : xLen; - return xLen >= yLen && 0 == _compare(x, yLen, y, yLen); -} - - -bool -_startsWithArgument(const wchar_t *x, int xLen, const wchar_t *y, int yLen) -{ - if (!x || !y) { - return false; - } - yLen = yLen < 0 ? (int)wcsnlen_s(y, MAXLEN) : yLen; - xLen = xLen < 0 ? (int)wcsnlen_s(x, MAXLEN) : xLen; - return xLen >= yLen && 0 == _compareArgument(x, yLen, y, yLen); -} - - -// Unlike regular startsWith, this function requires that the following -// character is either NULL (that is, the entire string matches) or is one of -// the characters in 'separators'. -bool -_startsWithSeparated(const wchar_t *x, int xLen, const wchar_t *y, int yLen, const wchar_t *separators) -{ - if (!x || !y) { - return false; - } - yLen = yLen < 0 ? (int)wcsnlen_s(y, MAXLEN) : yLen; - xLen = xLen < 0 ? (int)wcsnlen_s(x, MAXLEN) : xLen; - if (xLen < yLen) { - return false; - } - if (xLen == yLen) { - return 0 == _compare(x, xLen, y, yLen); - } - return separators && - 0 == _compare(x, yLen, y, yLen) && - wcschr(separators, x[yLen]) != NULL; -} - - - -/******************************************************************************\ - *** HELP TEXT *** -\******************************************************************************/ - - -int -showHelpText(wchar_t ** argv) -{ - // The help text is stored in launcher-usage.txt, which is compiled into - // the launcher and loaded at runtime if needed. - // - // The file must be UTF-8. There are two substitutions: - // %ls - PY_VERSION (as wchar_t*) - // %ls - argv[0] (as wchar_t*) - HRSRC res = FindResourceExW(NULL, L"USAGE", MAKEINTRESOURCE(1), MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); - HGLOBAL resData = res ? LoadResource(NULL, res) : NULL; - const char *usage = resData ? (const char*)LockResource(resData) : NULL; - if (usage == NULL) { - winerror(0, L"Unable to load usage text"); - return RC_INTERNAL_ERROR; - } - - DWORD cbData = SizeofResource(NULL, res); - DWORD cchUsage = MultiByteToWideChar(CP_UTF8, 0, usage, cbData, NULL, 0); - if (!cchUsage) { - winerror(0, L"Unable to preprocess usage text"); - return RC_INTERNAL_ERROR; - } - - cchUsage += 1; - wchar_t *wUsage = (wchar_t*)malloc(cchUsage * sizeof(wchar_t)); - cchUsage = MultiByteToWideChar(CP_UTF8, 0, usage, cbData, wUsage, cchUsage); - if (!cchUsage) { - winerror(0, L"Unable to preprocess usage text"); - free((void *)wUsage); - return RC_INTERNAL_ERROR; - } - // Ensure null termination - wUsage[cchUsage] = L'\0'; - - fwprintf(stdout, wUsage, (L"" PY_VERSION), argv[0]); - fflush(stdout); - - free((void *)wUsage); - - return 0; -} - - -/******************************************************************************\ - *** SEARCH INFO *** -\******************************************************************************/ - - -struct _SearchInfoBuffer { - struct _SearchInfoBuffer *next; - wchar_t buffer[0]; -}; - - -typedef struct { - // the original string, managed by the OS - const wchar_t *originalCmdLine; - // pointer into the cmdline to mark what we've consumed - const wchar_t *restOfCmdLine; - // if known/discovered, the full executable path of our runtime - const wchar_t *executablePath; - // pointer and length into cmdline for the file to check for a - // shebang line, if any. Length can be -1 if the string is null - // terminated. - const wchar_t *scriptFile; - int scriptFileLength; - // pointer and length into cmdline or a static string with the - // name of the target executable. Length can be -1 if the string - // is null terminated. - const wchar_t *executable; - int executableLength; - // pointer and length into a string with additional interpreter - // arguments to include before restOfCmdLine. Length can be -1 if - // the string is null terminated. - const wchar_t *executableArgs; - int executableArgsLength; - // pointer and length into cmdline or a static string with the - // company name for PEP 514 lookup. Length can be -1 if the string - // is null terminated. - const wchar_t *company; - int companyLength; - // pointer and length into cmdline or a static string with the - // tag for PEP 514 lookup. Length can be -1 if the string is - // null terminated. - const wchar_t *tag; - int tagLength; - // if true, treats 'tag' as a non-PEP 514 filter - bool oldStyleTag; - // if true, ignores 'tag' when a high priority environment is found - // gh-92817: This is currently set when a tag is read from configuration, - // the environment, or a shebang, rather than the command line, and the - // only currently possible high priority environment is an active virtual - // environment - bool lowPriorityTag; - // if true, allow PEP 514 lookup to override 'executable' - bool allowExecutableOverride; - // if true, allow a nearby pyvenv.cfg to locate the executable - bool allowPyvenvCfg; - // if true, allow defaults (env/py.ini) to clarify/override tags - bool allowDefaults; - // if true, prefer windowed (console-less) executable - bool windowed; - // if true, only list detected runtimes without launching - bool list; - // if true, only list detected runtimes with paths without launching - bool listPaths; - // if true, display help message before continuing - bool help; - // if set, limits search to registry keys with the specified Company - // This is intended for debugging and testing only - const wchar_t *limitToCompany; - // dynamically allocated buffers to free later - struct _SearchInfoBuffer *_buffer; -} SearchInfo; - - -wchar_t * -allocSearchInfoBuffer(SearchInfo *search, int wcharCount) -{ - struct _SearchInfoBuffer *buffer = (struct _SearchInfoBuffer*)malloc( - sizeof(struct _SearchInfoBuffer) + - wcharCount * sizeof(wchar_t) - ); - if (!buffer) { - return NULL; - } - buffer->next = search->_buffer; - search->_buffer = buffer; - return buffer->buffer; -} - - -void -freeSearchInfo(SearchInfo *search) -{ - struct _SearchInfoBuffer *b = search->_buffer; - search->_buffer = NULL; - while (b) { - struct _SearchInfoBuffer *nextB = b->next; - free((void *)b); - b = nextB; - } -} - - -void -_debugStringAndLength(const wchar_t *s, int len, const wchar_t *name) -{ - if (!s) { - debug(L"%s: (null)\n", name); - } else if (len == 0) { - debug(L"%s: (empty)\n", name); - } else if (len < 0) { - debug(L"%s: %s\n", name, s); - } else { - debug(L"%s: %.*ls\n", name, len, s); - } -} - - -void -dumpSearchInfo(SearchInfo *search) -{ - if (!log_fp) { - return; - } - -#ifdef __clang__ -#define DEBUGNAME(s) L # s -#else -#define DEBUGNAME(s) # s -#endif -#define DEBUG(s) debug(L"SearchInfo." DEBUGNAME(s) L": %s\n", (search->s) ? (search->s) : L"(null)") -#define DEBUG_2(s, sl) _debugStringAndLength((search->s), (search->sl), L"SearchInfo." DEBUGNAME(s)) -#define DEBUG_BOOL(s) debug(L"SearchInfo." DEBUGNAME(s) L": %s\n", (search->s) ? L"True" : L"False") - DEBUG(originalCmdLine); - DEBUG(restOfCmdLine); - DEBUG(executablePath); - DEBUG_2(scriptFile, scriptFileLength); - DEBUG_2(executable, executableLength); - DEBUG_2(executableArgs, executableArgsLength); - DEBUG_2(company, companyLength); - DEBUG_2(tag, tagLength); - DEBUG_BOOL(oldStyleTag); - DEBUG_BOOL(lowPriorityTag); - DEBUG_BOOL(allowDefaults); - DEBUG_BOOL(allowExecutableOverride); - DEBUG_BOOL(windowed); - DEBUG_BOOL(list); - DEBUG_BOOL(listPaths); - DEBUG_BOOL(help); - DEBUG(limitToCompany); -#undef DEBUG_BOOL -#undef DEBUG_2 -#undef DEBUG -#undef DEBUGNAME -} - - -int -findArgv0Length(const wchar_t *buffer, int bufferLength) -{ - // Note: this implements semantics that are only valid for argv0. - // Specifically, there is no escaping of quotes, and quotes within - // the argument have no effect. A quoted argv0 must start and end - // with a double quote character; otherwise, it ends at the first - // ' ' or '\t'. - int quoted = buffer[0] == L'"'; - for (int i = 1; bufferLength < 0 || i < bufferLength; ++i) { - switch (buffer[i]) { - case L'\0': - return i; - case L' ': - case L'\t': - if (!quoted) { - return i; - } - break; - case L'"': - if (quoted) { - return i + 1; - } - break; - } - } - return bufferLength; -} - - -const wchar_t * -findArgv0End(const wchar_t *buffer, int bufferLength) -{ - return &buffer[findArgv0Length(buffer, bufferLength)]; -} - - -/******************************************************************************\ - *** COMMAND-LINE PARSING *** -\******************************************************************************/ - -// Adapted from https://stackoverflow.com/a/65583702 -typedef struct AppExecLinkFile { // For tag IO_REPARSE_TAG_APPEXECLINK - DWORD reparseTag; - WORD reparseDataLength; - WORD reserved; - ULONG version; - wchar_t stringList[MAX_PATH * 4]; // Multistring (Consecutive UTF-16 strings each ending with a NUL) - /* There are normally 4 strings here. Ex: - Package ID: L"Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" - Entry Point: L"Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!PythonRedirector" - Executable: L"C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.17.106910_x64__8wekyb3d8bbwe\AppInstallerPythonRedirector.exe" - Applic. Type: L"0" // Integer as ASCII. "0" = Desktop bridge application; Else sandboxed UWP application - */ -} AppExecLinkFile; - - -int -parseCommandLine(SearchInfo *search) -{ - if (!search || !search->originalCmdLine) { - return RC_NO_COMMANDLINE; - } - - const wchar_t *argv0End = findArgv0End(search->originalCmdLine, -1); - const wchar_t *tail = argv0End; // will be start of the executable name - const wchar_t *end = argv0End; // will be end of the executable name - search->restOfCmdLine = argv0End; // will be first space after argv0 - while (--tail != search->originalCmdLine) { - if (*tail == L'"' && end == argv0End) { - // Move the "end" up to the quote, so we also allow moving for - // a period later on. - end = argv0End = tail; - } else if (*tail == L'.' && end == argv0End) { - end = tail; - } else if (*tail == L'\\' || *tail == L'/') { - ++tail; - break; - } - } - if (tail == search->originalCmdLine && tail[0] == L'"') { - ++tail; - } - // Without special cases, we can now fill in the search struct - int tailLen = (int)(end ? (end - tail) : wcsnlen_s(tail, MAXLEN)); - search->executableLength = -1; - - // Our special cases are as follows -#define MATCHES(s) (0 == _comparePath(tail, tailLen, (s), -1)) -#define STARTSWITH(s) _startsWith(tail, tailLen, (s), -1) - if (MATCHES(L"py")) { - search->executable = L"python.exe"; - search->allowExecutableOverride = true; - search->allowDefaults = true; - } else if (MATCHES(L"pyw")) { - search->executable = L"pythonw.exe"; - search->allowExecutableOverride = true; - search->allowDefaults = true; - search->windowed = true; - } else if (MATCHES(L"py_d")) { - search->executable = L"python_d.exe"; - search->allowExecutableOverride = true; - search->allowDefaults = true; - } else if (MATCHES(L"pyw_d")) { - search->executable = L"pythonw_d.exe"; - search->allowExecutableOverride = true; - search->allowDefaults = true; - search->windowed = true; - } else if (STARTSWITH(L"python3")) { - search->executable = L"python.exe"; - search->tag = &tail[6]; - search->tagLength = tailLen - 6; - search->allowExecutableOverride = true; - search->oldStyleTag = true; - search->allowPyvenvCfg = true; - } else if (STARTSWITH(L"pythonw3")) { - search->executable = L"pythonw.exe"; - search->tag = &tail[7]; - search->tagLength = tailLen - 7; - search->allowExecutableOverride = true; - search->oldStyleTag = true; - search->allowPyvenvCfg = true; - search->windowed = true; - } else { - search->executable = tail; - search->executableLength = tailLen; - search->allowPyvenvCfg = true; - } -#undef STARTSWITH -#undef MATCHES - - // First argument might be one of our options. If so, consume it, - // update flags and then set restOfCmdLine. - const wchar_t *arg = search->restOfCmdLine; - while(*arg && isspace(*arg)) { ++arg; } -#define MATCHES(s) (0 == _compareArgument(arg, argLen, (s), -1)) -#define STARTSWITH(s) _startsWithArgument(arg, argLen, (s), -1) - if (*arg && *arg == L'-' && *++arg) { - tail = arg; - while (*tail && !isspace(*tail)) { ++tail; } - int argLen = (int)(tail - arg); - if (argLen > 0) { - if (STARTSWITH(L"2") || STARTSWITH(L"3")) { - // All arguments starting with 2 or 3 are assumed to be version tags - search->tag = arg; - search->tagLength = argLen; - search->oldStyleTag = true; - search->restOfCmdLine = tail; - } else if (STARTSWITH(L"V:") || STARTSWITH(L"-version:")) { - // Arguments starting with 'V:' specify company and/or tag - const wchar_t *argStart = wcschr(arg, L':') + 1; - const wchar_t *tagStart = wcschr(argStart, L'/') ; - if (tagStart) { - search->company = argStart; - search->companyLength = (int)(tagStart - argStart); - search->tag = tagStart + 1; - } else { - search->tag = argStart; - } - search->tagLength = (int)(tail - search->tag); - search->allowDefaults = false; - search->restOfCmdLine = tail; - } else if (MATCHES(L"0") || MATCHES(L"-list")) { - search->list = true; - search->restOfCmdLine = tail; - } else if (MATCHES(L"0p") || MATCHES(L"-list-paths")) { - search->listPaths = true; - search->restOfCmdLine = tail; - } else if (MATCHES(L"h") || MATCHES(L"-help")) { - search->help = true; - // Do not update restOfCmdLine so that we trigger the help - // message from whichever interpreter we select - } - } - } -#undef STARTSWITH -#undef MATCHES - - // Might have a script filename. If it looks like a filename, add - // it to the SearchInfo struct for later reference. - arg = search->restOfCmdLine; - while(*arg && isspace(*arg)) { ++arg; } - if (*arg && *arg != L'-') { - search->scriptFile = arg; - if (*arg == L'"') { - ++search->scriptFile; - while (*++arg && *arg != L'"') { } - } else { - while (*arg && !isspace(*arg)) { ++arg; } - } - search->scriptFileLength = (int)(arg - search->scriptFile); - } - - return 0; -} - - -int -_decodeShebang(SearchInfo *search, const char *buffer, int bufferLength, bool onlyUtf8, wchar_t **decoded, int *decodedLength) -{ - DWORD cp = CP_UTF8; - int wideLen = MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, buffer, bufferLength, NULL, 0); - if (!wideLen) { - cp = CP_ACP; - wideLen = MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, buffer, bufferLength, NULL, 0); - if (!wideLen) { - debug(L"# Failed to decode shebang line (0x%08X)\n", GetLastError()); - return RC_BAD_VIRTUAL_PATH; - } - } - wchar_t *b = allocSearchInfoBuffer(search, wideLen + 1); - if (!b) { - return RC_NO_MEMORY; - } - wideLen = MultiByteToWideChar(cp, 0, buffer, bufferLength, b, wideLen + 1); - if (!wideLen) { - debug(L"# Failed to decode shebang line (0x%08X)\n", GetLastError()); - return RC_BAD_VIRTUAL_PATH; - } - b[wideLen] = L'\0'; - *decoded = b; - *decodedLength = wideLen; - return 0; -} - - -bool -_shebangStartsWith(const wchar_t *buffer, int bufferLength, const wchar_t *prefix, const wchar_t **rest, int *firstArgumentLength) -{ - int prefixLength = (int)wcsnlen_s(prefix, MAXLEN); - if (bufferLength < prefixLength || !_startsWithArgument(buffer, bufferLength, prefix, prefixLength)) { - return false; - } - if (rest) { - *rest = &buffer[prefixLength]; - } - if (firstArgumentLength) { - int i = prefixLength; - while (i < bufferLength && !isspace(buffer[i])) { - i += 1; - } - *firstArgumentLength = i - prefixLength; - } - return true; -} - - -int -ensure_no_redirector_stub(wchar_t* filename, wchar_t* buffer) -{ - // Make sure we didn't find a reparse point that will open the Microsoft Store - // If we did, pretend there was no shebang and let normal handling take over - WIN32_FIND_DATAW findData; - HANDLE hFind = FindFirstFileW(buffer, &findData); - if (!hFind) { - // Let normal handling take over - debug(L"# Did not find %s on PATH\n", filename); - return RC_NO_SHEBANG; - } - - FindClose(hFind); - - if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && - findData.dwReserved0 & IO_REPARSE_TAG_APPEXECLINK)) { - return 0; - } - - HANDLE hReparsePoint = CreateFileW(buffer, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT, NULL); - if (!hReparsePoint) { - // Let normal handling take over - debug(L"# Did not find %s on PATH\n", filename); - return RC_NO_SHEBANG; - } - - AppExecLinkFile appExecLink; - - if (!DeviceIoControl(hReparsePoint, FSCTL_GET_REPARSE_POINT, NULL, 0, &appExecLink, sizeof(appExecLink), NULL, NULL)) { - // Let normal handling take over - debug(L"# Did not find %s on PATH\n", filename); - CloseHandle(hReparsePoint); - return RC_NO_SHEBANG; - } - - CloseHandle(hReparsePoint); - - const wchar_t* redirectorPackageId = L"Microsoft.DesktopAppInstaller_8wekyb3d8bbwe"; - - if (0 == wcscmp(appExecLink.stringList, redirectorPackageId)) { - debug(L"# ignoring redirector that would launch store\n"); - return RC_NO_SHEBANG; - } - - return 0; -} - - -int -searchPath(SearchInfo *search, const wchar_t *shebang, int shebangLength) -{ - if (isEnvVarSet(L"PYLAUNCHER_NO_SEARCH_PATH")) { - return RC_NO_SHEBANG; - } - - wchar_t *command; - int commandLength; - if (!_shebangStartsWith(shebang, shebangLength, L"/usr/bin/env ", &command, &commandLength)) { - return RC_NO_SHEBANG; - } - - if (!commandLength || commandLength == MAXLEN) { - return RC_BAD_VIRTUAL_PATH; - } - - int lastDot = commandLength; - while (lastDot > 0 && command[lastDot] != L'.') { - lastDot -= 1; - } - if (!lastDot) { - lastDot = commandLength; - } - - wchar_t filename[MAXLEN]; - if (wcsncpy_s(filename, MAXLEN, command, commandLength)) { - return RC_BAD_VIRTUAL_PATH; - } - - const wchar_t *ext = L".exe"; - // If the command already has an extension, we do not want to add it again - if (!lastDot || _comparePath(&filename[lastDot], -1, ext, -1)) { - if (wcscat_s(filename, MAXLEN, L".exe")) { - return RC_BAD_VIRTUAL_PATH; - } - } - - debug(L"# Search PATH for %s\n", filename); - - wchar_t pathVariable[MAXLEN]; - int n = GetEnvironmentVariableW(L"PATH", pathVariable, MAXLEN); - if (!n) { - if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { - return RC_NO_SHEBANG; - } - winerror(0, L"Failed to read PATH\n", filename); - return RC_INTERNAL_ERROR; - } - - wchar_t buffer[MAXLEN]; - n = SearchPathW(pathVariable, filename, NULL, MAXLEN, buffer, NULL); - if (!n) { - if (GetLastError() == ERROR_FILE_NOT_FOUND) { - debug(L"# Did not find %s on PATH\n", filename); - // If we didn't find it on PATH, let normal handling take over - return RC_NO_SHEBANG; - } - // Other errors should cause us to break - winerror(0, L"Failed to find %s on PATH\n", filename); - return RC_BAD_VIRTUAL_PATH; - } - - int result = ensure_no_redirector_stub(filename, buffer); - if (result) { - return result; - } - - // Check that we aren't going to call ourselves again - // If we are, pretend there was no shebang and let normal handling take over - if (GetModuleFileNameW(NULL, filename, MAXLEN) && - 0 == _comparePath(filename, -1, buffer, -1)) { - debug(L"# ignoring recursive shebang command\n"); - return RC_RECURSIVE_SHEBANG; - } - - wchar_t *buf = allocSearchInfoBuffer(search, n + 1); - if (!buf || wcscpy_s(buf, n + 1, buffer)) { - return RC_NO_MEMORY; - } - - search->executablePath = buf; - search->executableArgs = &command[commandLength]; - search->executableArgsLength = shebangLength - commandLength; - debug(L"# Found %s on PATH\n", buf); - - return 0; -} - - -int -_readIni(const wchar_t *section, const wchar_t *settingName, wchar_t *buffer, int bufferLength) -{ - wchar_t iniPath[MAXLEN]; - int n; - // Check for _PYLAUNCHER_INIDIR override (used for test isolation) - DWORD len = GetEnvironmentVariableW(L"_PYLAUNCHER_INIDIR", iniPath, MAXLEN); - if (len && len < MAXLEN) { - if (join(iniPath, MAXLEN, L"py.ini")) { - debug(L"# Reading from %s for %s/%s\n", iniPath, section, settingName); - n = GetPrivateProfileStringW(section, settingName, NULL, buffer, bufferLength, iniPath); - if (n) { - debug(L"# Found %s in %s\n", settingName, iniPath); - return n; - } - } - // When _PYLAUNCHER_INIDIR is set, skip the default locations - return 0; - } - if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, iniPath)) && - join(iniPath, MAXLEN, L"py.ini")) { - debug(L"# Reading from %s for %s/%s\n", iniPath, section, settingName); - n = GetPrivateProfileStringW(section, settingName, NULL, buffer, bufferLength, iniPath); - if (n) { - debug(L"# Found %s in %s\n", settingName, iniPath); - return n; - } else if (GetLastError() == ERROR_FILE_NOT_FOUND) { - debug(L"# Did not find file %s\n", iniPath); - } else { - winerror(0, L"Failed to read from %s\n", iniPath); - } - } - if (GetModuleFileNameW(NULL, iniPath, MAXLEN) && - SUCCEEDED(PathCchRemoveFileSpec(iniPath, MAXLEN)) && - join(iniPath, MAXLEN, L"py.ini")) { - debug(L"# Reading from %s for %s/%s\n", iniPath, section, settingName); - n = GetPrivateProfileStringW(section, settingName, NULL, buffer, MAXLEN, iniPath); - if (n) { - debug(L"# Found %s in %s\n", settingName, iniPath); - return n; - } else if (GetLastError() == ERROR_FILE_NOT_FOUND) { - debug(L"# Did not find file %s\n", iniPath); - } else { - winerror(0, L"Failed to read from %s\n", iniPath); - } - } - return 0; -} - - -bool -_findCommand(SearchInfo *search, const wchar_t *command, int commandLength) -{ - wchar_t commandBuffer[MAXLEN]; - wchar_t buffer[MAXLEN]; - wcsncpy_s(commandBuffer, MAXLEN, command, commandLength); - int n = _readIni(L"commands", commandBuffer, buffer, MAXLEN); - if (!n) { - return false; - } - wchar_t *path = allocSearchInfoBuffer(search, n + 1); - if (!path) { - return false; - } - wcscpy_s(path, n + 1, buffer); - search->executablePath = path; - return true; -} - - -int -_useShebangAsExecutable(SearchInfo *search, const wchar_t *shebang, int shebangLength) -{ - wchar_t buffer[MAXLEN]; - wchar_t script[MAXLEN]; - wchar_t command[MAXLEN]; - - int commandLength = 0; - int inQuote = 0; - - if (!shebang || !shebangLength) { - return 0; - } - - wchar_t *pC = command; - for (int i = 0; i < shebangLength; ++i) { - wchar_t c = shebang[i]; - if (isspace(c) && !inQuote) { - commandLength = i; - break; - } else if (c == L'"') { - inQuote = !inQuote; - } else if (c == L'/' || c == L'\\') { - *pC++ = L'\\'; - } else { - *pC++ = c; - } - } - *pC = L'\0'; - - if (!GetCurrentDirectoryW(MAXLEN, buffer) || - wcsncpy_s(script, MAXLEN, search->scriptFile, search->scriptFileLength) || - FAILED(PathCchCombineEx(buffer, MAXLEN, buffer, script, - PATHCCH_ALLOW_LONG_PATHS)) || - FAILED(PathCchRemoveFileSpec(buffer, MAXLEN)) || - FAILED(PathCchCombineEx(buffer, MAXLEN, buffer, command, - PATHCCH_ALLOW_LONG_PATHS)) - ) { - return RC_NO_MEMORY; - } - - int n = (int)wcsnlen(buffer, MAXLEN); - wchar_t *path = allocSearchInfoBuffer(search, n + 1); - if (!path) { - return RC_NO_MEMORY; - } - wcscpy_s(path, n + 1, buffer); - search->executablePath = path; - if (commandLength) { - search->executableArgs = &shebang[commandLength]; - search->executableArgsLength = shebangLength - commandLength; - } - return 0; -} - - -int -checkShebang(SearchInfo *search) -{ - // Do not check shebang if a tag was provided or if no script file - // was found on the command line. - if (search->tag || !search->scriptFile) { - return 0; - } - - if (search->scriptFileLength < 0) { - search->scriptFileLength = (int)wcsnlen_s(search->scriptFile, MAXLEN); - } - - wchar_t *scriptFile = (wchar_t*)malloc(sizeof(wchar_t) * (search->scriptFileLength + 1)); - if (!scriptFile) { - return RC_NO_MEMORY; - } - - wcsncpy_s(scriptFile, search->scriptFileLength + 1, - search->scriptFile, search->scriptFileLength); - - HANDLE hFile = CreateFileW(scriptFile, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, 0, NULL); - - if (hFile == INVALID_HANDLE_VALUE) { - debug(L"# Failed to open %s for shebang parsing (0x%08X)\n", - scriptFile, GetLastError()); - free(scriptFile); - return RC_NO_SCRIPT; - } - - DWORD bytesRead = 0; - unsigned char buffer[4096]; - if (!ReadFile(hFile, buffer, sizeof(buffer), &bytesRead, NULL)) { - debug(L"# Failed to read %s for shebang parsing (0x%08X)\n", - scriptFile, GetLastError()); - free(scriptFile); - return 0; - } - - CloseHandle(hFile); - debug(L"# Read %d bytes from %s to find shebang line\n", bytesRead, scriptFile); - free(scriptFile); - - - unsigned char *b = buffer; - bool onlyUtf8 = false; - if (bytesRead > 3 && *b == 0xEF) { - if (*++b == 0xBB && *++b == 0xBF) { - // Allow a UTF-8 BOM - ++b; - bytesRead -= 3; - onlyUtf8 = true; - } else { - debug(L"# Invalid BOM in shebang line"); - return 0; - } - } - if (bytesRead <= 2 || b[0] != '#' || b[1] != '!') { - // No shebang (#!) at start of line - debug(L"# No valid shebang line"); - return 0; - } - ++b; - --bytesRead; - while (--bytesRead > 0 && isspace(*++b)) { } - const unsigned char *start = b; - while (--bytesRead > 0 && *++b != '\r' && *b != '\n') { } - wchar_t *shebang; - int shebangLength; - // We add 1 when bytesRead==0, as in that case we hit EOF and b points - // to the last character in the file, not the newline - int exitCode = _decodeShebang(search, (const char*)start, (int)(b - start + (bytesRead == 0)), onlyUtf8, &shebang, &shebangLength); - if (exitCode) { - return exitCode; - } - debug(L"Shebang: %s\n", shebang); - - // Handle shebangs that we should search PATH for - int executablePathWasSetByUsrBinEnv = 0; - exitCode = searchPath(search, shebang, shebangLength); - if (exitCode == 0) { - executablePathWasSetByUsrBinEnv = 1; - } else if (exitCode != RC_NO_SHEBANG) { - return exitCode; - } - - // Handle some known, case-sensitive shebangs - const wchar_t *command; - int commandLength; - // Each template must end with "python" - static const wchar_t *shebangTemplates[] = { - L"/usr/bin/env python", - L"/usr/bin/python", - L"/usr/local/bin/python", - L"python", - NULL - }; - - for (const wchar_t **tmpl = shebangTemplates; *tmpl; ++tmpl) { - // Just to make sure we don't mess this up in the future - assert(0 == wcscmp(L"python", (*tmpl) + wcslen(*tmpl) - 6)); - - if (_shebangStartsWith(shebang, shebangLength, *tmpl, &command, &commandLength)) { - // Search for "python{command}" overrides. All templates end with - // "python", so we prepend it by jumping back 6 characters - if (_findCommand(search, &command[-6], commandLength + 6)) { - search->executableArgs = &command[commandLength]; - search->executableArgsLength = shebangLength - commandLength; - debug(L"# Treating shebang command '%.*s' as %s\n", - commandLength + 6, &command[-6], search->executablePath); - return 0; - } - - search->tag = command; - search->tagLength = commandLength; - // If we had 'python3.12.exe' then we want to strip the suffix - // off of the tag - if (search->tagLength >= 4) { - const wchar_t *suffix = &search->tag[search->tagLength - 4]; - if (0 == _comparePath(suffix, 4, L".exe", -1)) { - search->tagLength -= 4; - } - } - // If we had 'python3_d' then we want to strip the '_d' (any - // '.exe' is already gone) - if (search->tagLength >= 2) { - const wchar_t *suffix = &search->tag[search->tagLength - 2]; - if (0 == _comparePath(suffix, 2, L"_d", -1)) { - search->tagLength -= 2; - } - } - search->oldStyleTag = true; - search->lowPriorityTag = true; - search->executableArgs = &command[commandLength]; - search->executableArgsLength = shebangLength - commandLength; - if (search->tag && search->tagLength) { - debug(L"# Treating shebang command '%.*s' as 'py -%.*s'\n", - commandLength, command, search->tagLength, search->tag); - } else { - debug(L"# Treating shebang command '%.*s' as 'py'\n", - commandLength, command); - } - return 0; - } - } - - // Didn't match a template, but we found it on PATH - if (executablePathWasSetByUsrBinEnv) { - return 0; - } - - // Unrecognised executables are first tried as command aliases - commandLength = 0; - while (commandLength < shebangLength && !isspace(shebang[commandLength])) { - commandLength += 1; - } - if (_findCommand(search, shebang, commandLength)) { - search->executableArgs = &shebang[commandLength]; - search->executableArgsLength = shebangLength - commandLength; - debug(L"# Treating shebang command '%.*s' as %s\n", - commandLength, shebang, search->executablePath); - return 0; - } - - // Unrecognised commands are joined to the script's directory and treated - // as the executable path - return _useShebangAsExecutable(search, shebang, shebangLength); -} - - -int -checkDefaults(SearchInfo *search) -{ - if (!search->allowDefaults) { - return 0; - } - - // Only resolve old-style (or absent) tags to defaults - if (search->tag && search->tagLength && !search->oldStyleTag) { - return 0; - } - - // If tag is only a major version number, expand it from the environment - // or an ini file - const wchar_t *iniSettingName = NULL; - const wchar_t *envSettingName = NULL; - if (!search->tag || !search->tagLength) { - iniSettingName = L"python"; - envSettingName = L"py_python"; - } else if (0 == wcsncmp(search->tag, L"3", search->tagLength)) { - iniSettingName = L"python3"; - envSettingName = L"py_python3"; - } else if (0 == wcsncmp(search->tag, L"2", search->tagLength)) { - iniSettingName = L"python2"; - envSettingName = L"py_python2"; - } else { - debug(L"# Cannot select defaults for tag '%.*s'\n", search->tagLength, search->tag); - return 0; - } - - // First, try to read an environment variable - wchar_t buffer[MAXLEN]; - int n = GetEnvironmentVariableW(envSettingName, buffer, MAXLEN); - - // If none found, check in our two .ini files instead - if (!n) { - n = _readIni(L"defaults", iniSettingName, buffer, MAXLEN); - } - - if (n) { - wchar_t *tag = allocSearchInfoBuffer(search, n + 1); - if (!tag) { - return RC_NO_MEMORY; - } - wcscpy_s(tag, n + 1, buffer); - wchar_t *slash = wcschr(tag, L'/'); - if (!slash) { - search->tag = tag; - search->tagLength = n; - search->oldStyleTag = true; - } else { - search->company = tag; - search->companyLength = (int)(slash - tag); - search->tag = slash + 1; - search->tagLength = n - (search->companyLength + 1); - search->oldStyleTag = false; - } - // gh-92817: allow a high priority env to be selected even if it - // doesn't match the tag - search->lowPriorityTag = true; - } - - return 0; -} - -/******************************************************************************\ - *** ENVIRONMENT SEARCH *** -\******************************************************************************/ - -typedef struct EnvironmentInfo { - /* We use a binary tree and sort on insert */ - struct EnvironmentInfo *prev; - struct EnvironmentInfo *next; - /* parent is only used when constructing */ - struct EnvironmentInfo *parent; - const wchar_t *company; - const wchar_t *tag; - int internalSortKey; - const wchar_t *installDir; - const wchar_t *executablePath; - const wchar_t *executableArgs; - const wchar_t *architecture; - const wchar_t *displayName; - bool highPriority; -} EnvironmentInfo; - - -int -copyWstr(const wchar_t **dest, const wchar_t *src) -{ - if (!dest) { - return RC_NO_MEMORY; - } - if (!src) { - *dest = NULL; - return 0; - } - size_t n = wcsnlen_s(src, MAXLEN - 1) + 1; - wchar_t *buffer = (wchar_t*)malloc(n * sizeof(wchar_t)); - if (!buffer) { - return RC_NO_MEMORY; - } - wcsncpy_s(buffer, n, src, n - 1); - *dest = (const wchar_t*)buffer; - return 0; -} - - -EnvironmentInfo * -newEnvironmentInfo(const wchar_t *company, const wchar_t *tag) -{ - EnvironmentInfo *env = (EnvironmentInfo *)malloc(sizeof(EnvironmentInfo)); - if (!env) { - return NULL; - } - memset(env, 0, sizeof(EnvironmentInfo)); - int exitCode = copyWstr(&env->company, company); - if (exitCode) { - free((void *)env); - return NULL; - } - exitCode = copyWstr(&env->tag, tag); - if (exitCode) { - free((void *)env->company); - free((void *)env); - return NULL; - } - return env; -} - - -void -freeEnvironmentInfo(EnvironmentInfo *env) -{ - if (env) { - free((void *)env->company); - free((void *)env->tag); - free((void *)env->installDir); - free((void *)env->executablePath); - free((void *)env->executableArgs); - free((void *)env->displayName); - freeEnvironmentInfo(env->prev); - env->prev = NULL; - freeEnvironmentInfo(env->next); - env->next = NULL; - free((void *)env); - } -} - - -/* Specific string comparisons for sorting the tree */ - -int -_compareCompany(const wchar_t *x, const wchar_t *y) -{ - if (!x && !y) { - return 0; - } else if (!x) { - return -1; - } else if (!y) { - return 1; - } - - bool coreX = 0 == _compare(x, -1, L"PythonCore", -1); - bool coreY = 0 == _compare(y, -1, L"PythonCore", -1); - if (coreX) { - return coreY ? 0 : -1; - } else if (coreY) { - return 1; - } - return _compare(x, -1, y, -1); -} - - -int -_compareTag(const wchar_t *x, const wchar_t *y) -{ - if (!x && !y) { - return 0; - } else if (!x) { - return -1; - } else if (!y) { - return 1; - } - - // Compare up to the first dash. If not equal, that's our sort order - const wchar_t *xDash = wcschr(x, L'-'); - const wchar_t *yDash = wcschr(y, L'-'); - int xToDash = xDash ? (int)(xDash - x) : -1; - int yToDash = yDash ? (int)(yDash - y) : -1; - int r = _compare(x, xToDash, y, yToDash); - if (r) { - return r; - } - // If we're equal up to the first dash, we want to sort one with - // no dash *after* one with a dash. Otherwise, a reversed compare. - // This works out because environments are sorted in descending tag - // order, so that higher versions (probably) come first. - // For PythonCore, our "X.Y" structure ensures that higher versions - // come first. Everyone else will just have to deal with it. - if (xDash && yDash) { - return _compare(yDash, -1, xDash, -1); - } else if (xDash) { - return -1; - } else if (yDash) { - return 1; - } - return 0; -} - - -int -addEnvironmentInfo(EnvironmentInfo **root, EnvironmentInfo* parent, EnvironmentInfo *node) -{ - EnvironmentInfo *r = *root; - if (!r) { - *root = node; - node->parent = parent; - return 0; - } - // Sort by company name - switch (_compareCompany(node->company, r->company)) { - case -1: - return addEnvironmentInfo(&r->prev, r, node); - case 1: - return addEnvironmentInfo(&r->next, r, node); - case 0: - break; - } - // Then by tag (descending) - switch (_compareTag(node->tag, r->tag)) { - case -1: - return addEnvironmentInfo(&r->next, r, node); - case 1: - return addEnvironmentInfo(&r->prev, r, node); - case 0: - break; - } - // Then keep the one with the lowest internal sort key - if (node->internalSortKey < r->internalSortKey) { - // Replace the current node - node->parent = r->parent; - if (node->parent) { - if (node->parent->prev == r) { - node->parent->prev = node; - } else if (node->parent->next == r) { - node->parent->next = node; - } else { - debug(L"# Inconsistent parent value in tree\n"); - freeEnvironmentInfo(node); - return RC_INTERNAL_ERROR; - } - } else { - // If node has no parent, then it is the root. - *root = node; - } - - node->next = r->next; - node->prev = r->prev; - - debug(L"# replaced %s/%s/%i in tree\n", node->company, node->tag, node->internalSortKey); - freeEnvironmentInfo(r); - } else { - debug(L"# not adding %s/%s/%i to tree\n", node->company, node->tag, node->internalSortKey); - return RC_DUPLICATE_ITEM; - } - return 0; -} - - -/******************************************************************************\ - *** REGISTRY SEARCH *** -\******************************************************************************/ - - -int -_registryReadString(const wchar_t **dest, HKEY root, const wchar_t *subkey, const wchar_t *value) -{ - // Note that this is bytes (hence 'cb'), not characters ('cch') - DWORD cbData = 0; - DWORD flags = RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ; - - if (ERROR_SUCCESS != RegGetValueW(root, subkey, value, flags, NULL, NULL, &cbData)) { - return 0; - } - - wchar_t *buffer = (wchar_t*)malloc(cbData); - if (!buffer) { - return RC_NO_MEMORY; - } - - if (ERROR_SUCCESS == RegGetValueW(root, subkey, value, flags, NULL, buffer, &cbData)) { - *dest = buffer; - } else { - free((void *)buffer); - } - return 0; -} - - -int -_combineWithInstallDir(const wchar_t **dest, const wchar_t *installDir, const wchar_t *fragment, int fragmentLength) -{ - wchar_t buffer[MAXLEN]; - wchar_t fragmentBuffer[MAXLEN]; - if (wcsncpy_s(fragmentBuffer, MAXLEN, fragment, fragmentLength)) { - return RC_NO_MEMORY; - } - - if (FAILED(PathCchCombineEx(buffer, MAXLEN, installDir, fragmentBuffer, PATHCCH_ALLOW_LONG_PATHS))) { - return RC_NO_MEMORY; - } - - return copyWstr(dest, buffer); -} - - -bool -_isLegacyVersion(EnvironmentInfo *env) -{ - // Check if backwards-compatibility is required. - // Specifically PythonCore versions 2.X and 3.0 - 3.5 do not implement PEP 514. - if (0 != _compare(env->company, -1, L"PythonCore", -1)) { - return false; - } - - int versionMajor, versionMinor; - int n = swscanf_s(env->tag, L"%d.%d", &versionMajor, &versionMinor); - if (n != 2) { - debug(L"# %s/%s has an invalid version tag\n", env->company, env->tag); - return false; - } - - return versionMajor == 2 - || (versionMajor == 3 && versionMinor >= 0 && versionMinor <= 5); -} - -int -_registryReadLegacyEnvironment(const SearchInfo *search, HKEY root, EnvironmentInfo *env, const wchar_t *fallbackArch) -{ - // Backwards-compatibility for PythonCore versions which do not implement PEP 514. - int exitCode = _combineWithInstallDir( - &env->executablePath, - env->installDir, - search->executable, - search->executableLength - ); - if (exitCode) { - return exitCode; - } - - if (search->windowed) { - exitCode = _registryReadString(&env->executableArgs, root, L"InstallPath", L"WindowedExecutableArguments"); - } - else { - exitCode = _registryReadString(&env->executableArgs, root, L"InstallPath", L"ExecutableArguments"); - } - if (exitCode) { - return exitCode; - } - - if (fallbackArch) { - copyWstr(&env->architecture, fallbackArch); - } else { - DWORD binaryType; - BOOL success = GetBinaryTypeW(env->executablePath, &binaryType); - if (!success) { - return RC_NO_PYTHON; - } - - switch (binaryType) { - case SCS_32BIT_BINARY: - copyWstr(&env->architecture, L"32bit"); - break; - case SCS_64BIT_BINARY: - copyWstr(&env->architecture, L"64bit"); - break; - default: - return RC_NO_PYTHON; - } - } - - if (0 == _compare(env->architecture, -1, L"32bit", -1)) { - size_t tagLength = wcslen(env->tag); - if (tagLength <= 3 || 0 != _compare(&env->tag[tagLength - 3], 3, L"-32", 3)) { - const wchar_t *rawTag = env->tag; - wchar_t *realTag = (wchar_t*) malloc(sizeof(wchar_t) * (tagLength + 4)); - if (!realTag) { - return RC_NO_MEMORY; - } - - int count = swprintf_s(realTag, tagLength + 4, L"%s-32", env->tag); - if (count == -1) { - debug(L"# Failed to generate 32bit tag\n"); - free(realTag); - return RC_INTERNAL_ERROR; - } - - env->tag = realTag; - free((void*)rawTag); - } - } - - wchar_t buffer[MAXLEN]; - if (swprintf_s(buffer, MAXLEN, L"Python %s", env->tag)) { - copyWstr(&env->displayName, buffer); - } - - return 0; -} - - -int -_registryReadEnvironment(const SearchInfo *search, HKEY root, EnvironmentInfo *env, const wchar_t *fallbackArch) -{ - int exitCode = _registryReadString(&env->installDir, root, L"InstallPath", NULL); - if (exitCode) { - return exitCode; - } - if (!env->installDir) { - return RC_NO_PYTHON; - } - - if (_isLegacyVersion(env)) { - return _registryReadLegacyEnvironment(search, root, env, fallbackArch); - } - - // If pythonw.exe requested, check specific value - if (search->windowed) { - exitCode = _registryReadString(&env->executablePath, root, L"InstallPath", L"WindowedExecutablePath"); - if (!exitCode && env->executablePath) { - exitCode = _registryReadString(&env->executableArgs, root, L"InstallPath", L"WindowedExecutableArguments"); - } - } - if (exitCode) { - return exitCode; - } - - // Missing windowed path or non-windowed request means we use ExecutablePath - if (!env->executablePath) { - exitCode = _registryReadString(&env->executablePath, root, L"InstallPath", L"ExecutablePath"); - if (!exitCode && env->executablePath) { - exitCode = _registryReadString(&env->executableArgs, root, L"InstallPath", L"ExecutableArguments"); - } - } - if (exitCode) { - return exitCode; - } - - if (!env->executablePath) { - debug(L"# %s/%s has no executable path\n", env->company, env->tag); - return RC_NO_PYTHON; - } - - exitCode = _registryReadString(&env->architecture, root, NULL, L"SysArchitecture"); - if (exitCode) { - return exitCode; - } - - exitCode = _registryReadString(&env->displayName, root, NULL, L"DisplayName"); - if (exitCode) { - return exitCode; - } - - return 0; -} - -int -_registrySearchTags(const SearchInfo *search, EnvironmentInfo **result, HKEY root, int sortKey, const wchar_t *company, const wchar_t *fallbackArch) -{ - wchar_t buffer[256]; - int err = 0; - int exitCode = 0; - for (int i = 0; exitCode == 0; ++i) { - DWORD cchBuffer = sizeof(buffer) / sizeof(buffer[0]); - err = RegEnumKeyExW(root, i, buffer, &cchBuffer, NULL, NULL, NULL, NULL); - if (err) { - if (err != ERROR_NO_MORE_ITEMS) { - winerror(0, L"Failed to read installs (tags) from the registry"); - } - break; - } - HKEY subkey; - if (ERROR_SUCCESS == RegOpenKeyExW(root, buffer, 0, KEY_READ, &subkey)) { - EnvironmentInfo *env = newEnvironmentInfo(company, buffer); - env->internalSortKey = sortKey; - exitCode = _registryReadEnvironment(search, subkey, env, fallbackArch); - RegCloseKey(subkey); - if (exitCode == RC_NO_PYTHON) { - freeEnvironmentInfo(env); - exitCode = 0; - } else if (!exitCode) { - exitCode = addEnvironmentInfo(result, NULL, env); - if (exitCode) { - freeEnvironmentInfo(env); - if (exitCode == RC_DUPLICATE_ITEM) { - exitCode = 0; - } - } - } - } - } - return exitCode; -} - - -int -registrySearch(const SearchInfo *search, EnvironmentInfo **result, HKEY root, int sortKey, const wchar_t *fallbackArch) -{ - wchar_t buffer[256]; - int err = 0; - int exitCode = 0; - for (int i = 0; exitCode == 0; ++i) { - DWORD cchBuffer = sizeof(buffer) / sizeof(buffer[0]); - err = RegEnumKeyExW(root, i, buffer, &cchBuffer, NULL, NULL, NULL, NULL); - if (err) { - if (err != ERROR_NO_MORE_ITEMS) { - winerror(0, L"Failed to read distributors (company) from the registry"); - } - break; - } - if (search->limitToCompany && 0 != _compare(search->limitToCompany, -1, buffer, cchBuffer)) { - debug(L"# Skipping %s due to PYLAUNCHER_LIMIT_TO_COMPANY\n", buffer); - continue; - } - HKEY subkey; - if (ERROR_SUCCESS == RegOpenKeyExW(root, buffer, 0, KEY_READ, &subkey)) { - exitCode = _registrySearchTags(search, result, subkey, sortKey, buffer, fallbackArch); - RegCloseKey(subkey); - } - } - return exitCode; -} - - -/******************************************************************************\ - *** APP PACKAGE SEARCH *** -\******************************************************************************/ - -int -appxSearch(const SearchInfo *search, EnvironmentInfo **result, const wchar_t *packageFamilyName, const wchar_t *tag, int sortKey) -{ - wchar_t realTag[32]; - wchar_t buffer[MAXLEN]; - const wchar_t *exeName = search->executable; - if (!exeName || search->allowExecutableOverride) { - exeName = search->windowed ? L"pythonw.exe" : L"python.exe"; - } - - // Failure to get LocalAppData may just mean we're running as a user who - // doesn't have a profile directory. - // In this case, return "not found", but don't fail. - // Chances are they can't launch Store installs anyway. - if (FAILED(SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, buffer))) { - return RC_NO_PYTHON; - } - - if (!join(buffer, MAXLEN, L"Microsoft\\WindowsApps") || - !join(buffer, MAXLEN, packageFamilyName) || - !join(buffer, MAXLEN, exeName)) { - debug(L"# Failed to construct App Execution Alias path\n"); - return RC_INTERNAL_ERROR; - } - - if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(buffer)) { - return RC_NO_PYTHON; - } - - // Assume packages are native architecture, which means we need to append - // the '-arm64' on ARM64 host. - wcscpy_s(realTag, 32, tag); - if (isARM64Host()) { - wcscat_s(realTag, 32, L"-arm64"); - } - - EnvironmentInfo *env = newEnvironmentInfo(L"PythonCore", realTag); - if (!env) { - return RC_NO_MEMORY; - } - env->internalSortKey = sortKey; - if (isAMD64Host()) { - copyWstr(&env->architecture, L"64bit"); - } else if (isARM64Host()) { - copyWstr(&env->architecture, L"ARM64"); - } - - copyWstr(&env->executablePath, buffer); - - if (swprintf_s(buffer, MAXLEN, L"Python %s (Store)", tag)) { - copyWstr(&env->displayName, buffer); - } - - int exitCode = addEnvironmentInfo(result, NULL, env); - if (exitCode) { - freeEnvironmentInfo(env); - if (exitCode == RC_DUPLICATE_ITEM) { - exitCode = 0; - } - } - - - return exitCode; -} - - -/******************************************************************************\ - *** OVERRIDDEN EXECUTABLE PATH *** -\******************************************************************************/ - - -int -explicitOverrideSearch(const SearchInfo *search, EnvironmentInfo **result) -{ - if (!search->executablePath) { - return 0; - } - - EnvironmentInfo *env = newEnvironmentInfo(NULL, NULL); - if (!env) { - return RC_NO_MEMORY; - } - env->internalSortKey = 10; - int exitCode = copyWstr(&env->executablePath, search->executablePath); - if (exitCode) { - goto abort; - } - exitCode = copyWstr(&env->displayName, L"Explicit override"); - if (exitCode) { - goto abort; - } - exitCode = addEnvironmentInfo(result, NULL, env); - if (exitCode) { - goto abort; - } - return 0; - -abort: - freeEnvironmentInfo(env); - if (exitCode == RC_DUPLICATE_ITEM) { - exitCode = 0; - } - return exitCode; -} - - -/******************************************************************************\ - *** ACTIVE VIRTUAL ENVIRONMENT SEARCH *** -\******************************************************************************/ - -int -virtualenvSearch(const SearchInfo *search, EnvironmentInfo **result) -{ - int exitCode = 0; - EnvironmentInfo *env = NULL; - wchar_t buffer[MAXLEN]; - int n = GetEnvironmentVariableW(L"VIRTUAL_ENV", buffer, MAXLEN); - if (!n || !join(buffer, MAXLEN, L"Scripts") || !join(buffer, MAXLEN, search->executable)) { - return 0; - } - - DWORD attr = GetFileAttributesW(buffer); - if (INVALID_FILE_ATTRIBUTES == attr && search->lowPriorityTag) { - if (!split_parent(buffer, MAXLEN) || !join(buffer, MAXLEN, L"python.exe")) { - return 0; - } - attr = GetFileAttributesW(buffer); - } - - if (INVALID_FILE_ATTRIBUTES == attr) { - debug(L"Python executable %s missing from virtual env\n", buffer); - return 0; - } - - env = newEnvironmentInfo(NULL, NULL); - if (!env) { - return RC_NO_MEMORY; - } - env->highPriority = true; - env->internalSortKey = 20; - exitCode = copyWstr(&env->displayName, L"Active venv"); - if (exitCode) { - goto abort; - } - exitCode = copyWstr(&env->executablePath, buffer); - if (exitCode) { - goto abort; - } - exitCode = addEnvironmentInfo(result, NULL, env); - if (exitCode) { - goto abort; - } - return 0; - -abort: - freeEnvironmentInfo(env); - if (exitCode == RC_DUPLICATE_ITEM) { - return 0; - } - return exitCode; -} - -/******************************************************************************\ - *** COLLECT ENVIRONMENTS *** -\******************************************************************************/ - - -struct RegistrySearchInfo { - // Registry subkey to search - const wchar_t *subkey; - // Registry hive to search - HKEY hive; - // Flags to use when opening the subkey - DWORD flags; - // Internal sort key to select between "identical" environments discovered - // through different methods - int sortKey; - // Fallback value to assume for PythonCore entries missing a SysArchitecture value - const wchar_t *fallbackArch; -}; - - -struct RegistrySearchInfo REGISTRY_SEARCH[] = { - { - L"Software\\Python", - HKEY_CURRENT_USER, - KEY_READ, - 1, - NULL - }, - { - L"Software\\Python", - HKEY_LOCAL_MACHINE, - KEY_READ | KEY_WOW64_64KEY, - 3, - L"64bit" - }, - { - L"Software\\Python", - HKEY_LOCAL_MACHINE, - KEY_READ | KEY_WOW64_32KEY, - 4, - L"32bit" - }, - { NULL, 0, 0, 0, NULL } -}; - - -struct AppxSearchInfo { - // The package family name. Can be found for an installed package using the - // Powershell "Get-AppxPackage" cmdlet - const wchar_t *familyName; - // The tag to treat the installation as - const wchar_t *tag; - // Internal sort key to select between "identical" environments discovered - // through different methods - int sortKey; -}; - - -struct AppxSearchInfo APPX_SEARCH[] = { - // Releases made through the Store - { L"PythonSoftwareFoundation.Python.3.14_qbz5n2kfra8p0", L"3.14", 10 }, - { L"PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0", L"3.13", 10 }, - { L"PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0", L"3.12", 10 }, - { L"PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0", L"3.11", 10 }, - { L"PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0", L"3.10", 10 }, - { L"PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0", L"3.9", 10 }, - { L"PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0", L"3.8", 10 }, - - // Side-loadable releases. Note that the publisher ID changes whenever we - // change our code signing certificate subject, so the newer IDs have higher - // priorities (lower sortKey) - { L"PythonSoftwareFoundation.Python.3.14_3847v3x7pw1km", L"3.14", 11 }, - { L"PythonSoftwareFoundation.Python.3.13_3847v3x7pw1km", L"3.13", 11 }, - { L"PythonSoftwareFoundation.Python.3.12_3847v3x7pw1km", L"3.12", 11 }, - { L"PythonSoftwareFoundation.Python.3.11_3847v3x7pw1km", L"3.11", 11 }, - { L"PythonSoftwareFoundation.Python.3.11_hd69rhyc2wevp", L"3.11", 12 }, - { L"PythonSoftwareFoundation.Python.3.10_3847v3x7pw1km", L"3.10", 11 }, - { L"PythonSoftwareFoundation.Python.3.10_hd69rhyc2wevp", L"3.10", 12 }, - { L"PythonSoftwareFoundation.Python.3.9_3847v3x7pw1km", L"3.9", 11 }, - { L"PythonSoftwareFoundation.Python.3.9_hd69rhyc2wevp", L"3.9", 12 }, - { L"PythonSoftwareFoundation.Python.3.8_hd69rhyc2wevp", L"3.8", 12 }, - { NULL, NULL, 0 } -}; - - -int -collectEnvironments(const SearchInfo *search, EnvironmentInfo **result) -{ - int exitCode = 0; - HKEY root; - EnvironmentInfo *env = NULL; - - if (!result) { - debug(L"# collectEnvironments() was passed a NULL result\n"); - return RC_INTERNAL_ERROR; - } - *result = NULL; - - exitCode = explicitOverrideSearch(search, result); - if (exitCode) { - return exitCode; - } - - exitCode = virtualenvSearch(search, result); - if (exitCode) { - return exitCode; - } - - // If we aren't collecting all items to list them, we can exit now. - if (env && !(search->list || search->listPaths)) { - return 0; - } - - for (struct RegistrySearchInfo *info = REGISTRY_SEARCH; info->subkey; ++info) { - if (ERROR_SUCCESS == RegOpenKeyExW(info->hive, info->subkey, 0, info->flags, &root)) { - exitCode = registrySearch(search, result, root, info->sortKey, info->fallbackArch); - RegCloseKey(root); - } - if (exitCode) { - return exitCode; - } - } - - if (search->limitToCompany) { - debug(L"# Skipping APPX search due to PYLAUNCHER_LIMIT_TO_COMPANY\n"); - return 0; - } - - for (struct AppxSearchInfo *info = APPX_SEARCH; info->familyName; ++info) { - exitCode = appxSearch(search, result, info->familyName, info->tag, info->sortKey); - if (exitCode && exitCode != RC_NO_PYTHON) { - return exitCode; - } - } - - return 0; -} - - -/******************************************************************************\ - *** INSTALL ON DEMAND *** -\******************************************************************************/ - -struct StoreSearchInfo { - // The tag a user is looking for - const wchar_t *tag; - // The Store ID for a package if it can be installed from the Microsoft - // Store. These are obtained from the dashboard at - // https://partner.microsoft.com/dashboard - const wchar_t *storeId; -}; - - -struct StoreSearchInfo STORE_SEARCH[] = { - { L"3", /* 3.13 */ L"9PNRBTZXMB4Z" }, - { L"3.14", L"9NTRHQCBBPR8" }, - { L"3.13", L"9PNRBTZXMB4Z" }, - { L"3.12", L"9NCVDN91XZQP" }, - { L"3.11", L"9NRWMJP3717K" }, - { L"3.10", L"9PJPW5LDXLZ5" }, - { L"3.9", L"9P7QFQMJRFP7" }, - { L"3.8", L"9MSSZTT1N39L" }, - { NULL, NULL } -}; - - -int -_installEnvironment(const wchar_t *command, const wchar_t *arguments) -{ - SHELLEXECUTEINFOW siw = { - sizeof(SHELLEXECUTEINFOW), - SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE, - NULL, NULL, - command, arguments, NULL, - SW_SHOWNORMAL - }; - - debug(L"# Installing with %s %s\n", command, arguments); - if (isEnvVarSet(L"PYLAUNCHER_DRYRUN")) { - debug(L"# Exiting due to PYLAUNCHER_DRYRUN\n"); - fflush(stdout); - int mode = _setmode(_fileno(stdout), _O_U8TEXT); - if (arguments) { - fwprintf_s(stdout, L"\"%s\" %s\n", command, arguments); - } else { - fwprintf_s(stdout, L"\"%s\"\n", command); - } - fflush(stdout); - if (mode >= 0) { - _setmode(_fileno(stdout), mode); - } - return RC_INSTALLING; - } - - if (!ShellExecuteExW(&siw)) { - return RC_NO_PYTHON; - } - - if (!siw.hProcess) { - return RC_INSTALLING; - } - - WaitForSingleObjectEx(siw.hProcess, INFINITE, FALSE); - DWORD exitCode = 0; - if (GetExitCodeProcess(siw.hProcess, &exitCode) && exitCode == 0) { - return 0; - } - return RC_INSTALLING; -} - - -const wchar_t *WINGET_COMMAND = L"Microsoft\\WindowsApps\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\winget.exe"; -const wchar_t *WINGET_ARGUMENTS = L"install -q %s --exact --accept-package-agreements --source msstore"; - -const wchar_t *MSSTORE_COMMAND = L"ms-windows-store://pdp/?productid=%s"; - -int -installEnvironment(const SearchInfo *search) -{ - // No tag? No installing - if (!search->tag || !search->tagLength) { - debug(L"# Cannot install Python with no tag specified\n"); - return RC_NO_PYTHON; - } - - // PEP 514 tag but not PythonCore? No installing - if (!search->oldStyleTag && - search->company && search->companyLength && - 0 != _compare(search->company, search->companyLength, L"PythonCore", -1)) { - debug(L"# Cannot install for company %.*s\n", search->companyLength, search->company); - return RC_NO_PYTHON; - } - - const wchar_t *storeId = NULL; - for (struct StoreSearchInfo *info = STORE_SEARCH; info->tag; ++info) { - if (0 == _compare(search->tag, search->tagLength, info->tag, -1)) { - storeId = info->storeId; - break; - } - } - - if (!storeId) { - return RC_NO_PYTHON; - } - - int exitCode; - wchar_t command[MAXLEN]; - wchar_t arguments[MAXLEN]; - if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, command)) && - join(command, MAXLEN, WINGET_COMMAND) && - swprintf_s(arguments, MAXLEN, WINGET_ARGUMENTS, storeId)) { - if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(command)) { - formatWinerror(GetLastError(), arguments, MAXLEN); - debug(L"# Skipping %s: %s\n", command, arguments); - } else { - fputws(L"Launching winget to install Python. The following output is from the install process\n\ -***********************************************************************\n", stdout); - exitCode = _installEnvironment(command, arguments); - if (exitCode == RC_INSTALLING) { - fputws(L"***********************************************************************\n\ -Please check the install status and run your command again.", stderr); - return exitCode; - } else if (exitCode) { - return exitCode; - } - fputws(L"***********************************************************************\n\ -Install appears to have succeeded. Searching for new matching installs.\n", stdout); - return 0; - } - } - - if (swprintf_s(command, MAXLEN, MSSTORE_COMMAND, storeId)) { - fputws(L"Opening the Microsoft Store to install Python. After installation, " - L"please run your command again.\n", stderr); - exitCode = _installEnvironment(command, NULL); - if (exitCode) { - return exitCode; - } - return 0; - } - - return RC_NO_PYTHON; -} - -/******************************************************************************\ - *** ENVIRONMENT SELECT *** -\******************************************************************************/ - -bool -_companyMatches(const SearchInfo *search, const EnvironmentInfo *env) -{ - if (!search->company || !search->companyLength) { - return true; - } - return 0 == _compare(env->company, -1, search->company, search->companyLength); -} - - -bool -_tagMatches(const SearchInfo *search, const EnvironmentInfo *env, int searchTagLength) -{ - if (searchTagLength < 0) { - searchTagLength = search->tagLength; - } - if (!search->tag || !searchTagLength) { - return true; - } - return _startsWithSeparated(env->tag, -1, search->tag, searchTagLength, L".-"); -} - - -bool -_is32Bit(const EnvironmentInfo *env) -{ - if (env->architecture) { - return 0 == _compare(env->architecture, -1, L"32bit", -1); - } - return false; -} - - -int -_selectEnvironment(const SearchInfo *search, EnvironmentInfo *env, EnvironmentInfo **best) -{ - int exitCode = 0; - while (env) { - exitCode = _selectEnvironment(search, env->prev, best); - - if (exitCode && exitCode != RC_NO_PYTHON) { - return exitCode; - } else if (!exitCode && *best) { - return 0; - } - - if (env->highPriority && search->lowPriorityTag) { - // This environment is marked high priority, and the search allows - // it to be selected even though a tag is specified, so select it - // gh-92817: this allows an active venv to be selected even when a - // default tag has been found in py.ini or the environment - *best = env; - return 0; - } - - if (!search->oldStyleTag) { - if (_companyMatches(search, env) && _tagMatches(search, env, -1)) { - // Because of how our sort tree is set up, we will walk up the - // "prev" side and implicitly select the "best" best. By - // returning straight after a match, we skip the entire "next" - // branch and won't ever select a "worse" best. - *best = env; - return 0; - } - } else if (0 == _compare(env->company, -1, L"PythonCore", -1)) { - // Old-style tags can only match PythonCore entries - - // If the tag ends with -64, we want to exclude 32-bit runtimes - // (If the tag ends with -32, it will be filtered later) - int tagLength = search->tagLength; - bool exclude32Bit = false, only32Bit = false; - if (tagLength > 3) { - if (0 == _compareArgument(&search->tag[tagLength - 3], 3, L"-64", 3)) { - tagLength -= 3; - exclude32Bit = true; - } else if (0 == _compareArgument(&search->tag[tagLength - 3], 3, L"-32", 3)) { - tagLength -= 3; - only32Bit = true; - } - } - - if (_tagMatches(search, env, tagLength)) { - if (exclude32Bit && _is32Bit(env)) { - debug(L"# Excluding %s/%s because it looks like 32bit\n", env->company, env->tag); - } else if (only32Bit && !_is32Bit(env)) { - debug(L"# Excluding %s/%s because it doesn't look 32bit\n", env->company, env->tag); - } else { - *best = env; - return 0; - } - } - } - - env = env->next; - } - return RC_NO_PYTHON; -} - -int -selectEnvironment(const SearchInfo *search, EnvironmentInfo *root, EnvironmentInfo **best) -{ - if (!best) { - debug(L"# selectEnvironment() was passed a NULL best\n"); - return RC_INTERNAL_ERROR; - } - if (!root) { - *best = NULL; - return RC_NO_PYTHON_AT_ALL; - } - - EnvironmentInfo *result = NULL; - int exitCode = _selectEnvironment(search, root, &result); - if (!exitCode) { - *best = result; - } - - return exitCode; -} - - -/******************************************************************************\ - *** LIST ENVIRONMENTS *** -\******************************************************************************/ - -#define TAGWIDTH 16 - -int -_printEnvironment(const EnvironmentInfo *env, FILE *out, bool showPath, const wchar_t *argument) -{ - if (showPath) { - if (env->executablePath && env->executablePath[0]) { - if (env->executableArgs && env->executableArgs[0]) { - fwprintf(out, L" %-*s %s %s\n", TAGWIDTH, argument, env->executablePath, env->executableArgs); - } else { - fwprintf(out, L" %-*s %s\n", TAGWIDTH, argument, env->executablePath); - } - } else if (env->installDir && env->installDir[0]) { - fwprintf(out, L" %-*s %s\n", TAGWIDTH, argument, env->installDir); - } else { - fwprintf(out, L" %s\n", argument); - } - } else if (env->displayName) { - fwprintf(out, L" %-*s %s\n", TAGWIDTH, argument, env->displayName); - } else { - fwprintf(out, L" %s\n", argument); - } - return 0; -} - - -int -_listAllEnvironments(EnvironmentInfo *env, FILE * out, bool showPath, EnvironmentInfo *defaultEnv) -{ - wchar_t buffer[256]; - const int bufferSize = 256; - while (env) { - int exitCode = _listAllEnvironments(env->prev, out, showPath, defaultEnv); - if (exitCode) { - return exitCode; - } - - if (!env->company || !env->tag) { - buffer[0] = L'\0'; - } else if (0 == _compare(env->company, -1, L"PythonCore", -1)) { - swprintf_s(buffer, bufferSize, L"-V:%s", env->tag); - } else { - swprintf_s(buffer, bufferSize, L"-V:%s/%s", env->company, env->tag); - } - - if (env == defaultEnv) { - wcscat_s(buffer, bufferSize, L" *"); - } - - if (buffer[0]) { - exitCode = _printEnvironment(env, out, showPath, buffer); - if (exitCode) { - return exitCode; - } - } - - env = env->next; - } - return 0; -} - - -int -listEnvironments(EnvironmentInfo *env, FILE * out, bool showPath, EnvironmentInfo *defaultEnv) -{ - if (!env) { - fwprintf_s(stdout, L"No installed Pythons found!\n"); - return 0; - } - - /* TODO: Do we want to display these? - In favour, helps users see that '-3' is a good option - Against, repeats the next line of output - SearchInfo majorSearch; - EnvironmentInfo *major; - int exitCode; - - if (showPath) { - memset(&majorSearch, 0, sizeof(majorSearch)); - majorSearch.company = L"PythonCore"; - majorSearch.companyLength = -1; - majorSearch.tag = L"3"; - majorSearch.tagLength = -1; - majorSearch.oldStyleTag = true; - major = NULL; - exitCode = selectEnvironment(&majorSearch, env, &major); - if (!exitCode && major) { - exitCode = _printEnvironment(major, out, showPath, L"-3 *"); - isDefault = false; - if (exitCode) { - return exitCode; - } - } - majorSearch.tag = L"2"; - major = NULL; - exitCode = selectEnvironment(&majorSearch, env, &major); - if (!exitCode && major) { - exitCode = _printEnvironment(major, out, showPath, L"-2"); - if (exitCode) { - return exitCode; - } - } - } - */ - - int mode = _setmode(_fileno(out), _O_U8TEXT); - int exitCode = _listAllEnvironments(env, out, showPath, defaultEnv); - fflush(out); - if (mode >= 0) { - _setmode(_fileno(out), mode); - } - return exitCode; -} - - -/******************************************************************************\ - *** INTERPRETER LAUNCH *** -\******************************************************************************/ - - -int -calculateCommandLine(const SearchInfo *search, const EnvironmentInfo *launch, wchar_t *buffer, int bufferLength) -{ - int exitCode = 0; - const wchar_t *executablePath = NULL; - - // Construct command line from a search override, or else the selected - // environment's executablePath - if (search->executablePath) { - executablePath = search->executablePath; - } else if (launch && launch->executablePath) { - executablePath = launch->executablePath; - } - - // If we have an executable path, put it at the start of the command, but - // only if the search allowed an override. - // Otherwise, use the environment's installDir and the search's default - // executable name. - if (executablePath && search->allowExecutableOverride) { - if (wcschr(executablePath, L' ') && executablePath[0] != L'"') { - buffer[0] = L'"'; - exitCode = wcscpy_s(&buffer[1], bufferLength - 1, executablePath); - if (!exitCode) { - exitCode = wcscat_s(buffer, bufferLength, L"\""); - } - } else { - exitCode = wcscpy_s(buffer, bufferLength, executablePath); - } - } else if (launch) { - if (!launch->installDir) { - fwprintf_s(stderr, L"Cannot launch %s %s because no install directory was specified", - launch->company, launch->tag); - exitCode = RC_NO_PYTHON; - } else if (!search->executable || !search->executableLength) { - fwprintf_s(stderr, L"Cannot launch %s %s because no executable name is available", - launch->company, launch->tag); - exitCode = RC_NO_PYTHON; - } else { - wchar_t executable[256]; - wcsncpy_s(executable, 256, search->executable, search->executableLength); - if ((wcschr(launch->installDir, L' ') && launch->installDir[0] != L'"') || - (wcschr(executable, L' ') && executable[0] != L'"')) { - buffer[0] = L'"'; - exitCode = wcscpy_s(&buffer[1], bufferLength - 1, launch->installDir); - if (!exitCode) { - exitCode = join(buffer, bufferLength, executable) ? 0 : RC_NO_MEMORY; - } - if (!exitCode) { - exitCode = wcscat_s(buffer, bufferLength, L"\""); - } - } else { - exitCode = wcscpy_s(buffer, bufferLength, launch->installDir); - if (!exitCode) { - exitCode = join(buffer, bufferLength, executable) ? 0 : RC_NO_MEMORY; - } - } - } - } else { - exitCode = RC_NO_PYTHON; - } - - if (!exitCode && launch && launch->executableArgs) { - exitCode = wcscat_s(buffer, bufferLength, L" "); - if (!exitCode) { - exitCode = wcscat_s(buffer, bufferLength, launch->executableArgs); - } - } - - if (!exitCode && search->executableArgs) { - if (search->executableArgsLength < 0) { - exitCode = wcscat_s(buffer, bufferLength, search->executableArgs); - } else if (search->executableArgsLength > 0) { - int end = (int)wcsnlen_s(buffer, MAXLEN); - if (end < bufferLength - (search->executableArgsLength + 1)) { - exitCode = wcsncpy_s(&buffer[end], bufferLength - end, - search->executableArgs, search->executableArgsLength); - } - } - } - - if (!exitCode && search->restOfCmdLine) { - exitCode = wcscat_s(buffer, bufferLength, search->restOfCmdLine); - } - - return exitCode; -} - - - -BOOL -_safeDuplicateHandle(HANDLE in, HANDLE * pout, const wchar_t *nameForError) -{ - BOOL ok; - HANDLE process = GetCurrentProcess(); - DWORD rc; - - *pout = NULL; - ok = DuplicateHandle(process, in, process, pout, 0, TRUE, - DUPLICATE_SAME_ACCESS); - if (!ok) { - rc = GetLastError(); - if (rc == ERROR_INVALID_HANDLE) { - debug(L"DuplicateHandle returned ERROR_INVALID_HANDLE\n"); - ok = TRUE; - } - else { - winerror(0, L"Failed to duplicate %s handle", nameForError); - } - } - return ok; -} - -BOOL WINAPI -ctrl_c_handler(DWORD code) -{ - return TRUE; /* We just ignore all control events. */ -} - - -int -launchEnvironment(const SearchInfo *search, const EnvironmentInfo *launch, wchar_t *launchCommand) -{ - HANDLE job; - JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - DWORD rc; - BOOL ok; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - - // If this is a dryrun, do not actually launch - if (isEnvVarSet(L"PYLAUNCHER_DRYRUN")) { - debug(L"LaunchCommand: %s\n", launchCommand); - debug(L"# Exiting due to PYLAUNCHER_DRYRUN variable\n"); - fflush(stdout); - int mode = _setmode(_fileno(stdout), _O_U8TEXT); - fwprintf(stdout, L"%s\n", launchCommand); - fflush(stdout); - if (mode >= 0) { - _setmode(_fileno(stdout), mode); - } - return 0; - } - -#if defined(_WINDOWS) - /* - When explorer launches a Windows (GUI) application, it displays - the "app starting" (the "pointer + hourglass") cursor for a number - of seconds, or until the app does something UI-ish (eg, creating a - window, or fetching a message). As this launcher doesn't do this - directly, that cursor remains even after the child process does these - things. We avoid that by doing a simple post+get message. - See http://bugs.python.org/issue17290 - */ - MSG msg; - - PostMessage(0, 0, 0, 0); - GetMessage(&msg, 0, 0, 0); -#endif - - debug(L"# about to run: %s\n", launchCommand); - job = CreateJobObject(NULL, NULL); - ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation, - &info, sizeof(info), &rc); - if (!ok || (rc != sizeof(info)) || !job) { - winerror(0, L"Failed to query job information"); - return RC_CREATE_PROCESS; - } - info.BasicLimitInformation.LimitFlags |= JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | - JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK; - ok = SetInformationJobObject(job, JobObjectExtendedLimitInformation, &info, - sizeof(info)); - if (!ok) { - winerror(0, L"Failed to update job information"); - return RC_CREATE_PROCESS; - } - memset(&si, 0, sizeof(si)); - GetStartupInfoW(&si); - if (!_safeDuplicateHandle(GetStdHandle(STD_INPUT_HANDLE), &si.hStdInput, L"stdin") || - !_safeDuplicateHandle(GetStdHandle(STD_OUTPUT_HANDLE), &si.hStdOutput, L"stdout") || - !_safeDuplicateHandle(GetStdHandle(STD_ERROR_HANDLE), &si.hStdError, L"stderr")) { - return RC_NO_STD_HANDLES; - } - - ok = SetConsoleCtrlHandler(ctrl_c_handler, TRUE); - if (!ok) { - winerror(0, L"Failed to update Control-C handler"); - return RC_NO_STD_HANDLES; - } - - si.dwFlags = STARTF_USESTDHANDLES; - ok = CreateProcessW(NULL, launchCommand, NULL, NULL, TRUE, - 0, NULL, NULL, &si, &pi); - if (!ok) { - winerror(0, L"Unable to create process using '%s'", launchCommand); - return RC_CREATE_PROCESS; - } - AssignProcessToJobObject(job, pi.hProcess); - CloseHandle(pi.hThread); - WaitForSingleObjectEx(pi.hProcess, INFINITE, FALSE); - ok = GetExitCodeProcess(pi.hProcess, &rc); - if (!ok) { - winerror(0, L"Failed to get exit code of process"); - return RC_CREATE_PROCESS; - } - debug(L"child process exit code: %d\n", rc); - return rc; -} - - -/******************************************************************************\ - *** PROCESS CONTROLLER *** -\******************************************************************************/ - - -int -performSearch(SearchInfo *search, EnvironmentInfo **envs) -{ - // First parse the command line for options - int exitCode = parseCommandLine(search); - if (exitCode) { - return exitCode; - } - - // Check for a shebang line in our script file - // (or return quickly if no script file was specified) - exitCode = checkShebang(search); - switch (exitCode) { - case 0: - case RC_NO_SHEBANG: - case RC_RECURSIVE_SHEBANG: - break; - case RC_NO_SCRIPT: - if (!_comparePath(search->scriptFile, search->scriptFileLength, L"install", -1) || - !_comparePath(search->scriptFile, search->scriptFileLength, L"uninstall", -1) || - !_comparePath(search->scriptFile, search->scriptFileLength, L"list", -1) || - !_comparePath(search->scriptFile, search->scriptFileLength, L"help", -1)) { - fprintf( - stderr, - "WARNING: The '%.*ls' command is unavailable because this is the legacy py.exe command.\n" - "If you have already installed the Python install manager, open Installed Apps and " - "remove 'Python Launcher' to enable the new py.exe command.\n", - search->scriptFileLength, - search->scriptFile - ); - } - break; - default: - return exitCode; - } - - // Resolve old-style tags (possibly from a shebang) against py.ini entries - // and environment variables. - exitCode = checkDefaults(search); - if (exitCode) { - return exitCode; - } - - // If debugging is enabled, list our search criteria - dumpSearchInfo(search); - - // Find all matching environments - exitCode = collectEnvironments(search, envs); - if (exitCode) { - return exitCode; - } - - return 0; -} - - -int -process(int argc, wchar_t ** argv) -{ - int exitCode = 0; - int searchExitCode = 0; - SearchInfo search = {0}; - EnvironmentInfo *envs = NULL; - EnvironmentInfo *env = NULL; - wchar_t launchCommand[MAXLEN]; - - memset(launchCommand, 0, sizeof(launchCommand)); - - if (isEnvVarSet(L"PYLAUNCHER_DEBUG")) { - setvbuf(stderr, (char *)NULL, _IONBF, 0); - log_fp = stderr; - debug(L"argv0: %s\nversion: %S\n", argv[0], PY_VERSION); - } - - DWORD len = GetEnvironmentVariableW(L"PYLAUNCHER_LIMIT_TO_COMPANY", NULL, 0); - if (len > 1) { - wchar_t *limitToCompany = allocSearchInfoBuffer(&search, len); - if (!limitToCompany) { - exitCode = RC_NO_MEMORY; - winerror(0, L"Failed to allocate internal buffer"); - goto abort; - } - search.limitToCompany = limitToCompany; - if (0 == GetEnvironmentVariableW(L"PYLAUNCHER_LIMIT_TO_COMPANY", limitToCompany, len)) { - exitCode = RC_INTERNAL_ERROR; - winerror(0, L"Failed to read PYLAUNCHER_LIMIT_TO_COMPANY variable"); - goto abort; - } - } - - search.originalCmdLine = GetCommandLineW(); - - exitCode = performSearch(&search, &envs); - if (exitCode) { - goto abort; - } - - // Display the help text, but only exit on error - if (search.help) { - exitCode = showHelpText(argv); - if (exitCode) { - goto abort; - } - } - - // Select best environment - // This is early so that we can show the default when listing, but all - // responses to any errors occur later. - searchExitCode = selectEnvironment(&search, envs, &env); - - // List all environments, then exit - if (search.list || search.listPaths) { - exitCode = listEnvironments(envs, stdout, search.listPaths, env); - goto abort; - } - - // When debugging, list all discovered environments anyway - if (log_fp) { - exitCode = listEnvironments(envs, log_fp, true, NULL); - if (exitCode) { - goto abort; - } - } - - // We searched earlier, so if we didn't find anything, now we react - exitCode = searchExitCode; - // If none found, and if permitted, install it - if (exitCode == RC_NO_PYTHON && isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL") || - isEnvVarSet(L"PYLAUNCHER_ALWAYS_INSTALL")) { - exitCode = installEnvironment(&search); - if (!exitCode) { - // Successful install, so we need to re-scan and select again - env = NULL; - exitCode = performSearch(&search, &envs); - if (exitCode) { - goto abort; - } - exitCode = selectEnvironment(&search, envs, &env); - } - } - if (exitCode == RC_NO_PYTHON) { - fputws(L"No suitable Python runtime found\n", stderr); - fputws(L"Pass --list (-0) to see all detected environments on your machine\n", stderr); - if (!isEnvVarSet(L"PYLAUNCHER_ALLOW_INSTALL") && search.oldStyleTag) { - fputws(L"or set environment variable PYLAUNCHER_ALLOW_INSTALL to use winget\n" - L"or open the Microsoft Store to the requested version.\n", stderr); - } - goto abort; - } - if (exitCode == RC_NO_PYTHON_AT_ALL) { - fputws(L"No installed Python found!\n", stderr); - goto abort; - } - if (exitCode) { - goto abort; - } - - if (env) { - debug(L"env.company: %s\nenv.tag: %s\n", env->company, env->tag); - } else { - debug(L"env.company: (null)\nenv.tag: (null)\n"); - } - - exitCode = calculateCommandLine(&search, env, launchCommand, sizeof(launchCommand) / sizeof(launchCommand[0])); - if (exitCode) { - goto abort; - } - - // Launch selected runtime - exitCode = launchEnvironment(&search, env, launchCommand); - -abort: - freeSearchInfo(&search); - freeEnvironmentInfo(envs); - return exitCode; -} - - -#if defined(_WINDOWS) - -int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPWSTR lpstrCmd, int nShow) -{ - return process(__argc, __wargv); -} - -#else - -int cdecl wmain(int argc, wchar_t ** argv) -{ - return process(argc, argv); -} - -#endif diff --git a/PC/layout/__init__.py b/PC/layout/__init__.py deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/PC/layout/__main__.py b/PC/layout/__main__.py deleted file mode 100644 index 05a059eee7c1d7..00000000000000 --- a/PC/layout/__main__.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys - -try: - import layout # noqa: F401 -except ImportError: - # Failed to import our package, which likely means we were started directly - # Add the additional search path needed to locate our module. - from pathlib import Path - - sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) - -from layout.main import main - -sys.exit(int(main() or 0)) diff --git a/PC/layout/main.py b/PC/layout/main.py deleted file mode 100644 index 8543e7c56e1c41..00000000000000 --- a/PC/layout/main.py +++ /dev/null @@ -1,729 +0,0 @@ -""" -Generates a layout of Python for Windows from a build. - -See python make_layout.py --help for usage. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - -import argparse -import json -import os -import shutil -import sys -import tempfile -import zipfile - -from pathlib import Path - -if __name__ == "__main__": - # Started directly, so enable relative imports - __path__ = [str(Path(__file__).resolve().parent)] - -from .support.appxmanifest import * -from .support.catalog import * -from .support.constants import * -from .support.filesets import * -from .support.logging import * -from .support.options import * -from .support.pip import * -from .support.props import * -from .support.pymanager import * -from .support.nuspec import * - -TEST_PYDS_ONLY = FileStemSet("xxlimited", "xxlimited_35", "_ctypes_test", "_test*") -TEST_DLLS_ONLY = set() -TEST_DIRS_ONLY = FileNameSet("test", "tests") - -IDLE_DIRS_ONLY = FileNameSet("idlelib") - -TCLTK_PYDS_ONLY = FileStemSet("_tkinter") -TCLTK_DLLS_ONLY = FileStemSet("tcl*", "tk*", "zlib1") -TCLTK_DIRS_ONLY = FileNameSet("tkinter", "turtledemo") -TCLTK_FILES_ONLY = FileNameSet("turtle.py") - -VENV_DIRS_ONLY = FileNameSet("venv", "ensurepip") - -EXCLUDE_FROM_DLLS = FileStemSet("python*", "pyshellext", "vcruntime*") -EXCLUDE_FROM_LIB = FileNameSet("*.pyc", "__pycache__", "*.pickle") -EXCLUDE_FROM_PACKAGED_LIB = FileNameSet("readme.txt") -EXCLUDE_FROM_COMPILE = FileNameSet("badsyntax_*", "bad_*") -EXCLUDE_FROM_CATALOG = FileSuffixSet(".exe", ".pyd", ".dll") - -REQUIRED_DLLS = FileStemSet("libcrypto*", "libssl*", "libffi*") - -PY_FILES = FileSuffixSet(".py") -PYC_FILES = FileSuffixSet(".pyc") -CAT_FILES = FileSuffixSet(".cat") -CDF_FILES = FileSuffixSet(".cdf") - -DATA_DIRS = FileNameSet("data") - -TOOLS_DIRS = FileNameSet("scripts", "i18n", "parser") -TOOLS_FILES = FileSuffixSet(".py", ".pyw", ".txt") - - -def copy_if_modified(src, dest): - try: - dest_stat = os.stat(dest) - except FileNotFoundError: - do_copy = True - else: - src_stat = os.stat(src) - do_copy = ( - src_stat.st_mtime != dest_stat.st_mtime - or src_stat.st_size != dest_stat.st_size - ) - - if do_copy: - try: - shutil.copy2(src, dest) - except FileNotFoundError: - raise FileNotFoundError(src) from None - - -def get_lib_layout(ns): - def _c(f): - if f in EXCLUDE_FROM_LIB: - return False - if f.is_dir(): - if f in TEST_DIRS_ONLY: - return ns.include_tests - if f in TCLTK_DIRS_ONLY: - return ns.include_tcltk - if f in IDLE_DIRS_ONLY: - return ns.include_idle - if f in VENV_DIRS_ONLY: - return ns.include_venv - else: - if f in TCLTK_FILES_ONLY: - return ns.include_tcltk - return True - - for dest, src in rglob(ns.source / "Lib", "**/*", _c): - yield dest, src - - -def get_tcltk_lib(ns): - if not ns.include_tcltk: - return - - tcl_lib = os.getenv("TCL_LIBRARY") - if not tcl_lib or not os.path.isdir(tcl_lib): - try: - with open(ns.build / "TCL_LIBRARY.env", "r", encoding="utf-8-sig") as f: - tcl_lib = f.read().strip() - except FileNotFoundError: - pass - if not tcl_lib or not os.path.isdir(tcl_lib): - log_warning("Failed to find TCL_LIBRARY") - return - - for dest, src in rglob(Path(tcl_lib).parent, "**/*"): - yield "tcl/{}".format(dest), src - - -def get_layout(ns): - def in_build(f, dest="", new_name=None, no_lib=False): - n, _, x = f.rpartition(".") - n = new_name or n - src = ns.build / f - if ns.debug and src not in REQUIRED_DLLS: - if not "_d." in src.name: - src = src.parent / (src.stem + "_d" + src.suffix) - if "_d." not in f: - n += "_d" - f = n + "." + x - yield dest + n + "." + x, src - if ns.include_symbols: - pdb = src.with_suffix(".pdb") - if pdb.is_file(): - yield dest + n + ".pdb", pdb - if ns.include_dev and not no_lib: - lib = src.with_suffix(".lib") - if lib.is_file(): - yield "libs/" + n + ".lib", lib - - source = "python.exe" - sourcew = "pythonw.exe" - alias = [ - "python", - "python{}".format(VER_MAJOR) if ns.include_alias3 else "", - "python{}".format(VER_DOT) if ns.include_alias3x else "", - ] - aliasw = [ - "pythonw", - "pythonw{}".format(VER_MAJOR) if ns.include_alias3 else "", - "pythonw{}".format(VER_DOT) if ns.include_alias3x else "", - ] - if ns.include_appxmanifest: - source = "python_uwp.exe" - sourcew = "pythonw_uwp.exe" - elif ns.include_freethreaded: - source = "python{}t.exe".format(VER_DOT) - sourcew = "pythonw{}t.exe".format(VER_DOT) - if not ns.include_alias: - alias = [] - aliasw = [] - alias.extend([ - "python{}t".format(VER_DOT), - "python{}t".format(VER_MAJOR) if ns.include_alias3 else None, - ]) - aliasw.extend([ - "pythonw{}t".format(VER_DOT), - "pythonw{}t".format(VER_MAJOR) if ns.include_alias3 else None, - ]) - - for a in filter(None, alias): - yield from in_build(source, new_name=a) - for a in filter(None, aliasw): - yield from in_build(sourcew, new_name=a) - - if ns.include_freethreaded: - yield from in_build(FREETHREADED_PYTHON_DLL_NAME) - else: - yield from in_build(PYTHON_DLL_NAME) - - if ns.include_launchers and ns.include_appxmanifest: - if ns.include_pip: - yield from in_build("python_uwp.exe", new_name="pip{}".format(VER_DOT)) - if ns.include_idle: - yield from in_build("pythonw_uwp.exe", new_name="idle{}".format(VER_DOT)) - - if ns.include_stable: - if ns.include_freethreaded: - yield from in_build(FREETHREADED_PYTHON_STABLE_DLL_NAME) - else: - yield from in_build(PYTHON_STABLE_DLL_NAME) - - found_any = False - for dest, src in rglob(ns.build, "vcruntime*.dll"): - found_any = True - yield dest, src - if not found_any: - log_error("Failed to locate vcruntime DLL in the build.") - - yield "LICENSE.txt", ns.build / "LICENSE.txt" - - dest = "" if ns.flat_dlls else "DLLs/" - - for _, src in rglob(ns.build, "*.pyd"): - if ns.include_freethreaded: - if not src.match("*.cp*t-win*.pyd"): - continue - if bool(src.match("*_d.cp*.pyd")) != bool(ns.debug): - continue - else: - if src.match("*.cp*t-win*.pyd"): - continue - if bool(src.match("*_d.pyd")) != bool(ns.debug): - continue - if src in TEST_PYDS_ONLY and not ns.include_tests: - continue - if src in TCLTK_PYDS_ONLY and not ns.include_tcltk: - continue - yield from in_build(src.name, dest=dest, no_lib=True) - - for _, src in rglob(ns.build, "*.dll"): - if src.stem.endswith("_d") != bool(ns.debug) and src not in REQUIRED_DLLS: - continue - if src in EXCLUDE_FROM_DLLS: - continue - if src in TEST_DLLS_ONLY and not ns.include_tests: - continue - if src in TCLTK_DLLS_ONLY and not ns.include_tcltk: - continue - yield from in_build(src.name, dest=dest, no_lib=True) - - if ns.zip_lib: - zip_name = PYTHON_ZIP_NAME - yield zip_name, ns.temp / zip_name - else: - for dest, src in get_lib_layout(ns): - yield "Lib/{}".format(dest), src - - if ns.include_venv: - if ns.include_freethreaded: - yield from in_build("venvlaunchert.exe", "Lib/venv/scripts/nt/") - yield from in_build("venvwlaunchert.exe", "Lib/venv/scripts/nt/") - elif (VER_MAJOR, VER_MINOR) > (3, 12): - yield from in_build("venvlauncher.exe", "Lib/venv/scripts/nt/") - yield from in_build("venvwlauncher.exe", "Lib/venv/scripts/nt/") - else: - # Older versions of venv expected the scripts to be named 'python' - # and they were renamed at this stage. We need to replicate that - # when packaging older versions. - yield from in_build("venvlauncher.exe", "Lib/venv/scripts/nt/", "python") - yield from in_build("venvwlauncher.exe", "Lib/venv/scripts/nt/", "pythonw") - - if ns.include_tools: - - def _c(d): - if d.is_dir(): - return d in TOOLS_DIRS - return d in TOOLS_FILES - - for dest, src in rglob(ns.source / "Tools", "**/*", _c): - yield "Tools/{}".format(dest), src - - if ns.include_underpth: - yield PYTHON_PTH_NAME, ns.temp / PYTHON_PTH_NAME - - if ns.include_dev: - for dest, src in rglob(ns.source / "Include", "**/*.h"): - yield "include/{}".format(dest), src - # Support for layout of new and old releases. - pc = ns.source / "PC" - if (pc / "pyconfig.h.in").is_file(): - yield "include/pyconfig.h", ns.build / "pyconfig.h" - else: - yield "include/pyconfig.h", pc / "pyconfig.h" - - for dest, src in get_tcltk_lib(ns): - yield dest, src - - if ns.include_pip: - for dest, src in get_pip_layout(ns): - if not isinstance(src, tuple) and ( - src in EXCLUDE_FROM_LIB or src in EXCLUDE_FROM_PACKAGED_LIB - ): - continue - yield dest, src - - if ns.include_chm: - for dest, src in rglob(ns.doc_build / "htmlhelp", PYTHON_CHM_NAME): - yield "Doc/{}".format(dest), src - - if ns.include_html_doc: - for dest, src in rglob(ns.doc_build / "html", "**/*"): - yield "Doc/html/{}".format(dest), src - - if ns.include_props: - for dest, src in get_props_layout(ns): - yield dest, src - - if ns.include_nuspec: - for dest, src in get_nuspec_layout(ns): - yield dest, src - - for dest, src in get_appx_layout(ns): - yield dest, src - - if ns.include_cat: - if ns.flat_dlls: - yield ns.include_cat.name, ns.include_cat - else: - yield "DLLs/{}".format(ns.include_cat.name), ns.include_cat - - if ns.include_install_json or ns.include_install_embed_json or ns.include_install_test_json: - yield "__install__.json", ns.temp / "__install__.json" - - -def _compile_one_py(src, dest, name, optimize, checked=True): - import py_compile - - if dest is not None: - dest = str(dest) - - mode = ( - py_compile.PycInvalidationMode.CHECKED_HASH - if checked - else py_compile.PycInvalidationMode.UNCHECKED_HASH - ) - - try: - return Path( - py_compile.compile( - str(src), - dest, - str(name), - doraise=True, - optimize=optimize, - invalidation_mode=mode, - ) - ) - except py_compile.PyCompileError: - log_warning("Failed to compile {}", src) - return None - - -# name argument added to address bpo-37641 -def _py_temp_compile(src, name, ns, dest_dir=None, checked=True): - if not ns.precompile or src not in PY_FILES or src.parent in DATA_DIRS: - return None - dest = (dest_dir or ns.temp) / (src.stem + ".pyc") - return _compile_one_py(src, dest, name, optimize=2, checked=checked) - - -def _write_to_zip(zf, dest, src, ns, checked=True): - pyc = _py_temp_compile(src, dest, ns, checked=checked) - if pyc: - try: - zf.write(str(pyc), dest.with_suffix(".pyc")) - finally: - try: - pyc.unlink() - except: - log_exception("Failed to delete {}", pyc) - return - - zf.write(str(src), str(dest)) - - -def generate_source_files(ns): - if ns.zip_lib: - zip_name = PYTHON_ZIP_NAME - zip_path = ns.temp / zip_name - if zip_path.is_file(): - zip_path.unlink() - elif zip_path.is_dir(): - log_error( - "Cannot create zip file because a directory exists by the same name" - ) - return - log_info("Generating {} in {}", zip_name, ns.temp) - ns.temp.mkdir(parents=True, exist_ok=True) - with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zf: - for dest, src in get_lib_layout(ns): - _write_to_zip(zf, dest, src, ns, checked=False) - - if ns.include_underpth: - log_info("Generating {} in {}", PYTHON_PTH_NAME, ns.temp) - ns.temp.mkdir(parents=True, exist_ok=True) - with open(ns.temp / PYTHON_PTH_NAME, "w", encoding="utf-8") as f: - if ns.zip_lib: - print(PYTHON_ZIP_NAME, file=f) - if ns.include_pip: - print("packages", file=f) - else: - print("Lib", file=f) - print("Lib/site-packages", file=f) - if not ns.flat_dlls: - print("DLLs", file=f) - print(".", file=f) - print(file=f) - print("# Uncomment to run site.main() automatically", file=f) - print("#import site", file=f) - - if ns.include_pip: - log_info("Extracting pip") - extract_pip_files(ns) - - if ns.include_install_json: - log_info("Generating __install__.json in {}", ns.temp) - ns.temp.mkdir(parents=True, exist_ok=True) - with open(ns.temp / "__install__.json", "w", encoding="utf-8") as f: - json.dump(calculate_install_json(ns), f, indent=2) - elif ns.include_install_embed_json: - log_info("Generating embeddable __install__.json in {}", ns.temp) - ns.temp.mkdir(parents=True, exist_ok=True) - with open(ns.temp / "__install__.json", "w", encoding="utf-8") as f: - json.dump(calculate_install_json(ns, for_embed=True), f, indent=2) - elif ns.include_install_test_json: - log_info("Generating test __install__.json in {}", ns.temp) - ns.temp.mkdir(parents=True, exist_ok=True) - with open(ns.temp / "__install__.json", "w", encoding="utf-8") as f: - json.dump(calculate_install_json(ns, for_test=True), f, indent=2) - - -def _create_zip_file(ns): - if not ns.zip: - return None - - if ns.zip.is_file(): - try: - ns.zip.unlink() - except OSError: - log_exception("Unable to remove {}", ns.zip) - sys.exit(8) - elif ns.zip.is_dir(): - log_error("Cannot create ZIP file because {} is a directory", ns.zip) - sys.exit(8) - - ns.zip.parent.mkdir(parents=True, exist_ok=True) - return zipfile.ZipFile(ns.zip, "w", zipfile.ZIP_DEFLATED) - - -def copy_files(files, ns): - if ns.copy: - ns.copy.mkdir(parents=True, exist_ok=True) - - try: - total = len(files) - except TypeError: - total = None - count = 0 - - zip_file = _create_zip_file(ns) - try: - need_compile = [] - in_catalog = [] - - for dest, src in files: - count += 1 - if count % 10 == 0: - if total: - log_info("Processed {:>4} of {} files", count, total) - else: - log_info("Processed {} files", count) - log_debug("Processing {!s}", src) - - if isinstance(src, tuple): - src, content = src - if ns.copy: - log_debug("Copy {} -> {}", src, ns.copy / dest) - (ns.copy / dest).parent.mkdir(parents=True, exist_ok=True) - with open(ns.copy / dest, "wb") as f: - f.write(content) - if ns.zip: - log_debug("Zip {} into {}", src, ns.zip) - zip_file.writestr(str(dest), content) - continue - - if ( - ns.precompile - and src in PY_FILES - and src not in EXCLUDE_FROM_COMPILE - and src.parent not in DATA_DIRS - and os.path.normcase(str(dest)).startswith(os.path.normcase("Lib")) - ): - if ns.copy: - need_compile.append((dest, ns.copy / dest)) - else: - (ns.temp / "Lib" / dest).parent.mkdir(parents=True, exist_ok=True) - copy_if_modified(src, ns.temp / "Lib" / dest) - need_compile.append((dest, ns.temp / "Lib" / dest)) - - if src not in EXCLUDE_FROM_CATALOG: - in_catalog.append((src.name, src)) - - if ns.copy: - log_debug("Copy {} -> {}", src, ns.copy / dest) - (ns.copy / dest).parent.mkdir(parents=True, exist_ok=True) - try: - copy_if_modified(src, ns.copy / dest) - except shutil.SameFileError: - pass - - if ns.zip: - log_debug("Zip {} into {}", src, ns.zip) - zip_file.write(src, str(dest)) - - if need_compile: - for dest, src in need_compile: - compiled = [ - _compile_one_py(src, None, dest, optimize=0), - _compile_one_py(src, None, dest, optimize=1), - _compile_one_py(src, None, dest, optimize=2), - ] - for c in compiled: - if not c: - continue - cdest = Path(dest).parent / Path(c).relative_to(src.parent) - if ns.zip: - log_debug("Zip {} into {}", c, ns.zip) - zip_file.write(c, str(cdest)) - in_catalog.append((cdest.name, cdest)) - - if ns.catalog: - # Just write out the CDF now. Compilation and signing is - # an extra step - log_info("Generating {}", ns.catalog) - ns.catalog.parent.mkdir(parents=True, exist_ok=True) - write_catalog(ns.catalog, in_catalog) - - finally: - if zip_file: - zip_file.close() - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("-v", help="Increase verbosity", action="count") - parser.add_argument( - "-s", - "--source", - metavar="dir", - help="The directory containing the repository root", - type=Path, - default=None, - ) - parser.add_argument( - "-b", "--build", metavar="dir", help="Specify the build directory", type=Path - ) - parser.add_argument( - "--arch", - metavar="architecture", - help="Specify the target architecture", - type=str, - default=None, - ) - parser.add_argument( - "--doc-build", - metavar="dir", - help="Specify the docs build directory", - type=Path, - default=None, - ) - parser.add_argument( - "--copy", - metavar="directory", - help="The name of the directory to copy an extracted layout to", - type=Path, - default=None, - ) - parser.add_argument( - "--zip", - metavar="file", - help="The ZIP file to write all files to", - type=Path, - default=None, - ) - parser.add_argument( - "--catalog", - metavar="file", - help="The CDF file to write catalog entries to", - type=Path, - default=None, - ) - parser.add_argument( - "--log", - metavar="file", - help="Write all operations to the specified file", - type=Path, - default=None, - ) - parser.add_argument( - "-t", - "--temp", - metavar="file", - help="A temporary working directory", - type=Path, - default=None, - ) - parser.add_argument( - "-d", "--debug", help="Include debug build", action="store_true" - ) - parser.add_argument( - "-p", - "--precompile", - help="Include .pyc files instead of .py", - action="store_true", - ) - parser.add_argument( - "-z", "--zip-lib", help="Include library in a ZIP file", action="store_true" - ) - parser.add_argument( - "--flat-dlls", help="Does not create a DLLs directory", action="store_true" - ) - parser.add_argument( - "-a", - "--include-all", - help="Include all optional components", - action="store_true", - ) - parser.add_argument( - "--include-cat", - metavar="file", - help="Specify the catalog file to include", - type=Path, - default=None, - ) - for opt, help in get_argparse_options(): - parser.add_argument(opt, help=help, action="store_true") - - ns = parser.parse_args() - update_presets(ns) - - ns.source = ns.source or (Path(__file__).resolve().parent.parent.parent) - ns.build = ns.build or Path(sys.executable).parent - ns.doc_build = ns.doc_build or (ns.source / "Doc" / "build") - if ns.copy and not ns.copy.is_absolute(): - ns.copy = (Path.cwd() / ns.copy).resolve() - if not ns.temp: - # Put temp on a Dev Drive for speed if we're copying to one. - # If not, the regular temp dir will have to do. - if ns.copy and getattr(os.path, "isdevdrive", lambda d: False)(ns.copy): - ns.temp = ns.copy.with_name(ns.copy.name + "_temp") - else: - ns.temp = Path(tempfile.mkdtemp()) - if not ns.source.is_absolute(): - ns.source = (Path.cwd() / ns.source).resolve() - if not ns.build.is_absolute(): - ns.build = (Path.cwd() / ns.build).resolve() - if not ns.temp.is_absolute(): - ns.temp = (Path.cwd() / ns.temp).resolve() - if not ns.doc_build.is_absolute(): - ns.doc_build = (Path.cwd() / ns.doc_build).resolve() - if ns.include_cat and not ns.include_cat.is_absolute(): - ns.include_cat = (Path.cwd() / ns.include_cat).resolve() - if ns.zip and not ns.zip.is_absolute(): - ns.zip = (Path.cwd() / ns.zip).resolve() - if ns.catalog and not ns.catalog.is_absolute(): - ns.catalog = (Path.cwd() / ns.catalog).resolve() - - configure_logger(ns) - - if not ns.arch: - from .support.arch import calculate_from_build_dir - ns.arch = calculate_from_build_dir(ns.build) - - expect = f"{VER_MAJOR}.{VER_MINOR}.{VER_MICRO}{VER_SUFFIX}" - actual = check_patchlevel_version(ns.source) - if actual and actual != expect: - log_error(f"Inferred version {expect} does not match {actual} from patchlevel.h. " - "You should set %PYTHONINCLUDE% or %PYTHON_HEXVERSION% before launching.") - return 5 - - log_info( - """OPTIONS -Source: {ns.source} -Build: {ns.build} -Temp: {ns.temp} -Arch: {ns.arch} - -Copy to: {ns.copy} -Zip to: {ns.zip} -Catalog: {ns.catalog}""", - ns=ns, - ) - - if ns.arch not in ("win32", "amd64", "arm32", "arm64"): - log_error("--arch is not a valid value (win32, amd64, arm32, arm64)") - return 4 - if ns.arch == "arm32": - for n in ("include_idle", "include_tcltk"): - if getattr(ns, n): - log_warning(f"Disabling --{n.replace('_', '-')} on unsupported platform") - setattr(ns, n, False) - - if ns.include_idle and not ns.include_tcltk: - log_warning("Assuming --include-tcltk to support --include-idle") - ns.include_tcltk = True - - if not (ns.include_alias or ns.include_alias3 or ns.include_alias3x): - if ns.include_freethreaded: - ns.include_alias3x = True - else: - ns.include_alias = True - - try: - generate_source_files(ns) - files = list(get_layout(ns)) - copy_files(files, ns) - except KeyboardInterrupt: - log_info("Interrupted by Ctrl+C") - return 3 - except SystemExit: - raise - except: - log_exception("Unhandled error") - - if error_was_logged(): - log_error("Errors occurred.") - return 1 - - -if __name__ == "__main__": - sys.exit(int(main() or 0)) diff --git a/PC/layout/support/__init__.py b/PC/layout/support/__init__.py deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/PC/layout/support/appxmanifest.py b/PC/layout/support/appxmanifest.py deleted file mode 100644 index 53977beb8af834..00000000000000 --- a/PC/layout/support/appxmanifest.py +++ /dev/null @@ -1,518 +0,0 @@ -""" -File generation for APPX/MSIX manifests. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - - -import ctypes -import io -import os - -from pathlib import PureWindowsPath -from xml.etree import ElementTree as ET - -from .constants import * - -__all__ = ["get_appx_layout"] - - -APPX_DATA = dict( - Name="PythonSoftwareFoundation.Python.{}".format(VER_DOT), - Version="{}.{}.{}.0".format(VER_MAJOR, VER_MINOR, VER_FIELD3), - Publisher=os.getenv( - "APPX_DATA_PUBLISHER", "CN=4975D53F-AA7E-49A5-8B49-EA4FDC1BB66B" - ), - DisplayName="Python {}".format(VER_DOT), - Description="The Python {} runtime and console.".format(VER_DOT), -) - -APPX_PLATFORM_DATA = dict( - _keys=("ProcessorArchitecture",), - win32=("x86",), - amd64=("x64",), - arm32=("arm",), - arm64=("arm64",), -) - -PYTHON_VE_DATA = dict( - DisplayName="Python {}".format(VER_DOT), - Description="Python interactive console", - Square150x150Logo="_resources/pythonx150.png", - Square44x44Logo="_resources/pythonx44.png", - BackgroundColor="transparent", -) - -PYTHONW_VE_DATA = dict( - DisplayName="Python {} (Windowed)".format(VER_DOT), - Description="Python windowed app launcher", - Square150x150Logo="_resources/pythonwx150.png", - Square44x44Logo="_resources/pythonwx44.png", - BackgroundColor="transparent", - AppListEntry="none", -) - -PIP_VE_DATA = dict( - DisplayName="pip (Python {})".format(VER_DOT), - Description="pip package manager for Python {}".format(VER_DOT), - Square150x150Logo="_resources/pythonx150.png", - Square44x44Logo="_resources/pythonx44.png", - BackgroundColor="transparent", - AppListEntry="none", -) - -IDLE_VE_DATA = dict( - DisplayName="IDLE (Python {})".format(VER_DOT), - Description="IDLE editor for Python {}".format(VER_DOT), - Square150x150Logo="_resources/idlex150.png", - Square44x44Logo="_resources/idlex44.png", - BackgroundColor="transparent", -) - -PY_PNG = "_resources/py.png" - -APPXMANIFEST_NS = { - "": "http://schemas.microsoft.com/appx/manifest/foundation/windows10", - "m": "http://schemas.microsoft.com/appx/manifest/foundation/windows10", - "uap": "http://schemas.microsoft.com/appx/manifest/uap/windows10", - "rescap": "http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities", - "rescap4": "http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/4", - "desktop4": "http://schemas.microsoft.com/appx/manifest/desktop/windows10/4", - "desktop6": "http://schemas.microsoft.com/appx/manifest/desktop/windows10/6", - "uap3": "http://schemas.microsoft.com/appx/manifest/uap/windows10/3", - "uap4": "http://schemas.microsoft.com/appx/manifest/uap/windows10/4", - "uap5": "http://schemas.microsoft.com/appx/manifest/uap/windows10/5", -} - -APPXMANIFEST_TEMPLATE = """ - - - - - Python Software Foundation - - _resources/pythonx50.png - - - - - - - - - - - - - - -""" - - -RESOURCES_XML_TEMPLATE = r""" - - - - - - - - - - - - - - - - - - - - - - - - - - - -""" - - -SCCD_FILENAME = "PC/classicAppCompat.sccd" - -SPECIAL_LOOKUP = object() - -REGISTRY = { - "HKCU\\Software\\Python\\PythonCore": { - VER_DOT: { - "DisplayName": APPX_DATA["DisplayName"], - "SupportUrl": "https://www.python.org/", - "SysArchitecture": SPECIAL_LOOKUP, - "SysVersion": VER_DOT, - "Version": "{}.{}.{}".format(VER_MAJOR, VER_MINOR, VER_MICRO), - "InstallPath": { - "": "[{AppVPackageRoot}]", - "ExecutablePath": "[{{AppVPackageRoot}}]\\python{}.exe".format(VER_DOT), - "WindowedExecutablePath": "[{{AppVPackageRoot}}]\\pythonw{}.exe".format( - VER_DOT - ), - }, - "Help": { - "Main Python Documentation": { - "_condition": lambda ns: ns.include_chm, - "": "[{{AppVPackageRoot}}]\\Doc\\{}".format(PYTHON_CHM_NAME), - }, - "Local Python Documentation": { - "_condition": lambda ns: ns.include_html_doc, - "": "[{AppVPackageRoot}]\\Doc\\html\\index.html", - }, - "Online Python Documentation": { - "": "https://docs.python.org/{}".format(VER_DOT) - }, - }, - "Idle": { - "_condition": lambda ns: ns.include_idle, - "": "[{AppVPackageRoot}]\\Lib\\idlelib\\idle.pyw", - }, - } - } -} - - -def get_packagefamilyname(name, publisher_id): - class PACKAGE_ID(ctypes.Structure): - _fields_ = [ - ("reserved", ctypes.c_uint32), - ("processorArchitecture", ctypes.c_uint32), - ("version", ctypes.c_uint64), - ("name", ctypes.c_wchar_p), - ("publisher", ctypes.c_wchar_p), - ("resourceId", ctypes.c_wchar_p), - ("publisherId", ctypes.c_wchar_p), - ] - _pack_ = 4 - - pid = PACKAGE_ID(0, 0, 0, name, publisher_id, None, None) - result = ctypes.create_unicode_buffer(256) - result_len = ctypes.c_uint32(256) - r = ctypes.windll.kernel32.PackageFamilyNameFromId( - ctypes.byref(pid), ctypes.byref(result_len), result - ) - if r: - raise OSError(r, "failed to get package family name") - return result.value[: result_len.value] - - -def _fixup_sccd(ns, sccd, new_hash=None): - if not new_hash: - return sccd - - NS = dict(s="http://schemas.microsoft.com/appx/2016/sccd") - with open(sccd, "rb") as f: - xml = ET.parse(f) - - pfn = get_packagefamilyname(APPX_DATA["Name"], APPX_DATA["Publisher"]) - - ae = xml.find("s:AuthorizedEntities", NS) - ae.clear() - - e = ET.SubElement(ae, ET.QName(NS["s"], "AuthorizedEntity")) - e.set("AppPackageFamilyName", pfn) - e.set("CertificateSignatureHash", new_hash) - - for e in xml.findall("s:Catalog", NS): - e.text = "FFFF" - - sccd = ns.temp / sccd.name - sccd.parent.mkdir(parents=True, exist_ok=True) - with open(sccd, "wb") as f: - xml.write(f, encoding="utf-8") - - return sccd - - -def find_or_add(xml, element, attr=None, always_add=False): - if always_add: - e = None - else: - q = element - if attr: - q += "[@{}='{}']".format(*attr) - e = xml.find(q, APPXMANIFEST_NS) - if e is None: - prefix, _, name = element.partition(":") - name = ET.QName(APPXMANIFEST_NS[prefix or ""], name) - e = ET.SubElement(xml, name) - if attr: - e.set(*attr) - return e - - -def _get_app(xml, appid): - if appid: - app = xml.find( - "m:Applications/m:Application[@Id='{}']".format(appid), APPXMANIFEST_NS - ) - if app is None: - raise LookupError(appid) - else: - app = xml - return app - - -def add_visual(xml, appid, data): - app = _get_app(xml, appid) - e = find_or_add(app, "uap:VisualElements") - for i in data.items(): - e.set(*i) - return e - - -def add_alias(xml, appid, alias, subsystem="windows"): - app = _get_app(xml, appid) - e = find_or_add(app, "m:Extensions") - e = find_or_add(e, "uap5:Extension", ("Category", "windows.appExecutionAlias")) - e = find_or_add(e, "uap5:AppExecutionAlias") - e.set(ET.QName(APPXMANIFEST_NS["desktop4"], "Subsystem"), subsystem) - e = find_or_add(e, "uap5:ExecutionAlias", ("Alias", alias)) - - -def add_file_type(xml, appid, name, suffix, parameters='"%1"', info=None, logo=None): - app = _get_app(xml, appid) - e = find_or_add(app, "m:Extensions") - e = find_or_add(e, "uap3:Extension", ("Category", "windows.fileTypeAssociation")) - e = find_or_add(e, "uap3:FileTypeAssociation", ("Name", name)) - e.set("Parameters", parameters) - if info: - find_or_add(e, "uap:DisplayName").text = info - if logo: - find_or_add(e, "uap:Logo").text = logo - e = find_or_add(e, "uap:SupportedFileTypes") - if isinstance(suffix, str): - suffix = [suffix] - for s in suffix: - ET.SubElement(e, ET.QName(APPXMANIFEST_NS["uap"], "FileType")).text = s - - -def add_application( - ns, xml, appid, executable, aliases, visual_element, subsystem, file_types -): - node = xml.find("m:Applications", APPXMANIFEST_NS) - suffix = "_d.exe" if ns.debug else ".exe" - app = ET.SubElement( - node, - ET.QName(APPXMANIFEST_NS[""], "Application"), - { - "Id": appid, - "Executable": executable + suffix, - "EntryPoint": "Windows.FullTrustApplication", - ET.QName(APPXMANIFEST_NS["desktop4"], "SupportsMultipleInstances"): "true", - }, - ) - if visual_element: - add_visual(app, None, visual_element) - for alias in aliases: - add_alias(app, None, alias + suffix, subsystem) - if file_types: - add_file_type(app, None, *file_types) - return app - - -def _get_registry_entries(ns, root="", d=None): - r = root if root else PureWindowsPath("") - if d is None: - d = REGISTRY - for key, value in d.items(): - if key == "_condition": - continue - if value is SPECIAL_LOOKUP: - if key == "SysArchitecture": - value = { - "win32": "32bit", - "amd64": "64bit", - "arm32": "32bit", - "arm64": "64bit", - }[ns.arch] - else: - raise ValueError(f"Key '{key}' unhandled for special lookup") - if isinstance(value, dict): - cond = value.get("_condition") - if cond and not cond(ns): - continue - fullkey = r - for part in PureWindowsPath(key).parts: - fullkey /= part - if len(fullkey.parts) > 1: - yield str(fullkey), None, None - yield from _get_registry_entries(ns, fullkey, value) - elif len(r.parts) > 1: - yield str(r), key, value - - -def add_registry_entries(ns, xml): - e = find_or_add(xml, "m:Extensions") - e = find_or_add(e, "rescap4:Extension") - e.set("Category", "windows.classicAppCompatKeys") - e.set("EntryPoint", "Windows.FullTrustApplication") - e = ET.SubElement(e, ET.QName(APPXMANIFEST_NS["rescap4"], "ClassicAppCompatKeys")) - for name, valuename, value in _get_registry_entries(ns): - k = ET.SubElement( - e, ET.QName(APPXMANIFEST_NS["rescap4"], "ClassicAppCompatKey") - ) - k.set("Name", name) - if value: - k.set("ValueName", valuename) - k.set("Value", value) - k.set("ValueType", "REG_SZ") - - -def disable_registry_virtualization(xml): - e = find_or_add(xml, "m:Properties") - e = find_or_add(e, "desktop6:RegistryWriteVirtualization") - e.text = "disabled" - e = find_or_add(xml, "m:Capabilities") - e = find_or_add(e, "rescap:Capability", ("Name", "unvirtualizedResources")) - - -def get_appxmanifest(ns): - for k, v in APPXMANIFEST_NS.items(): - ET.register_namespace(k, v) - ET.register_namespace("", APPXMANIFEST_NS["m"]) - - xml = ET.parse(io.StringIO(APPXMANIFEST_TEMPLATE)) - NS = APPXMANIFEST_NS - QN = ET.QName - - data = dict(APPX_DATA) - for k, v in zip(APPX_PLATFORM_DATA["_keys"], APPX_PLATFORM_DATA[ns.arch]): - data[k] = v - - node = xml.find("m:Identity", NS) - for k in node.keys(): - value = data.get(k) - if value: - node.set(k, value) - - for node in xml.find("m:Properties", NS): - value = data.get(node.tag.rpartition("}")[2]) - if value: - node.text = value - - try: - winver = tuple(int(i) for i in os.getenv("APPX_DATA_WINVER", "").split(".", maxsplit=3)) - except (TypeError, ValueError): - winver = () - - # Default "known good" version is 10.0.22000, first Windows 11 release - winver = winver or (10, 0, 22000) - - if winver < (10, 0, 17763): - winver = 10, 0, 17763 - find_or_add(xml, "m:Dependencies/m:TargetDeviceFamily").set( - "MaxVersionTested", "{}.{}.{}.{}".format(*(winver + (0, 0, 0, 0)[:4])) - ) - - # Only for Python 3.11 and later. Older versions do not disable virtualization - if (VER_MAJOR, VER_MINOR) >= (3, 11) and winver > (10, 0, 17763): - disable_registry_virtualization(xml) - - app = add_application( - ns, - xml, - "Python", - "python{}".format(VER_DOT), - ["python", "python{}".format(VER_MAJOR), "python{}".format(VER_DOT)], - PYTHON_VE_DATA, - "console", - ("python.file", [".py"], '"%1" %*', "Python File", PY_PNG), - ) - - add_application( - ns, - xml, - "PythonW", - "pythonw{}".format(VER_DOT), - ["pythonw", "pythonw{}".format(VER_MAJOR), "pythonw{}".format(VER_DOT)], - PYTHONW_VE_DATA, - "windows", - ("python.windowedfile", [".pyw"], '"%1" %*', "Python File (no console)", PY_PNG), - ) - - if ns.include_pip and ns.include_launchers: - add_application( - ns, - xml, - "Pip", - "pip{}".format(VER_DOT), - ["pip", "pip{}".format(VER_MAJOR), "pip{}".format(VER_DOT)], - PIP_VE_DATA, - "console", - ("python.wheel", [".whl"], 'install "%1"', "Python Wheel"), - ) - - if ns.include_idle and ns.include_launchers: - add_application( - ns, - xml, - "Idle", - "idle{}".format(VER_DOT), - ["idle", "idle{}".format(VER_MAJOR), "idle{}".format(VER_DOT)], - IDLE_VE_DATA, - "windows", - None, - ) - - if (ns.source / SCCD_FILENAME).is_file(): - add_registry_entries(ns, xml) - node = xml.find("m:Capabilities", NS) - node = ET.SubElement(node, QN(NS["uap4"], "CustomCapability")) - node.set("Name", "Microsoft.classicAppCompat_8wekyb3d8bbwe") - - buffer = io.BytesIO() - xml.write(buffer, encoding="utf-8", xml_declaration=True) - return buffer.getbuffer() - - -def get_resources_xml(ns): - return RESOURCES_XML_TEMPLATE.encode("utf-8") - - -def get_appx_layout(ns): - if not ns.include_appxmanifest: - return - - yield "AppxManifest.xml", ("AppxManifest.xml", get_appxmanifest(ns)) - yield "_resources.xml", ("_resources.xml", get_resources_xml(ns)) - icons = ns.source / "PC" / "icons" - for px in [44, 50, 150]: - src = icons / "pythonx{}.png".format(px) - yield f"_resources/pythonx{px}.png", src - yield f"_resources/pythonx{px}$targetsize-{px}_altform-unplated.png", src - for px in [44, 150]: - src = icons / "pythonwx{}.png".format(px) - yield f"_resources/pythonwx{px}.png", src - yield f"_resources/pythonwx{px}$targetsize-{px}_altform-unplated.png", src - if ns.include_idle and ns.include_launchers: - for px in [44, 150]: - src = icons / "idlex{}.png".format(px) - yield f"_resources/idlex{px}.png", src - yield f"_resources/idlex{px}$targetsize-{px}_altform-unplated.png", src - yield f"_resources/py.png", icons / "py.png" - sccd = ns.source / SCCD_FILENAME - if sccd.is_file(): - # This should only be set for side-loading purposes. - sccd = _fixup_sccd(ns, sccd, os.getenv("APPX_DATA_SHA256")) - yield sccd.name, sccd diff --git a/PC/layout/support/arch.py b/PC/layout/support/arch.py deleted file mode 100644 index daf4efbc7ab674..00000000000000 --- a/PC/layout/support/arch.py +++ /dev/null @@ -1,34 +0,0 @@ -from struct import unpack -from .constants import * -from .logging import * - -def calculate_from_build_dir(root): - candidates = [ - root / PYTHON_DLL_NAME, - root / FREETHREADED_PYTHON_DLL_NAME, - *root.glob("*.dll"), - *root.glob("*.pyd"), - # Check EXE last because it's easier to have cross-platform EXE - *root.glob("*.exe"), - ] - - ARCHS = { - b"PE\0\0\x4c\x01": "win32", - b"PE\0\0\x64\x86": "amd64", - b"PE\0\0\x64\xAA": "arm64" - } - - first_exc = None - for pe in candidates: - try: - # Read the PE header to grab the machine type - with open(pe, "rb") as f: - f.seek(0x3C) - offset = int.from_bytes(f.read(4), "little") - f.seek(offset) - arch = ARCHS[f.read(6)] - except (FileNotFoundError, PermissionError, LookupError) as ex: - log_debug("Failed to open {}: {}", pe, ex) - continue - log_info("Inferred architecture {} from {}", arch, pe) - return arch diff --git a/PC/layout/support/catalog.py b/PC/layout/support/catalog.py deleted file mode 100644 index c9d87cb89484c2..00000000000000 --- a/PC/layout/support/catalog.py +++ /dev/null @@ -1,42 +0,0 @@ -""" -File generation for catalog signing non-binary contents. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - - -__all__ = ["PYTHON_CAT_NAME", "PYTHON_CDF_NAME"] - - -def public(f): - __all__.append(f.__name__) - return f - - -PYTHON_CAT_NAME = "python.cat" -PYTHON_CDF_NAME = "python.cdf" - - -CATALOG_TEMPLATE = r"""[CatalogHeader] -Name={target.stem}.cat -ResultDir={target.parent} -PublicVersion=1 -CatalogVersion=2 -HashAlgorithms=SHA256 -PageHashes=false -EncodingType= - -[CatalogFiles] -""" - - -def can_sign(file): - return file.is_file() and file.stat().st_size - - -@public -def write_catalog(target, files): - with target.open("w", encoding="utf-8") as cat: - cat.write(CATALOG_TEMPLATE.format(target=target)) - cat.writelines("{}={}\n".format(n, f) for n, f in files if can_sign(f)) diff --git a/PC/layout/support/constants.py b/PC/layout/support/constants.py deleted file mode 100644 index 6b8c915e519743..00000000000000 --- a/PC/layout/support/constants.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -Constants for generating the layout. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - -import os -import pathlib -import re -import struct -import sys - - -def _unpack_hexversion(): - try: - hexversion = int(os.getenv("PYTHON_HEXVERSION"), 16) - return struct.pack(">i", hexversion) - except (TypeError, ValueError): - pass - if os.getenv("PYTHONINCLUDE"): - try: - return _read_patchlevel_version(pathlib.Path(os.getenv("PYTHONINCLUDE"))) - except OSError: - pass - return struct.pack(">i", sys.hexversion) - - -def _get_suffix(field4): - name = {0xA0: "a", 0xB0: "b", 0xC0: "rc"}.get(field4 & 0xF0, "") - if name: - serial = field4 & 0x0F - return f"{name}{serial}" - return "" - - -def _read_patchlevel_version(sources): - if not sources.match("Include"): - sources /= "Include" - values = {} - with open(sources / "patchlevel.h", "r", encoding="utf-8") as f: - for line in f: - m = re.match(r'#\s*define\s+(PY_\S+?)\s+(\S+)', line.strip(), re.I) - if m and m.group(2): - v = m.group(2) - if v.startswith('"'): - v = v[1:-1] - else: - v = values.get(v, v) - if isinstance(v, str): - try: - v = int(v, 16 if v.startswith("0x") else 10) - except ValueError: - pass - values[m.group(1)] = v - return ( - values["PY_MAJOR_VERSION"], - values["PY_MINOR_VERSION"], - values["PY_MICRO_VERSION"], - values["PY_RELEASE_LEVEL"] << 4 | values["PY_RELEASE_SERIAL"], - ) - - -def check_patchlevel_version(sources): - got = _read_patchlevel_version(sources) - if got != (VER_MAJOR, VER_MINOR, VER_MICRO, VER_FIELD4): - return f"{got[0]}.{got[1]}.{got[2]}{_get_suffix(got[3])}" - - -VER_MAJOR, VER_MINOR, VER_MICRO, VER_FIELD4 = _unpack_hexversion() -VER_SUFFIX = _get_suffix(VER_FIELD4) -VER_FIELD3 = VER_MICRO << 8 | VER_FIELD4 -VER_DOT = "{}.{}".format(VER_MAJOR, VER_MINOR) - -PYTHON_DLL_NAME = "python{}{}.dll".format(VER_MAJOR, VER_MINOR) -PYTHON_STABLE_DLL_NAME = "python{}.dll".format(VER_MAJOR) -PYTHON_ZIP_NAME = "python{}{}.zip".format(VER_MAJOR, VER_MINOR) -PYTHON_PTH_NAME = "python{}{}._pth".format(VER_MAJOR, VER_MINOR) - -PYTHON_CHM_NAME = "python{}{}{}{}.chm".format( - VER_MAJOR, VER_MINOR, VER_MICRO, VER_SUFFIX -) - -FREETHREADED_PYTHON_DLL_NAME = "python{}{}t.dll".format(VER_MAJOR, VER_MINOR) -FREETHREADED_PYTHON_STABLE_DLL_NAME = "python{}t.dll".format(VER_MAJOR) diff --git a/PC/layout/support/filesets.py b/PC/layout/support/filesets.py deleted file mode 100644 index 3f63f686a9fabb..00000000000000 --- a/PC/layout/support/filesets.py +++ /dev/null @@ -1,102 +0,0 @@ -""" -File sets and globbing helper for make_layout. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - -import os - - -class FileStemSet: - def __init__(self, *patterns): - self._names = set() - self._prefixes = [] - self._suffixes = [] - for p in map(os.path.normcase, patterns): - if p.endswith("*"): - self._prefixes.append(p[:-1]) - elif p.startswith("*"): - self._suffixes.append(p[1:]) - else: - self._names.add(p) - - def _make_name(self, f): - return os.path.normcase(f.stem) - - def __contains__(self, f): - bn = self._make_name(f) - return ( - bn in self._names - or any(map(bn.startswith, self._prefixes)) - or any(map(bn.endswith, self._suffixes)) - ) - - -class FileNameSet(FileStemSet): - def _make_name(self, f): - return os.path.normcase(f.name) - - -class FileSuffixSet: - def __init__(self, *patterns): - self._names = set() - self._prefixes = [] - self._suffixes = [] - for p in map(os.path.normcase, patterns): - if p.startswith("*."): - self._names.add(p[1:]) - elif p.startswith("*"): - self._suffixes.append(p[1:]) - elif p.endswith("*"): - self._prefixes.append(p[:-1]) - elif p.startswith("."): - self._names.add(p) - else: - self._names.add("." + p) - - def _make_name(self, f): - return os.path.normcase(f.suffix) - - def __contains__(self, f): - bn = self._make_name(f) - return ( - bn in self._names - or any(map(bn.startswith, self._prefixes)) - or any(map(bn.endswith, self._suffixes)) - ) - - -def _rglob(root, pattern, condition): - dirs = [root] - recurse = pattern[:3] in {"**/", "**\\"} - if recurse: - pattern = pattern[3:] - - while dirs: - d = dirs.pop(0) - if recurse: - dirs.extend( - filter( - condition, (type(root)(f2) for f2 in os.scandir(d) if f2.is_dir()) - ) - ) - yield from ( - (f.relative_to(root), f) - for f in d.glob(pattern) - if f.is_file() and condition(f) - ) - - -def _return_true(f): - return True - - -def rglob(root, patterns, condition=None): - if not os.path.isdir(root): - return - if isinstance(patterns, tuple): - for p in patterns: - yield from _rglob(root, p, condition or _return_true) - else: - yield from _rglob(root, patterns, condition or _return_true) diff --git a/PC/layout/support/logging.py b/PC/layout/support/logging.py deleted file mode 100644 index 30869b949a1c33..00000000000000 --- a/PC/layout/support/logging.py +++ /dev/null @@ -1,93 +0,0 @@ -""" -Logging support for make_layout. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - -import logging -import sys - -__all__ = [] - -LOG = None -HAS_ERROR = False - - -def public(f): - __all__.append(f.__name__) - return f - - -@public -def configure_logger(ns): - global LOG - if LOG: - return - - LOG = logging.getLogger("make_layout") - LOG.level = logging.DEBUG - - if ns.v: - s_level = max(logging.ERROR - ns.v * 10, logging.DEBUG) - f_level = max(logging.WARNING - ns.v * 10, logging.DEBUG) - else: - s_level = logging.ERROR - f_level = logging.INFO - - handler = logging.StreamHandler(sys.stdout) - handler.setFormatter(logging.Formatter("{levelname:8s} {message}", style="{")) - handler.setLevel(s_level) - LOG.addHandler(handler) - - if ns.log: - handler = logging.FileHandler(ns.log, encoding="utf-8", delay=True) - handler.setFormatter( - logging.Formatter("[{asctime}]{levelname:8s}: {message}", style="{") - ) - handler.setLevel(f_level) - LOG.addHandler(handler) - - -class BraceMessage: - def __init__(self, fmt, *args, **kwargs): - self.fmt = fmt - self.args = args - self.kwargs = kwargs - - def __str__(self): - return self.fmt.format(*self.args, **self.kwargs) - - -@public -def log_debug(msg, *args, **kwargs): - return LOG.debug(BraceMessage(msg, *args, **kwargs)) - - -@public -def log_info(msg, *args, **kwargs): - return LOG.info(BraceMessage(msg, *args, **kwargs)) - - -@public -def log_warning(msg, *args, **kwargs): - return LOG.warning(BraceMessage(msg, *args, **kwargs)) - - -@public -def log_error(msg, *args, **kwargs): - global HAS_ERROR - HAS_ERROR = True - return LOG.error(BraceMessage(msg, *args, **kwargs)) - - -@public -def log_exception(msg, *args, **kwargs): - global HAS_ERROR - HAS_ERROR = True - return LOG.exception(BraceMessage(msg, *args, **kwargs)) - - -@public -def error_was_logged(): - return HAS_ERROR diff --git a/PC/layout/support/nuspec.py b/PC/layout/support/nuspec.py deleted file mode 100644 index a87e0bea049427..00000000000000 --- a/PC/layout/support/nuspec.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -Provides .props file. -""" - -import os -import sys - -from .constants import * - -__all__ = ["get_nuspec_layout"] - -PYTHON_NUSPEC_NAME = "python.nuspec" - -NUSPEC_DATA = { - "PYTHON_TAG": VER_DOT, - "PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"), - "FILELIST": r' ', - "GIT": sys._git, -} - -NUSPEC_PLATFORM_DATA = dict( - _keys=("PYTHON_BITNESS", "PACKAGENAME", "PACKAGETITLE"), - win32=("32-bit", "pythonx86", "Python (32-bit)"), - amd64=("64-bit", "python", "Python"), - arm32=("ARM", "pythonarm", "Python (ARM)"), - arm64=("ARM64", "pythonarm64", "Python (ARM64)"), - win32t=("32-bit free-threaded", "pythonx86-freethreaded", "Python (32-bit, free-threaded)"), - amd64t=("64-bit free-threaded", "python-freethreaded", "Python (free-threaded)"), - arm32t=("ARM free-threaded", "pythonarm-freethreaded", "Python (ARM, free-threaded)"), - arm64t=("ARM64 free-threaded", "pythonarm64-freethreaded", "Python (ARM64, free-threaded)"), -) - -if not NUSPEC_DATA["PYTHON_VERSION"]: - NUSPEC_DATA["PYTHON_VERSION"] = "{}.{}{}{}".format( - VER_DOT, VER_MICRO, "-" if VER_SUFFIX else "", VER_SUFFIX - ) - -FILELIST_WITH_PROPS = r""" - """ - -NUSPEC_TEMPLATE = r""" - - - {PACKAGENAME} - {PACKAGETITLE} - {PYTHON_VERSION} - Python Software Foundation - tools\LICENSE.txt - https://www.python.org/ - Installs {PYTHON_BITNESS} Python for use in build scenarios. - images\python.png - https://www.python.org/static/favicon.ico - python - - - - -{FILELIST} - - -""" - - -def _get_nuspec_data_overrides(ns): - arch = ns.arch - if ns.include_freethreaded: - arch += "t" - for k, v in zip(NUSPEC_PLATFORM_DATA["_keys"], NUSPEC_PLATFORM_DATA[arch]): - ev = os.getenv("PYTHON_NUSPEC_" + k) - if ev: - yield k, ev - yield k, v - - -def get_nuspec_layout(ns): - if ns.include_all or ns.include_nuspec: - data = dict(NUSPEC_DATA) - for k, v in _get_nuspec_data_overrides(ns): - if not data.get(k): - data[k] = v - if ns.include_all or ns.include_props: - data["FILELIST"] = FILELIST_WITH_PROPS - nuspec = NUSPEC_TEMPLATE.format_map(data) - yield "python.nuspec", ("python.nuspec", nuspec.encode("utf-8")) - yield "python.png", ns.source / "PC" / "icons" / "logox128.png" diff --git a/PC/layout/support/options.py b/PC/layout/support/options.py deleted file mode 100644 index e8c393385425e7..00000000000000 --- a/PC/layout/support/options.py +++ /dev/null @@ -1,172 +0,0 @@ -""" -List of optional components. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - - -__all__ = [] - - -def public(f): - __all__.append(f.__name__) - return f - - -OPTIONS = { - "stable": {"help": "stable ABI stub"}, - "pip": {"help": "pip"}, - "pip-user": {"help": "pip.ini file for default --user"}, - "tcltk": {"help": "Tcl, Tk and tkinter"}, - "idle": {"help": "Idle"}, - "tests": {"help": "test suite"}, - "tools": {"help": "tools"}, - "venv": {"help": "venv"}, - "dev": {"help": "headers and libs"}, - "symbols": {"help": "symbols"}, - "underpth": {"help": "a python._pth file", "not-in-all": True}, - "launchers": {"help": "specific launchers"}, - "appxmanifest": {"help": "an appxmanifest"}, - "props": {"help": "a python.props file"}, - "nuspec": {"help": "a python.nuspec file"}, - "chm": {"help": "the CHM documentation"}, - "html-doc": {"help": "the HTML documentation"}, - "freethreaded": {"help": "freethreaded binaries", "not-in-all": True}, - "alias": {"help": "aliased python.exe entry-point binaries"}, - "alias3": {"help": "aliased python3.exe entry-point binaries"}, - "alias3x": {"help": "aliased python3.x.exe entry-point binaries"}, - "install-json": {"help": "a PyManager __install__.json file"}, - "install-embed-json": {"help": "a PyManager __install__.json file for embeddable distro"}, - "install-test-json": {"help": "a PyManager __install__.json for the test distro"}, -} - - -PRESETS = { - "appx": { - "help": "APPX package", - "options": [ - "stable", - "pip", - "tcltk", - "idle", - "venv", - "dev", - "launchers", - "appxmanifest", - "alias", - "alias3x", - # XXX: Disabled for now "precompile", - ], - }, - "nuget": { - "help": "nuget package", - "options": [ - "dev", - "pip", - "stable", - "venv", - "props", - "nuspec", - "alias", - ], - }, - "iot": {"help": "Windows IoT Core", "options": ["alias", "stable", "pip"]}, - "default": { - "help": "development kit package", - "options": [ - "stable", - "pip", - "tcltk", - "idle", - "tests", - "venv", - "dev", - "symbols", - "html-doc", - "alias", - ], - }, - "embed": { - "help": "embeddable package", - "options": [ - "alias", - "stable", - "zip-lib", - "flat-dlls", - "underpth", - "precompile", - ], - }, - "pymanager": { - "help": "PyManager package", - "options": [ - "stable", - "pip", - "tcltk", - "idle", - "venv", - "dev", - "html-doc", - "install-json", - ], - }, - "pymanager-test": { - "help": "PyManager test package", - "options": [ - "stable", - "pip", - "tcltk", - "idle", - "venv", - "dev", - "html-doc", - "symbols", - "tests", - "install-test-json", - ], - }, -} - - -@public -def get_argparse_options(): - for opt, info in OPTIONS.items(): - help = "When specified, includes {}".format(info["help"]) - if info.get("not-in-all"): - help = "{}. Not affected by --include-all".format(help) - - yield "--include-{}".format(opt), help - - for opt, info in PRESETS.items(): - help = "When specified, includes default options for {}".format(info["help"]) - yield "--preset-{}".format(opt), help - - -def ns_get(ns, key, default=False): - return getattr(ns, key.replace("-", "_"), default) - - -def ns_set(ns, key, value=True): - k1 = key.replace("-", "_") - k2 = "include_{}".format(k1) - if hasattr(ns, k2): - setattr(ns, k2, value) - elif hasattr(ns, k1): - setattr(ns, k1, value) - else: - raise AttributeError("no argument named '{}'".format(k1)) - - -@public -def update_presets(ns): - for preset, info in PRESETS.items(): - if ns_get(ns, "preset-{}".format(preset)): - for opt in info["options"]: - ns_set(ns, opt) - - if ns.include_all: - for opt in OPTIONS: - if OPTIONS[opt].get("not-in-all"): - continue - ns_set(ns, opt) diff --git a/PC/layout/support/pip.py b/PC/layout/support/pip.py deleted file mode 100644 index 0a6582acf348a3..00000000000000 --- a/PC/layout/support/pip.py +++ /dev/null @@ -1,93 +0,0 @@ -""" -Extraction and file list generation for pip. -""" - -__author__ = "Steve Dower " -__version__ = "3.8" - - -import os -import shutil -import subprocess -import sys - -from .filesets import * - -__all__ = ["extract_pip_files", "get_pip_layout"] - - -def get_pip_dir(ns): - if ns.copy: - if ns.zip_lib: - return ns.copy / "packages" - return ns.copy / "Lib" / "site-packages" - else: - return ns.temp / "packages" - - -def get_pip_layout(ns): - pip_dir = get_pip_dir(ns) - if not pip_dir.is_dir(): - log_warning("Failed to find {} - pip will not be included", pip_dir) - else: - pkg_root = "packages/{}" if ns.zip_lib else "Lib/site-packages/{}" - for dest, src in rglob(pip_dir, "**/*"): - yield pkg_root.format(dest), src - if ns.include_pip_user: - content = "\n".join( - "[{}]\nuser=yes".format(n) - for n in ["install", "uninstall", "freeze", "list"] - ) - yield "pip.ini", ("pip.ini", content.encode()) - - -def extract_pip_files(ns): - dest = get_pip_dir(ns) - try: - dest.mkdir(parents=True, exist_ok=False) - except IOError: - return - - src = ns.source / "Lib" / "ensurepip" / "_bundled" - - ns.temp.mkdir(parents=True, exist_ok=True) - wheels = [shutil.copy(whl, ns.temp) for whl in src.glob("*.whl")] - search_path = os.pathsep.join(wheels) - if os.environ.get("PYTHONPATH"): - search_path += ";" + os.environ["PYTHONPATH"] - - env = os.environ.copy() - env["PYTHONPATH"] = search_path - - output = subprocess.check_output( - [ - sys.executable, - "-m", - "pip", - "--no-color", - "install", - "pip", - "--upgrade", - "--target", - str(dest), - "--no-index", - "--no-compile", - "--no-cache-dir", - "-f", - str(src), - "--only-binary", - ":all:", - ], - env=env, - ) - - try: - shutil.rmtree(dest / "bin") - except OSError: - pass - - for file in wheels: - try: - os.remove(file) - except OSError: - pass diff --git a/PC/layout/support/props.py b/PC/layout/support/props.py deleted file mode 100644 index f751a4b3f1e437..00000000000000 --- a/PC/layout/support/props.py +++ /dev/null @@ -1,95 +0,0 @@ -""" -Provides .props file. -""" - -import os - -from .constants import * - -__all__ = ["get_props_layout"] - -PYTHON_PROPS_NAME = "python.props" - -PROPS_DATA = { - "PYTHON_TAG": VER_DOT, - "PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"), - "PYTHON_PLATFORM": os.getenv("PYTHON_PROPS_PLATFORM"), - "PYTHON_TARGET": "", -} - -if not PROPS_DATA["PYTHON_VERSION"]: - PROPS_DATA["PYTHON_VERSION"] = "{}.{}{}{}".format( - VER_DOT, VER_MICRO, "-" if VER_SUFFIX else "", VER_SUFFIX - ) - -PROPS_DATA["PYTHON_TARGET"] = "_GetPythonRuntimeFilesDependsOn{}{}_{}".format( - VER_MAJOR, VER_MINOR, PROPS_DATA["PYTHON_PLATFORM"] -) - -PROPS_TEMPLATE = r""" - - - $([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)\..\..\tools")) - $(PythonHome)\include - $(PythonHome)\libs - {PYTHON_TAG} - {PYTHON_VERSION} - - true - false - - {PYTHON_TARGET};$(GetPythonRuntimeFilesDependsOn) - - - - - $(PythonInclude);%(AdditionalIncludeDirectories) - MultiThreadedDLL - - - $(PythonLibs);%(AdditionalLibraryDirectories) - - - - - - - - <_PythonRuntimeExe Include="$(PythonHome)\python*.dll" /> - <_PythonRuntimeExe Include="$(PythonHome)\python*.exe" Condition="$(IncludePythonExe) == 'true'" /> - <_PythonRuntimeExe> - %(Filename)%(Extension) - - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.pyd" /> - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.dll" /> - <_PythonRuntimeDlls> - DLLs\%(Filename)%(Extension) - - <_PythonRuntimeLib Include="$(PythonHome)\Lib\**\*" Exclude="$(PythonHome)\Lib\**\*.pyc;$(PythonHome)\Lib\site-packages\**\*" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\ensurepip\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\venv\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib> - Lib\%(RecursiveDir)%(Filename)%(Extension) - - - - - - - -""" - - -def get_props_layout(ns): - if ns.include_all or ns.include_props: - # TODO: Filter contents of props file according to included/excluded items - d = dict(PROPS_DATA) - if not d.get("PYTHON_PLATFORM"): - d["PYTHON_PLATFORM"] = { - "win32": "Win32", - "amd64": "X64", - "arm32": "ARM", - "arm64": "ARM64", - }[ns.arch] - props = PROPS_TEMPLATE.format_map(d) - yield "python.props", ("python.props", props.encode("utf-8")) diff --git a/PC/layout/support/pymanager.py b/PC/layout/support/pymanager.py deleted file mode 100644 index 667c89cdd2cc7a..00000000000000 --- a/PC/layout/support/pymanager.py +++ /dev/null @@ -1,256 +0,0 @@ -from .constants import * - -URL_BASE = "https://www.python.org/ftp/python/" - -XYZ_VERSION = f"{VER_MAJOR}.{VER_MINOR}.{VER_MICRO}" -WIN32_VERSION = f"{VER_MAJOR}.{VER_MINOR}.{VER_MICRO}.{VER_FIELD4}" -FULL_VERSION = f"{VER_MAJOR}.{VER_MINOR}.{VER_MICRO}{VER_SUFFIX}" - - -def _not_empty(n, key=None): - result = [] - for i in n: - if key: - i_l = i[key] - else: - i_l = i - if not i_l: - continue - result.append(i) - return result - - -def calculate_install_json(ns, *, for_embed=False, for_test=False): - TARGET = "python.exe" - TARGETW = "pythonw.exe" - - SYS_ARCH = { - "win32": "32bit", - "amd64": "64bit", - "arm64": "64bit", # Unfortunate, but this is how it's spec'd - }[ns.arch] - TAG_ARCH = { - "win32": "-32", - "amd64": "-64", - "arm64": "-arm64", - }[ns.arch] - - COMPANY = "PythonCore" - DISPLAY_NAME = "Python" - TAG_SUFFIX = "" - ALIAS_PREFIX = "python" - ALIAS_WPREFIX = "pythonw" - FILE_PREFIX = "python-" - FILE_SUFFIX = f"-{ns.arch}" - DISPLAY_TAGS = [{ - "win32": "32-bit", - "amd64": "", - "arm64": "ARM64", - }[ns.arch]] - - if for_test: - # Packages with the test suite come under a different Company - COMPANY = "PythonTest" - DISPLAY_TAGS.append("with tests") - FILE_SUFFIX = f"-test-{ns.arch}" - if for_embed: - # Embeddable distro comes under a different Company - COMPANY = "PythonEmbed" - TARGETW = None - ALIAS_PREFIX = None - ALIAS_WPREFIX = None - DISPLAY_TAGS.append("embeddable") - # Deliberately name the file differently from the existing distro - # so we can republish old versions without replacing files. - FILE_SUFFIX = f"-embeddable-{ns.arch}" - if ns.include_freethreaded: - # Free-threaded distro comes with a tag suffix - TAG_SUFFIX = "t" - TARGET = f"python{VER_MAJOR}.{VER_MINOR}t.exe" - TARGETW = f"pythonw{VER_MAJOR}.{VER_MINOR}t.exe" - DISPLAY_TAGS.append("free-threaded") - FILE_SUFFIX = f"t-{ns.arch}" - - FULL_TAG = f"{VER_MAJOR}.{VER_MINOR}.{VER_MICRO}{VER_SUFFIX}{TAG_SUFFIX}" - FULL_ARCH_TAG = f"{FULL_TAG}{TAG_ARCH}" - XY_TAG = f"{VER_MAJOR}.{VER_MINOR}{TAG_SUFFIX}" - XY_ARCH_TAG = f"{XY_TAG}{TAG_ARCH}" - X_TAG = f"{VER_MAJOR}{TAG_SUFFIX}" - X_ARCH_TAG = f"{X_TAG}{TAG_ARCH}" - - # Tag used in runtime ID (for side-by-side install/updates) - ID_TAG = XY_ARCH_TAG - # Tag shown in 'py list' output - DISPLAY_TAG = f"{XY_TAG}-dev{TAG_ARCH}" if VER_SUFFIX else XY_ARCH_TAG - # Tag used for PEP 514 registration - SYS_WINVER = XY_TAG + (TAG_ARCH if TAG_ARCH != '-64' else '') - - DISPLAY_SUFFIX = ", ".join(i for i in DISPLAY_TAGS if i) - if DISPLAY_SUFFIX: - DISPLAY_SUFFIX = f" ({DISPLAY_SUFFIX})" - DISPLAY_VERSION = f"{XYZ_VERSION}{VER_SUFFIX}{DISPLAY_SUFFIX}" - - STD_RUN_FOR = [] - STD_ALIAS = [] - STD_PEP514 = [] - STD_START = [] - STD_UNINSTALL = [] - - # The list of 'py install ' tags that will match this runtime. - # Architecture should always be included here because PyManager will add it. - INSTALL_TAGS = [ - FULL_ARCH_TAG, - XY_ARCH_TAG, - X_ARCH_TAG, - # X_TAG and XY_TAG doesn't include VER_SUFFIX, so create -dev versions - f"{XY_TAG}-dev{TAG_ARCH}" if XY_TAG and VER_SUFFIX else "", - f"{X_TAG}-dev{TAG_ARCH}" if X_TAG and VER_SUFFIX else "", - ] - - # Generate run-for entries for each target. - # Again, include architecture because PyManager will add it. - for base in [ - {"target": TARGET}, - {"target": TARGETW, "windowed": 1}, - ]: - if not base["target"]: - continue - STD_RUN_FOR.append({**base, "tag": FULL_ARCH_TAG}) - if XY_TAG: - STD_RUN_FOR.append({**base, "tag": XY_ARCH_TAG}) - if X_TAG: - STD_RUN_FOR.append({**base, "tag": X_ARCH_TAG}) - if VER_SUFFIX: - STD_RUN_FOR.extend([ - {**base, "tag": f"{XY_TAG}-dev{TAG_ARCH}" if XY_TAG else ""}, - {**base, "tag": f"{X_TAG}-dev{TAG_ARCH}" if X_TAG else ""}, - ]) - - # Generate alias entries for each target. We need both arch and non-arch - # versions as well as windowed/non-windowed versions to make sure that all - # necessary aliases are created. - for prefix, base in ( - (ALIAS_PREFIX, {"target": TARGET}), - (ALIAS_WPREFIX, {"target": TARGETW, "windowed": 1}), - ): - if not prefix: - continue - if not base["target"]: - continue - if XY_TAG: - STD_ALIAS.extend([ - {**base, "name": f"{prefix}{XY_TAG}.exe"}, - {**base, "name": f"{prefix}{XY_ARCH_TAG}.exe"}, - ]) - if X_TAG: - STD_ALIAS.extend([ - {**base, "name": f"{prefix}{X_TAG}.exe"}, - {**base, "name": f"{prefix}{X_ARCH_TAG}.exe"}, - ]) - - if SYS_WINVER: - STD_PEP514.append({ - "kind": "pep514", - "Key": rf"{COMPANY}\{SYS_WINVER}", - "DisplayName": f"{DISPLAY_NAME} {DISPLAY_VERSION}", - "SupportUrl": "https://www.python.org/", - "SysArchitecture": SYS_ARCH, - "SysVersion": VER_DOT, - "Version": FULL_VERSION, - "InstallPath": { - "_": "%PREFIX%", - "ExecutablePath": f"%PREFIX%{TARGET}", - # WindowedExecutablePath is added below - }, - "Help": { - "Online Python Documentation": { - "_": f"https://docs.python.org/{VER_DOT}/" - }, - }, - }) - - STD_START.append({ - "kind": "start", - "Name": f"{DISPLAY_NAME} {VER_DOT}{DISPLAY_SUFFIX}", - "Items": [ - { - "Name": f"{DISPLAY_NAME} {VER_DOT}{DISPLAY_SUFFIX}", - "Target": f"%PREFIX%{TARGET}", - "Icon": f"%PREFIX%{TARGET}", - }, - { - "Name": f"{DISPLAY_NAME} {VER_DOT} Online Documentation", - "Icon": r"%SystemRoot%\System32\SHELL32.dll", - "IconIndex": 13, - "Target": f"https://docs.python.org/{VER_DOT}/", - }, - # IDLE and local documentation items are added below - ], - }) - - if TARGETW and STD_PEP514: - STD_PEP514[0]["InstallPath"]["WindowedExecutablePath"] = f"%PREFIX%{TARGETW}" - - if ns.include_idle: - STD_START[0]["Items"].append({ - "Name": f"IDLE (Python {VER_DOT}{DISPLAY_SUFFIX})", - "Target": f"%PREFIX%{TARGETW or TARGET}", - "Arguments": r'"%PREFIX%Lib\idlelib\idle.pyw"', - "Icon": r"%PREFIX%Lib\idlelib\Icons\idle.ico", - "IconIndex": 0, - }) - STD_START[0]["Items"].append({ - "Name": f"PyDoc (Python {VER_DOT}{DISPLAY_SUFFIX})", - "Target": f"%PREFIX%{TARGET}", - "Arguments": "-m pydoc -b", - "Icon": r"%PREFIX%Lib\idlelib\Icons\idle.ico", - "IconIndex": 0, - }) - if STD_PEP514: - STD_PEP514[0]["InstallPath"]["IdlePath"] = f"%PREFIX%Lib\\idlelib\\idle.pyw" - - if ns.include_html_doc: - STD_PEP514[0]["Help"]["Main Python Documentation"] = { - "_": rf"%PREFIX%Doc\html\index.html", - } - STD_START[0]["Items"].append({ - "Name": f"{DISPLAY_NAME} {VER_DOT} Manuals{DISPLAY_SUFFIX}", - "Target": r"%PREFIX%Doc\html\index.html", - }) - elif ns.include_chm: - STD_PEP514[0]["Help"]["Main Python Documentation"] = { - "_": rf"%PREFIX%Doc\{PYTHON_CHM_NAME}", - } - STD_START[0]["Items"].append({ - "Name": f"{DISPLAY_NAME} {VER_DOT} Manuals{DISPLAY_SUFFIX}", - "Target": "%WINDIR%hhc.exe", - "Arguments": rf"%PREFIX%Doc\{PYTHON_CHM_NAME}", - }) - - STD_UNINSTALL.append({ - "kind": "uninstall", - # Other settings will pick up sensible defaults - "Publisher": "Python Software Foundation", - "HelpLink": f"https://docs.python.org/{VER_DOT}/", - }) - - data = { - "schema": 1, - "id": f"{COMPANY.lower()}-{ID_TAG}", - "sort-version": FULL_VERSION, - "company": COMPANY, - "tag": DISPLAY_TAG, - "install-for": _not_empty(INSTALL_TAGS), - "run-for": _not_empty(STD_RUN_FOR, "tag"), - "alias": _not_empty(STD_ALIAS, "name"), - "shortcuts": [ - *STD_PEP514, - *STD_START, - *STD_UNINSTALL, - ], - "display-name": f"{DISPLAY_NAME} {DISPLAY_VERSION}", - "executable": rf".\{TARGET}", - "url": f"{URL_BASE}{XYZ_VERSION}/{FILE_PREFIX}{FULL_VERSION}{FILE_SUFFIX}.zip" - } - - return data diff --git a/PC/layout/support/python.props b/PC/layout/support/python.props deleted file mode 100644 index c48ecb2f9c1b57..00000000000000 --- a/PC/layout/support/python.props +++ /dev/null @@ -1,52 +0,0 @@ - - - - $(MSBuildThisFileDirectory)\..\..\tools - $(PythonHome)\include - $(PythonHome)\libs - $$PYTHON_TAG$$ - $$PYTHON_VERSION$$ - - true - false - - $$PYTHON_TARGET$$;$(GetPythonRuntimeFilesDependsOn) - - - - - $(PythonInclude);%(AdditionalIncludeDirectories) - MultiThreadedDLL - - - $(PythonLibs);%(AdditionalLibraryDirectories) - - - - - - - - <_PythonRuntimeExe Include="$(PythonHome)\python*.dll" /> - <_PythonRuntimeExe Include="$(PythonHome)\vcruntime140.dll" /> - <_PythonRuntimeExe Include="$(PythonHome)\python*.exe" Condition="$(IncludePythonExe) == 'true'" /> - <_PythonRuntimeExe> - %(Filename)%(Extension) - - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.pyd" /> - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.dll" /> - <_PythonRuntimeDlls> - DLLs\%(Filename)%(Extension) - - <_PythonRuntimeLib Include="$(PythonHome)\Lib\**\*" Exclude="$(PythonHome)\Lib\**\*.pyc;$(PythonHome)\Lib\site-packages\**\*" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\ensurepip\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\venv\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib> - Lib\%(RecursiveDir)%(Filename)%(Extension) - - - - - - - diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c deleted file mode 100644 index b170e06b47dd59..00000000000000 --- a/PC/msvcrtmodule.c +++ /dev/null @@ -1,674 +0,0 @@ -/********************************************************* - - msvcrtmodule.c - - A Python interface to the Microsoft Visual C Runtime - Library, providing access to those non-portable, but - still useful routines. - - Only ever compiled with an MS compiler, so no attempt - has been made to avoid MS language extensions, etc... - - This may only work on NT or 95... - - Author: Mark Hammond and Guido van Rossum. - Maintenance: Guido van Rossum. - -***********************************************************/ - -#include "Python.h" -#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH -#include "malloc.h" -#include -#include -#include -#include -#include - -#ifdef _MSC_VER -#if _MSC_VER >= 1500 && _MSC_VER < 1600 -#include -#elif _MSC_VER >= 1600 -#include -#endif -#endif - -/*[python input] -class HANDLE_converter(CConverter): - type = 'void *' - format_unit = '"_Py_PARSE_UINTPTR"' - - def parse_arg(self, argname, displayname, *, limited_capi): - return self.format_code(""" - {paramname} = PyLong_AsVoidPtr({argname}); - if (!{paramname} && PyErr_Occurred()) {{{{ - goto exit; - }}}} - """, - argname=argname) - -class HANDLE_return_converter(CReturnConverter): - type = 'void *' - - def render(self, function, data): - self.declare(data) - self.err_occurred_if( - "_return_value == NULL || _return_value == INVALID_HANDLE_VALUE", - data) - data.return_conversion.append( - 'return_value = PyLong_FromVoidPtr(_return_value);\n') - -class byte_char_return_converter(CReturnConverter): - type = 'int' - - def render(self, function, data): - data.declarations.append('char s[1];') - data.return_value = 's[0]' - data.return_conversion.append( - 'return_value = PyBytes_FromStringAndSize(s, 1);\n') - -class wchar_t_return_converter(CReturnConverter): - type = 'wchar_t' - - def render(self, function, data): - self.declare(data) - data.return_conversion.append( - 'return_value = PyUnicode_FromOrdinal(_return_value);\n') -[python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=ff031be44ab3250d]*/ - -/*[clinic input] -module msvcrt -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f31a87a783d036cd]*/ - -#include "clinic/msvcrtmodule.c.h" - -/*[clinic input] -msvcrt.heapmin - -Minimize the malloc() heap. - -Force the malloc() heap to clean itself up and return unused blocks -to the operating system. On failure, this raises OSError. -[clinic start generated code]*/ - -static PyObject * -msvcrt_heapmin_impl(PyObject *module) -/*[clinic end generated code: output=1ba00f344782dc19 input=82e1771d21bde2d8]*/ -{ - if (_heapmin() != 0) - return PyErr_SetFromErrno(PyExc_OSError); - - Py_RETURN_NONE; -} -/*[clinic input] -msvcrt.locking - - fd: int - mode: int - nbytes: long - / - -Lock part of a file based on file descriptor fd from the C runtime. - -Raises OSError on failure. The locked region of the file extends from -the current file position for nbytes bytes, and may continue beyond -the end of the file. mode must be one of the LK_* constants listed -below. Multiple regions in a file may be locked at the same time, but -may not overlap. Adjacent regions are not merged; they must be unlocked -individually. -[clinic start generated code]*/ - -static PyObject * -msvcrt_locking_impl(PyObject *module, int fd, int mode, long nbytes) -/*[clinic end generated code: output=a4a90deca9785a03 input=e97bd15fc4a04fef]*/ -{ - int err; - - if (PySys_Audit("msvcrt.locking", "iil", fd, mode, nbytes) < 0) { - return NULL; - } - - Py_BEGIN_ALLOW_THREADS - _Py_BEGIN_SUPPRESS_IPH - err = _locking(fd, mode, nbytes); - _Py_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS - if (err != 0) - return PyErr_SetFromErrno(PyExc_OSError); - - Py_RETURN_NONE; -} - -/*[clinic input] -msvcrt.setmode -> long - - fd: int - mode as flags: int - / - -Set the line-end translation mode for the file descriptor fd. - -To set it to text mode, flags should be os.O_TEXT; for binary, it -should be os.O_BINARY. - -Return value is the previous mode. -[clinic start generated code]*/ - -static long -msvcrt_setmode_impl(PyObject *module, int fd, int flags) -/*[clinic end generated code: output=24a9be5ea07ccb9b input=76e7c01f6b137f75]*/ -{ - _Py_BEGIN_SUPPRESS_IPH - flags = _setmode(fd, flags); - _Py_END_SUPPRESS_IPH - if (flags == -1) - PyErr_SetFromErrno(PyExc_OSError); - - return flags; -} - -/*[clinic input] -msvcrt.open_osfhandle -> long - - handle: HANDLE - flags: int - / - -Create a C runtime file descriptor from the file handle handle. - -The flags parameter should be a bitwise OR of os.O_APPEND, os.O_RDONLY, -and os.O_TEXT. The returned file descriptor may be used as a parameter -to os.fdopen() to create a file object. -[clinic start generated code]*/ - -static long -msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags) -/*[clinic end generated code: output=b2fb97c4b515e4e6 input=d5db190a307cf4bb]*/ -{ - if (PySys_Audit("msvcrt.open_osfhandle", "Ki", handle, flags) < 0) { - return -1; - } - - return _Py_open_osfhandle(handle, flags); -} - -/*[clinic input] -msvcrt.get_osfhandle -> HANDLE - - fd: int - / - -Return the file handle for the file descriptor fd. - -Raises OSError if fd is not recognized. -[clinic start generated code]*/ - -static void * -msvcrt_get_osfhandle_impl(PyObject *module, int fd) -/*[clinic end generated code: output=aca01dfe24637374 input=5fcfde9b17136aa2]*/ -{ - if (PySys_Audit("msvcrt.get_osfhandle", "(i)", fd) < 0) { - return NULL; - } - - return _Py_get_osfhandle(fd); -} - -/* Console I/O */ -/*[clinic input] -msvcrt.kbhit -> long - -Returns a nonzero value if a keypress is waiting to be read. Otherwise, return 0. -[clinic start generated code]*/ - -static long -msvcrt_kbhit_impl(PyObject *module) -/*[clinic end generated code: output=940dfce6587c1890 input=d0f4cb3289ff51e2]*/ -{ - return _kbhit(); -} - -/*[clinic input] -msvcrt.getch -> byte_char - -Read a keypress and return the resulting character as a byte string. - -Nothing is echoed to the console. This call will block if a keypress is -not already available, but will not wait for Enter to be pressed. If the -pressed key was a special function key, this will return '\000' or -'\xe0'; the next call will return the keycode. The Control-C keypress -cannot be read with this function. -[clinic start generated code]*/ - -static int -msvcrt_getch_impl(PyObject *module) -/*[clinic end generated code: output=a4e51f0565064a7d input=37a40cf0ed0d1153]*/ -{ - int ch; - - Py_BEGIN_ALLOW_THREADS - ch = _getch(); - Py_END_ALLOW_THREADS - return ch; -} - -#ifdef MS_WINDOWS_DESKTOP - -/*[clinic input] -msvcrt.getwch -> wchar_t - -Wide char variant of getch(), returning a Unicode value. -[clinic start generated code]*/ - -static wchar_t -msvcrt_getwch_impl(PyObject *module) -/*[clinic end generated code: output=be9937494e22f007 input=27b3dec8ad823d7c]*/ -{ - wchar_t ch; - - Py_BEGIN_ALLOW_THREADS - ch = _getwch(); - Py_END_ALLOW_THREADS - return ch; -} - -#endif /* MS_WINDOWS_DESKTOP */ - -/*[clinic input] -msvcrt.getche -> byte_char - -Similar to getch(), but the keypress will be echoed if possible. -[clinic start generated code]*/ - -static int -msvcrt_getche_impl(PyObject *module) -/*[clinic end generated code: output=d8f7db4fd2990401 input=43311ade9ed4a9c0]*/ -{ - int ch; - - Py_BEGIN_ALLOW_THREADS - ch = _getche(); - Py_END_ALLOW_THREADS - return ch; -} - -#ifdef MS_WINDOWS_DESKTOP - -/*[clinic input] -msvcrt.getwche -> wchar_t - -Wide char variant of getche(), returning a Unicode value. -[clinic start generated code]*/ - -static wchar_t -msvcrt_getwche_impl(PyObject *module) -/*[clinic end generated code: output=d0dae5ba3829d596 input=49337d59d1a591f8]*/ -{ - wchar_t ch; - - Py_BEGIN_ALLOW_THREADS - ch = _getwche(); - Py_END_ALLOW_THREADS - return ch; -} - -#endif /* MS_WINDOWS_DESKTOP */ - -/*[clinic input] -msvcrt.putch - - char: char - / - -Print the byte string char to the console without buffering. -[clinic start generated code]*/ - -static PyObject * -msvcrt_putch_impl(PyObject *module, char char_value) -/*[clinic end generated code: output=92ec9b81012d8f60 input=ec078dd10cb054d6]*/ -{ - _Py_BEGIN_SUPPRESS_IPH - _putch(char_value); - _Py_END_SUPPRESS_IPH - Py_RETURN_NONE; -} - -#ifdef MS_WINDOWS_DESKTOP - -/*[clinic input] -msvcrt.putwch - - unicode_char: int(accept={str}) - / - -Wide char variant of putch(), accepting a Unicode value. -[clinic start generated code]*/ - -static PyObject * -msvcrt_putwch_impl(PyObject *module, int unicode_char) -/*[clinic end generated code: output=a3bd1a8951d28eee input=996ccd0bbcbac4c3]*/ -{ - _Py_BEGIN_SUPPRESS_IPH - _putwch(unicode_char); - _Py_END_SUPPRESS_IPH - Py_RETURN_NONE; - -} - -#endif /* MS_WINDOWS_DESKTOP */ - -/*[clinic input] -msvcrt.ungetch - - char: char - / - -Opposite of getch. - -Cause the byte string char to be "pushed back" into the -console buffer; it will be the next character read by -getch() or getche(). -[clinic start generated code]*/ - -static PyObject * -msvcrt_ungetch_impl(PyObject *module, char char_value) -/*[clinic end generated code: output=c6942a0efa119000 input=22f07ee9001bbf0f]*/ -{ - int res; - - _Py_BEGIN_SUPPRESS_IPH - res = _ungetch(char_value); - _Py_END_SUPPRESS_IPH - - if (res == EOF) - return PyErr_SetFromErrno(PyExc_OSError); - Py_RETURN_NONE; -} - -#ifdef MS_WINDOWS_DESKTOP - -/*[clinic input] -msvcrt.ungetwch - - unicode_char: int(accept={str}) - / - -Wide char variant of ungetch(), accepting a Unicode value. -[clinic start generated code]*/ - -static PyObject * -msvcrt_ungetwch_impl(PyObject *module, int unicode_char) -/*[clinic end generated code: output=e63af05438b8ba3d input=83ec0492be04d564]*/ -{ - int res; - - _Py_BEGIN_SUPPRESS_IPH - res = _ungetwch(unicode_char); - _Py_END_SUPPRESS_IPH - - if (res == WEOF) - return PyErr_SetFromErrno(PyExc_OSError); - Py_RETURN_NONE; -} - -#endif /* MS_WINDOWS_DESKTOP */ - -#ifdef _DEBUG -/*[clinic input] -msvcrt.CrtSetReportFile -> HANDLE - - type: int - file: HANDLE - / - -Wrapper around _CrtSetReportFile. - -Only available on Debug builds. -[clinic start generated code]*/ - -static void * -msvcrt_CrtSetReportFile_impl(PyObject *module, int type, void *file) -/*[clinic end generated code: output=9393e8c77088bbe9 input=290809b5f19e65b9]*/ -{ - HANDLE res; - - _Py_BEGIN_SUPPRESS_IPH - res = _CrtSetReportFile(type, file); - _Py_END_SUPPRESS_IPH - - return res; -} - -/*[clinic input] -msvcrt.CrtSetReportMode -> long - - type: int - mode: int - / - -Wrapper around _CrtSetReportMode. - -Only available on Debug builds. -[clinic start generated code]*/ - -static long -msvcrt_CrtSetReportMode_impl(PyObject *module, int type, int mode) -/*[clinic end generated code: output=b2863761523de317 input=9319d29b4319426b]*/ -{ - int res; - - _Py_BEGIN_SUPPRESS_IPH - res = _CrtSetReportMode(type, mode); - _Py_END_SUPPRESS_IPH - if (res == -1) - PyErr_SetFromErrno(PyExc_OSError); - return res; -} - -/*[clinic input] -msvcrt.set_error_mode -> long - - mode: int - / - -Wrapper around _set_error_mode. - -Only available on Debug builds. -[clinic start generated code]*/ - -static long -msvcrt_set_error_mode_impl(PyObject *module, int mode) -/*[clinic end generated code: output=ac4a09040d8ac4e3 input=046fca59c0f20872]*/ -{ - long res; - - _Py_BEGIN_SUPPRESS_IPH - res = _set_error_mode(mode); - _Py_END_SUPPRESS_IPH - - return res; -} -#endif /* _DEBUG */ - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -msvcrt.GetErrorMode - -Wrapper around GetErrorMode. -[clinic start generated code]*/ - -static PyObject * -msvcrt_GetErrorMode_impl(PyObject *module) -/*[clinic end generated code: output=3103fc6145913591 input=5a7fb083b6dd71fd]*/ -{ - unsigned int res; - - _Py_BEGIN_SUPPRESS_IPH - res = GetErrorMode(); - _Py_END_SUPPRESS_IPH - - return PyLong_FromUnsignedLong(res); -} - -#endif /* MS_WINDOWS_APP || MS_WINDOWS_SYSTEM */ - -/*[clinic input] -msvcrt.SetErrorMode - - mode: unsigned_int(bitwise=True) - / - -Wrapper around SetErrorMode. -[clinic start generated code]*/ - -static PyObject * -msvcrt_SetErrorMode_impl(PyObject *module, unsigned int mode) -/*[clinic end generated code: output=01d529293f00da8f input=d8b167258d32d907]*/ -{ - unsigned int res; - - _Py_BEGIN_SUPPRESS_IPH - res = SetErrorMode(mode); - _Py_END_SUPPRESS_IPH - - return PyLong_FromUnsignedLong(res); -} - -/*[clinic input] -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/ - -/* List of functions exported by this module */ -static struct PyMethodDef msvcrt_functions[] = { - MSVCRT_HEAPMIN_METHODDEF - MSVCRT_LOCKING_METHODDEF - MSVCRT_SETMODE_METHODDEF - MSVCRT_OPEN_OSFHANDLE_METHODDEF - MSVCRT_GET_OSFHANDLE_METHODDEF - MSVCRT_KBHIT_METHODDEF - MSVCRT_GETCH_METHODDEF - MSVCRT_GETCHE_METHODDEF - MSVCRT_PUTCH_METHODDEF - MSVCRT_UNGETCH_METHODDEF - MSVCRT_GETERRORMODE_METHODDEF - MSVCRT_SETERRORMODE_METHODDEF - MSVCRT_CRTSETREPORTFILE_METHODDEF - MSVCRT_CRTSETREPORTMODE_METHODDEF - MSVCRT_SET_ERROR_MODE_METHODDEF - MSVCRT_GETWCH_METHODDEF - MSVCRT_GETWCHE_METHODDEF - MSVCRT_PUTWCH_METHODDEF - MSVCRT_UNGETWCH_METHODDEF - {NULL, NULL} -}; - -static int -insertptr(PyObject *mod, const char *name, void *value) -{ - return PyModule_Add(mod, name, PyLong_FromVoidPtr(value)); -} - -#define INSERTINT(MOD, NAME, VAL) do { \ - if (PyModule_AddIntConstant(MOD, NAME, VAL) < 0) { \ - return -1; \ - } \ -} while (0) - -#define INSERTPTR(MOD, NAME, PTR) do { \ - if (insertptr(MOD, NAME, PTR) < 0) { \ - return -1; \ - } \ -} while (0) - -#define INSERTSTR(MOD, NAME, CONST) do { \ - if (PyModule_AddStringConstant(MOD, NAME, CONST) < 0) { \ - return -1; \ - } \ -} while (0) - -static int -exec_module(PyObject* m) -{ - /* constants for the locking() function's mode argument */ - INSERTINT(m, "LK_LOCK", _LK_LOCK); - INSERTINT(m, "LK_NBLCK", _LK_NBLCK); - INSERTINT(m, "LK_NBRLCK", _LK_NBRLCK); - INSERTINT(m, "LK_RLCK", _LK_RLCK); - INSERTINT(m, "LK_UNLCK", _LK_UNLCK); -#ifdef MS_WINDOWS_DESKTOP - INSERTINT(m, "SEM_FAILCRITICALERRORS", SEM_FAILCRITICALERRORS); - INSERTINT(m, "SEM_NOALIGNMENTFAULTEXCEPT", SEM_NOALIGNMENTFAULTEXCEPT); - INSERTINT(m, "SEM_NOGPFAULTERRORBOX", SEM_NOGPFAULTERRORBOX); - INSERTINT(m, "SEM_NOOPENFILEERRORBOX", SEM_NOOPENFILEERRORBOX); -#endif -#ifdef _DEBUG - INSERTINT(m, "CRT_WARN", _CRT_WARN); - INSERTINT(m, "CRT_ERROR", _CRT_ERROR); - INSERTINT(m, "CRT_ASSERT", _CRT_ASSERT); - INSERTINT(m, "CRTDBG_MODE_DEBUG", _CRTDBG_MODE_DEBUG); - INSERTINT(m, "CRTDBG_MODE_FILE", _CRTDBG_MODE_FILE); - INSERTINT(m, "CRTDBG_MODE_WNDW", _CRTDBG_MODE_WNDW); - INSERTINT(m, "CRTDBG_REPORT_MODE", _CRTDBG_REPORT_MODE); - INSERTPTR(m, "CRTDBG_FILE_STDERR", _CRTDBG_FILE_STDERR); - INSERTPTR(m, "CRTDBG_FILE_STDOUT", _CRTDBG_FILE_STDOUT); - INSERTPTR(m, "CRTDBG_REPORT_FILE", _CRTDBG_REPORT_FILE); - INSERTINT(m, "OUT_TO_DEFAULT", _OUT_TO_DEFAULT); - INSERTINT(m, "OUT_TO_STDERR", _OUT_TO_STDERR); - INSERTINT(m, "OUT_TO_MSGBOX", _OUT_TO_MSGBOX); - INSERTINT(m, "REPORT_ERRMODE", _REPORT_ERRMODE); -#endif - -#undef INSERTINT -#undef INSERTPTR - - /* constants for the crt versions */ -#ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN - INSERTSTR(m, "VC_ASSEMBLY_PUBLICKEYTOKEN", _VC_ASSEMBLY_PUBLICKEYTOKEN); -#endif -#ifdef _CRT_ASSEMBLY_VERSION - INSERTSTR(m, "CRT_ASSEMBLY_VERSION", _CRT_ASSEMBLY_VERSION); -#endif -#ifdef __LIBRARIES_ASSEMBLY_NAME_PREFIX - INSERTSTR(m, "LIBRARIES_ASSEMBLY_NAME_PREFIX", - __LIBRARIES_ASSEMBLY_NAME_PREFIX); -#endif - -#undef INSERTSTR - - /* constants for the 2010 crt versions */ -#if defined(_VC_CRT_MAJOR_VERSION) && defined (_VC_CRT_MINOR_VERSION) && defined(_VC_CRT_BUILD_VERSION) && defined(_VC_CRT_RBUILD_VERSION) - PyObject *version = PyUnicode_FromFormat("%d.%d.%d.%d", - _VC_CRT_MAJOR_VERSION, - _VC_CRT_MINOR_VERSION, - _VC_CRT_BUILD_VERSION, - _VC_CRT_RBUILD_VERSION); - if (PyModule_Add(m, "CRT_ASSEMBLY_VERSION", version) < 0) { - return -1; - } -#endif - - return 0; -} - -static PyModuleDef_Slot msvcrt_slots[] = { - {Py_mod_exec, exec_module}, - {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, - {Py_mod_gil, Py_MOD_GIL_NOT_USED}, - {0, NULL} -}; - -static struct PyModuleDef msvcrtmodule = { - .m_base = PyModuleDef_HEAD_INIT, - .m_name = "msvcrt", - .m_methods = msvcrt_functions, - .m_slots = msvcrt_slots, -}; - -PyMODINIT_FUNC -PyInit_msvcrt(void) -{ - return PyModuleDef_Init(&msvcrtmodule); -} diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in deleted file mode 100644 index 424421f6ff1647..00000000000000 --- a/PC/pyconfig.h.in +++ /dev/null @@ -1,759 +0,0 @@ -#ifndef Py_CONFIG_H -#define Py_CONFIG_H - -/* pyconfig.h. NOT Generated automatically by configure. - -This is a manually maintained version used for the Watcom, -Borland and Microsoft Visual C++ compilers. It is a -standard part of the Python distribution. - -WINDOWS DEFINES: -The code specific to Windows should be wrapped around one of -the following #defines - -MS_WIN64 - Code specific to the MS Win64 API -MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs) -MS_WINDOWS - Code specific to Windows, but all versions. -Py_ENABLE_SHARED - Code if the Python core is built as a DLL. - -Also note that neither "_M_IX86" or "_MSC_VER" should be used for -any purpose other than "Windows Intel x86 specific" and "Microsoft -compiler specific". Therefore, these should be very rare. - - -NOTE: The following symbols are deprecated: -NT, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT -MS_CORE_DLL. - -WIN32 is still required for the locale module. - -*/ - -/* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */ -#ifdef USE_DL_EXPORT -# define Py_BUILD_CORE -#endif /* USE_DL_EXPORT */ - -/* Visual Studio 2005 introduces deprecation warnings for - "insecure" and POSIX functions. The insecure functions should - be replaced by *_s versions (according to Microsoft); the - POSIX functions by _* versions (which, according to Microsoft, - would be ISO C conforming). Neither renaming is feasible, so - we just silence the warnings. */ - -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif -#ifndef _CRT_NONSTDC_NO_DEPRECATE -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif - -#define HAVE_IO_H -#define HAVE_SYS_UTIME_H -#define HAVE_TEMPNAM -#define HAVE_TMPFILE -#define HAVE_TMPNAM -#define HAVE_CLOCK -#define HAVE_STRERROR - -#include - -#define HAVE_STRFTIME -#define DONT_HAVE_SIG_ALARM -#define DONT_HAVE_SIG_PAUSE -#define LONG_BIT 32 -#define WORD_BIT 32 - -#define MS_WIN32 /* only support win32 and greater. */ -#define MS_WINDOWS -#define NT_THREADS -#define WITH_THREAD -#ifndef NETSCAPE_PI -#define USE_SOCKET -#endif - -#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE) -#include - -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -#define MS_WINDOWS_DESKTOP -#endif -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) -#define MS_WINDOWS_APP -#endif -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM) -#define MS_WINDOWS_SYSTEM -#endif -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_GAMES) -#define MS_WINDOWS_GAMES -#endif - -/* Define to 1 if you support windows console io */ -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM) -#define HAVE_WINDOWS_CONSOLE_IO 1 -#endif -#endif /* Py_BUILD_CORE || Py_BUILD_CORE_BUILTIN || Py_BUILD_CORE_MODULE */ - -/* Define to 1 if you want to disable the GIL */ -/* Uncomment the definition for free-threaded builds, or define it manually - * when compiling extension modules. Note that we test with #ifdef, so - * defining as 0 will still disable the GIL. */ -#ifndef Py_GIL_DISABLED -/* #define Py_GIL_DISABLED 1 */ -#endif - -/* Compiler specific defines */ - -/* ------------------------------------------------------------------------*/ -/* Microsoft C defines _MSC_VER, as does clang-cl.exe */ -#ifdef _MSC_VER - -/* We want COMPILER to expand to a string containing _MSC_VER's *value*. - * This is horridly tricky, because the stringization operator only works - * on macro arguments, and doesn't evaluate macros passed *as* arguments. - */ -#define _Py_PASTE_VERSION(SUFFIX) \ - ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]") -/* e.g., this produces, after compile-time string catenation, - * ("[MSC v.1900 64 bit (Intel)]") - * - * _Py_STRINGIZE(_MSC_VER) expands to - * _Py_STRINGIZE1(_MSC_VER) and this second macro call is scanned - * again for macros and so further expands to - * _Py_STRINGIZE1(1900) which then expands to - * "1900" - */ -#define _Py_STRINGIZE(X) _Py_STRINGIZE1(X) -#define _Py_STRINGIZE1(X) #X - -/* MSVC defines _WINxx to differentiate the windows platform types - - Note that for compatibility reasons _WIN32 is defined on Win32 - *and* on Win64. For the same reasons, in Python, MS_WIN32 is - defined on Win32 *and* Win64. Win32 only code must therefore be - guarded as follows: - #if defined(MS_WIN32) && !defined(MS_WIN64) -*/ -#ifdef _WIN64 -#define MS_WIN64 -#endif - -/* set the COMPILER and support tier - * - * win_amd64 MSVC (x86_64-pc-windows-msvc): 1 - * win32 MSVC (i686-pc-windows-msvc): 1 - * win_arm64 MSVC (aarch64-pc-windows-msvc): 3 - * other archs and ICC: 0 - */ -#ifdef MS_WIN64 -#if defined(_M_X64) || defined(_M_AMD64) -#if defined(__clang__) -#define COMPILER ("[Clang " __clang_version__ "] 64 bit (AMD64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]") -#define PY_SUPPORT_TIER 0 -#elif defined(__INTEL_COMPILER) -#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]") -#define PY_SUPPORT_TIER 0 -#else -#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)") -#define PY_SUPPORT_TIER 1 -#endif /* __clang__ */ -#define PYD_PLATFORM_TAG "win_amd64" -#elif defined(_M_ARM64) -#define COMPILER _Py_PASTE_VERSION("64 bit (ARM64)") -#define PY_SUPPORT_TIER 3 -#define PYD_PLATFORM_TAG "win_arm64" -#else -#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)") -#define PY_SUPPORT_TIER 0 -#endif -#endif /* MS_WIN64 */ - -/* set the version macros for the windows headers */ -/* Python 3.12+ requires Windows 8.1 or greater */ -#define Py_WINVER 0x0603 /* _WIN32_WINNT_WINBLUE (8.1) */ -#define Py_NTDDI NTDDI_WINBLUE - -/* We only set these values when building Python - we don't want to force - these values on extensions, as that will affect the prototypes and - structures exposed in the Windows headers. Even when building Python, we - allow a single source file to override this - they may need access to - structures etc so it can optionally use new Windows features if it - determines at runtime they are available. -*/ -#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE) -#ifndef NTDDI_VERSION -#define NTDDI_VERSION Py_NTDDI -#endif -#ifndef WINVER -#define WINVER Py_WINVER -#endif -#ifndef _WIN32_WINNT -#define _WIN32_WINNT Py_WINVER -#endif -#endif - -/* _W64 is not defined for VC6 or eVC4 */ -#ifndef _W64 -#define _W64 -#endif - -/* Define like size_t, omitting the "unsigned" */ -#ifdef MS_WIN64 -typedef __int64 Py_ssize_t; -# define PY_SSIZE_T_MAX LLONG_MAX -#else -typedef _W64 int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -#endif -#define HAVE_PY_SSIZE_T 1 - -#if defined(MS_WIN32) && !defined(MS_WIN64) -#if defined(_M_IX86) -#if defined(__clang__) -#define COMPILER ("[Clang " __clang_version__ "] 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]") -#define PY_SUPPORT_TIER 0 -#elif defined(__INTEL_COMPILER) -#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]") -#define PY_SUPPORT_TIER 0 -#else -#define COMPILER _Py_PASTE_VERSION("32 bit (Intel)") -#define PY_SUPPORT_TIER 1 -#endif /* __clang__ */ -#define PYD_PLATFORM_TAG "win32" -#elif defined(_M_ARM) -#define COMPILER _Py_PASTE_VERSION("32 bit (ARM)") -#define PYD_PLATFORM_TAG "win_arm32" -#define PY_SUPPORT_TIER 0 -#else -#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)") -#define PY_SUPPORT_TIER 0 -#endif -#endif /* MS_WIN32 && !MS_WIN64 */ - -typedef int pid_t; - -/* define some ANSI types that are not defined in earlier Win headers */ -#if _MSC_VER >= 1200 -/* This file only exists in VC 6.0 or higher */ -#include -#endif - -#endif /* _MSC_VER */ - -/* ------------------------------------------------------------------------*/ -/* mingw and mingw-w64 define __MINGW32__ */ -#ifdef __MINGW32__ - -#ifdef _WIN64 -#define MS_WIN64 -#endif - -#endif /* __MINGW32__*/ - -/* ------------------------------------------------------------------------*/ -/* egcs/gnu-win32 defines __GNUC__ and _WIN32 */ -#if defined(__GNUC__) && defined(_WIN32) -/* XXX These defines are likely incomplete, but should be easy to fix. - They should be complete enough to build extension modules. */ -/* Suggested by Rene Liebscher to avoid a GCC 2.91.* - bug that requires structure imports. More recent versions of the - compiler don't exhibit this bug. -*/ -#if (__GNUC__==2) && (__GNUC_MINOR__<=91) -#warning "Please use an up-to-date version of gcc! (>2.91 recommended)" -#endif - -#define COMPILER "[gcc]" -#define PY_LONG_LONG long long -#define PY_LLONG_MIN LLONG_MIN -#define PY_LLONG_MAX LLONG_MAX -#define PY_ULLONG_MAX ULLONG_MAX -#endif /* GNUC */ - -/* ------------------------------------------------------------------------*/ -/* lcc-win32 defines __LCC__ */ -#if defined(__LCC__) -/* XXX These defines are likely incomplete, but should be easy to fix. - They should be complete enough to build extension modules. */ - -#define COMPILER "[lcc-win32]" -typedef int pid_t; -/* __declspec() is supported here too - do nothing to get the defaults */ - -#endif /* LCC */ - -/* ------------------------------------------------------------------------*/ -/* End of compilers - finish up */ - -#ifndef NO_STDIO_H -# include -#endif - -/* 64 bit ints are usually spelt __int64 unless compiler has overridden */ -#ifndef PY_LONG_LONG -# define PY_LONG_LONG __int64 -# define PY_LLONG_MAX _I64_MAX -# define PY_LLONG_MIN _I64_MIN -# define PY_ULLONG_MAX _UI64_MAX -#endif - -/* For Windows the Python core is in a DLL by default. Test -Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ -#if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) -# define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ -# define MS_COREDLL /* deprecated old symbol */ -#endif /* !MS_NO_COREDLL && ... */ - -/* All windows compilers that use this header support __declspec */ -#define HAVE_DECLSPEC_DLL - -/* For an MSVC DLL, we can nominate the .lib files used by extensions */ -#ifdef MS_COREDLL -# if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN) - /* not building the core - must be an ext */ -# if defined(_MSC_VER) - /* So MSVC users need not specify the .lib - file in their Makefile */ -# if defined(Py_GIL_DISABLED) -# if defined(_DEBUG) -# pragma comment(lib,"python313t_d.lib") -# elif defined(Py_LIMITED_API) -# pragma comment(lib,"python3t.lib") -# else -# pragma comment(lib,"python313t.lib") -# endif /* _DEBUG */ -# else /* Py_GIL_DISABLED */ -# if defined(_DEBUG) -# pragma comment(lib,"python313_d.lib") -# elif defined(Py_LIMITED_API) -# pragma comment(lib,"python3.lib") -# else -# pragma comment(lib,"python313.lib") -# endif /* _DEBUG */ -# endif /* Py_GIL_DISABLED */ -# endif /* _MSC_VER */ -# endif /* Py_BUILD_CORE */ -#endif /* MS_COREDLL */ - -#ifdef MS_WIN64 -/* maintain "win32" sys.platform for backward compatibility of Python code, - the Win64 API should be close enough to the Win32 API to make this - preferable */ -# define PLATFORM "win32" -# define SIZEOF_VOID_P 8 -# define SIZEOF_TIME_T 8 -# define SIZEOF_OFF_T 4 -# define SIZEOF_FPOS_T 8 -# define SIZEOF_HKEY 8 -# define SIZEOF_SIZE_T 8 -# define ALIGNOF_SIZE_T 8 -# define ALIGNOF_MAX_ALIGN_T 8 -/* configure.ac defines HAVE_LARGEFILE_SUPPORT iff - sizeof(off_t) > sizeof(long), and sizeof(long long) >= sizeof(off_t). - On Win64 the second condition is not true, but if fpos_t replaces off_t - then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64 - should define this. */ -# define HAVE_LARGEFILE_SUPPORT -#elif defined(MS_WIN32) -# define PLATFORM "win32" -# define HAVE_LARGEFILE_SUPPORT -# define SIZEOF_VOID_P 4 -# define SIZEOF_OFF_T 4 -# define SIZEOF_FPOS_T 8 -# define SIZEOF_HKEY 4 -# define SIZEOF_SIZE_T 4 -# define ALIGNOF_SIZE_T 4 - /* MS VS2005 changes time_t to a 64-bit type on all platforms */ -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define SIZEOF_TIME_T 8 -# else -# define SIZEOF_TIME_T 4 -# endif -# define ALIGNOF_MAX_ALIGN_T 8 -#endif - -#ifdef _DEBUG -# define Py_DEBUG -#endif - - -#ifdef MS_WIN32 - -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 -#define ALIGNOF_LONG 4 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_DOUBLE 8 -#define SIZEOF_FLOAT 4 - -/* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200. - Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't - define these. - If some compiler does not provide them, modify the #if appropriately. */ -#if defined(_MSC_VER) -#if _MSC_VER > 1300 -#define HAVE_UINTPTR_T 1 -#define HAVE_INTPTR_T 1 -#else -/* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer literals */ -#define Py_LL(x) x##I64 -#endif /* _MSC_VER > 1300 */ -#endif /* _MSC_VER */ - -#endif - -/* define signed and unsigned exact-width 32-bit and 64-bit types, used in the - implementation of Python integers. */ -#define PY_UINT32_T uint32_t -#define PY_UINT64_T uint64_t -#define PY_INT32_T int32_t -#define PY_INT64_T int64_t - -/* Fairly standard from here! */ - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* #undef _ALL_SOURCE */ -#endif - -/* Define to empty if the keyword does not work. */ -/* #define const */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CONIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DIRECT_H 1 - -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. - */ -#define HAVE_DECL_TZNAME 1 - -/* Define if you have dirent.h. */ -/* #define DIRENT 1 */ - -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -/* #undef GETGROUPS_T */ - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define if your struct tm has tm_zone. */ -/* #undef HAVE_TM_ZONE */ - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#define HAVE_TZNAME - -/* Define to `int' if doesn't define. */ -/* #undef mode_t */ - -/* Define if you don't have dirent.h, but have ndir.h. */ -/* #undef NDIR */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you don't have dirent.h, but have sys/dir.h. */ -/* #undef SYSDIR */ - -/* Define if you don't have dirent.h, but have sys/ndir.h. */ -/* #undef SYSNDIR */ - -/* Define if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define if your declares struct tm. */ -/* #define TM_IN_SYS_TIME 1 */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -/* Define if the closedir function returns void instead of int. */ -/* #undef VOID_CLOSEDIR */ - -/* Define if getpgrp() must be called as getpgrp(0) - and (consequently) setpgrp() as setpgrp(0, 0). */ -/* #undef GETPGRP_HAVE_ARGS */ - -/* Define this if your time.h defines altzone */ -/* #define HAVE_ALTZONE */ - -/* Define if you have the putenv function. */ -#define HAVE_PUTENV - -/* Define if your compiler supports function prototypes */ -#define HAVE_PROTOTYPES - -/* Define if you can safely include both and - (which you can't on SCO ODT 3.0). */ -/* #undef SYS_SELECT_WITH_SYS_TIME */ - -/* Define if you want build the _decimal module using a coroutine-local rather - than a thread-local context */ -#define WITH_DECIMAL_CONTEXTVAR 1 - -/* Define if you want documentation strings in extension modules */ -#define WITH_DOC_STRINGS 1 - -/* Define if you want to compile in rudimentary thread support */ -/* #undef WITH_THREAD */ - -/* Define if you want to use the GNU readline library */ -/* #define WITH_READLINE 1 */ - -/* Use Python's own small-block memory-allocator. */ -#define WITH_PYMALLOC 1 - -/* Define if you want to compile in mimalloc memory allocator. */ -#define WITH_MIMALLOC 1 - -/* Define if you want to compile in object freelists optimization */ -#define WITH_FREELISTS 1 - -/* Define if you have clock. */ -/* #define HAVE_CLOCK */ - -/* Define when any dynamic module loading is enabled */ -#define HAVE_DYNAMIC_LOADING - -/* Define if you have ftime. */ -#define HAVE_FTIME - -/* Define if you have getpeername. */ -#define HAVE_GETPEERNAME - -/* Define if you have getpgrp. */ -/* #undef HAVE_GETPGRP */ - -/* Define if you have getpid. */ -#define HAVE_GETPID - -/* Define if you have gettimeofday. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define if you have getwd. */ -/* #undef HAVE_GETWD */ - -/* Define if you have lstat. */ -/* #undef HAVE_LSTAT */ - -/* Define if you have the mktime function. */ -#define HAVE_MKTIME - -/* Define if you have nice. */ -/* #undef HAVE_NICE */ - -/* Define if you have readlink. */ -/* #undef HAVE_READLINK */ - -/* Define if you have setpgid. */ -/* #undef HAVE_SETPGID */ - -/* Define if you have setpgrp. */ -/* #undef HAVE_SETPGRP */ - -/* Define if you have setsid. */ -/* #undef HAVE_SETSID */ - -/* Define if you have setvbuf. */ -#define HAVE_SETVBUF - -/* Define if you have siginterrupt. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the `shutdown' function. */ -#define HAVE_SHUTDOWN 1 - -/* Define if you have symlink. */ -/* #undef HAVE_SYMLINK */ - -/* Define if you have tcgetpgrp. */ -/* #undef HAVE_TCGETPGRP */ - -/* Define if you have tcsetpgrp. */ -/* #undef HAVE_TCSETPGRP */ - -/* Define if you have times. */ -/* #undef HAVE_TIMES */ - -/* Define to 1 if you have the `umask' function. */ -#define HAVE_UMASK 1 - -/* Define if you have uname. */ -/* #undef HAVE_UNAME */ - -/* Define if you have waitpid. */ -/* #undef HAVE_WAITPID */ - -/* Define to 1 if you have the `wcsftime' function. */ -#if defined(_MSC_VER) && _MSC_VER >= 1310 -#define HAVE_WCSFTIME 1 -#endif - -/* Define to 1 if you have the `wcscoll' function. */ -#define HAVE_WCSCOLL 1 - -/* Define to 1 if you have the `wcsxfrm' function. */ -#define HAVE_WCSXFRM 1 - -/* Define if the zlib library has inflateCopy */ -#define HAVE_ZLIB_COPY 1 - -/* Define if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PROCESS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_AUDIOIO_H */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_PARAM_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_SELECT_H 1 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SYS_TIME_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_TIMES_H 1 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the header file. */ -/* #define HAVE_SYS_UN_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_UTIME_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_SYS_UTSNAME_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_UNISTD_H 1 */ - -/* Define if you have the header file. */ -/* #define HAVE_UTIME_H 1 */ - -/* Define if the compiler provides a wchar.h header file. */ -#define HAVE_WCHAR_H 1 - -/* The size of `wchar_t', as computed by sizeof. */ -#define SIZEOF_WCHAR_T 2 - -/* The size of `_Bool', as computed by sizeof. */ -#define SIZEOF__BOOL 1 - -/* The size of `pid_t', as computed by sizeof. */ -#define SIZEOF_PID_T SIZEOF_INT - -/* Define if you have the dl library (-ldl). */ -/* #undef HAVE_LIBDL */ - -/* Define if you have the mpc library (-lmpc). */ -/* #undef HAVE_LIBMPC */ - -/* Define if you have the seq library (-lseq). */ -/* #undef HAVE_LIBSEQ */ - -/* Define if you have the socket library (-lsocket). */ -#define HAVE_LIBSOCKET 1 - -/* Define if you have the sun library (-lsun). */ -/* #undef HAVE_LIBSUN */ - -/* Define if you have the termcap library (-ltermcap). */ -/* #undef HAVE_LIBTERMCAP */ - -/* Define if you have the termlib library (-ltermlib). */ -/* #undef HAVE_LIBTERMLIB */ - -/* Define if you have the thread library (-lthread). */ -/* #undef HAVE_LIBTHREAD */ - -/* WinSock does not use a bitmask in select, and uses - socket handles greater than FD_SETSIZE */ -#define Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE - -/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the - least significant byte first */ -#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1 - -/* Define to 1 if you have the `erf' function. */ -#define HAVE_ERF 1 - -/* Define to 1 if you have the `erfc' function. */ -#define HAVE_ERFC 1 - -// netdb.h functions (provided by winsock.h) -#define HAVE_GETHOSTNAME 1 -#define HAVE_GETHOSTBYADDR 1 -#define HAVE_GETHOSTBYNAME 1 -#define HAVE_GETPROTOBYNAME 1 -#define HAVE_GETSERVBYNAME 1 -#define HAVE_GETSERVBYPORT 1 -// sys/socket.h functions (provided by winsock.h) -#define HAVE_INET_PTON 1 -#define HAVE_INET_NTOA 1 -#define HAVE_ACCEPT 1 -#define HAVE_BIND 1 -#define HAVE_CONNECT 1 -#define HAVE_GETSOCKNAME 1 -#define HAVE_LISTEN 1 -#define HAVE_RECVFROM 1 -#define HAVE_SENDTO 1 -#define HAVE_SETSOCKOPT 1 -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `dup' function. */ -#define HAVE_DUP 1 - -/* framework name */ -#define _PYTHONFRAMEWORK "" - -/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */ -#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1 - -#endif /* !Py_CONFIG_H */ diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc deleted file mode 100644 index 11862643aa6989..00000000000000 --- a/PC/pylauncher.rc +++ /dev/null @@ -1,67 +0,0 @@ -#include - -#include "python_ver_rc.h" - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif -// Include the manifest file that indicates we support all -// current versions of Windows. -1 RT_MANIFEST "python.manifest" - -#if defined(PY_ICON) -1 ICON DISCARDABLE "icons\python.ico" -#elif defined(PYW_ICON) -1 ICON DISCARDABLE "icons\pythonw.ico" -#else -1 ICON DISCARDABLE "icons\launcher.ico" -2 ICON DISCARDABLE "icons\py.ico" -3 ICON DISCARDABLE "icons\pyc.ico" -4 ICON DISCARDABLE "icons\pyd.ico" -5 ICON DISCARDABLE "icons\python.ico" -6 ICON DISCARDABLE "icons\pythonw.ico" -7 ICON DISCARDABLE "icons\setup.ico" -#endif - -1 USAGE "launcher-usage.txt" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PYVERSION64 - PRODUCTVERSION PYVERSION64 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", PYTHON_COMPANY "\0" - VALUE "FileDescription", "Python\0" - VALUE "FileVersion", PYTHON_VERSION - VALUE "InternalName", "Python Launcher\0" - VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0" - VALUE "OriginalFilename", "py" PYTHON_DEBUG_EXT ".exe\0" - VALUE "ProductName", "Python\0" - VALUE "ProductVersion", PYTHON_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END \ No newline at end of file diff --git a/PC/pyshellext.cpp b/PC/pyshellext.cpp deleted file mode 100644 index ffca169857c375..00000000000000 --- a/PC/pyshellext.cpp +++ /dev/null @@ -1,608 +0,0 @@ -// Support back to Vista -#define _WIN32_WINNT _WIN32_WINNT_VISTA -#include - -// Use WRL to define a classic COM class -#define __WRL_CLASSIC_COM__ -#include - -#include -#include -#include -#include -#include - -#define DDWM_UPDATEWINDOW (WM_USER+3) - -static HINSTANCE hModule; -static CLIPFORMAT cfDropDescription; -static CLIPFORMAT cfDragWindow; - -#define CLASS_GUID "{BEA218D2-6950-497B-9434-61683EC065FE}" -static const LPCWSTR CLASS_SUBKEY = L"Software\\Classes\\CLSID\\" CLASS_GUID; -static const LPCWSTR DRAG_MESSAGE = L"Open with %1"; - -using namespace Microsoft::WRL; - -HRESULT FilenameListCchLengthA(LPCSTR pszSource, size_t cchMax, size_t *pcchLength, size_t *pcchCount) { - HRESULT hr = S_OK; - size_t count = 0; - size_t length = 0; - - while (pszSource && pszSource[0]) { - size_t oneLength; - hr = StringCchLengthA(pszSource, cchMax - length, &oneLength); - if (FAILED(hr)) { - return hr; - } - count += 1; - length += oneLength + (strchr(pszSource, ' ') ? 3 : 1); - pszSource = &pszSource[oneLength + 1]; - } - - *pcchCount = count; - *pcchLength = length; - return hr; -} - -HRESULT FilenameListCchLengthW(LPCWSTR pszSource, size_t cchMax, size_t *pcchLength, size_t *pcchCount) { - HRESULT hr = S_OK; - size_t count = 0; - size_t length = 0; - - while (pszSource && pszSource[0]) { - size_t oneLength; - hr = StringCchLengthW(pszSource, cchMax - length, &oneLength); - if (FAILED(hr)) { - return hr; - } - count += 1; - length += oneLength + (wcschr(pszSource, ' ') ? 3 : 1); - pszSource = &pszSource[oneLength + 1]; - } - - *pcchCount = count; - *pcchLength = length; - return hr; -} - -HRESULT FilenameListCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, LPCSTR pszSource, LPCSTR pszSeparator) { - HRESULT hr = S_OK; - size_t count = 0; - size_t length = 0; - - while (pszSource[0]) { - STRSAFE_LPSTR newDest; - - hr = StringCchCopyExA(pszDest, cchDest, pszSource, &newDest, &cchDest, 0); - if (FAILED(hr)) { - return hr; - } - pszSource += (newDest - pszDest) + 1; - pszDest = PathQuoteSpacesA(pszDest) ? newDest + 2 : newDest; - - if (pszSource[0]) { - hr = StringCchCopyExA(pszDest, cchDest, pszSeparator, &newDest, &cchDest, 0); - if (FAILED(hr)) { - return hr; - } - pszDest = newDest; - } - } - - return hr; -} - -HRESULT FilenameListCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, LPCWSTR pszSource, LPCWSTR pszSeparator) { - HRESULT hr = S_OK; - size_t count = 0; - size_t length = 0; - - while (pszSource[0]) { - STRSAFE_LPWSTR newDest; - - hr = StringCchCopyExW(pszDest, cchDest, pszSource, &newDest, &cchDest, 0); - if (FAILED(hr)) { - return hr; - } - pszSource += (newDest - pszDest) + 1; - pszDest = PathQuoteSpacesW(pszDest) ? newDest + 2 : newDest; - - if (pszSource[0]) { - hr = StringCchCopyExW(pszDest, cchDest, pszSeparator, &newDest, &cchDest, 0); - if (FAILED(hr)) { - return hr; - } - pszDest = newDest; - } - } - - return hr; -} - -class DECLSPEC_UUID(CLASS_GUID) PyShellExt : public RuntimeClass< - RuntimeClassFlags, - IDropTarget, - IPersistFile -> -{ - LPOLESTR target, target_dir; - DWORD target_mode; - - IDataObject *data_obj; - -public: - PyShellExt() : target(NULL), target_dir(NULL), target_mode(0), data_obj(NULL) { - OutputDebugString(L"PyShellExt::PyShellExt"); - } - - ~PyShellExt() { - if (target) { - CoTaskMemFree(target); - } - if (target_dir) { - CoTaskMemFree(target_dir); - } - if (data_obj) { - data_obj->Release(); - } - } - -private: - HRESULT UpdateDropDescription(IDataObject *pDataObj) { - STGMEDIUM medium; - FORMATETC fmt = { - cfDropDescription, - NULL, - DVASPECT_CONTENT, - -1, - TYMED_HGLOBAL - }; - - auto hr = pDataObj->GetData(&fmt, &medium); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::UpdateDropDescription - failed to get DROPDESCRIPTION format"); - return hr; - } - if (!medium.hGlobal) { - OutputDebugString(L"PyShellExt::UpdateDropDescription - DROPDESCRIPTION format had NULL hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - auto dd = (DROPDESCRIPTION*)GlobalLock(medium.hGlobal); - if (!dd) { - OutputDebugString(L"PyShellExt::UpdateDropDescription - failed to lock DROPDESCRIPTION hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - StringCchCopy(dd->szMessage, sizeof(dd->szMessage) / sizeof(dd->szMessage[0]), DRAG_MESSAGE); - StringCchCopy(dd->szInsert, sizeof(dd->szInsert) / sizeof(dd->szInsert[0]), PathFindFileNameW(target)); - dd->type = DROPIMAGE_MOVE; - - GlobalUnlock(medium.hGlobal); - ReleaseStgMedium(&medium); - - return S_OK; - } - - HRESULT GetDragWindow(IDataObject *pDataObj, HWND *phWnd) { - HRESULT hr; - HWND *pMem; - STGMEDIUM medium; - FORMATETC fmt = { - cfDragWindow, - NULL, - DVASPECT_CONTENT, - -1, - TYMED_HGLOBAL - }; - - hr = pDataObj->GetData(&fmt, &medium); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::GetDragWindow - failed to get DragWindow format"); - return hr; - } - if (!medium.hGlobal) { - OutputDebugString(L"PyShellExt::GetDragWindow - DragWindow format had NULL hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - - pMem = (HWND*)GlobalLock(medium.hGlobal); - if (!pMem) { - OutputDebugString(L"PyShellExt::GetDragWindow - failed to lock DragWindow hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - - *phWnd = *pMem; - - GlobalUnlock(medium.hGlobal); - ReleaseStgMedium(&medium); - - return S_OK; - } - - HRESULT GetArguments(IDataObject *pDataObj, LPCWSTR *pArguments) { - HRESULT hr; - DROPFILES *pdropfiles; - - STGMEDIUM medium; - FORMATETC fmt = { - CF_HDROP, - NULL, - DVASPECT_CONTENT, - -1, - TYMED_HGLOBAL - }; - - hr = pDataObj->GetData(&fmt, &medium); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::GetArguments - failed to get CF_HDROP format"); - return hr; - } - if (!medium.hGlobal) { - OutputDebugString(L"PyShellExt::GetArguments - CF_HDROP format had NULL hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - - pdropfiles = (DROPFILES*)GlobalLock(medium.hGlobal); - if (!pdropfiles) { - OutputDebugString(L"PyShellExt::GetArguments - failed to lock CF_HDROP hGlobal"); - ReleaseStgMedium(&medium); - return E_FAIL; - } - - if (pdropfiles->fWide) { - LPCWSTR files = (LPCWSTR)((char*)pdropfiles + pdropfiles->pFiles); - size_t len, count; - hr = FilenameListCchLengthW(files, 32767, &len, &count); - if (SUCCEEDED(hr)) { - LPWSTR args = (LPWSTR)CoTaskMemAlloc(sizeof(WCHAR) * (len + 1)); - if (args) { - hr = FilenameListCchCopyW(args, 32767, files, L" "); - if (SUCCEEDED(hr)) { - *pArguments = args; - } else { - CoTaskMemFree(args); - } - } else { - hr = E_OUTOFMEMORY; - } - } - } else { - LPCSTR files = (LPCSTR)((char*)pdropfiles + pdropfiles->pFiles); - size_t len, count; - hr = FilenameListCchLengthA(files, 32767, &len, &count); - if (SUCCEEDED(hr)) { - LPSTR temp = (LPSTR)CoTaskMemAlloc(sizeof(CHAR) * (len + 1)); - if (temp) { - hr = FilenameListCchCopyA(temp, 32767, files, " "); - if (SUCCEEDED(hr)) { - int wlen = MultiByteToWideChar(CP_ACP, 0, temp, (int)len, NULL, 0); - if (wlen) { - LPWSTR args = (LPWSTR)CoTaskMemAlloc(sizeof(WCHAR) * (wlen + 1)); - if (MultiByteToWideChar(CP_ACP, 0, temp, (int)len, args, wlen + 1)) { - *pArguments = args; - } else { - OutputDebugString(L"PyShellExt::GetArguments - failed to convert multi-byte to wide-char path"); - CoTaskMemFree(args); - hr = E_FAIL; - } - } else { - OutputDebugString(L"PyShellExt::GetArguments - failed to get length of wide-char path"); - hr = E_FAIL; - } - } - CoTaskMemFree(temp); - } else { - hr = E_OUTOFMEMORY; - } - } - } - - GlobalUnlock(medium.hGlobal); - ReleaseStgMedium(&medium); - - return hr; - } - - HRESULT NotifyDragWindow(HWND hwnd) { - LRESULT res; - - if (!hwnd) { - return S_FALSE; - } - - res = SendMessage(hwnd, DDWM_UPDATEWINDOW, 0, NULL); - - if (res) { - OutputDebugString(L"PyShellExt::NotifyDragWindow - failed to post DDWM_UPDATEWINDOW"); - return E_FAIL; - } - - return S_OK; - } - -public: - // IDropTarget implementation - - STDMETHODIMP DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { - HWND hwnd; - - OutputDebugString(L"PyShellExt::DragEnter"); - - pDataObj->AddRef(); - data_obj = pDataObj; - - *pdwEffect = DROPEFFECT_MOVE; - - if (FAILED(UpdateDropDescription(data_obj))) { - OutputDebugString(L"PyShellExt::DragEnter - failed to update drop description"); - } - if (FAILED(GetDragWindow(data_obj, &hwnd))) { - OutputDebugString(L"PyShellExt::DragEnter - failed to get drag window"); - } - if (FAILED(NotifyDragWindow(hwnd))) { - OutputDebugString(L"PyShellExt::DragEnter - failed to notify drag window"); - } - - return S_OK; - } - - STDMETHODIMP DragLeave() { - return S_OK; - } - - STDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { - return S_OK; - } - - STDMETHODIMP Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { - LPCWSTR args; - - OutputDebugString(L"PyShellExt::Drop"); - *pdwEffect = DROPEFFECT_NONE; - - if (pDataObj != data_obj) { - OutputDebugString(L"PyShellExt::Drop - unexpected data object"); - return E_FAIL; - } - - data_obj->Release(); - data_obj = NULL; - - if (SUCCEEDED(GetArguments(pDataObj, &args))) { - OutputDebugString(args); - ShellExecute(NULL, NULL, target, args, target_dir, SW_NORMAL); - - CoTaskMemFree((LPVOID)args); - } else { - OutputDebugString(L"PyShellExt::Drop - failed to get launch arguments"); - } - - return S_OK; - } - - // IPersistFile implementation - - STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName) { - HRESULT hr; - size_t len; - - if (!ppszFileName) { - return E_POINTER; - } - - hr = StringCchLength(target, STRSAFE_MAX_CCH - 1, &len); - if (FAILED(hr)) { - return E_FAIL; - } - - *ppszFileName = (LPOLESTR)CoTaskMemAlloc(sizeof(WCHAR) * (len + 1)); - if (!*ppszFileName) { - return E_OUTOFMEMORY; - } - - hr = StringCchCopy(*ppszFileName, len + 1, target); - if (FAILED(hr)) { - CoTaskMemFree(*ppszFileName); - *ppszFileName = NULL; - return E_FAIL; - } - - return S_OK; - } - - STDMETHODIMP IsDirty() { - return S_FALSE; - } - - STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode) { - HRESULT hr; - size_t len; - - OutputDebugString(L"PyShellExt::Load"); - OutputDebugString(pszFileName); - - hr = StringCchLength(pszFileName, STRSAFE_MAX_CCH - 1, &len); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::Load - failed to get string length"); - return hr; - } - - if (target) { - CoTaskMemFree(target); - } - if (target_dir) { - CoTaskMemFree(target_dir); - } - - target = (LPOLESTR)CoTaskMemAlloc(sizeof(WCHAR) * (len + 1)); - if (!target) { - OutputDebugString(L"PyShellExt::Load - E_OUTOFMEMORY"); - return E_OUTOFMEMORY; - } - target_dir = (LPOLESTR)CoTaskMemAlloc(sizeof(WCHAR) * (len + 1)); - if (!target_dir) { - OutputDebugString(L"PyShellExt::Load - E_OUTOFMEMORY"); - return E_OUTOFMEMORY; - } - - hr = StringCchCopy(target, len + 1, pszFileName); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::Load - failed to copy string"); - return hr; - } - - hr = StringCchCopy(target_dir, len + 1, pszFileName); - if (FAILED(hr)) { - OutputDebugString(L"PyShellExt::Load - failed to copy string"); - return hr; - } - if (!PathRemoveFileSpecW(target_dir)) { - OutputDebugStringW(L"PyShellExt::Load - failed to remove filespec from target"); - return E_FAIL; - } - - OutputDebugString(target); - target_mode = dwMode; - OutputDebugString(L"PyShellExt::Load - S_OK"); - return S_OK; - } - - STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember) { - return E_NOTIMPL; - } - - STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName) { - return E_NOTIMPL; - } - - STDMETHODIMP GetClassID(CLSID *pClassID) { - *pClassID = __uuidof(PyShellExt); - return S_OK; - } -}; - -CoCreatableClass(PyShellExt); - -STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, _COM_Outptr_ void** ppv) { - return Module::GetModule().GetClassObject(rclsid, riid, ppv); -} - -STDAPI DllCanUnloadNow() { - return Module::GetModule().Terminate() ? S_OK : S_FALSE; -} - -STDAPI DllRegisterServer() { - LONG res; - SECURITY_ATTRIBUTES secattr = { sizeof(SECURITY_ATTRIBUTES), NULL, FALSE }; - LPSECURITY_ATTRIBUTES psecattr = NULL; - HKEY key, ipsKey; - WCHAR modname[MAX_PATH]; - DWORD modname_len; - - OutputDebugString(L"PyShellExt::DllRegisterServer"); - if (!hModule) { - OutputDebugString(L"PyShellExt::DllRegisterServer - module handle was not set"); - return SELFREG_E_CLASS; - } - modname_len = GetModuleFileName(hModule, modname, MAX_PATH); - if (modname_len == 0 || - (modname_len == MAX_PATH && GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to get module file name"); - return SELFREG_E_CLASS; - } - - DWORD disp; - res = RegCreateKeyEx(HKEY_LOCAL_MACHINE, CLASS_SUBKEY, 0, NULL, 0, - KEY_ALL_ACCESS, psecattr, &key, &disp); - if (res == ERROR_ACCESS_DENIED) { - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to write per-machine registration. Attempting per-user instead."); - res = RegCreateKeyEx(HKEY_CURRENT_USER, CLASS_SUBKEY, 0, NULL, 0, - KEY_ALL_ACCESS, psecattr, &key, &disp); - } - if (res != ERROR_SUCCESS) { - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to create class key"); - return SELFREG_E_CLASS; - } - - res = RegCreateKeyEx(key, L"InProcServer32", 0, NULL, 0, - KEY_ALL_ACCESS, psecattr, &ipsKey, NULL); - if (res != ERROR_SUCCESS) { - RegCloseKey(key); - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to create InProcServer32 key"); - return SELFREG_E_CLASS; - } - - res = RegSetValueEx(ipsKey, NULL, 0, - REG_SZ, (LPBYTE)modname, modname_len * sizeof(modname[0])); - - if (res != ERROR_SUCCESS) { - RegCloseKey(ipsKey); - RegCloseKey(key); - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to set server path"); - return SELFREG_E_CLASS; - } - - res = RegSetValueEx(ipsKey, L"ThreadingModel", 0, - REG_SZ, (LPBYTE)(L"Apartment"), sizeof(L"Apartment")); - - RegCloseKey(ipsKey); - RegCloseKey(key); - if (res != ERROR_SUCCESS) { - OutputDebugString(L"PyShellExt::DllRegisterServer - failed to set threading model"); - return SELFREG_E_CLASS; - } - - SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); - - OutputDebugString(L"PyShellExt::DllRegisterServer - S_OK"); - return S_OK; -} - -STDAPI DllUnregisterServer() { - LONG res_lm, res_cu; - - res_lm = RegDeleteTree(HKEY_LOCAL_MACHINE, CLASS_SUBKEY); - if (res_lm != ERROR_SUCCESS && res_lm != ERROR_FILE_NOT_FOUND) { - OutputDebugString(L"PyShellExt::DllUnregisterServer - failed to delete per-machine registration"); - return SELFREG_E_CLASS; - } - - res_cu = RegDeleteTree(HKEY_CURRENT_USER, CLASS_SUBKEY); - if (res_cu != ERROR_SUCCESS && res_cu != ERROR_FILE_NOT_FOUND) { - OutputDebugString(L"PyShellExt::DllUnregisterServer - failed to delete per-user registration"); - return SELFREG_E_CLASS; - } - - if (res_lm == ERROR_FILE_NOT_FOUND && res_cu == ERROR_FILE_NOT_FOUND) { - OutputDebugString(L"PyShellExt::DllUnregisterServer - extension was not registered"); - return SELFREG_E_CLASS; - } - - SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); - - OutputDebugString(L"PyShellExt::DllUnregisterServer - S_OK"); - return S_OK; -} - -STDAPI_(BOOL) DllMain(_In_opt_ HINSTANCE hinst, DWORD reason, _In_opt_ void*) { - if (reason == DLL_PROCESS_ATTACH) { - hModule = hinst; - - cfDropDescription = RegisterClipboardFormat(CFSTR_DROPDESCRIPTION); - if (!cfDropDescription) { - OutputDebugString(L"PyShellExt::DllMain - failed to get CFSTR_DROPDESCRIPTION format"); - } - cfDragWindow = RegisterClipboardFormat(L"DragWindow"); - if (!cfDragWindow) { - OutputDebugString(L"PyShellExt::DllMain - failed to get DragWindow format"); - } - - DisableThreadLibraryCalls(hinst); - } - return TRUE; -} \ No newline at end of file diff --git a/PC/pyshellext.def b/PC/pyshellext.def deleted file mode 100644 index 288a9adf982f19..00000000000000 --- a/PC/pyshellext.def +++ /dev/null @@ -1,5 +0,0 @@ -EXPORTS - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE - DllGetClassObject PRIVATE - DllCanUnloadNow PRIVATE diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc deleted file mode 100644 index af797ce95d5077..00000000000000 --- a/PC/pyshellext.rc +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include "python_ver_rc.h" - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif - -// Include the manifest file that indicates we support all -// current versions of Windows. -1 RT_MANIFEST "python.manifest" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PYVERSION64 - PRODUCTVERSION PYVERSION64 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", PYTHON_COMPANY "\0" - VALUE "FileDescription", "Python\0" - VALUE "FileVersion", PYTHON_VERSION - VALUE "InternalName", "Python Launcher Shell Extension\0" - VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0" - VALUE "OriginalFilename", "pyshellext" PYTHON_DEBUG_EXT ".dll\0" - VALUE "ProductName", "Python\0" - VALUE "ProductVersion", PYTHON_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END \ No newline at end of file diff --git a/PC/python.manifest b/PC/python.manifest deleted file mode 100644 index 8e1bc022adfb4f..00000000000000 --- a/PC/python.manifest +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - diff --git a/PC/python3dll.c b/PC/python3dll.c deleted file mode 100755 index eb077df70a57d6..00000000000000 --- a/PC/python3dll.c +++ /dev/null @@ -1,918 +0,0 @@ -/* Re-export stable Python ABI */ - -/* Generated by Tools/build/stable_abi.py */ - -#ifdef _M_IX86 -#define DECORATE "_" -#else -#define DECORATE -#endif - -#define EXPORT_FUNC(name) \ - __pragma(comment(linker, "/EXPORT:" DECORATE #name "=" PYTHON_DLL_NAME "." #name)) -#define EXPORT_DATA(name) \ - __pragma(comment(linker, "/EXPORT:" DECORATE #name "=" PYTHON_DLL_NAME "." #name ",DATA")) - -EXPORT_FUNC(_Py_BuildValue_SizeT) -EXPORT_FUNC(_Py_CheckRecursiveCall) -EXPORT_FUNC(_Py_Dealloc) -EXPORT_FUNC(_Py_DecRef) -EXPORT_FUNC(_Py_IncRef) -EXPORT_FUNC(_Py_NegativeRefcount) -EXPORT_FUNC(_Py_SetRefcnt) -EXPORT_FUNC(_Py_VaBuildValue_SizeT) -EXPORT_FUNC(_PyArg_Parse_SizeT) -EXPORT_FUNC(_PyArg_ParseTuple_SizeT) -EXPORT_FUNC(_PyArg_ParseTupleAndKeywords_SizeT) -EXPORT_FUNC(_PyArg_VaParse_SizeT) -EXPORT_FUNC(_PyArg_VaParseTupleAndKeywords_SizeT) -EXPORT_FUNC(_PyErr_BadInternalCall) -EXPORT_FUNC(_PyObject_CallFunction_SizeT) -EXPORT_FUNC(_PyObject_CallMethod_SizeT) -EXPORT_FUNC(_PyObject_GC_New) -EXPORT_FUNC(_PyObject_GC_NewVar) -EXPORT_FUNC(_PyObject_GC_Resize) -EXPORT_FUNC(_PyObject_New) -EXPORT_FUNC(_PyObject_NewVar) -EXPORT_FUNC(_PyState_AddModule) -EXPORT_FUNC(_PyThreadState_Init) -EXPORT_FUNC(_PyThreadState_Prealloc) -EXPORT_FUNC(Py_AddPendingCall) -EXPORT_FUNC(Py_AtExit) -EXPORT_FUNC(Py_BuildValue) -EXPORT_FUNC(Py_BytesMain) -EXPORT_FUNC(Py_CompileString) -EXPORT_FUNC(Py_DecodeLocale) -EXPORT_FUNC(Py_DecRef) -EXPORT_FUNC(Py_EncodeLocale) -EXPORT_FUNC(Py_EndInterpreter) -EXPORT_FUNC(Py_EnterRecursiveCall) -EXPORT_FUNC(Py_Exit) -EXPORT_FUNC(Py_FatalError) -EXPORT_FUNC(Py_Finalize) -EXPORT_FUNC(Py_FinalizeEx) -EXPORT_FUNC(Py_GenericAlias) -EXPORT_FUNC(Py_GetArgcArgv) -EXPORT_FUNC(Py_GetBuildInfo) -EXPORT_FUNC(Py_GetCompiler) -EXPORT_FUNC(Py_GetConstant) -EXPORT_FUNC(Py_GetConstantBorrowed) -EXPORT_FUNC(Py_GetCopyright) -EXPORT_FUNC(Py_GetExecPrefix) -EXPORT_FUNC(Py_GetPath) -EXPORT_FUNC(Py_GetPlatform) -EXPORT_FUNC(Py_GetPrefix) -EXPORT_FUNC(Py_GetProgramFullPath) -EXPORT_FUNC(Py_GetProgramName) -EXPORT_FUNC(Py_GetPythonHome) -EXPORT_FUNC(Py_GetRecursionLimit) -EXPORT_FUNC(Py_GetVersion) -EXPORT_FUNC(Py_IncRef) -EXPORT_FUNC(Py_Initialize) -EXPORT_FUNC(Py_InitializeEx) -EXPORT_FUNC(Py_Is) -EXPORT_FUNC(Py_IsFalse) -EXPORT_FUNC(Py_IsFinalizing) -EXPORT_FUNC(Py_IsInitialized) -EXPORT_FUNC(Py_IsNone) -EXPORT_FUNC(Py_IsTrue) -EXPORT_FUNC(Py_LeaveRecursiveCall) -EXPORT_FUNC(Py_Main) -EXPORT_FUNC(Py_MakePendingCalls) -EXPORT_FUNC(Py_NewInterpreter) -EXPORT_FUNC(Py_NewRef) -EXPORT_FUNC(Py_ReprEnter) -EXPORT_FUNC(Py_ReprLeave) -EXPORT_FUNC(Py_SetPath) -EXPORT_FUNC(Py_SetProgramName) -EXPORT_FUNC(Py_SetPythonHome) -EXPORT_FUNC(Py_SetRecursionLimit) -EXPORT_FUNC(Py_VaBuildValue) -EXPORT_FUNC(Py_XNewRef) -EXPORT_FUNC(PyAIter_Check) -EXPORT_FUNC(PyArg_Parse) -EXPORT_FUNC(PyArg_ParseTuple) -EXPORT_FUNC(PyArg_ParseTupleAndKeywords) -EXPORT_FUNC(PyArg_UnpackTuple) -EXPORT_FUNC(PyArg_ValidateKeywordArguments) -EXPORT_FUNC(PyArg_VaParse) -EXPORT_FUNC(PyArg_VaParseTupleAndKeywords) -EXPORT_FUNC(PyBool_FromLong) -EXPORT_FUNC(PyBuffer_FillContiguousStrides) -EXPORT_FUNC(PyBuffer_FillInfo) -EXPORT_FUNC(PyBuffer_FromContiguous) -EXPORT_FUNC(PyBuffer_GetPointer) -EXPORT_FUNC(PyBuffer_IsContiguous) -EXPORT_FUNC(PyBuffer_Release) -EXPORT_FUNC(PyBuffer_SizeFromFormat) -EXPORT_FUNC(PyBuffer_ToContiguous) -EXPORT_FUNC(PyByteArray_AsString) -EXPORT_FUNC(PyByteArray_Concat) -EXPORT_FUNC(PyByteArray_FromObject) -EXPORT_FUNC(PyByteArray_FromStringAndSize) -EXPORT_FUNC(PyByteArray_Resize) -EXPORT_FUNC(PyByteArray_Size) -EXPORT_FUNC(PyBytes_AsString) -EXPORT_FUNC(PyBytes_AsStringAndSize) -EXPORT_FUNC(PyBytes_Concat) -EXPORT_FUNC(PyBytes_ConcatAndDel) -EXPORT_FUNC(PyBytes_DecodeEscape) -EXPORT_FUNC(PyBytes_FromFormat) -EXPORT_FUNC(PyBytes_FromFormatV) -EXPORT_FUNC(PyBytes_FromObject) -EXPORT_FUNC(PyBytes_FromString) -EXPORT_FUNC(PyBytes_FromStringAndSize) -EXPORT_FUNC(PyBytes_Repr) -EXPORT_FUNC(PyBytes_Size) -EXPORT_FUNC(PyCallable_Check) -EXPORT_FUNC(PyCallIter_New) -EXPORT_FUNC(PyCapsule_GetContext) -EXPORT_FUNC(PyCapsule_GetDestructor) -EXPORT_FUNC(PyCapsule_GetName) -EXPORT_FUNC(PyCapsule_GetPointer) -EXPORT_FUNC(PyCapsule_Import) -EXPORT_FUNC(PyCapsule_IsValid) -EXPORT_FUNC(PyCapsule_New) -EXPORT_FUNC(PyCapsule_SetContext) -EXPORT_FUNC(PyCapsule_SetDestructor) -EXPORT_FUNC(PyCapsule_SetName) -EXPORT_FUNC(PyCapsule_SetPointer) -EXPORT_FUNC(PyCFunction_Call) -EXPORT_FUNC(PyCFunction_GetFlags) -EXPORT_FUNC(PyCFunction_GetFunction) -EXPORT_FUNC(PyCFunction_GetSelf) -EXPORT_FUNC(PyCFunction_New) -EXPORT_FUNC(PyCFunction_NewEx) -EXPORT_FUNC(PyCMethod_New) -EXPORT_FUNC(PyCodec_BackslashReplaceErrors) -EXPORT_FUNC(PyCodec_Decode) -EXPORT_FUNC(PyCodec_Decoder) -EXPORT_FUNC(PyCodec_Encode) -EXPORT_FUNC(PyCodec_Encoder) -EXPORT_FUNC(PyCodec_IgnoreErrors) -EXPORT_FUNC(PyCodec_IncrementalDecoder) -EXPORT_FUNC(PyCodec_IncrementalEncoder) -EXPORT_FUNC(PyCodec_KnownEncoding) -EXPORT_FUNC(PyCodec_LookupError) -EXPORT_FUNC(PyCodec_NameReplaceErrors) -EXPORT_FUNC(PyCodec_Register) -EXPORT_FUNC(PyCodec_RegisterError) -EXPORT_FUNC(PyCodec_ReplaceErrors) -EXPORT_FUNC(PyCodec_StreamReader) -EXPORT_FUNC(PyCodec_StreamWriter) -EXPORT_FUNC(PyCodec_StrictErrors) -EXPORT_FUNC(PyCodec_Unregister) -EXPORT_FUNC(PyCodec_XMLCharRefReplaceErrors) -EXPORT_FUNC(PyComplex_FromDoubles) -EXPORT_FUNC(PyComplex_ImagAsDouble) -EXPORT_FUNC(PyComplex_RealAsDouble) -EXPORT_FUNC(PyDescr_NewClassMethod) -EXPORT_FUNC(PyDescr_NewGetSet) -EXPORT_FUNC(PyDescr_NewMember) -EXPORT_FUNC(PyDescr_NewMethod) -EXPORT_FUNC(PyDict_Clear) -EXPORT_FUNC(PyDict_Contains) -EXPORT_FUNC(PyDict_Copy) -EXPORT_FUNC(PyDict_DelItem) -EXPORT_FUNC(PyDict_DelItemString) -EXPORT_FUNC(PyDict_GetItem) -EXPORT_FUNC(PyDict_GetItemRef) -EXPORT_FUNC(PyDict_GetItemString) -EXPORT_FUNC(PyDict_GetItemStringRef) -EXPORT_FUNC(PyDict_GetItemWithError) -EXPORT_FUNC(PyDict_Items) -EXPORT_FUNC(PyDict_Keys) -EXPORT_FUNC(PyDict_Merge) -EXPORT_FUNC(PyDict_MergeFromSeq2) -EXPORT_FUNC(PyDict_New) -EXPORT_FUNC(PyDict_Next) -EXPORT_FUNC(PyDict_SetItem) -EXPORT_FUNC(PyDict_SetItemString) -EXPORT_FUNC(PyDict_Size) -EXPORT_FUNC(PyDict_Update) -EXPORT_FUNC(PyDict_Values) -EXPORT_FUNC(PyDictProxy_New) -EXPORT_FUNC(PyErr_BadArgument) -EXPORT_FUNC(PyErr_BadInternalCall) -EXPORT_FUNC(PyErr_CheckSignals) -EXPORT_FUNC(PyErr_Clear) -EXPORT_FUNC(PyErr_Display) -EXPORT_FUNC(PyErr_DisplayException) -EXPORT_FUNC(PyErr_ExceptionMatches) -EXPORT_FUNC(PyErr_Fetch) -EXPORT_FUNC(PyErr_Format) -EXPORT_FUNC(PyErr_FormatV) -EXPORT_FUNC(PyErr_GetExcInfo) -EXPORT_FUNC(PyErr_GetHandledException) -EXPORT_FUNC(PyErr_GetRaisedException) -EXPORT_FUNC(PyErr_GivenExceptionMatches) -EXPORT_FUNC(PyErr_NewException) -EXPORT_FUNC(PyErr_NewExceptionWithDoc) -EXPORT_FUNC(PyErr_NoMemory) -EXPORT_FUNC(PyErr_NormalizeException) -EXPORT_FUNC(PyErr_Occurred) -EXPORT_FUNC(PyErr_Print) -EXPORT_FUNC(PyErr_PrintEx) -EXPORT_FUNC(PyErr_ProgramText) -EXPORT_FUNC(PyErr_ResourceWarning) -EXPORT_FUNC(PyErr_Restore) -EXPORT_FUNC(PyErr_SetExcFromWindowsErr) -EXPORT_FUNC(PyErr_SetExcFromWindowsErrWithFilename) -EXPORT_FUNC(PyErr_SetExcFromWindowsErrWithFilenameObject) -EXPORT_FUNC(PyErr_SetExcFromWindowsErrWithFilenameObjects) -EXPORT_FUNC(PyErr_SetExcInfo) -EXPORT_FUNC(PyErr_SetFromErrno) -EXPORT_FUNC(PyErr_SetFromErrnoWithFilename) -EXPORT_FUNC(PyErr_SetFromErrnoWithFilenameObject) -EXPORT_FUNC(PyErr_SetFromErrnoWithFilenameObjects) -EXPORT_FUNC(PyErr_SetFromWindowsErr) -EXPORT_FUNC(PyErr_SetFromWindowsErrWithFilename) -EXPORT_FUNC(PyErr_SetHandledException) -EXPORT_FUNC(PyErr_SetImportError) -EXPORT_FUNC(PyErr_SetImportErrorSubclass) -EXPORT_FUNC(PyErr_SetInterrupt) -EXPORT_FUNC(PyErr_SetInterruptEx) -EXPORT_FUNC(PyErr_SetNone) -EXPORT_FUNC(PyErr_SetObject) -EXPORT_FUNC(PyErr_SetRaisedException) -EXPORT_FUNC(PyErr_SetString) -EXPORT_FUNC(PyErr_SyntaxLocation) -EXPORT_FUNC(PyErr_SyntaxLocationEx) -EXPORT_FUNC(PyErr_WarnEx) -EXPORT_FUNC(PyErr_WarnExplicit) -EXPORT_FUNC(PyErr_WarnFormat) -EXPORT_FUNC(PyErr_WriteUnraisable) -EXPORT_FUNC(PyEval_AcquireLock) -EXPORT_FUNC(PyEval_AcquireThread) -EXPORT_FUNC(PyEval_CallFunction) -EXPORT_FUNC(PyEval_CallMethod) -EXPORT_FUNC(PyEval_CallObjectWithKeywords) -EXPORT_FUNC(PyEval_EvalCode) -EXPORT_FUNC(PyEval_EvalCodeEx) -EXPORT_FUNC(PyEval_EvalFrame) -EXPORT_FUNC(PyEval_EvalFrameEx) -EXPORT_FUNC(PyEval_GetBuiltins) -EXPORT_FUNC(PyEval_GetFrame) -EXPORT_FUNC(PyEval_GetFrameBuiltins) -EXPORT_FUNC(PyEval_GetFrameGlobals) -EXPORT_FUNC(PyEval_GetFrameLocals) -EXPORT_FUNC(PyEval_GetFuncDesc) -EXPORT_FUNC(PyEval_GetFuncName) -EXPORT_FUNC(PyEval_GetGlobals) -EXPORT_FUNC(PyEval_GetLocals) -EXPORT_FUNC(PyEval_InitThreads) -EXPORT_FUNC(PyEval_ReleaseLock) -EXPORT_FUNC(PyEval_ReleaseThread) -EXPORT_FUNC(PyEval_RestoreThread) -EXPORT_FUNC(PyEval_SaveThread) -EXPORT_FUNC(PyEval_ThreadsInitialized) -EXPORT_FUNC(PyException_GetArgs) -EXPORT_FUNC(PyException_GetCause) -EXPORT_FUNC(PyException_GetContext) -EXPORT_FUNC(PyException_GetTraceback) -EXPORT_FUNC(PyException_SetArgs) -EXPORT_FUNC(PyException_SetCause) -EXPORT_FUNC(PyException_SetContext) -EXPORT_FUNC(PyException_SetTraceback) -EXPORT_FUNC(PyExceptionClass_Name) -EXPORT_FUNC(PyFile_FromFd) -EXPORT_FUNC(PyFile_GetLine) -EXPORT_FUNC(PyFile_WriteObject) -EXPORT_FUNC(PyFile_WriteString) -EXPORT_FUNC(PyFloat_AsDouble) -EXPORT_FUNC(PyFloat_FromDouble) -EXPORT_FUNC(PyFloat_FromString) -EXPORT_FUNC(PyFloat_GetInfo) -EXPORT_FUNC(PyFloat_GetMax) -EXPORT_FUNC(PyFloat_GetMin) -EXPORT_FUNC(PyFrame_GetCode) -EXPORT_FUNC(PyFrame_GetLineNumber) -EXPORT_FUNC(PyFrozenSet_New) -EXPORT_FUNC(PyGC_Collect) -EXPORT_FUNC(PyGC_Disable) -EXPORT_FUNC(PyGC_Enable) -EXPORT_FUNC(PyGC_IsEnabled) -EXPORT_FUNC(PyGILState_Ensure) -EXPORT_FUNC(PyGILState_GetThisThreadState) -EXPORT_FUNC(PyGILState_Release) -EXPORT_FUNC(PyImport_AddModule) -EXPORT_FUNC(PyImport_AddModuleObject) -EXPORT_FUNC(PyImport_AddModuleRef) -EXPORT_FUNC(PyImport_AppendInittab) -EXPORT_FUNC(PyImport_ExecCodeModule) -EXPORT_FUNC(PyImport_ExecCodeModuleEx) -EXPORT_FUNC(PyImport_ExecCodeModuleObject) -EXPORT_FUNC(PyImport_ExecCodeModuleWithPathnames) -EXPORT_FUNC(PyImport_GetImporter) -EXPORT_FUNC(PyImport_GetMagicNumber) -EXPORT_FUNC(PyImport_GetMagicTag) -EXPORT_FUNC(PyImport_GetModule) -EXPORT_FUNC(PyImport_GetModuleDict) -EXPORT_FUNC(PyImport_Import) -EXPORT_FUNC(PyImport_ImportFrozenModule) -EXPORT_FUNC(PyImport_ImportFrozenModuleObject) -EXPORT_FUNC(PyImport_ImportModule) -EXPORT_FUNC(PyImport_ImportModuleLevel) -EXPORT_FUNC(PyImport_ImportModuleLevelObject) -EXPORT_FUNC(PyImport_ImportModuleNoBlock) -EXPORT_FUNC(PyImport_ReloadModule) -EXPORT_FUNC(PyIndex_Check) -EXPORT_FUNC(PyInterpreterState_Clear) -EXPORT_FUNC(PyInterpreterState_Delete) -EXPORT_FUNC(PyInterpreterState_Get) -EXPORT_FUNC(PyInterpreterState_GetDict) -EXPORT_FUNC(PyInterpreterState_GetID) -EXPORT_FUNC(PyInterpreterState_New) -EXPORT_FUNC(PyIter_Check) -EXPORT_FUNC(PyIter_Next) -EXPORT_FUNC(PyIter_Send) -EXPORT_FUNC(PyList_Append) -EXPORT_FUNC(PyList_AsTuple) -EXPORT_FUNC(PyList_GetItem) -EXPORT_FUNC(PyList_GetItemRef) -EXPORT_FUNC(PyList_GetSlice) -EXPORT_FUNC(PyList_Insert) -EXPORT_FUNC(PyList_New) -EXPORT_FUNC(PyList_Reverse) -EXPORT_FUNC(PyList_SetItem) -EXPORT_FUNC(PyList_SetSlice) -EXPORT_FUNC(PyList_Size) -EXPORT_FUNC(PyList_Sort) -EXPORT_FUNC(PyLong_AsDouble) -EXPORT_FUNC(PyLong_AsInt) -EXPORT_FUNC(PyLong_AsLong) -EXPORT_FUNC(PyLong_AsLongAndOverflow) -EXPORT_FUNC(PyLong_AsLongLong) -EXPORT_FUNC(PyLong_AsLongLongAndOverflow) -EXPORT_FUNC(PyLong_AsSize_t) -EXPORT_FUNC(PyLong_AsSsize_t) -EXPORT_FUNC(PyLong_AsUnsignedLong) -EXPORT_FUNC(PyLong_AsUnsignedLongLong) -EXPORT_FUNC(PyLong_AsUnsignedLongLongMask) -EXPORT_FUNC(PyLong_AsUnsignedLongMask) -EXPORT_FUNC(PyLong_AsVoidPtr) -EXPORT_FUNC(PyLong_FromDouble) -EXPORT_FUNC(PyLong_FromLong) -EXPORT_FUNC(PyLong_FromLongLong) -EXPORT_FUNC(PyLong_FromSize_t) -EXPORT_FUNC(PyLong_FromSsize_t) -EXPORT_FUNC(PyLong_FromString) -EXPORT_FUNC(PyLong_FromUnsignedLong) -EXPORT_FUNC(PyLong_FromUnsignedLongLong) -EXPORT_FUNC(PyLong_FromVoidPtr) -EXPORT_FUNC(PyLong_GetInfo) -EXPORT_FUNC(PyMapping_Check) -EXPORT_FUNC(PyMapping_GetItemString) -EXPORT_FUNC(PyMapping_GetOptionalItem) -EXPORT_FUNC(PyMapping_GetOptionalItemString) -EXPORT_FUNC(PyMapping_HasKey) -EXPORT_FUNC(PyMapping_HasKeyString) -EXPORT_FUNC(PyMapping_HasKeyStringWithError) -EXPORT_FUNC(PyMapping_HasKeyWithError) -EXPORT_FUNC(PyMapping_Items) -EXPORT_FUNC(PyMapping_Keys) -EXPORT_FUNC(PyMapping_Length) -EXPORT_FUNC(PyMapping_SetItemString) -EXPORT_FUNC(PyMapping_Size) -EXPORT_FUNC(PyMapping_Values) -EXPORT_FUNC(PyMarshal_ReadObjectFromString) -EXPORT_FUNC(PyMarshal_WriteObjectToString) -EXPORT_FUNC(PyMem_Calloc) -EXPORT_FUNC(PyMem_Free) -EXPORT_FUNC(PyMem_Malloc) -EXPORT_FUNC(PyMem_RawCalloc) -EXPORT_FUNC(PyMem_RawFree) -EXPORT_FUNC(PyMem_RawMalloc) -EXPORT_FUNC(PyMem_RawRealloc) -EXPORT_FUNC(PyMem_Realloc) -EXPORT_FUNC(PyMember_GetOne) -EXPORT_FUNC(PyMember_SetOne) -EXPORT_FUNC(PyMemoryView_FromBuffer) -EXPORT_FUNC(PyMemoryView_FromMemory) -EXPORT_FUNC(PyMemoryView_FromObject) -EXPORT_FUNC(PyMemoryView_GetContiguous) -EXPORT_FUNC(PyModule_Add) -EXPORT_FUNC(PyModule_AddFunctions) -EXPORT_FUNC(PyModule_AddIntConstant) -EXPORT_FUNC(PyModule_AddObject) -EXPORT_FUNC(PyModule_AddObjectRef) -EXPORT_FUNC(PyModule_AddStringConstant) -EXPORT_FUNC(PyModule_AddType) -EXPORT_FUNC(PyModule_Create2) -EXPORT_FUNC(PyModule_ExecDef) -EXPORT_FUNC(PyModule_FromDefAndSpec2) -EXPORT_FUNC(PyModule_GetDef) -EXPORT_FUNC(PyModule_GetDict) -EXPORT_FUNC(PyModule_GetFilename) -EXPORT_FUNC(PyModule_GetFilenameObject) -EXPORT_FUNC(PyModule_GetName) -EXPORT_FUNC(PyModule_GetNameObject) -EXPORT_FUNC(PyModule_GetState) -EXPORT_FUNC(PyModule_New) -EXPORT_FUNC(PyModule_NewObject) -EXPORT_FUNC(PyModule_SetDocString) -EXPORT_FUNC(PyModuleDef_Init) -EXPORT_FUNC(PyNumber_Absolute) -EXPORT_FUNC(PyNumber_Add) -EXPORT_FUNC(PyNumber_And) -EXPORT_FUNC(PyNumber_AsSsize_t) -EXPORT_FUNC(PyNumber_Check) -EXPORT_FUNC(PyNumber_Divmod) -EXPORT_FUNC(PyNumber_Float) -EXPORT_FUNC(PyNumber_FloorDivide) -EXPORT_FUNC(PyNumber_Index) -EXPORT_FUNC(PyNumber_InPlaceAdd) -EXPORT_FUNC(PyNumber_InPlaceAnd) -EXPORT_FUNC(PyNumber_InPlaceFloorDivide) -EXPORT_FUNC(PyNumber_InPlaceLshift) -EXPORT_FUNC(PyNumber_InPlaceMatrixMultiply) -EXPORT_FUNC(PyNumber_InPlaceMultiply) -EXPORT_FUNC(PyNumber_InPlaceOr) -EXPORT_FUNC(PyNumber_InPlacePower) -EXPORT_FUNC(PyNumber_InPlaceRemainder) -EXPORT_FUNC(PyNumber_InPlaceRshift) -EXPORT_FUNC(PyNumber_InPlaceSubtract) -EXPORT_FUNC(PyNumber_InPlaceTrueDivide) -EXPORT_FUNC(PyNumber_InPlaceXor) -EXPORT_FUNC(PyNumber_Invert) -EXPORT_FUNC(PyNumber_Long) -EXPORT_FUNC(PyNumber_Lshift) -EXPORT_FUNC(PyNumber_MatrixMultiply) -EXPORT_FUNC(PyNumber_Multiply) -EXPORT_FUNC(PyNumber_Negative) -EXPORT_FUNC(PyNumber_Or) -EXPORT_FUNC(PyNumber_Positive) -EXPORT_FUNC(PyNumber_Power) -EXPORT_FUNC(PyNumber_Remainder) -EXPORT_FUNC(PyNumber_Rshift) -EXPORT_FUNC(PyNumber_Subtract) -EXPORT_FUNC(PyNumber_ToBase) -EXPORT_FUNC(PyNumber_TrueDivide) -EXPORT_FUNC(PyNumber_Xor) -EXPORT_FUNC(PyObject_AsCharBuffer) -EXPORT_FUNC(PyObject_ASCII) -EXPORT_FUNC(PyObject_AsFileDescriptor) -EXPORT_FUNC(PyObject_AsReadBuffer) -EXPORT_FUNC(PyObject_AsWriteBuffer) -EXPORT_FUNC(PyObject_Bytes) -EXPORT_FUNC(PyObject_Call) -EXPORT_FUNC(PyObject_CallFunction) -EXPORT_FUNC(PyObject_CallFunctionObjArgs) -EXPORT_FUNC(PyObject_CallMethod) -EXPORT_FUNC(PyObject_CallMethodObjArgs) -EXPORT_FUNC(PyObject_CallNoArgs) -EXPORT_FUNC(PyObject_CallObject) -EXPORT_FUNC(PyObject_Calloc) -EXPORT_FUNC(PyObject_CheckBuffer) -EXPORT_FUNC(PyObject_CheckReadBuffer) -EXPORT_FUNC(PyObject_ClearWeakRefs) -EXPORT_FUNC(PyObject_CopyData) -EXPORT_FUNC(PyObject_DelAttr) -EXPORT_FUNC(PyObject_DelAttrString) -EXPORT_FUNC(PyObject_DelItem) -EXPORT_FUNC(PyObject_DelItemString) -EXPORT_FUNC(PyObject_Dir) -EXPORT_FUNC(PyObject_Format) -EXPORT_FUNC(PyObject_Free) -EXPORT_FUNC(PyObject_GC_Del) -EXPORT_FUNC(PyObject_GC_IsFinalized) -EXPORT_FUNC(PyObject_GC_IsTracked) -EXPORT_FUNC(PyObject_GC_Track) -EXPORT_FUNC(PyObject_GC_UnTrack) -EXPORT_FUNC(PyObject_GenericGetAttr) -EXPORT_FUNC(PyObject_GenericGetDict) -EXPORT_FUNC(PyObject_GenericSetAttr) -EXPORT_FUNC(PyObject_GenericSetDict) -EXPORT_FUNC(PyObject_GetAIter) -EXPORT_FUNC(PyObject_GetAttr) -EXPORT_FUNC(PyObject_GetAttrString) -EXPORT_FUNC(PyObject_GetBuffer) -EXPORT_FUNC(PyObject_GetItem) -EXPORT_FUNC(PyObject_GetIter) -EXPORT_FUNC(PyObject_GetOptionalAttr) -EXPORT_FUNC(PyObject_GetOptionalAttrString) -EXPORT_FUNC(PyObject_GetTypeData) -EXPORT_FUNC(PyObject_HasAttr) -EXPORT_FUNC(PyObject_HasAttrString) -EXPORT_FUNC(PyObject_HasAttrStringWithError) -EXPORT_FUNC(PyObject_HasAttrWithError) -EXPORT_FUNC(PyObject_Hash) -EXPORT_FUNC(PyObject_HashNotImplemented) -EXPORT_FUNC(PyObject_Init) -EXPORT_FUNC(PyObject_InitVar) -EXPORT_FUNC(PyObject_IsInstance) -EXPORT_FUNC(PyObject_IsSubclass) -EXPORT_FUNC(PyObject_IsTrue) -EXPORT_FUNC(PyObject_Length) -EXPORT_FUNC(PyObject_Malloc) -EXPORT_FUNC(PyObject_Not) -EXPORT_FUNC(PyObject_Realloc) -EXPORT_FUNC(PyObject_Repr) -EXPORT_FUNC(PyObject_RichCompare) -EXPORT_FUNC(PyObject_RichCompareBool) -EXPORT_FUNC(PyObject_SelfIter) -EXPORT_FUNC(PyObject_SetAttr) -EXPORT_FUNC(PyObject_SetAttrString) -EXPORT_FUNC(PyObject_SetItem) -EXPORT_FUNC(PyObject_Size) -EXPORT_FUNC(PyObject_Str) -EXPORT_FUNC(PyObject_Type) -EXPORT_FUNC(PyObject_Vectorcall) -EXPORT_FUNC(PyObject_VectorcallMethod) -EXPORT_FUNC(PyOS_CheckStack) -EXPORT_FUNC(PyOS_double_to_string) -EXPORT_FUNC(PyOS_FSPath) -EXPORT_FUNC(PyOS_getsig) -EXPORT_FUNC(PyOS_InterruptOccurred) -EXPORT_FUNC(PyOS_mystricmp) -EXPORT_FUNC(PyOS_mystrnicmp) -EXPORT_FUNC(PyOS_setsig) -EXPORT_FUNC(PyOS_snprintf) -EXPORT_FUNC(PyOS_string_to_double) -EXPORT_FUNC(PyOS_strtol) -EXPORT_FUNC(PyOS_strtoul) -EXPORT_FUNC(PyOS_vsnprintf) -EXPORT_FUNC(PySeqIter_New) -EXPORT_FUNC(PySequence_Check) -EXPORT_FUNC(PySequence_Concat) -EXPORT_FUNC(PySequence_Contains) -EXPORT_FUNC(PySequence_Count) -EXPORT_FUNC(PySequence_DelItem) -EXPORT_FUNC(PySequence_DelSlice) -EXPORT_FUNC(PySequence_Fast) -EXPORT_FUNC(PySequence_GetItem) -EXPORT_FUNC(PySequence_GetSlice) -EXPORT_FUNC(PySequence_In) -EXPORT_FUNC(PySequence_Index) -EXPORT_FUNC(PySequence_InPlaceConcat) -EXPORT_FUNC(PySequence_InPlaceRepeat) -EXPORT_FUNC(PySequence_Length) -EXPORT_FUNC(PySequence_List) -EXPORT_FUNC(PySequence_Repeat) -EXPORT_FUNC(PySequence_SetItem) -EXPORT_FUNC(PySequence_SetSlice) -EXPORT_FUNC(PySequence_Size) -EXPORT_FUNC(PySequence_Tuple) -EXPORT_FUNC(PySet_Add) -EXPORT_FUNC(PySet_Clear) -EXPORT_FUNC(PySet_Contains) -EXPORT_FUNC(PySet_Discard) -EXPORT_FUNC(PySet_New) -EXPORT_FUNC(PySet_Pop) -EXPORT_FUNC(PySet_Size) -EXPORT_FUNC(PySlice_AdjustIndices) -EXPORT_FUNC(PySlice_GetIndices) -EXPORT_FUNC(PySlice_GetIndicesEx) -EXPORT_FUNC(PySlice_New) -EXPORT_FUNC(PySlice_Unpack) -EXPORT_FUNC(PyState_AddModule) -EXPORT_FUNC(PyState_FindModule) -EXPORT_FUNC(PyState_RemoveModule) -EXPORT_FUNC(PyStructSequence_GetItem) -EXPORT_FUNC(PyStructSequence_New) -EXPORT_FUNC(PyStructSequence_NewType) -EXPORT_FUNC(PyStructSequence_SetItem) -EXPORT_FUNC(PySys_AddWarnOption) -EXPORT_FUNC(PySys_AddWarnOptionUnicode) -EXPORT_FUNC(PySys_AddXOption) -EXPORT_FUNC(PySys_Audit) -EXPORT_FUNC(PySys_AuditTuple) -EXPORT_FUNC(PySys_FormatStderr) -EXPORT_FUNC(PySys_FormatStdout) -EXPORT_FUNC(PySys_GetObject) -EXPORT_FUNC(PySys_GetXOptions) -EXPORT_FUNC(PySys_HasWarnOptions) -EXPORT_FUNC(PySys_ResetWarnOptions) -EXPORT_FUNC(PySys_SetArgv) -EXPORT_FUNC(PySys_SetArgvEx) -EXPORT_FUNC(PySys_SetObject) -EXPORT_FUNC(PySys_SetPath) -EXPORT_FUNC(PySys_WriteStderr) -EXPORT_FUNC(PySys_WriteStdout) -EXPORT_FUNC(PyThread_acquire_lock) -EXPORT_FUNC(PyThread_acquire_lock_timed) -EXPORT_FUNC(PyThread_allocate_lock) -EXPORT_FUNC(PyThread_create_key) -EXPORT_FUNC(PyThread_delete_key) -EXPORT_FUNC(PyThread_delete_key_value) -EXPORT_FUNC(PyThread_exit_thread) -EXPORT_FUNC(PyThread_free_lock) -EXPORT_FUNC(PyThread_get_key_value) -EXPORT_FUNC(PyThread_get_stacksize) -EXPORT_FUNC(PyThread_get_thread_ident) -EXPORT_FUNC(PyThread_get_thread_native_id) -EXPORT_FUNC(PyThread_GetInfo) -EXPORT_FUNC(PyThread_init_thread) -EXPORT_FUNC(PyThread_ReInitTLS) -EXPORT_FUNC(PyThread_release_lock) -EXPORT_FUNC(PyThread_set_key_value) -EXPORT_FUNC(PyThread_set_stacksize) -EXPORT_FUNC(PyThread_start_new_thread) -EXPORT_FUNC(PyThread_tss_alloc) -EXPORT_FUNC(PyThread_tss_create) -EXPORT_FUNC(PyThread_tss_delete) -EXPORT_FUNC(PyThread_tss_free) -EXPORT_FUNC(PyThread_tss_get) -EXPORT_FUNC(PyThread_tss_is_created) -EXPORT_FUNC(PyThread_tss_set) -EXPORT_FUNC(PyThreadState_Clear) -EXPORT_FUNC(PyThreadState_Delete) -EXPORT_FUNC(PyThreadState_DeleteCurrent) -EXPORT_FUNC(PyThreadState_Get) -EXPORT_FUNC(PyThreadState_GetDict) -EXPORT_FUNC(PyThreadState_GetFrame) -EXPORT_FUNC(PyThreadState_GetID) -EXPORT_FUNC(PyThreadState_GetInterpreter) -EXPORT_FUNC(PyThreadState_New) -EXPORT_FUNC(PyThreadState_SetAsyncExc) -EXPORT_FUNC(PyThreadState_Swap) -EXPORT_FUNC(PyTraceBack_Here) -EXPORT_FUNC(PyTraceBack_Print) -EXPORT_FUNC(PyTuple_GetItem) -EXPORT_FUNC(PyTuple_GetSlice) -EXPORT_FUNC(PyTuple_New) -EXPORT_FUNC(PyTuple_Pack) -EXPORT_FUNC(PyTuple_SetItem) -EXPORT_FUNC(PyTuple_Size) -EXPORT_FUNC(PyType_ClearCache) -EXPORT_FUNC(PyType_FromMetaclass) -EXPORT_FUNC(PyType_FromModuleAndSpec) -EXPORT_FUNC(PyType_FromSpec) -EXPORT_FUNC(PyType_FromSpecWithBases) -EXPORT_FUNC(PyType_GenericAlloc) -EXPORT_FUNC(PyType_GenericNew) -EXPORT_FUNC(PyType_GetFlags) -EXPORT_FUNC(PyType_GetFullyQualifiedName) -EXPORT_FUNC(PyType_GetModule) -EXPORT_FUNC(PyType_GetModuleByDef) -EXPORT_FUNC(PyType_GetModuleName) -EXPORT_FUNC(PyType_GetModuleState) -EXPORT_FUNC(PyType_GetName) -EXPORT_FUNC(PyType_GetQualName) -EXPORT_FUNC(PyType_GetSlot) -EXPORT_FUNC(PyType_GetTypeDataSize) -EXPORT_FUNC(PyType_IsSubtype) -EXPORT_FUNC(PyType_Modified) -EXPORT_FUNC(PyType_Ready) -EXPORT_FUNC(PyUnicode_Append) -EXPORT_FUNC(PyUnicode_AppendAndDel) -EXPORT_FUNC(PyUnicode_AsASCIIString) -EXPORT_FUNC(PyUnicode_AsCharmapString) -EXPORT_FUNC(PyUnicode_AsDecodedObject) -EXPORT_FUNC(PyUnicode_AsDecodedUnicode) -EXPORT_FUNC(PyUnicode_AsEncodedObject) -EXPORT_FUNC(PyUnicode_AsEncodedString) -EXPORT_FUNC(PyUnicode_AsEncodedUnicode) -EXPORT_FUNC(PyUnicode_AsLatin1String) -EXPORT_FUNC(PyUnicode_AsMBCSString) -EXPORT_FUNC(PyUnicode_AsRawUnicodeEscapeString) -EXPORT_FUNC(PyUnicode_AsUCS4) -EXPORT_FUNC(PyUnicode_AsUCS4Copy) -EXPORT_FUNC(PyUnicode_AsUnicodeEscapeString) -EXPORT_FUNC(PyUnicode_AsUTF16String) -EXPORT_FUNC(PyUnicode_AsUTF32String) -EXPORT_FUNC(PyUnicode_AsUTF8AndSize) -EXPORT_FUNC(PyUnicode_AsUTF8String) -EXPORT_FUNC(PyUnicode_AsWideChar) -EXPORT_FUNC(PyUnicode_AsWideCharString) -EXPORT_FUNC(PyUnicode_BuildEncodingMap) -EXPORT_FUNC(PyUnicode_Compare) -EXPORT_FUNC(PyUnicode_CompareWithASCIIString) -EXPORT_FUNC(PyUnicode_Concat) -EXPORT_FUNC(PyUnicode_Contains) -EXPORT_FUNC(PyUnicode_Count) -EXPORT_FUNC(PyUnicode_Decode) -EXPORT_FUNC(PyUnicode_DecodeASCII) -EXPORT_FUNC(PyUnicode_DecodeCharmap) -EXPORT_FUNC(PyUnicode_DecodeCodePageStateful) -EXPORT_FUNC(PyUnicode_DecodeFSDefault) -EXPORT_FUNC(PyUnicode_DecodeFSDefaultAndSize) -EXPORT_FUNC(PyUnicode_DecodeLatin1) -EXPORT_FUNC(PyUnicode_DecodeLocale) -EXPORT_FUNC(PyUnicode_DecodeLocaleAndSize) -EXPORT_FUNC(PyUnicode_DecodeMBCS) -EXPORT_FUNC(PyUnicode_DecodeMBCSStateful) -EXPORT_FUNC(PyUnicode_DecodeRawUnicodeEscape) -EXPORT_FUNC(PyUnicode_DecodeUnicodeEscape) -EXPORT_FUNC(PyUnicode_DecodeUTF16) -EXPORT_FUNC(PyUnicode_DecodeUTF16Stateful) -EXPORT_FUNC(PyUnicode_DecodeUTF32) -EXPORT_FUNC(PyUnicode_DecodeUTF32Stateful) -EXPORT_FUNC(PyUnicode_DecodeUTF7) -EXPORT_FUNC(PyUnicode_DecodeUTF7Stateful) -EXPORT_FUNC(PyUnicode_DecodeUTF8) -EXPORT_FUNC(PyUnicode_DecodeUTF8Stateful) -EXPORT_FUNC(PyUnicode_EncodeCodePage) -EXPORT_FUNC(PyUnicode_EncodeFSDefault) -EXPORT_FUNC(PyUnicode_EncodeLocale) -EXPORT_FUNC(PyUnicode_EqualToUTF8) -EXPORT_FUNC(PyUnicode_EqualToUTF8AndSize) -EXPORT_FUNC(PyUnicode_Find) -EXPORT_FUNC(PyUnicode_FindChar) -EXPORT_FUNC(PyUnicode_Format) -EXPORT_FUNC(PyUnicode_FromEncodedObject) -EXPORT_FUNC(PyUnicode_FromFormat) -EXPORT_FUNC(PyUnicode_FromFormatV) -EXPORT_FUNC(PyUnicode_FromObject) -EXPORT_FUNC(PyUnicode_FromOrdinal) -EXPORT_FUNC(PyUnicode_FromString) -EXPORT_FUNC(PyUnicode_FromStringAndSize) -EXPORT_FUNC(PyUnicode_FromWideChar) -EXPORT_FUNC(PyUnicode_FSConverter) -EXPORT_FUNC(PyUnicode_FSDecoder) -EXPORT_FUNC(PyUnicode_GetDefaultEncoding) -EXPORT_FUNC(PyUnicode_GetLength) -EXPORT_FUNC(PyUnicode_GetSize) -EXPORT_FUNC(PyUnicode_InternFromString) -EXPORT_FUNC(PyUnicode_InternImmortal) -EXPORT_FUNC(PyUnicode_InternInPlace) -EXPORT_FUNC(PyUnicode_IsIdentifier) -EXPORT_FUNC(PyUnicode_Join) -EXPORT_FUNC(PyUnicode_Partition) -EXPORT_FUNC(PyUnicode_ReadChar) -EXPORT_FUNC(PyUnicode_Replace) -EXPORT_FUNC(PyUnicode_Resize) -EXPORT_FUNC(PyUnicode_RichCompare) -EXPORT_FUNC(PyUnicode_RPartition) -EXPORT_FUNC(PyUnicode_RSplit) -EXPORT_FUNC(PyUnicode_Split) -EXPORT_FUNC(PyUnicode_Splitlines) -EXPORT_FUNC(PyUnicode_Substring) -EXPORT_FUNC(PyUnicode_Tailmatch) -EXPORT_FUNC(PyUnicode_Translate) -EXPORT_FUNC(PyUnicode_WriteChar) -EXPORT_FUNC(PyUnicodeDecodeError_Create) -EXPORT_FUNC(PyUnicodeDecodeError_GetEncoding) -EXPORT_FUNC(PyUnicodeDecodeError_GetEnd) -EXPORT_FUNC(PyUnicodeDecodeError_GetObject) -EXPORT_FUNC(PyUnicodeDecodeError_GetReason) -EXPORT_FUNC(PyUnicodeDecodeError_GetStart) -EXPORT_FUNC(PyUnicodeDecodeError_SetEnd) -EXPORT_FUNC(PyUnicodeDecodeError_SetReason) -EXPORT_FUNC(PyUnicodeDecodeError_SetStart) -EXPORT_FUNC(PyUnicodeEncodeError_GetEncoding) -EXPORT_FUNC(PyUnicodeEncodeError_GetEnd) -EXPORT_FUNC(PyUnicodeEncodeError_GetObject) -EXPORT_FUNC(PyUnicodeEncodeError_GetReason) -EXPORT_FUNC(PyUnicodeEncodeError_GetStart) -EXPORT_FUNC(PyUnicodeEncodeError_SetEnd) -EXPORT_FUNC(PyUnicodeEncodeError_SetReason) -EXPORT_FUNC(PyUnicodeEncodeError_SetStart) -EXPORT_FUNC(PyUnicodeTranslateError_GetEnd) -EXPORT_FUNC(PyUnicodeTranslateError_GetObject) -EXPORT_FUNC(PyUnicodeTranslateError_GetReason) -EXPORT_FUNC(PyUnicodeTranslateError_GetStart) -EXPORT_FUNC(PyUnicodeTranslateError_SetEnd) -EXPORT_FUNC(PyUnicodeTranslateError_SetReason) -EXPORT_FUNC(PyUnicodeTranslateError_SetStart) -EXPORT_FUNC(PyVectorcall_Call) -EXPORT_FUNC(PyVectorcall_NARGS) -EXPORT_FUNC(PyWeakref_GetObject) -EXPORT_FUNC(PyWeakref_GetRef) -EXPORT_FUNC(PyWeakref_NewProxy) -EXPORT_FUNC(PyWeakref_NewRef) -EXPORT_FUNC(PyWrapper_New) - -EXPORT_DATA(_Py_EllipsisObject) -EXPORT_DATA(_Py_FalseStruct) -EXPORT_DATA(_Py_NoneStruct) -EXPORT_DATA(_Py_NotImplementedStruct) -EXPORT_DATA(_Py_RefTotal) -EXPORT_DATA(_Py_SwappedOp) -EXPORT_DATA(_Py_TrueStruct) -EXPORT_DATA(_PyWeakref_CallableProxyType) -EXPORT_DATA(_PyWeakref_ProxyType) -EXPORT_DATA(_PyWeakref_RefType) -EXPORT_DATA(Py_FileSystemDefaultEncodeErrors) -EXPORT_DATA(Py_FileSystemDefaultEncoding) -EXPORT_DATA(Py_GenericAliasType) -EXPORT_DATA(Py_HasFileSystemDefaultEncoding) -EXPORT_DATA(Py_UTF8Mode) -EXPORT_DATA(Py_Version) -EXPORT_DATA(PyBaseObject_Type) -EXPORT_DATA(PyBool_Type) -EXPORT_DATA(PyByteArray_Type) -EXPORT_DATA(PyByteArrayIter_Type) -EXPORT_DATA(PyBytes_Type) -EXPORT_DATA(PyBytesIter_Type) -EXPORT_DATA(PyCallIter_Type) -EXPORT_DATA(PyCapsule_Type) -EXPORT_DATA(PyCFunction_Type) -EXPORT_DATA(PyClassMethodDescr_Type) -EXPORT_DATA(PyComplex_Type) -EXPORT_DATA(PyDict_Type) -EXPORT_DATA(PyDictItems_Type) -EXPORT_DATA(PyDictIterItem_Type) -EXPORT_DATA(PyDictIterKey_Type) -EXPORT_DATA(PyDictIterValue_Type) -EXPORT_DATA(PyDictKeys_Type) -EXPORT_DATA(PyDictProxy_Type) -EXPORT_DATA(PyDictRevIterItem_Type) -EXPORT_DATA(PyDictRevIterKey_Type) -EXPORT_DATA(PyDictRevIterValue_Type) -EXPORT_DATA(PyDictValues_Type) -EXPORT_DATA(PyEllipsis_Type) -EXPORT_DATA(PyEnum_Type) -EXPORT_DATA(PyExc_ArithmeticError) -EXPORT_DATA(PyExc_AssertionError) -EXPORT_DATA(PyExc_AttributeError) -EXPORT_DATA(PyExc_BaseException) -EXPORT_DATA(PyExc_BaseExceptionGroup) -EXPORT_DATA(PyExc_BlockingIOError) -EXPORT_DATA(PyExc_BrokenPipeError) -EXPORT_DATA(PyExc_BufferError) -EXPORT_DATA(PyExc_BytesWarning) -EXPORT_DATA(PyExc_ChildProcessError) -EXPORT_DATA(PyExc_ConnectionAbortedError) -EXPORT_DATA(PyExc_ConnectionError) -EXPORT_DATA(PyExc_ConnectionRefusedError) -EXPORT_DATA(PyExc_ConnectionResetError) -EXPORT_DATA(PyExc_DeprecationWarning) -EXPORT_DATA(PyExc_EncodingWarning) -EXPORT_DATA(PyExc_EnvironmentError) -EXPORT_DATA(PyExc_EOFError) -EXPORT_DATA(PyExc_Exception) -EXPORT_DATA(PyExc_FileExistsError) -EXPORT_DATA(PyExc_FileNotFoundError) -EXPORT_DATA(PyExc_FloatingPointError) -EXPORT_DATA(PyExc_FutureWarning) -EXPORT_DATA(PyExc_GeneratorExit) -EXPORT_DATA(PyExc_ImportError) -EXPORT_DATA(PyExc_ImportWarning) -EXPORT_DATA(PyExc_IndentationError) -EXPORT_DATA(PyExc_IndexError) -EXPORT_DATA(PyExc_InterruptedError) -EXPORT_DATA(PyExc_IOError) -EXPORT_DATA(PyExc_IsADirectoryError) -EXPORT_DATA(PyExc_KeyboardInterrupt) -EXPORT_DATA(PyExc_KeyError) -EXPORT_DATA(PyExc_LookupError) -EXPORT_DATA(PyExc_MemoryError) -EXPORT_DATA(PyExc_ModuleNotFoundError) -EXPORT_DATA(PyExc_NameError) -EXPORT_DATA(PyExc_NotADirectoryError) -EXPORT_DATA(PyExc_NotImplementedError) -EXPORT_DATA(PyExc_OSError) -EXPORT_DATA(PyExc_OverflowError) -EXPORT_DATA(PyExc_PendingDeprecationWarning) -EXPORT_DATA(PyExc_PermissionError) -EXPORT_DATA(PyExc_ProcessLookupError) -EXPORT_DATA(PyExc_RecursionError) -EXPORT_DATA(PyExc_ReferenceError) -EXPORT_DATA(PyExc_ResourceWarning) -EXPORT_DATA(PyExc_RuntimeError) -EXPORT_DATA(PyExc_RuntimeWarning) -EXPORT_DATA(PyExc_StopAsyncIteration) -EXPORT_DATA(PyExc_StopIteration) -EXPORT_DATA(PyExc_SyntaxError) -EXPORT_DATA(PyExc_SyntaxWarning) -EXPORT_DATA(PyExc_SystemError) -EXPORT_DATA(PyExc_SystemExit) -EXPORT_DATA(PyExc_TabError) -EXPORT_DATA(PyExc_TimeoutError) -EXPORT_DATA(PyExc_TypeError) -EXPORT_DATA(PyExc_UnboundLocalError) -EXPORT_DATA(PyExc_UnicodeDecodeError) -EXPORT_DATA(PyExc_UnicodeEncodeError) -EXPORT_DATA(PyExc_UnicodeError) -EXPORT_DATA(PyExc_UnicodeTranslateError) -EXPORT_DATA(PyExc_UnicodeWarning) -EXPORT_DATA(PyExc_UserWarning) -EXPORT_DATA(PyExc_ValueError) -EXPORT_DATA(PyExc_Warning) -EXPORT_DATA(PyExc_WindowsError) -EXPORT_DATA(PyExc_ZeroDivisionError) -EXPORT_DATA(PyFilter_Type) -EXPORT_DATA(PyFloat_Type) -EXPORT_DATA(PyFrozenSet_Type) -EXPORT_DATA(PyGetSetDescr_Type) -EXPORT_DATA(PyList_Type) -EXPORT_DATA(PyListIter_Type) -EXPORT_DATA(PyListRevIter_Type) -EXPORT_DATA(PyLong_Type) -EXPORT_DATA(PyLongRangeIter_Type) -EXPORT_DATA(PyMap_Type) -EXPORT_DATA(PyMemberDescr_Type) -EXPORT_DATA(PyMemoryView_Type) -EXPORT_DATA(PyMethodDescr_Type) -EXPORT_DATA(PyModule_Type) -EXPORT_DATA(PyModuleDef_Type) -EXPORT_DATA(PyOS_InputHook) -EXPORT_DATA(PyProperty_Type) -EXPORT_DATA(PyRange_Type) -EXPORT_DATA(PyRangeIter_Type) -EXPORT_DATA(PyReversed_Type) -EXPORT_DATA(PySeqIter_Type) -EXPORT_DATA(PySet_Type) -EXPORT_DATA(PySetIter_Type) -EXPORT_DATA(PySlice_Type) -EXPORT_DATA(PyStructSequence_UnnamedField) -EXPORT_DATA(PySuper_Type) -EXPORT_DATA(PyTraceBack_Type) -EXPORT_DATA(PyTuple_Type) -EXPORT_DATA(PyTupleIter_Type) -EXPORT_DATA(PyType_Type) -EXPORT_DATA(PyUnicode_Type) -EXPORT_DATA(PyUnicodeIter_Type) -EXPORT_DATA(PyWrapperDescr_Type) -EXPORT_DATA(PyZip_Type) diff --git a/PC/python_exe.rc b/PC/python_exe.rc deleted file mode 100644 index c3d3bff019895e..00000000000000 --- a/PC/python_exe.rc +++ /dev/null @@ -1,54 +0,0 @@ -// Resource script for Python console EXEs. - -#include "python_ver_rc.h" - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif - -// Include the manifest file that indicates we support all -// current versions of Windows. -1 RT_MANIFEST "python.manifest" - -1 ICON DISCARDABLE "icons\python.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PYVERSION64 - PRODUCTVERSION PYVERSION64 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", PYTHON_COMPANY "\0" - VALUE "FileDescription", "Python\0" - VALUE "FileVersion", PYTHON_VERSION - VALUE "InternalName", "Python Console\0" - VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0" - VALUE "OriginalFilename", "python" PYTHON_DEBUG_EXT ".exe\0" - VALUE "ProductName", "Python\0" - VALUE "ProductVersion", PYTHON_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/PC/python_nt.rc b/PC/python_nt.rc deleted file mode 100644 index ae64fbd217af74..00000000000000 --- a/PC/python_nt.rc +++ /dev/null @@ -1,51 +0,0 @@ -// Resource script for Python core DLL. - -#include "python_ver_rc.h" - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif - -// Include the manifest file that indicates we support all -// current versions of Windows. -2 RT_MANIFEST "python.manifest" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PYVERSION64 - PRODUCTVERSION PYVERSION64 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", PYTHON_COMPANY "\0" - VALUE "FileDescription", "Python Core\0" - VALUE "FileVersion", PYTHON_VERSION - VALUE "InternalName", "Python DLL\0" - VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0" - VALUE "OriginalFilename", ORIGINAL_FILENAME "\0" - VALUE "ProductName", "Python\0" - VALUE "ProductVersion", PYTHON_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/PC/python_uwp.cpp b/PC/python_uwp.cpp deleted file mode 100644 index 2beea60e5af1ef..00000000000000 --- a/PC/python_uwp.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/* Main program when embedded in a UWP application on Windows */ - -#include "Python.h" -#include - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include - -#include - -#include -#include -#include - -#ifdef PYTHONW -#ifdef _DEBUG -const wchar_t *PROGNAME = L"pythonw_d.exe"; -#else -const wchar_t *PROGNAME = L"pythonw.exe"; -#endif -#else -#ifdef _DEBUG -const wchar_t *PROGNAME = L"python_d.exe"; -#else -const wchar_t *PROGNAME = L"python.exe"; -#endif -#endif - -static std::wstring -get_package_family() -{ - try { - UINT32 nameLength = MAX_PATH; - std::wstring name; - name.resize(nameLength); - DWORD rc = GetCurrentPackageFamilyName(&nameLength, name.data()); - if (rc == ERROR_SUCCESS) { - name.resize(nameLength - 1); - return name; - } - else if (rc != ERROR_INSUFFICIENT_BUFFER) { - throw rc; - } - name.resize(nameLength); - rc = GetCurrentPackageFamilyName(&nameLength, name.data()); - if (rc != ERROR_SUCCESS) { - throw rc; - } - name.resize(nameLength - 1); - return name; - } - catch (...) { - } - - return std::wstring(); -} - -static std::wstring -get_user_base() -{ - try { - const auto appData = winrt::Windows::Storage::ApplicationData::Current(); - if (appData) { - const auto localCache = appData.LocalCacheFolder(); - if (localCache) { - std::wstring path { localCache.Path().c_str() }; - if (!path.empty()) { - return path + L"\\local-packages"; - } - } - } - } catch (...) { - } - - return std::wstring(); -} - -static std::wstring -get_package_home() -{ - try { - UINT32 pathLength = MAX_PATH; - std::wstring path; - path.resize(pathLength); - DWORD rc = GetCurrentPackagePath(&pathLength, path.data()); - if (rc == ERROR_SUCCESS) { - path.resize(pathLength - 1); - return path; - } - else if (rc != ERROR_INSUFFICIENT_BUFFER) { - throw rc; - } - path.resize(pathLength); - rc = GetCurrentPackagePath(&pathLength, path.data()); - if (rc != ERROR_SUCCESS) { - throw rc; - } - path.resize(pathLength - 1); - return path; - } - catch (...) { - } - - return std::wstring(); -} - -static PyStatus -set_process_name(PyConfig *config) -{ - PyStatus status = PyStatus_Ok(); - std::wstring executable; - - const auto home = get_package_home(); - const auto family = get_package_family(); - - if (!family.empty()) { - PWSTR localAppData; - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, - NULL, &localAppData))) { - executable = std::wstring(localAppData) - + L"\\Microsoft\\WindowsApps\\" - + family - + L"\\" - + PROGNAME; - - CoTaskMemFree(localAppData); - } - } - - /* Only use module filename if we don't have a home */ - if (home.empty() && executable.empty()) { - executable.resize(MAX_PATH); - while (true) { - DWORD len = GetModuleFileNameW( - NULL, executable.data(), (DWORD)executable.size()); - if (len == 0) { - executable.clear(); - break; - } else if (len == executable.size() && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - executable.resize(len * 2); - } else { - executable.resize(len); - break; - } - } - size_t i = executable.find_last_of(L"/\\"); - if (i == std::wstring::npos) { - executable = PROGNAME; - } else { - executable.replace(i + 1, std::wstring::npos, PROGNAME); - } - } - - if (!home.empty()) { - status = PyConfig_SetString(config, &config->home, home.c_str()); - if (PyStatus_Exception(status)) { - return status; - } - } - - const wchar_t *launcherPath = _wgetenv(L"__PYVENV_LAUNCHER__"); - if (launcherPath) { - if (!executable.empty()) { - status = PyConfig_SetString(config, &config->base_executable, - executable.c_str()); - if (PyStatus_Exception(status)) { - return status; - } - } - - status = PyConfig_SetString( - config, &config->executable, launcherPath); - - /* bpo-35873: Clear the environment variable to avoid it being - * inherited by child processes. */ - _wputenv_s(L"__PYVENV_LAUNCHER__", L""); - } else if (!executable.empty()) { - status = PyConfig_SetString( - config, &config->executable, executable.c_str()); - } - - return status; -} - -int -wmain(int argc, wchar_t **argv) -{ - PyStatus status; - PyPreConfig preconfig; - PyConfig config; - - const wchar_t *moduleName = NULL; - const wchar_t *p = wcsrchr(argv[0], L'\\'); - if (!p) { - p = argv[0]; - } - if (p) { - if (*p == L'\\') { - p++; - } - - if (wcsnicmp(p, L"pip", 3) == 0) { - moduleName = L"pip"; - } else if (wcsnicmp(p, L"idle", 4) == 0) { - moduleName = L"idlelib"; - } - } - - PyPreConfig_InitPythonConfig(&preconfig); - if (!moduleName) { - status = Py_PreInitializeFromArgs(&preconfig, argc, argv); - if (PyStatus_Exception(status)) { - goto fail_without_config; - } - } - - PyConfig_InitPythonConfig(&config); - - status = PyConfig_SetArgv(&config, argc, argv); - if (PyStatus_Exception(status)) { - goto fail; - } - if (moduleName) { - config.parse_argv = 0; - } - - status = set_process_name(&config); - if (PyStatus_Exception(status)) { - goto fail; - } - - p = _wgetenv(L"PYTHONUSERBASE"); - if (!p || !*p) { - _wputenv_s(L"PYTHONUSERBASE", get_user_base().c_str()); - } - - if (moduleName) { - status = PyConfig_SetString(&config, &config.run_module, moduleName); - if (PyStatus_Exception(status)) { - goto fail; - } - status = PyConfig_SetString(&config, &config.run_filename, NULL); - if (PyStatus_Exception(status)) { - goto fail; - } - status = PyConfig_SetString(&config, &config.run_command, NULL); - if (PyStatus_Exception(status)) { - goto fail; - } - } - - status = Py_InitializeFromConfig(&config); - if (PyStatus_Exception(status)) { - goto fail; - } - PyConfig_Clear(&config); - - return Py_RunMain(); - -fail: - PyConfig_Clear(&config); -fail_without_config: - if (PyStatus_IsExit(status)) { - return status.exitcode; - } - assert(PyStatus_Exception(status)); - Py_ExitStatusException(status); - /* Unreachable code */ - return 0; -} - -#ifdef PYTHONW - -int WINAPI wWinMain( - HINSTANCE hInstance, /* handle to current instance */ - HINSTANCE hPrevInstance, /* handle to previous instance */ - LPWSTR lpCmdLine, /* pointer to command line */ - int nCmdShow /* show state of window */ -) -{ - return wmain(__argc, __wargv); -} - -#endif diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h deleted file mode 100644 index 08509f96ed1db8..00000000000000 --- a/PC/python_ver_rc.h +++ /dev/null @@ -1,34 +0,0 @@ -// Resource script for Python core DLL. -// Currently only holds version information. -// -#pragma code_page(1252) -#include "winver.h" - -#define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2024 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." - -#define MS_WINDOWS -#include "modsupport.h" -#include "patchlevel.h" -#ifdef _DEBUG -# define PYTHON_DEBUG_EXT "_d" -#else -# define PYTHON_DEBUG_EXT -#endif - -/* e.g., 3.3.0a1 - * PY_VERSION comes from patchlevel.h - */ -#define PYTHON_VERSION PY_VERSION "\0" - -/* 64-bit version number as comma-separated list of 4 16-bit ints */ -#if PY_MICRO_VERSION > 64 -# error "PY_MICRO_VERSION > 64" -#endif -#if PY_RELEASE_LEVEL > 99 -# error "PY_RELEASE_LEVEL > 99" -#endif -#if PY_RELEASE_SERIAL > 9 -# error "PY_RELEASE_SERIAL > 9" -#endif -#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc deleted file mode 100644 index 38570b74fa3e02..00000000000000 --- a/PC/pythonw_exe.rc +++ /dev/null @@ -1,54 +0,0 @@ -// Resource script for Python console EXEs. - -#include "python_ver_rc.h" - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif - -// Include the manifest file that indicates we support all -// current versions of Windows. -1 RT_MANIFEST "python.manifest" - -1 ICON DISCARDABLE "icons\pythonw.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION PYVERSION64 - PRODUCTVERSION PYVERSION64 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", PYTHON_COMPANY "\0" - VALUE "FileDescription", "Python\0" - VALUE "FileVersion", PYTHON_VERSION - VALUE "InternalName", "Python Application\0" - VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0" - VALUE "OriginalFilename", "pythonw" PYTHON_DEBUG_EXT ".exe\0" - VALUE "ProductName", "Python\0" - VALUE "ProductVersion", PYTHON_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/PC/readme.txt b/PC/readme.txt deleted file mode 100644 index a917a72c1232cd..00000000000000 --- a/PC/readme.txt +++ /dev/null @@ -1,70 +0,0 @@ -Welcome to the "PC" subdirectory of the Python distribution -*********************************************************** - -This "PC" subdirectory contains complete project files to make -several older PC ports of Python, as well as all the PC-specific -Python source files. It should be located in the root of the -Python distribution, and there should be directories "Modules", -"Objects", "Python", etc. in the parent directory of this "PC" -subdirectory. Be sure to read the documentation in the Python -distribution. - -Python requires library files such as string.py to be available in -one or more library directories. The search path of libraries is -set up when Python starts. To see the current Python library search -path, start Python and enter "import sys" and "print sys.path". - -All PC ports use this scheme to try to set up a module search path: - - 1) The script location; the current directory without script. - 2) The PYTHONPATH variable, if set. - 3) Paths specified in the Registry. - 4) Default directories lib, lib/win, lib/test, lib/tkinter; - these are searched relative to the environment variable - PYTHONHOME, if set, or relative to the executable and its - ancestors, if a landmark file (Lib/string.py) is found , - or the current directory (not useful). - 5) The directory containing the executable. - -The best installation strategy is to put the Python executable and -DLL in some convenient directory such as -C:/python, and copy all library files and subdirectories (using XCOPY) -to C:/python/lib. Then you don't need to set PYTHONPATH. Otherwise, -set the environment variable PYTHONPATH to your Python search path. -For example, - set PYTHONPATH=.;d:\python\lib;d:\python\lib\win;d:\python\lib\dos-8x3 - -There are several add-in modules to build Python programs which use -the native Windows operating environment. The ports here just make -"QuickWin" and DOS Python versions which support a character-mode -(console) environment. Look in www.python.org for Tkinter, PythonWin, -WPY and wxPython. - -To make a Python port, start the Integrated Development Environment -(IDE) of your compiler, and read in the native "project file" -(or makefile) provided. This will enable you to change any source -files or build settings so you can make custom builds. - -pyconfig.h An important configuration file specific to PC's. - -config.c The list of C modules to include in the Python PC - version. Manually edit this file to add or - remove Python modules. - - -Additional files and subdirectories for 32-bit Windows -====================================================== - -python_nt.rc Resource compiler input for python15.dll. - -dl_nt.c - Additional sources used for 32-bit Windows features. - - -Note for Windows 3.x and DOS users -================================== - -Neither Windows 3.x nor DOS is supported any more. The last Python -version that supported these was Python 1.5.2; the support files were -present in Python 2.0 but weren't updated, and it is not our intention -to support these platforms for Python 2.x. diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc deleted file mode 100644 index 9ae2aa0f6f2f2c..00000000000000 --- a/PC/sqlite3.rc +++ /dev/null @@ -1,54 +0,0 @@ -// Resource script for Sqlite DLL. - -#include - -#ifndef RT_MANIFEST -// bpo-45220: Cannot reliably #include RT_MANIFEST from -// anywhere, so we hardcode it -#define RT_MANIFEST 24 -#endif - -// Include the manifest file that indicates we support all -// current versions of Windows. -2 RT_MANIFEST "python.manifest" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#define _S(x) #x -#define S(x) _S(x) - -VS_VERSION_INFO VERSIONINFO - FILEVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION - PRODUCTVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "SQLite3\0" - VALUE "FileDescription", "SQLite3\0" - VALUE "FileVersion", S(SQLITE_VERSION) "\0" - VALUE "InternalName", "SQLite3 DLL\0" - VALUE "LegalCopyright", "Unspecified\0" - VALUE "OriginalFilename", "sqlite3.dll\0" - VALUE "ProductName", "SQLite3\0" - VALUE "ProductVersion", S(SQLITE_VERSION) "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/PC/store_info.txt b/PC/store_info.txt deleted file mode 100644 index f6a85cb8ebec1f..00000000000000 --- a/PC/store_info.txt +++ /dev/null @@ -1,156 +0,0 @@ -# Overview - -NOTE: This file requires more content. - -Since Python 3.7.2, releases have been made through the Microsoft Store -to allow easy installation on Windows 10.0.17763.0 and later. - -# Building - -To build the store package, the PC/layout script should be used. -Execute the directory with the build of Python to package, and pass -"-h" for full command-line options. - -To sideload test builds, you will need a local certificate. -Instructions are available at -https://docs.microsoft.com/windows/uwp/packaging/create-certificate-package-signing. - -After exporting your certificate, you will need the subject name and -SHA256 hash. The `certutil -dump ` command will display this -information. - -To build for sideloading, use these commands in PowerShell: - -``` -$env:APPX_DATA_PUBLISHER= -$env:APPX_DATA_SHA256= -$env:SigningCertificateFile= - -python PC/layout --copy --include-appxmanifest -Tools/msi/make_appx.ps1 python.msix -sign - -Add-AppxPackage python.msix -``` - -(Note that only the last command requires PowerShell, and the others -can be used from Command Prompt. You can also double-click to install -the final package.) - -To build for publishing to the Store, use these commands: - -``` -$env:APPX_DATA_PUBLISHER = $null -$env:APPX_DATA_SHA256 = $null - -python PC/layout --copy --preset-appxmanifest --precompile -Tools/msi/make_appx.ps1 python.msix -``` - -Note that this package cannot be installed locally. It may only be -added to a submission for the store. - - -# Submission Metadata - -This file contains the text that we use to fill out the store listing -for the Microsoft Store. It needs to be entered manually when creating -a new submission via the dashboard at -https://partner.microsoft.com/dashboard. - -We keep it here for convenience and to allow it to be updated via pull -requests. - -When submitting a new app, the HeadlessAppBypass waiver will be needed. -To request this, send an email to PartnerOps@microsoft.com with the app -ID (12 character token available from the dashboard). The waiver needs -to be applied *before* uploading the package (as of November 2019). - -Ensure that the new app is named "Python.3.X", where X is the minor -version of the release. If the name provided initially does not match -the name used when building the package, the upload will fail. The -display name shown to users can be set later. - -## Title - -Python 3.9 - -## Short Title - -Python - -## Description - -Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. - -The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python web site, https://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. - -The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). Python is also suitable as an extension language for customizable applications. - -## ShortDescription - -The Python 3.9 interpreter and runtime. - -## Copyright Trademark Information - -(c) Python Software Foundation - -## Additional License Terms - -Visit https://docs.python.org/3.9/license.html for latest license terms. - -PSF LICENSE AGREEMENT FOR PYTHON 3.9 - -1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and - the Individual or Organization ("Licensee") accessing and otherwise using Python - 3.9 software in source or binary form and its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF hereby - grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, - analyze, test, perform and/or display publicly, prepare derivative works, - distribute, and otherwise use Python 3.9 alone or in any derivative - version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright © 2001-2018 Python Software Foundation; All Rights - Reserved" are retained in Python 3.9 alone or in any derivative version - prepared by Licensee. - -3. In the event Licensee prepares a derivative work that is based on or - incorporates Python 3.9 or any part thereof, and wants to make the - derivative work available to others as provided herein, then Licensee hereby - agrees to include in any such work a brief summary of the changes made to Python - 3.9. - -4. PSF is making Python 3.9 available to Licensee on an "AS IS" basis. - PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF - EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR - WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE - USE OF PYTHON 3.9 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 3.9 - FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF - MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 3.9, OR ANY DERIVATIVE - THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material breach of - its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any relationship - of agency, partnership, or joint venture between PSF and Licensee. This License - Agreement does not grant permission to use PSF trademarks or trade name in a - trademark sense to endorse or promote products or services of Licensee, or any - third party. - -8. By copying, installing or otherwise using Python 3.9, Licensee agrees - to be bound by the terms and conditions of this License Agreement. - -## Features - -* Easy to install Python runtime -* Supported by core CPython team -* Find Python, Pip and Idle on PATH - -## Search Terms - -* Python -* Scripting -* Interpreter - diff --git a/PC/validate_ucrtbase.py b/PC/validate_ucrtbase.py deleted file mode 100644 index 0ba54ab3bb42df..00000000000000 --- a/PC/validate_ucrtbase.py +++ /dev/null @@ -1,89 +0,0 @@ -''' -This script gets the version number from ucrtbased.dll and checks -whether it is a version with a known issue. -''' - -import sys - -from ctypes import (c_buffer, POINTER, byref, create_unicode_buffer, - Structure, WinDLL) -from ctypes.wintypes import DWORD, HANDLE - -class VS_FIXEDFILEINFO(Structure): - _fields_ = [ - ("dwSignature", DWORD), - ("dwStrucVersion", DWORD), - ("dwFileVersionMS", DWORD), - ("dwFileVersionLS", DWORD), - ("dwProductVersionMS", DWORD), - ("dwProductVersionLS", DWORD), - ("dwFileFlagsMask", DWORD), - ("dwFileFlags", DWORD), - ("dwFileOS", DWORD), - ("dwFileType", DWORD), - ("dwFileSubtype", DWORD), - ("dwFileDateMS", DWORD), - ("dwFileDateLS", DWORD), - ] - -kernel32 = WinDLL('kernel32') -version = WinDLL('version') - -if len(sys.argv) < 2: - print('Usage: validate_ucrtbase.py ') - sys.exit(2) - -try: - ucrtbased = WinDLL(sys.argv[1]) -except OSError: - print('Cannot find ucrtbased.dll') - # This likely means that VS is not installed, but that is an - # obvious enough problem if you're trying to produce a debug - # build that we don't need to fail here. - sys.exit(0) - -# We will immediately double the length up to MAX_PATH, but the -# path may be longer, so we retry until the returned string is -# shorter than our buffer. -name_len = actual_len = 130 -while actual_len == name_len: - name_len *= 2 - name = create_unicode_buffer(name_len) - actual_len = kernel32.GetModuleFileNameW(HANDLE(ucrtbased._handle), - name, len(name)) - if not actual_len: - print('Failed to get full module name.') - sys.exit(2) - -size = version.GetFileVersionInfoSizeW(name, None) -if not size: - print('Failed to get size of version info.') - sys.exit(2) - -ver_block = c_buffer(size) -if (not version.GetFileVersionInfoW(name, None, size, ver_block) or - not ver_block): - print('Failed to get version info.') - sys.exit(2) - -pvi = POINTER(VS_FIXEDFILEINFO)() -if not version.VerQueryValueW(ver_block, "", byref(pvi), byref(DWORD())): - print('Failed to get version value from info.') - sys.exit(2) - -ver = ( - pvi.contents.dwProductVersionMS >> 16, - pvi.contents.dwProductVersionMS & 0xFFFF, - pvi.contents.dwProductVersionLS >> 16, - pvi.contents.dwProductVersionLS & 0xFFFF, -) - -print('{} is version {}.{}.{}.{}'.format(name.value, *ver)) - -if ver < (10, 0, 10586): - print('WARN: ucrtbased contains known issues. ' - 'Please update the Windows 10 SDK.') - print('See:') - print(' http://bugs.python.org/issue27705') - print(' https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk') - sys.exit(1) diff --git a/PC/venvlauncher.c b/PC/venvlauncher.c deleted file mode 100644 index b6bb0218236ae9..00000000000000 --- a/PC/venvlauncher.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - * venv redirector for Windows - * - * This launcher looks for a nearby pyvenv.cfg to find the correct home - * directory, and then launches the original Python executable from it. - * The name of this executable is passed as argv[0]. - */ - -#define __STDC_WANT_LIB_EXT1__ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MS_WINDOWS -#include "patchlevel.h" - -#define MAXLEN PATHCCH_MAX_CCH -#define MSGSIZE 1024 - -#define RC_NO_STD_HANDLES 100 -#define RC_CREATE_PROCESS 101 -#define RC_NO_PYTHON 103 -#define RC_NO_MEMORY 104 -#define RC_NO_VENV_CFG 106 -#define RC_BAD_VENV_CFG 107 -#define RC_NO_COMMANDLINE 108 -#define RC_INTERNAL_ERROR 109 - -// This should always be defined when we build for real, -// but it's handy to have a definition for quick testing -#ifndef EXENAME -#define EXENAME L"python.exe" -#endif - -#ifndef CFGNAME -#define CFGNAME L"pyvenv.cfg" -#endif - -static FILE * log_fp = NULL; - -void -debug(wchar_t * format, ...) -{ - va_list va; - - if (log_fp != NULL) { - wchar_t buffer[MAXLEN]; - int r = 0; - va_start(va, format); - r = vswprintf_s(buffer, MAXLEN, format, va); - va_end(va); - - if (r <= 0) { - return; - } - fwprintf(log_fp, L"%ls\n", buffer); - while (r && isspace(buffer[r])) { - buffer[r--] = L'\0'; - } - if (buffer[0]) { - OutputDebugStringW(buffer); - } - } -} - - -void -formatWinerror(int rc, wchar_t * message, int size) -{ - FormatMessageW( - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, rc, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - message, size, NULL); -} - - -void -winerror(int err, wchar_t * format, ... ) -{ - va_list va; - wchar_t message[MSGSIZE]; - wchar_t win_message[MSGSIZE]; - int len; - - if (err == 0) { - err = GetLastError(); - } - - va_start(va, format); - len = _vsnwprintf_s(message, MSGSIZE, _TRUNCATE, format, va); - va_end(va); - - formatWinerror(err, win_message, MSGSIZE); - if (len >= 0) { - _snwprintf_s(&message[len], MSGSIZE - len, _TRUNCATE, L": %ls", - win_message); - } - -#if !defined(_WINDOWS) - fwprintf(stderr, L"%ls\n", message); -#else - MessageBoxW(NULL, message, L"Python venv launcher is sorry to say ...", - MB_OK); -#endif -} - - -void -error(wchar_t * format, ... ) -{ - va_list va; - wchar_t message[MSGSIZE]; - - va_start(va, format); - _vsnwprintf_s(message, MSGSIZE, _TRUNCATE, format, va); - va_end(va); - -#if !defined(_WINDOWS) - fwprintf(stderr, L"%ls\n", message); -#else - MessageBoxW(NULL, message, L"Python venv launcher is sorry to say ...", - MB_OK); -#endif -} - - -bool -isEnvVarSet(const wchar_t *name) -{ - /* only looking for non-empty, which means at least one character - and the null terminator */ - return GetEnvironmentVariableW(name, NULL, 0) >= 2; -} - - -bool -join(wchar_t *buffer, size_t bufferLength, const wchar_t *fragment) -{ - if (SUCCEEDED(PathCchCombineEx(buffer, bufferLength, buffer, fragment, PATHCCH_ALLOW_LONG_PATHS))) { - return true; - } - return false; -} - - -bool -split_parent(wchar_t *buffer, size_t bufferLength) -{ - return SUCCEEDED(PathCchRemoveFileSpec(buffer, bufferLength)); -} - - -/* - * Path calculation - */ - -int -calculate_pyvenvcfg_path(wchar_t *pyvenvcfg_path, size_t maxlen) -{ - if (!pyvenvcfg_path) { - error(L"invalid buffer provided"); - return RC_INTERNAL_ERROR; - } - if ((DWORD)maxlen != maxlen) { - error(L"path buffer is too large"); - return RC_INTERNAL_ERROR; - } - if (!GetModuleFileNameW(NULL, pyvenvcfg_path, (DWORD)maxlen)) { - winerror(GetLastError(), L"failed to read executable directory"); - return RC_NO_COMMANDLINE; - } - // Remove 'python.exe' from our path - if (!split_parent(pyvenvcfg_path, maxlen)) { - error(L"failed to remove segment from '%ls'", pyvenvcfg_path); - return RC_NO_COMMANDLINE; - } - // Replace with 'pyvenv.cfg' - if (!join(pyvenvcfg_path, maxlen, CFGNAME)) { - error(L"failed to append '%ls' to '%ls'", CFGNAME, pyvenvcfg_path); - return RC_NO_MEMORY; - } - // If it exists, return - if (GetFileAttributesW(pyvenvcfg_path) != INVALID_FILE_ATTRIBUTES) { - return 0; - } - // Otherwise, remove 'pyvenv.cfg' and (probably) 'Scripts' - if (!split_parent(pyvenvcfg_path, maxlen) || - !split_parent(pyvenvcfg_path, maxlen)) { - error(L"failed to remove segments from '%ls'", pyvenvcfg_path); - return RC_NO_COMMANDLINE; - } - // Replace 'pyvenv.cfg' - if (!join(pyvenvcfg_path, maxlen, CFGNAME)) { - error(L"failed to append '%ls' to '%ls'", CFGNAME, pyvenvcfg_path); - return RC_NO_MEMORY; - } - // If it exists, return - if (GetFileAttributesW(pyvenvcfg_path) != INVALID_FILE_ATTRIBUTES) { - return 0; - } - // Otherwise, we fail - winerror(GetLastError(), L"failed to locate %ls", CFGNAME); - return RC_NO_VENV_CFG; -} - - -/* - * pyvenv.cfg parsing - */ - -static int -find_home_value(const char *buffer, DWORD maxlen, const char **start, DWORD *length) -{ - if (!buffer || !start || !length) { - error(L"invalid find_home_value parameters()"); - return 0; - } - for (const char *s = strstr(buffer, "home"); - s && (size_t)((ptrdiff_t)s - (ptrdiff_t)buffer) < maxlen; - s = strstr(s + 1, "\nhome") - ) { - if (*s == '\n') { - ++s; - } - for (int i = 4; i > 0 && *s; --i, ++s); - - while (*s && iswspace(*s)) { - ++s; - } - if (*s != L'=') { - continue; - } - - do { - ++s; - } while (*s && iswspace(*s)); - - *start = s; - char *nl = strchr(s, '\n'); - if (nl) { - while (nl != s && iswspace(nl[-1])) { - --nl; - } - *length = (DWORD)((ptrdiff_t)nl - (ptrdiff_t)s); - } else { - *length = (DWORD)strlen(s); - } - return 1; - } - return 0; -} - - -int -read_home(const wchar_t *pyvenv_cfg, wchar_t *home_path, size_t maxlen) -{ - HANDLE hFile = CreateFileW(pyvenv_cfg, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, 0, NULL); - - if (hFile == INVALID_HANDLE_VALUE) { - winerror(GetLastError(), L"failed to open '%ls'", pyvenv_cfg); - return RC_BAD_VENV_CFG; - } - - // 8192 characters ought to be enough for anyone - // (doubled compared to the old implementation!) - char buffer[8192]; - DWORD len; - if (!ReadFile(hFile, buffer, sizeof(buffer) - 1, &len, NULL)) { - winerror(GetLastError(), L"failed to read '%ls'", pyvenv_cfg); - CloseHandle(hFile); - return RC_BAD_VENV_CFG; - } - CloseHandle(hFile); - // Ensure null termination - buffer[len] = '\0'; - - char *home; - DWORD home_len; - if (!find_home_value(buffer, sizeof(buffer), &home, &home_len)) { - error(L"no home= specified in '%ls'", pyvenv_cfg); - return RC_BAD_VENV_CFG; - } - - if ((DWORD)maxlen != maxlen) { - maxlen = 8192; - } - len = MultiByteToWideChar(CP_UTF8, 0, home, home_len, home_path, (DWORD)maxlen); - if (!len) { - winerror(GetLastError(), L"failed to decode home setting in '%ls'", pyvenv_cfg); - return RC_BAD_VENV_CFG; - } - home_path[len] = L'\0'; - - return 0; -} - - -int -locate_python(wchar_t *path, size_t maxlen) -{ - if (!join(path, maxlen, EXENAME)) { - error(L"failed to append %ls to '%ls'", EXENAME, path); - return RC_NO_MEMORY; - } - - if (GetFileAttributesW(path) == INVALID_FILE_ATTRIBUTES) { - winerror(GetLastError(), L"did not find executable at '%ls'", path); - return RC_NO_PYTHON; - } - - return 0; -} - - -int -smuggle_path() -{ - wchar_t buffer[MAXLEN]; - // We could use argv[0], but that may be wrong in certain rare cases (if the - // user is doing something weird like symlinks to venv redirectors), and - // what we _really_ want is the directory of the venv. We always copy the - // redirectors, so if we've made the venv, this will be correct. - DWORD len = GetModuleFileNameW(NULL, buffer, MAXLEN); - if (!len) { - winerror(GetLastError(), L"Failed to get own executable path"); - return RC_INTERNAL_ERROR; - } - buffer[len] = L'\0'; - debug(L"Setting __PYVENV_LAUNCHER__ = '%s'", buffer); - - if (!SetEnvironmentVariableW(L"__PYVENV_LAUNCHER__", buffer)) { - winerror(GetLastError(), L"Failed to set launcher environment"); - return RC_INTERNAL_ERROR; - } - - return 0; -} - -/* - * Process creation - */ - -static BOOL -safe_duplicate_handle(HANDLE in, HANDLE * pout, const wchar_t *name) -{ - BOOL ok; - HANDLE process = GetCurrentProcess(); - DWORD rc; - - *pout = NULL; - ok = DuplicateHandle(process, in, process, pout, 0, TRUE, - DUPLICATE_SAME_ACCESS); - if (!ok) { - rc = GetLastError(); - if (rc == ERROR_INVALID_HANDLE) { - debug(L"DuplicateHandle(%ls) returned ERROR_INVALID_HANDLE\n", name); - ok = TRUE; - } - else { - debug(L"DuplicateHandle(%ls) returned %d\n", name, rc); - } - } - return ok; -} - -static BOOL WINAPI -ctrl_c_handler(DWORD code) -{ - return TRUE; /* We just ignore all control events. */ -} - -static int -launch(const wchar_t *executable, wchar_t *cmdline) -{ - HANDLE job; - JOBOBJECT_EXTENDED_LIMIT_INFORMATION info; - DWORD rc; - BOOL ok; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - -#if defined(_WINDOWS) - /* - When explorer launches a Windows (GUI) application, it displays - the "app starting" (the "pointer + hourglass") cursor for a number - of seconds, or until the app does something UI-ish (eg, creating a - window, or fetching a message). As this launcher doesn't do this - directly, that cursor remains even after the child process does these - things. We avoid that by doing a simple post+get message. - See http://bugs.python.org/issue17290 - */ - MSG msg; - - PostMessage(0, 0, 0, 0); - GetMessage(&msg, 0, 0, 0); -#endif - - debug(L"run_child: about to run '%ls' with '%ls'\n", executable, cmdline); - job = CreateJobObject(NULL, NULL); - ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation, - &info, sizeof(info), &rc); - if (!ok || (rc != sizeof(info)) || !job) { - winerror(GetLastError(), L"Job information querying failed"); - return RC_CREATE_PROCESS; - } - info.BasicLimitInformation.LimitFlags |= JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | - JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK; - ok = SetInformationJobObject(job, JobObjectExtendedLimitInformation, &info, - sizeof(info)); - if (!ok) { - winerror(GetLastError(), L"Job information setting failed"); - return RC_CREATE_PROCESS; - } - memset(&si, 0, sizeof(si)); - GetStartupInfoW(&si); - ok = safe_duplicate_handle(GetStdHandle(STD_INPUT_HANDLE), &si.hStdInput, L"stdin"); - if (!ok) { - return RC_NO_STD_HANDLES; - } - ok = safe_duplicate_handle(GetStdHandle(STD_OUTPUT_HANDLE), &si.hStdOutput, L"stdout"); - if (!ok) { - return RC_NO_STD_HANDLES; - } - ok = safe_duplicate_handle(GetStdHandle(STD_ERROR_HANDLE), &si.hStdError, L"stderr"); - if (!ok) { - return RC_NO_STD_HANDLES; - } - - ok = SetConsoleCtrlHandler(ctrl_c_handler, TRUE); - if (!ok) { - winerror(GetLastError(), L"control handler setting failed"); - return RC_CREATE_PROCESS; - } - - si.dwFlags = STARTF_USESTDHANDLES; - ok = CreateProcessW(executable, cmdline, NULL, NULL, TRUE, - 0, NULL, NULL, &si, &pi); - if (!ok) { - winerror(GetLastError(), L"Unable to create process using '%ls'", cmdline); - return RC_CREATE_PROCESS; - } - AssignProcessToJobObject(job, pi.hProcess); - CloseHandle(pi.hThread); - WaitForSingleObjectEx(pi.hProcess, INFINITE, FALSE); - ok = GetExitCodeProcess(pi.hProcess, &rc); - if (!ok) { - winerror(GetLastError(), L"Failed to get exit code of process"); - return RC_CREATE_PROCESS; - } - debug(L"child process exit code: %d", rc); - return rc; -} - - -int -process(int argc, wchar_t ** argv) -{ - int exitCode; - wchar_t pyvenvcfg_path[MAXLEN]; - wchar_t home_path[MAXLEN]; - - if (isEnvVarSet(L"PYLAUNCHER_DEBUG")) { - setvbuf(stderr, (char *)NULL, _IONBF, 0); - log_fp = stderr; - } - - exitCode = calculate_pyvenvcfg_path(pyvenvcfg_path, MAXLEN); - if (exitCode) return exitCode; - - exitCode = read_home(pyvenvcfg_path, home_path, MAXLEN); - if (exitCode) return exitCode; - - exitCode = locate_python(home_path, MAXLEN); - if (exitCode) return exitCode; - - // We do not update argv[0] to point at the target runtime, and so we do not - // pass through our original argv[0] in an environment variable. - exitCode = smuggle_path(); - if (exitCode) return exitCode; - - exitCode = launch(home_path, GetCommandLineW()); - return exitCode; -} - - -#if defined(_WINDOWS) - -int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPWSTR lpstrCmd, int nShow) -{ - return process(__argc, __wargv); -} - -#else - -int cdecl wmain(int argc, wchar_t ** argv) -{ - return process(argc, argv); -} - -#endif diff --git a/PC/winreg.c b/PC/winreg.c deleted file mode 100644 index b81b0590eb9cb1..00000000000000 --- a/PC/winreg.c +++ /dev/null @@ -1,2220 +0,0 @@ -/* - winreg.c - - Windows Registry access module for Python. - - * Simple registry access written by Mark Hammond in win32api - module circa 1995. - * Bill Tutt expanded the support significantly not long after. - * Numerous other people have submitted patches since then. - * Ripped from win32api module 03-Feb-2000 by Mark Hammond, and - basic Unicode support added. - -*/ - -#include "Python.h" -#include "pycore_object.h" // _PyObject_Init() -#include "pycore_moduleobject.h" - -#include - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES) - -typedef struct { - PyTypeObject *PyHKEY_Type; -} winreg_state; - -/* Forward declares */ - -static BOOL PyHKEY_AsHKEY(winreg_state *st, PyObject *ob, HKEY *pRes, BOOL bNoneOK); -static BOOL clinic_HKEY_converter(winreg_state *st, PyObject *ob, void *p); -static PyObject *PyHKEY_FromHKEY(winreg_state *st, HKEY h); -static BOOL PyHKEY_Close(winreg_state *st, PyObject *obHandle); - -static char errNotAHandle[] = "Object is not a handle"; - -/* The win32api module reports the function name that failed, - but this concept is not in the Python core. - Hopefully it will one day, and in the meantime I don't - want to lose this info... -*/ -#define PyErr_SetFromWindowsErrWithFunction(rc, fnname) \ - PyErr_SetFromWindowsErr(rc) - -/* Doc strings */ -PyDoc_STRVAR(module_doc, -"This module provides access to the Windows registry API.\n" -"\n" -"Functions:\n" -"\n" -"CloseKey() - Closes a registry key.\n" -"ConnectRegistry() - Establishes a connection to a predefined registry handle\n" -" on another computer.\n" -"CreateKey() - Creates the specified key, or opens it if it already exists.\n" -"DeleteKey() - Deletes the specified key.\n" -"DeleteValue() - Removes a named value from the specified registry key.\n" -"DeleteTree() - Deletes the specified key and all its subkeys and values recursively.\n" -"EnumKey() - Enumerates subkeys of the specified open registry key.\n" -"EnumValue() - Enumerates values of the specified open registry key.\n" -"ExpandEnvironmentStrings() - Expand the env strings in a REG_EXPAND_SZ\n" -" string.\n" -"FlushKey() - Writes all the attributes of the specified key to the registry.\n" -"LoadKey() - Creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and\n" -" stores registration information from a specified file into that\n" -" subkey.\n" -"OpenKey() - Opens the specified key.\n" -"OpenKeyEx() - Alias of OpenKey().\n" -"QueryValue() - Retrieves the value associated with the unnamed value for a\n" -" specified key in the registry.\n" -"QueryValueEx() - Retrieves the type and data for a specified value name\n" -" associated with an open registry key.\n" -"QueryInfoKey() - Returns information about the specified key.\n" -"SaveKey() - Saves the specified key, and all its subkeys a file.\n" -"SetValue() - Associates a value with a specified key.\n" -"SetValueEx() - Stores data in the value field of an open registry key.\n" -"\n" -"Special objects:\n" -"\n" -"HKEYType -- type object for HKEY objects\n" -"error -- exception raised for Win32 errors\n" -"\n" -"Integer constants:\n" -"Many constants are defined - see the documentation for each function\n" -"to see what constants are used, and where."); - - - -/* PyHKEY docstrings */ -PyDoc_STRVAR(PyHKEY_doc, -"PyHKEY Object - A Python object, representing a win32 registry key.\n" -"\n" -"This object wraps a Windows HKEY object, automatically closing it when\n" -"the object is destroyed. To guarantee cleanup, you can call either\n" -"the Close() method on the PyHKEY, or the CloseKey() method.\n" -"\n" -"All functions which accept a handle object also accept an integer --\n" -"however, use of the handle object is encouraged.\n" -"\n" -"Functions:\n" -"Close() - Closes the underlying handle.\n" -"Detach() - Returns the integer Win32 handle, detaching it from the object\n" -"\n" -"Properties:\n" -"handle - The integer Win32 handle.\n" -"\n" -"Operations:\n" -"__bool__ - Handles with an open object return true, otherwise false.\n" -"__int__ - Converting a handle to an integer returns the Win32 handle.\n" -"__enter__, __exit__ - Context manager support for 'with' statement,\n" -"automatically closes handle."); - - - -/************************************************************************ - - The PyHKEY object definition - -************************************************************************/ -typedef struct { - PyObject_VAR_HEAD - HKEY hkey; -} PyHKEYObject; - -#define PyHKEY_Check(st, op) Py_IS_TYPE(op, st->PyHKEY_Type) - -static char *failMsg = "bad operand type"; - -static PyObject * -PyHKEY_unaryFailureFunc(PyObject *ob) -{ - PyErr_SetString(PyExc_TypeError, failMsg); - return NULL; -} -static PyObject * -PyHKEY_binaryFailureFunc(PyObject *ob1, PyObject *ob2) -{ - PyErr_SetString(PyExc_TypeError, failMsg); - return NULL; -} -static PyObject * -PyHKEY_ternaryFailureFunc(PyObject *ob1, PyObject *ob2, PyObject *ob3) -{ - PyErr_SetString(PyExc_TypeError, failMsg); - return NULL; -} - -static void -PyHKEY_deallocFunc(PyObject *ob) -{ - /* Can not call PyHKEY_Close, as the ob->tp_type - has already been cleared, thus causing the type - check to fail! - */ - PyHKEYObject *obkey = (PyHKEYObject *)ob; - if (obkey->hkey) - RegCloseKey((HKEY)obkey->hkey); - - PyTypeObject *tp = Py_TYPE(ob); - PyObject_GC_UnTrack(ob); - PyObject_GC_Del(ob); - Py_DECREF(tp); -} - -static int -PyHKEY_traverseFunc(PyHKEYObject *self, visitproc visit, void *arg) -{ - Py_VISIT(Py_TYPE(self)); - return 0; -} - -static int -PyHKEY_boolFunc(PyObject *ob) -{ - return ((PyHKEYObject *)ob)->hkey != 0; -} - -static PyObject * -PyHKEY_intFunc(PyObject *ob) -{ - PyHKEYObject *pyhkey = (PyHKEYObject *)ob; - return PyLong_FromVoidPtr(pyhkey->hkey); -} - -static PyObject * -PyHKEY_strFunc(PyObject *ob) -{ - PyHKEYObject *pyhkey = (PyHKEYObject *)ob; - return PyUnicode_FromFormat("", pyhkey->hkey); -} - -static int -PyHKEY_compareFunc(PyObject *ob1, PyObject *ob2) -{ - PyHKEYObject *pyhkey1 = (PyHKEYObject *)ob1; - PyHKEYObject *pyhkey2 = (PyHKEYObject *)ob2; - return pyhkey1 == pyhkey2 ? 0 : - (pyhkey1 < pyhkey2 ? -1 : 1); -} - -static Py_hash_t -PyHKEY_hashFunc(PyObject *ob) -{ - /* Just use the address. - XXX - should we use the handle value? - */ - return PyObject_GenericHash(ob); -} - - -/*[clinic input] -module winreg -class winreg.HKEYType "PyHKEYObject *" "&PyHKEY_Type" -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=4c964eba3bf914d6]*/ - -/*[python input] -class REGSAM_converter(int_converter): - type = 'REGSAM' - -class DWORD_converter(unsigned_long_converter): - type = 'DWORD' - -class HKEY_converter(CConverter): - type = 'HKEY' - converter = 'clinic_HKEY_converter' - broken_limited_capi = True - - def parse_arg(self, argname, displayname, *, limited_capi): - assert not limited_capi - return self.format_code(""" - if (!{converter}(_PyModule_GetState(module), {argname}, &{paramname})) {{{{ - goto exit; - }}}} - """, - argname=argname, - converter=self.converter) - -class HKEY_return_converter(CReturnConverter): - type = 'HKEY' - - def render(self, function, data): - self.declare(data) - self.err_occurred_if_null_pointer("_return_value", data) - data.return_conversion.append( - 'return_value = PyHKEY_FromHKEY(_PyModule_GetState(module), _return_value);\n') - -# HACK: this only works for PyHKEYObjects, nothing else. -# Should this be generalized and enshrined in clinic.py, -# destroy this converter with prejudice. -class self_return_converter(CReturnConverter): - type = 'PyHKEYObject *' - - def render(self, function, data): - self.declare(data) - data.return_conversion.append( - 'return_value = (PyObject *)_return_value;\n') -[python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=4979f33998ffb6f8]*/ - -#include "clinic/winreg.c.h" - -/************************************************************************ - - The PyHKEY object methods - -************************************************************************/ -/*[clinic input] -winreg.HKEYType.Close - -Closes the underlying Windows handle. - -If the handle is already closed, no error is raised. -[clinic start generated code]*/ - -static PyObject * -winreg_HKEYType_Close_impl(PyHKEYObject *self) -/*[clinic end generated code: output=fced3a624fb0c344 input=6786ac75f6b89de6]*/ -{ - winreg_state *st = _PyType_GetModuleState(Py_TYPE(self)); - assert(st != NULL); - if (!PyHKEY_Close(st, (PyObject *)self)) { - return NULL; - } - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.HKEYType.Detach - -Detaches the Windows handle from the handle object. - -The result is the value of the handle before it is detached. If the -handle is already detached, this will return zero. - -After calling this function, the handle is effectively invalidated, -but the handle is not closed. You would call this function when you -need the underlying win32 handle to exist beyond the lifetime of the -handle object. -[clinic start generated code]*/ - -static PyObject * -winreg_HKEYType_Detach_impl(PyHKEYObject *self) -/*[clinic end generated code: output=dda5a9e1a01ae78f input=dd2cc09e6c6ba833]*/ -{ - void* ret; - if (PySys_Audit("winreg.PyHKEY.Detach", "n", (Py_ssize_t)self->hkey) < 0) { - return NULL; - } - ret = (void*)self->hkey; - self->hkey = 0; - return PyLong_FromVoidPtr(ret); -} - -/*[clinic input] -winreg.HKEYType.__enter__ -> self -[clinic start generated code]*/ - -static PyHKEYObject * -winreg_HKEYType___enter___impl(PyHKEYObject *self) -/*[clinic end generated code: output=52c34986dab28990 input=c40fab1f0690a8e2]*/ -{ - return (PyHKEYObject*)Py_XNewRef(self); -} - - -/*[clinic input] -winreg.HKEYType.__exit__ - - exc_type: object - exc_value: object - traceback: object - / - -[clinic start generated code]*/ - -static PyObject * -winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, - PyObject *exc_value, PyObject *traceback) -/*[clinic end generated code: output=923ebe7389e6a263 input=1eac83cd06962689]*/ -{ - winreg_state *st = _PyType_GetModuleState(Py_TYPE(self)); - assert(st != NULL); - if (!PyHKEY_Close(st, (PyObject *)self)) { - return NULL; - } - Py_RETURN_NONE; -} - -/*[clinic input] -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/ - -static struct PyMethodDef PyHKEY_methods[] = { - WINREG_HKEYTYPE_CLOSE_METHODDEF - WINREG_HKEYTYPE_DETACH_METHODDEF - WINREG_HKEYTYPE___ENTER___METHODDEF - WINREG_HKEYTYPE___EXIT___METHODDEF - {NULL} -}; - -#define OFF(e) offsetof(PyHKEYObject, e) -static PyMemberDef PyHKEY_memberlist[] = { - {"handle", Py_T_INT, OFF(hkey), Py_READONLY}, - {NULL} /* Sentinel */ -}; - -static PyType_Slot pyhkey_type_slots[] = { - {Py_tp_dealloc, PyHKEY_deallocFunc}, - {Py_tp_members, PyHKEY_memberlist}, - {Py_tp_methods, PyHKEY_methods}, - {Py_tp_doc, (char *)PyHKEY_doc}, - {Py_tp_traverse, PyHKEY_traverseFunc}, - {Py_tp_hash, PyHKEY_hashFunc}, - {Py_tp_str, PyHKEY_strFunc}, - - // Number protocol - {Py_nb_add, PyHKEY_binaryFailureFunc}, - {Py_nb_subtract, PyHKEY_binaryFailureFunc}, - {Py_nb_multiply, PyHKEY_binaryFailureFunc}, - {Py_nb_remainder, PyHKEY_binaryFailureFunc}, - {Py_nb_divmod, PyHKEY_binaryFailureFunc}, - {Py_nb_power, PyHKEY_ternaryFailureFunc}, - {Py_nb_negative, PyHKEY_unaryFailureFunc}, - {Py_nb_positive, PyHKEY_unaryFailureFunc}, - {Py_nb_absolute, PyHKEY_unaryFailureFunc}, - {Py_nb_bool, PyHKEY_boolFunc}, - {Py_nb_invert, PyHKEY_unaryFailureFunc}, - {Py_nb_lshift, PyHKEY_binaryFailureFunc}, - {Py_nb_rshift, PyHKEY_binaryFailureFunc}, - {Py_nb_and, PyHKEY_binaryFailureFunc}, - {Py_nb_xor, PyHKEY_binaryFailureFunc}, - {Py_nb_or, PyHKEY_binaryFailureFunc}, - {Py_nb_int, PyHKEY_intFunc}, - {Py_nb_float, PyHKEY_unaryFailureFunc}, - {0, NULL}, -}; - -static PyType_Spec pyhkey_type_spec = { - .name = "winreg.PyHKEY", - .basicsize = sizeof(PyHKEYObject), - .flags = (Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_IMMUTABLETYPE | - Py_TPFLAGS_DISALLOW_INSTANTIATION), - .slots = pyhkey_type_slots, -}; - -/************************************************************************ - The public PyHKEY API (well, not public yet :-) -************************************************************************/ -PyObject * -PyHKEY_New(PyObject *m, HKEY hInit) -{ - winreg_state *st = _PyModule_GetState(m); - PyHKEYObject *key = PyObject_GC_New(PyHKEYObject, st->PyHKEY_Type); - if (key == NULL) { - return NULL; - } - key->hkey = hInit; - PyObject_GC_Track(key); - return (PyObject *)key; -} - -BOOL -PyHKEY_Close(winreg_state *st, PyObject *ob_handle) -{ - LONG rc; - HKEY key; - - if (!PyHKEY_AsHKEY(st, ob_handle, &key, TRUE)) { - return FALSE; - } - if (PyHKEY_Check(st, ob_handle)) { - ((PyHKEYObject*)ob_handle)->hkey = 0; - } - rc = key ? RegCloseKey(key) : ERROR_SUCCESS; - if (rc != ERROR_SUCCESS) - PyErr_SetFromWindowsErrWithFunction(rc, "RegCloseKey"); - return rc == ERROR_SUCCESS; -} - -BOOL -PyHKEY_AsHKEY(winreg_state *st, PyObject *ob, HKEY *pHANDLE, BOOL bNoneOK) -{ - if (ob == Py_None) { - if (!bNoneOK) { - PyErr_SetString( - PyExc_TypeError, - "None is not a valid HKEY in this context"); - return FALSE; - } - *pHANDLE = (HKEY)0; - } - else if (PyHKEY_Check(st ,ob)) { - PyHKEYObject *pH = (PyHKEYObject *)ob; - *pHANDLE = pH->hkey; - } - else if (PyLong_Check(ob)) { - /* We also support integers */ - PyErr_Clear(); - *pHANDLE = (HKEY)PyLong_AsVoidPtr(ob); - if (PyErr_Occurred()) - return FALSE; - } - else { - PyErr_SetString( - PyExc_TypeError, - "The object is not a PyHKEY object"); - return FALSE; - } - return TRUE; -} - -BOOL -clinic_HKEY_converter(winreg_state *st, PyObject *ob, void *p) -{ - if (!PyHKEY_AsHKEY(st, ob, (HKEY *)p, FALSE)) { - return FALSE; - } - return TRUE; -} - -PyObject * -PyHKEY_FromHKEY(winreg_state *st, HKEY h) -{ - PyHKEYObject *op = (PyHKEYObject *)PyObject_GC_New(PyHKEYObject, - st->PyHKEY_Type); - if (op == NULL) { - return NULL; - } - op->hkey = h; - PyObject_GC_Track(op); - return (PyObject *)op; -} - - -/************************************************************************ - The module methods -************************************************************************/ -BOOL -PyWinObject_CloseHKEY(winreg_state *st, PyObject *obHandle) -{ - BOOL ok; - if (PyHKEY_Check(st, obHandle)) { - ok = PyHKEY_Close(st, obHandle); - } -#if SIZEOF_LONG >= SIZEOF_HKEY - else if (PyLong_Check(obHandle)) { - long rc = RegCloseKey((HKEY)PyLong_AsLong(obHandle)); - ok = (rc == ERROR_SUCCESS); - if (!ok) - PyErr_SetFromWindowsErrWithFunction(rc, "RegCloseKey"); - } -#else - else if (PyLong_Check(obHandle)) { - long rc = RegCloseKey((HKEY)PyLong_AsVoidPtr(obHandle)); - ok = (rc == ERROR_SUCCESS); - if (!ok) - PyErr_SetFromWindowsErrWithFunction(rc, "RegCloseKey"); - } -#endif - else { - PyErr_SetString( - PyExc_TypeError, - "A handle must be a HKEY object or an integer"); - return FALSE; - } - return ok; -} - - -/* - Private Helper functions for the registry interfaces - -** Note that fixupMultiSZ and countString have both had changes -** made to support "incorrect strings". The registry specification -** calls for strings to be terminated with 2 null bytes. It seems -** some commercial packages install strings which don't conform, -** causing this code to fail - however, "regedit" etc still work -** with these strings (ie only we don't!). -*/ -static void -fixupMultiSZ(wchar_t **str, wchar_t *data, int len) -{ - wchar_t *P; - int i; - wchar_t *Q; - - if (len > 0 && data[len - 1] == '\0') { - Q = data + len - 1; - } - else { - Q = data + len; - } - - for (P = data, i = 0; P < Q; P++, i++) { - str[i] = P; - for (; P < Q && *P != '\0'; P++) { - ; - } - } -} - -static int -countStrings(wchar_t *data, int len) -{ - int strings; - wchar_t *P, *Q; - - if (len > 0 && data[len - 1] == '\0') { - Q = data + len - 1; - } - else { - Q = data + len; - } - - for (P = data, strings = 0; P < Q; P++, strings++) { - for (; P < Q && *P != '\0'; P++) { - ; - } - } - return strings; -} - -/* Convert PyObject into Registry data. - Allocates space as needed. */ -static BOOL -Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) -{ - Py_ssize_t i,j; - switch (typ) { - case REG_DWORD: - { - if (value != Py_None && !PyLong_Check(value)) { - return FALSE; - } - DWORD d; - if (value == Py_None) { - d = 0; - } - else if (PyLong_Check(value)) { - d = PyLong_AsUnsignedLong(value); - if (d == (DWORD)(-1) && PyErr_Occurred()) { - return FALSE; - } - } - *retDataBuf = (BYTE *)PyMem_NEW(DWORD, 1); - if (*retDataBuf == NULL) { - PyErr_NoMemory(); - return FALSE; - } - memcpy(*retDataBuf, &d, sizeof(DWORD)); - *retDataSize = sizeof(DWORD); - break; - } - case REG_QWORD: - { - if (value != Py_None && !PyLong_Check(value)) { - return FALSE; - } - DWORD64 d; - if (value == Py_None) { - d = 0; - } - else if (PyLong_Check(value)) { - d = PyLong_AsUnsignedLongLong(value); - if (d == (DWORD64)(-1) && PyErr_Occurred()) { - return FALSE; - } - } - *retDataBuf = (BYTE *)PyMem_NEW(DWORD64, 1); - if (*retDataBuf == NULL) { - PyErr_NoMemory(); - return FALSE; - } - memcpy(*retDataBuf, &d, sizeof(DWORD64)); - *retDataSize = sizeof(DWORD64); - break; - } - case REG_SZ: - case REG_EXPAND_SZ: - { - if (value != Py_None) { - Py_ssize_t len; - if (!PyUnicode_Check(value)) - return FALSE; - *retDataBuf = (BYTE*)PyUnicode_AsWideCharString(value, &len); - if (*retDataBuf == NULL) - return FALSE; - *retDataSize = Py_SAFE_DOWNCAST( - (len + 1) * sizeof(wchar_t), - Py_ssize_t, DWORD); - } - else { - *retDataBuf = (BYTE *)PyMem_NEW(wchar_t, 1); - if (*retDataBuf == NULL) { - PyErr_NoMemory(); - return FALSE; - } - ((wchar_t *)*retDataBuf)[0] = L'\0'; - *retDataSize = 1 * sizeof(wchar_t); - } - break; - } - case REG_MULTI_SZ: - { - DWORD size = 0; - wchar_t *P; - - if (value == Py_None) - i = 0; - else { - if (!PyList_Check(value)) - return FALSE; - i = PyList_Size(value); - } - for (j = 0; j < i; j++) - { - PyObject *t; - Py_ssize_t len; - - t = PyList_GET_ITEM(value, j); - if (!PyUnicode_Check(t)) - return FALSE; - len = PyUnicode_AsWideChar(t, NULL, 0); - if (len < 0) - return FALSE; - size += Py_SAFE_DOWNCAST(len * sizeof(wchar_t), - size_t, DWORD); - } - - *retDataSize = size + 2; - *retDataBuf = (BYTE *)PyMem_NEW(char, - *retDataSize); - if (*retDataBuf == NULL){ - PyErr_NoMemory(); - return FALSE; - } - P = (wchar_t *)*retDataBuf; - - for (j = 0; j < i; j++) - { - PyObject *t; - Py_ssize_t len; - - t = PyList_GET_ITEM(value, j); - assert(size > 0); - len = PyUnicode_AsWideChar(t, P, size); - assert(len >= 0); - assert((unsigned)len < size); - size -= (DWORD)len + 1; - P += len + 1; - } - /* And doubly-terminate the list... */ - *P = L'\0'; - break; - } - case REG_BINARY: - /* ALSO handle ALL unknown data types here. Even if we can't - support it natively, we should handle the bits. */ - default: - if (value == Py_None) { - *retDataSize = 0; - *retDataBuf = NULL; - } - else { - Py_buffer view; - - if (!PyObject_CheckBuffer(value)) { - PyErr_Format(PyExc_TypeError, - "Objects of type '%s' can not " - "be used as binary registry values", - Py_TYPE(value)->tp_name); - return FALSE; - } - - if (PyObject_GetBuffer(value, &view, PyBUF_SIMPLE) < 0) - return FALSE; - - *retDataBuf = (BYTE *)PyMem_NEW(char, view.len); - if (*retDataBuf == NULL){ - PyBuffer_Release(&view); - PyErr_NoMemory(); - return FALSE; - } - *retDataSize = Py_SAFE_DOWNCAST(view.len, Py_ssize_t, DWORD); - memcpy(*retDataBuf, view.buf, view.len); - PyBuffer_Release(&view); - } - break; - } - return TRUE; -} - -/* Convert Registry data into PyObject*/ -static PyObject * -Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) -{ - PyObject *obData; - - switch (typ) { - case REG_DWORD: - if (retDataSize == 0) - obData = PyLong_FromUnsignedLong(0); - else - obData = PyLong_FromUnsignedLong(*(DWORD *)retDataBuf); - break; - case REG_QWORD: - if (retDataSize == 0) - obData = PyLong_FromUnsignedLongLong(0); - else - obData = PyLong_FromUnsignedLongLong(*(DWORD64 *)retDataBuf); - break; - case REG_SZ: - case REG_EXPAND_SZ: - { - /* REG_SZ should be a NUL terminated string, but only by - * convention. The buffer may have been saved without a NUL - * or with embedded NULs. To be consistent with reg.exe and - * regedit.exe, consume only up to the first NUL. */ - wchar_t *data = (wchar_t *)retDataBuf; - size_t len = wcsnlen(data, retDataSize / sizeof(wchar_t)); - obData = PyUnicode_FromWideChar(data, len); - break; - } - case REG_MULTI_SZ: - if (retDataSize == 0) - obData = PyList_New(0); - else - { - int index = 0; - wchar_t *data = (wchar_t *)retDataBuf; - int len = retDataSize / 2; - int s = countStrings(data, len); - wchar_t **str = PyMem_New(wchar_t *, s); - if (str == NULL) - return PyErr_NoMemory(); - - fixupMultiSZ(str, data, len); - obData = PyList_New(s); - if (obData == NULL) { - PyMem_Free(str); - return NULL; - } - for (index = 0; index < s; index++) - { - size_t slen = wcsnlen(str[index], len); - PyObject *uni = PyUnicode_FromWideChar(str[index], slen); - if (uni == NULL) { - Py_DECREF(obData); - PyMem_Free(str); - return NULL; - } - PyList_SET_ITEM(obData, index, uni); - len -= Py_SAFE_DOWNCAST(slen + 1, size_t, int); - } - PyMem_Free(str); - - break; - } - case REG_BINARY: - /* ALSO handle ALL unknown data types here. Even if we can't - support it natively, we should handle the bits. */ - default: - if (retDataSize == 0) { - obData = Py_NewRef(Py_None); - } - else - obData = PyBytes_FromStringAndSize( - (char *)retDataBuf, retDataSize); - break; - } - return obData; -} - -/* The Python methods */ - -/*[clinic input] -winreg.CloseKey - - hkey: object - A previously opened key. - / - -Closes a previously opened registry key. - -Note that if the key is not closed using this method, it will be -closed when the hkey object is destroyed by Python. -[clinic start generated code]*/ - -static PyObject * -winreg_CloseKey(PyObject *module, PyObject *hkey) -/*[clinic end generated code: output=a4fa537019a80d15 input=5b1aac65ba5127ad]*/ -{ - if (!PyHKEY_Close(_PyModule_GetState(module), hkey)) { - return NULL; - } - Py_RETURN_NONE; -} - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -winreg.ConnectRegistry -> HKEY - - computer_name: Py_UNICODE(accept={str, NoneType}) - The name of the remote computer, of the form r"\\computername". If - None, the local computer is used. - key: HKEY - The predefined key to connect to. - / - -Establishes a connection to the registry on another computer. - -The return value is the handle of the opened key. -If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static HKEY -winreg_ConnectRegistry_impl(PyObject *module, const wchar_t *computer_name, - HKEY key) -/*[clinic end generated code: output=c77d12428f4bfe29 input=5f98a891a347e68e]*/ -{ - HKEY retKey; - long rc; - if (PySys_Audit("winreg.ConnectRegistry", "un", - computer_name, (Py_ssize_t)key) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegConnectRegistryW(computer_name, key, &retKey); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) { - PyErr_SetFromWindowsErrWithFunction(rc, "ConnectRegistry"); - return NULL; - } - return retKey; -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */ - -/*[clinic input] -winreg.CreateKey -> HKEY - - key: HKEY - An already open key, or one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(accept={str, NoneType}) - The name of the key this method opens or creates. - / - -Creates or opens the specified key. - -If key is one of the predefined keys, sub_key may be None. In that case, -the handle returned is the same key handle passed in to the function. - -If the key already exists, this function opens the existing key. - -The return value is the handle of the opened key. -If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static HKEY -winreg_CreateKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key) -/*[clinic end generated code: output=58d3eb2ed428a84d input=3cdd1622488acea2]*/ -{ - HKEY retKey; - long rc; - - if (PySys_Audit("winreg.CreateKey", "nun", - (Py_ssize_t)key, sub_key, - (Py_ssize_t)KEY_WRITE) < 0) { - return NULL; - } - rc = RegCreateKeyW(key, sub_key, &retKey); - if (rc != ERROR_SUCCESS) { - PyErr_SetFromWindowsErrWithFunction(rc, "CreateKey"); - return NULL; - } - if (PySys_Audit("winreg.OpenKey/result", "n", - (Py_ssize_t)retKey) < 0) { - return NULL; - } - return retKey; -} - -/*[clinic input] -winreg.CreateKeyEx -> HKEY - - key: HKEY - An already open key, or one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(accept={str, NoneType}) - The name of the key this method opens or creates. - reserved: int = 0 - A reserved integer, and must be zero. Default is zero. - access: REGSAM(c_default='KEY_WRITE') = winreg.KEY_WRITE - An integer that specifies an access mask that describes the - desired security access for the key. Default is KEY_WRITE. - -Creates or opens the specified key. - -If key is one of the predefined keys, sub_key may be None. In that case, -the handle returned is the same key handle passed in to the function. - -If the key already exists, this function opens the existing key - -The return value is the handle of the opened key. -If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static HKEY -winreg_CreateKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access) -/*[clinic end generated code: output=51b53e38d5e00d4b input=42c2b03f98406b66]*/ -{ - HKEY retKey; - long rc; - - if (PySys_Audit("winreg.CreateKey", "nun", - (Py_ssize_t)key, sub_key, - (Py_ssize_t)access) < 0) { - return NULL; - } - rc = RegCreateKeyExW(key, sub_key, reserved, NULL, 0, - access, NULL, &retKey, NULL); - if (rc != ERROR_SUCCESS) { - PyErr_SetFromWindowsErrWithFunction(rc, "CreateKeyEx"); - return NULL; - } - if (PySys_Audit("winreg.OpenKey/result", "n", - (Py_ssize_t)retKey) < 0) { - return NULL; - } - return retKey; -} - -/*[clinic input] -winreg.DeleteKey - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE - A string that must be the name of a subkey of the key identified by - the key parameter. This value must not be None, and the key may not - have subkeys. - / - -Deletes the specified key. - -This method can not delete keys with subkeys. - -If the function succeeds, the entire key, including all of its values, -is removed. If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static PyObject * -winreg_DeleteKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key) -/*[clinic end generated code: output=2e9f7c09eb7701b8 input=b31d225b935e4211]*/ -{ - long rc; - if (PySys_Audit("winreg.DeleteKey", "nun", - (Py_ssize_t)key, sub_key, - (Py_ssize_t)0) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegDeleteKeyW(key, sub_key); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKey"); - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.DeleteKeyEx - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE - A string that must be the name of a subkey of the key identified by - the key parameter. This value must not be None, and the key may not - have subkeys. - access: REGSAM(c_default='KEY_WOW64_64KEY') = winreg.KEY_WOW64_64KEY - An integer that specifies an access mask that describes the - desired security access for the key. Default is KEY_WOW64_64KEY. - reserved: int = 0 - A reserved integer, and must be zero. Default is zero. - -Deletes the specified key (intended for 64-bit OS). - -While this function is intended to be used for 64-bit OS, it is also - available on 32-bit systems. - -This method can not delete keys with subkeys. - -If the function succeeds, the entire key, including all of its values, -is removed. If the function fails, an OSError exception is raised. -On unsupported Windows versions, NotImplementedError is raised. -[clinic start generated code]*/ - -static PyObject * -winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - REGSAM access, int reserved) -/*[clinic end generated code: output=3bf4865c783fe7b2 input=a3186db079b3bf85]*/ -{ - long rc; - if (PySys_Audit("winreg.DeleteKey", "nun", - (Py_ssize_t)key, sub_key, - (Py_ssize_t)access) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegDeleteKeyExW(key, sub_key, access, reserved); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKeyEx"); - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.DeleteValue - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - value: Py_UNICODE(accept={str, NoneType}) - A string that identifies the value to remove. - / - -Removes a named value from a registry key. -[clinic start generated code]*/ - -static PyObject * -winreg_DeleteValue_impl(PyObject *module, HKEY key, const wchar_t *value) -/*[clinic end generated code: output=ed24b297aab137a5 input=a78d3407a4197b21]*/ -{ - long rc; - if (PySys_Audit("winreg.DeleteValue", "nu", - (Py_ssize_t)key, value) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegDeleteValueW(key, value); - Py_END_ALLOW_THREADS - if (rc !=ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegDeleteValue"); - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.EnumKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - index: int - An integer that identifies the index of the key to retrieve. - / - -Enumerates subkeys of an open registry key. - -The function retrieves the name of one subkey each time it is called. -It is typically called repeatedly until an OSError exception is -raised, indicating no more values are available. -[clinic start generated code]*/ - -static PyObject * -winreg_EnumKey_impl(PyObject *module, HKEY key, int index) -/*[clinic end generated code: output=25a6ec52cd147bc4 input=fad9a7c00ab0e04b]*/ -{ - long rc; - PyObject *retStr; - - if (PySys_Audit("winreg.EnumKey", "ni", - (Py_ssize_t)key, index) < 0) { - return NULL; - } - /* The Windows docs claim that the max key name length is 255 - * characters, plus a terminating nul character. However, - * empirical testing demonstrates that it is possible to - * create a 256 character key that is missing the terminating - * nul. RegEnumKeyEx requires a 257 character buffer to - * retrieve such a key name. */ - wchar_t tmpbuf[257]; - DWORD len = sizeof(tmpbuf)/sizeof(wchar_t); /* includes NULL terminator */ - - Py_BEGIN_ALLOW_THREADS - rc = RegEnumKeyExW(key, index, tmpbuf, &len, NULL, NULL, NULL, NULL); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegEnumKeyEx"); - - retStr = PyUnicode_FromWideChar(tmpbuf, len); - return retStr; /* can be NULL */ -} - -/*[clinic input] -winreg.EnumValue - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - index: int - An integer that identifies the index of the value to retrieve. - / - -Enumerates values of an open registry key. - -The function retrieves the name of one subkey each time it is called. -It is typically called repeatedly, until an OSError exception -is raised, indicating no more values. - -The result is a tuple of 3 items: - value_name - A string that identifies the value. - value_data - An object that holds the value data, and whose type depends - on the underlying registry type. - data_type - An integer that identifies the type of the value data. -[clinic start generated code]*/ - -static PyObject * -winreg_EnumValue_impl(PyObject *module, HKEY key, int index) -/*[clinic end generated code: output=d363b5a06f8789ac input=4414f47a6fb238b5]*/ -{ - long rc; - wchar_t *retValueBuf; - BYTE *tmpBuf; - BYTE *retDataBuf; - DWORD retValueSize, bufValueSize; - DWORD retDataSize, bufDataSize; - DWORD typ; - PyObject *obData; - PyObject *retVal; - - if (PySys_Audit("winreg.EnumValue", "ni", - (Py_ssize_t)key, index) < 0) { - return NULL; - } - if ((rc = RegQueryInfoKeyW(key, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, - &retValueSize, &retDataSize, NULL, NULL)) - != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegQueryInfoKey"); - ++retValueSize; /* include null terminators */ - ++retDataSize; - bufDataSize = retDataSize; - bufValueSize = retValueSize; - retValueBuf = PyMem_New(wchar_t, retValueSize); - if (retValueBuf == NULL) - return PyErr_NoMemory(); - retDataBuf = (BYTE *)PyMem_Malloc(retDataSize); - if (retDataBuf == NULL) { - PyMem_Free(retValueBuf); - return PyErr_NoMemory(); - } - - while (1) { - Py_BEGIN_ALLOW_THREADS - rc = RegEnumValueW(key, - index, - retValueBuf, - &retValueSize, - NULL, - &typ, - (BYTE *)retDataBuf, - &retDataSize); - Py_END_ALLOW_THREADS - - if (rc != ERROR_MORE_DATA) - break; - - bufDataSize *= 2; - tmpBuf = (BYTE *)PyMem_Realloc(retDataBuf, bufDataSize); - if (tmpBuf == NULL) { - PyErr_NoMemory(); - retVal = NULL; - goto fail; - } - retDataBuf = tmpBuf; - retDataSize = bufDataSize; - retValueSize = bufValueSize; - } - - if (rc != ERROR_SUCCESS) { - retVal = PyErr_SetFromWindowsErrWithFunction(rc, - "PyRegEnumValue"); - goto fail; - } - obData = Reg2Py(retDataBuf, retDataSize, typ); - if (obData == NULL) { - retVal = NULL; - goto fail; - } - retVal = Py_BuildValue("uOi", retValueBuf, obData, typ); - Py_DECREF(obData); - fail: - PyMem_Free(retValueBuf); - PyMem_Free(retDataBuf); - return retVal; -} - -/*[clinic input] -winreg.ExpandEnvironmentStrings - - string: Py_UNICODE - / - -Expand environment vars. -[clinic start generated code]*/ - -static PyObject * -winreg_ExpandEnvironmentStrings_impl(PyObject *module, const wchar_t *string) -/*[clinic end generated code: output=53f120bbe788fa6f input=b2a9714d2b751aa6]*/ -{ - wchar_t *retValue = NULL; - DWORD retValueSize; - DWORD rc; - PyObject *o; - - if (PySys_Audit("winreg.ExpandEnvironmentStrings", "u", - string) < 0) { - return NULL; - } - - retValueSize = ExpandEnvironmentStringsW(string, retValue, 0); - if (retValueSize == 0) { - return PyErr_SetFromWindowsErrWithFunction(retValueSize, - "ExpandEnvironmentStrings"); - } - retValue = PyMem_New(wchar_t, retValueSize); - if (retValue == NULL) { - return PyErr_NoMemory(); - } - - rc = ExpandEnvironmentStringsW(string, retValue, retValueSize); - if (rc == 0) { - PyMem_Free(retValue); - return PyErr_SetFromWindowsErrWithFunction(retValueSize, - "ExpandEnvironmentStrings"); - } - o = PyUnicode_FromWideChar(retValue, wcslen(retValue)); - PyMem_Free(retValue); - return o; -} - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -winreg.FlushKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - / - -Writes all the attributes of a key to the registry. - -It is not necessary to call FlushKey to change a key. Registry changes -are flushed to disk by the registry using its lazy flusher. Registry -changes are also flushed to disk at system shutdown. Unlike -CloseKey(), the FlushKey() method returns only when all the data has -been written to the registry. - -An application should only call FlushKey() if it requires absolute -certainty that registry changes are on disk. If you don't know whether -a FlushKey() call is required, it probably isn't. -[clinic start generated code]*/ - -static PyObject * -winreg_FlushKey_impl(PyObject *module, HKEY key) -/*[clinic end generated code: output=e6fc230d4c5dc049 input=f57457c12297d82f]*/ -{ - long rc; - Py_BEGIN_ALLOW_THREADS - rc = RegFlushKey(key); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegFlushKey"); - Py_RETURN_NONE; -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */ - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -winreg.LoadKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE - A string that identifies the sub-key to load. - file_name: Py_UNICODE - The name of the file to load registry data from. This file must - have been created with the SaveKey() function. Under the file - allocation table (FAT) file system, the filename may not have an - extension. - / - -Insert data into the registry from a file. - -Creates a subkey under the specified key and stores registration -information from a specified file into that subkey. - -A call to LoadKey() fails if the calling process does not have the -SE_RESTORE_PRIVILEGE privilege. - -If key is a handle returned by ConnectRegistry(), then the path -specified in fileName is relative to the remote computer. - -The MSDN docs imply key must be in the HKEY_USER or HKEY_LOCAL_MACHINE -tree. -[clinic start generated code]*/ - -static PyObject * -winreg_LoadKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - const wchar_t *file_name) -/*[clinic end generated code: output=5561b0216e5ab263 input=e3b5b45ade311582]*/ -{ - long rc; - - if (PySys_Audit("winreg.LoadKey", "nuu", - (Py_ssize_t)key, sub_key, file_name) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegLoadKeyW(key, sub_key, file_name ); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegLoadKey"); - Py_RETURN_NONE; -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */ - -/*[clinic input] -winreg.OpenKey -> HKEY - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(accept={str, NoneType}) - A string that identifies the sub_key to open. - reserved: int = 0 - A reserved integer that must be zero. Default is zero. - access: REGSAM(c_default='KEY_READ') = winreg.KEY_READ - An integer that specifies an access mask that describes the desired - security access for the key. Default is KEY_READ. - -Opens the specified key. - -The result is a new handle to the specified key. -If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static HKEY -winreg_OpenKey_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access) -/*[clinic end generated code: output=5efbad23b3ffe2e7 input=098505ac36a9ae28]*/ -{ - HKEY retKey; - long rc; - - if (PySys_Audit("winreg.OpenKey", "nun", - (Py_ssize_t)key, sub_key, - (Py_ssize_t)access) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegOpenKeyExW(key, sub_key, reserved, access, &retKey); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) { - PyErr_SetFromWindowsErrWithFunction(rc, "RegOpenKeyEx"); - return NULL; - } - if (PySys_Audit("winreg.OpenKey/result", "n", - (Py_ssize_t)retKey) < 0) { - return NULL; - } - return retKey; -} - -/*[clinic input] -winreg.OpenKeyEx = winreg.OpenKey - -Opens the specified key. - -The result is a new handle to the specified key. -If the function fails, an OSError exception is raised. -[clinic start generated code]*/ - -static HKEY -winreg_OpenKeyEx_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - int reserved, REGSAM access) -/*[clinic end generated code: output=435e675800fa78c2 input=c6c4972af8622959]*/ -{ - return winreg_OpenKey_impl(module, key, sub_key, reserved, access); -} - -/*[clinic input] -winreg.QueryInfoKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - / - -Returns information about a key. - -The result is a tuple of 3 items: -An integer that identifies the number of sub keys this key has. -An integer that identifies the number of values this key has. -An integer that identifies when the key was last modified (if available) -as 100's of nanoseconds since Jan 1, 1600. -[clinic start generated code]*/ - -static PyObject * -winreg_QueryInfoKey_impl(PyObject *module, HKEY key) -/*[clinic end generated code: output=dc657b8356a4f438 input=c3593802390cde1f]*/ -{ - long rc; - DWORD nSubKeys, nValues; - FILETIME ft; - LARGE_INTEGER li; - PyObject *l; - PyObject *ret; - - if (PySys_Audit("winreg.QueryInfoKey", "n", (Py_ssize_t)key) < 0) { - return NULL; - } - if ((rc = RegQueryInfoKeyW(key, NULL, NULL, 0, &nSubKeys, NULL, NULL, - &nValues, NULL, NULL, NULL, &ft)) - != ERROR_SUCCESS) { - return PyErr_SetFromWindowsErrWithFunction(rc, "RegQueryInfoKey"); - } - li.LowPart = ft.dwLowDateTime; - li.HighPart = ft.dwHighDateTime; - l = PyLong_FromLongLong(li.QuadPart); - if (l == NULL) { - return NULL; - } - ret = Py_BuildValue("iiO", nSubKeys, nValues, l); - Py_DECREF(l); - return ret; -} - - -/*[clinic input] -winreg.QueryValue - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(accept={str, NoneType}) - A string that holds the name of the subkey with which the value - is associated. If this parameter is None or empty, the function - retrieves the value set by the SetValue() method for the key - identified by key. - / - -Retrieves the unnamed value for a key. - -Values in the registry have name, type, and data components. This method -retrieves the data for a key's first value that has a NULL name. -But since the underlying API call doesn't return the type, you'll -probably be happier using QueryValueEx; this function is just here for -completeness. -[clinic start generated code]*/ - -static PyObject * -winreg_QueryValue_impl(PyObject *module, HKEY key, const wchar_t *sub_key) -/*[clinic end generated code: output=b665ce9ae391fda9 input=41cafbbf423b21d6]*/ -{ - LONG rc; - HKEY childKey = key; - WCHAR buf[256], *pbuf = buf; - DWORD size = sizeof(buf); - DWORD type; - Py_ssize_t length; - PyObject *result = NULL; - - if (PySys_Audit("winreg.QueryValue", "nuu", - (Py_ssize_t)key, sub_key, NULL) < 0) - { - return NULL; - } - - if (key == HKEY_PERFORMANCE_DATA) { - return PyErr_SetFromWindowsErrWithFunction(ERROR_INVALID_HANDLE, - "RegQueryValue"); - } - - if (sub_key && sub_key[0]) { - Py_BEGIN_ALLOW_THREADS - rc = RegOpenKeyExW(key, sub_key, 0, KEY_QUERY_VALUE, &childKey); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) { - return PyErr_SetFromWindowsErrWithFunction(rc, "RegOpenKeyEx"); - } - } - - while (1) { - Py_BEGIN_ALLOW_THREADS - rc = RegQueryValueExW(childKey, NULL, NULL, &type, (LPBYTE)pbuf, - &size); - Py_END_ALLOW_THREADS - if (rc != ERROR_MORE_DATA) { - break; - } - void *tmp = PyMem_Realloc(pbuf != buf ? pbuf : NULL, size); - if (tmp == NULL) { - PyErr_NoMemory(); - goto exit; - } - pbuf = tmp; - } - - if (rc == ERROR_SUCCESS) { - if (type != REG_SZ) { - PyErr_SetFromWindowsErrWithFunction(ERROR_INVALID_DATA, - "RegQueryValue"); - goto exit; - } - length = wcsnlen(pbuf, size / sizeof(WCHAR)); - } - else if (rc == ERROR_FILE_NOT_FOUND) { - // Return an empty string if there's no default value. - length = 0; - } - else { - PyErr_SetFromWindowsErrWithFunction(rc, "RegQueryValueEx"); - goto exit; - } - - result = PyUnicode_FromWideChar(pbuf, length); - -exit: - if (pbuf != buf) { - PyMem_Free(pbuf); - } - if (childKey != key) { - RegCloseKey(childKey); - } - return result; -} - - -/*[clinic input] -winreg.QueryValueEx - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - name: Py_UNICODE(accept={str, NoneType}) - A string indicating the value to query. - / - -Retrieves the type and value of a specified sub-key. - -Behaves mostly like QueryValue(), but also returns the type of the -specified value name associated with the given open registry key. - -The return value is a tuple of the value and the type_id. -[clinic start generated code]*/ - -static PyObject * -winreg_QueryValueEx_impl(PyObject *module, HKEY key, const wchar_t *name) -/*[clinic end generated code: output=2cdecaa44c8c333e input=cf366cada4836891]*/ -{ - long rc; - BYTE *retBuf, *tmp; - DWORD bufSize = 0, retSize; - DWORD typ; - PyObject *obData; - PyObject *result; - - if (PySys_Audit("winreg.QueryValue", "nuu", - (Py_ssize_t)key, NULL, name) < 0) { - return NULL; - } - rc = RegQueryValueExW(key, name, NULL, NULL, NULL, &bufSize); - if (rc == ERROR_MORE_DATA) - bufSize = 256; - else if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegQueryValueEx"); - retBuf = (BYTE *)PyMem_Malloc(bufSize); - if (retBuf == NULL) - return PyErr_NoMemory(); - - while (1) { - retSize = bufSize; - rc = RegQueryValueExW(key, name, NULL, &typ, - (BYTE *)retBuf, &retSize); - if (rc != ERROR_MORE_DATA) - break; - - bufSize *= 2; - tmp = (char *) PyMem_Realloc(retBuf, bufSize); - if (tmp == NULL) { - PyMem_Free(retBuf); - return PyErr_NoMemory(); - } - retBuf = tmp; - } - - if (rc != ERROR_SUCCESS) { - PyMem_Free(retBuf); - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegQueryValueEx"); - } - obData = Reg2Py(retBuf, retSize, typ); - PyMem_Free(retBuf); - if (obData == NULL) - return NULL; - result = Py_BuildValue("Oi", obData, typ); - Py_DECREF(obData); - return result; -} - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -winreg.SaveKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - file_name: Py_UNICODE - The name of the file to save registry data to. This file cannot - already exist. If this filename includes an extension, it cannot be - used on file allocation table (FAT) file systems by the LoadKey(), - ReplaceKey() or RestoreKey() methods. - / - -Saves the specified key, and all its subkeys to the specified file. - -If key represents a key on a remote computer, the path described by -file_name is relative to the remote computer. - -The caller of this method must possess the SeBackupPrivilege -security privilege. This function passes NULL for security_attributes -to the API. -[clinic start generated code]*/ - -static PyObject * -winreg_SaveKey_impl(PyObject *module, HKEY key, const wchar_t *file_name) -/*[clinic end generated code: output=249b1b58b9598eef input=da735241f91ac7a2]*/ -{ - LPSECURITY_ATTRIBUTES pSA = NULL; - - long rc; -/* One day we may get security into the core? - if (!PyWinObject_AsSECURITY_ATTRIBUTES(obSA, &pSA, TRUE)) - return NULL; -*/ - if (PySys_Audit("winreg.SaveKey", "nu", - (Py_ssize_t)key, file_name) < 0) { - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = RegSaveKeyW(key, file_name, pSA ); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, "RegSaveKey"); - Py_RETURN_NONE; -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */ - -/*[clinic input] -winreg.SetValue - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(accept={str, NoneType}) - A string that names the subkey with which the value is associated. - type: DWORD - An integer that specifies the type of the data. Currently this must - be REG_SZ, meaning only strings are supported. - value as value_obj: unicode - A string that specifies the new value. - / - -Associates a value with a specified key. - -If the key specified by the sub_key parameter does not exist, the -SetValue function creates it. - -Value lengths are limited by available memory. Long values (more than -2048 bytes) should be stored as files with the filenames stored in -the configuration registry to help the registry perform efficiently. - -The key identified by the key parameter must have been opened with -KEY_SET_VALUE access. -[clinic start generated code]*/ - -static PyObject * -winreg_SetValue_impl(PyObject *module, HKEY key, const wchar_t *sub_key, - DWORD type, PyObject *value_obj) -/*[clinic end generated code: output=de590747df47d2c7 input=bf088494ae2d24fd]*/ -{ - LONG rc; - HKEY childKey = key; - LPWSTR value; - Py_ssize_t size; - Py_ssize_t length; - PyObject *result = NULL; - - if (type != REG_SZ) { - PyErr_SetString(PyExc_TypeError, "type must be winreg.REG_SZ"); - return NULL; - } - - value = PyUnicode_AsWideCharString(value_obj, &length); - if (value == NULL) { - return NULL; - } - - size = (length + 1) * sizeof(WCHAR); - if ((Py_ssize_t)(DWORD)size != size) { - PyErr_SetString(PyExc_OverflowError, "value is too long"); - goto exit; - } - - if (PySys_Audit("winreg.SetValue", "nunu#", - (Py_ssize_t)key, sub_key, (Py_ssize_t)type, - value, length) < 0) - { - goto exit; - } - - if (key == HKEY_PERFORMANCE_DATA) { - PyErr_SetFromWindowsErrWithFunction(ERROR_INVALID_HANDLE, - "RegSetValue"); - goto exit; - } - - if (sub_key && sub_key[0]) { - Py_BEGIN_ALLOW_THREADS - rc = RegCreateKeyExW(key, sub_key, 0, NULL, 0, KEY_SET_VALUE, NULL, - &childKey, NULL); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) { - PyErr_SetFromWindowsErrWithFunction(rc, "RegCreateKeyEx"); - goto exit; - } - } - - Py_BEGIN_ALLOW_THREADS - rc = RegSetValueExW(childKey, NULL, 0, REG_SZ, (LPBYTE)value, (DWORD)size); - Py_END_ALLOW_THREADS - if (rc == ERROR_SUCCESS) { - result = Py_NewRef(Py_None); - } - else { - PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValueEx"); - } - -exit: - PyMem_Free(value); - if (childKey != key) { - RegCloseKey(childKey); - } - return result; -} - - -/*[clinic input] -winreg.SetValueEx - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - value_name: Py_UNICODE(accept={str, NoneType}) - A string containing the name of the value to set, or None. - reserved: object - Can be anything - zero is always passed to the API. - type: DWORD - An integer that specifies the type of the data, one of: - REG_BINARY -- Binary data in any form. - REG_DWORD -- A 32-bit number. - REG_DWORD_LITTLE_ENDIAN -- A 32-bit number in little-endian format. Equivalent to REG_DWORD - REG_DWORD_BIG_ENDIAN -- A 32-bit number in big-endian format. - REG_EXPAND_SZ -- A null-terminated string that contains unexpanded - references to environment variables (for example, - %PATH%). - REG_LINK -- A Unicode symbolic link. - REG_MULTI_SZ -- A sequence of null-terminated strings, terminated - by two null characters. Note that Python handles - this termination automatically. - REG_NONE -- No defined value type. - REG_QWORD -- A 64-bit number. - REG_QWORD_LITTLE_ENDIAN -- A 64-bit number in little-endian format. Equivalent to REG_QWORD. - REG_RESOURCE_LIST -- A device-driver resource list. - REG_SZ -- A null-terminated string. - value: object - A string that specifies the new value. - / - -Stores data in the value field of an open registry key. - -This method can also set additional value and type information for the -specified key. The key identified by the key parameter must have been -opened with KEY_SET_VALUE access. - -To open the key, use the CreateKeyEx() or OpenKeyEx() methods. - -Value lengths are limited by available memory. Long values (more than -2048 bytes) should be stored as files with the filenames stored in -the configuration registry to help the registry perform efficiently. -[clinic start generated code]*/ - -static PyObject * -winreg_SetValueEx_impl(PyObject *module, HKEY key, const wchar_t *value_name, - PyObject *reserved, DWORD type, PyObject *value) -/*[clinic end generated code: output=295db04deb456d9e input=900a9e3990bfb196]*/ -{ - LONG rc; - BYTE *data = NULL; - DWORD size; - PyObject *result = NULL; - - if (!Py2Reg(value, type, &data, &size)) - { - if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_ValueError, - "Could not convert the data to the specified type."); - } - return NULL; - } - if (PySys_Audit("winreg.SetValue", "nunO", - (Py_ssize_t)key, value_name, (Py_ssize_t)type, - value) < 0) - { - goto exit; - } - - Py_BEGIN_ALLOW_THREADS - rc = RegSetValueExW(key, value_name, 0, type, data, size); - Py_END_ALLOW_THREADS - if (rc == ERROR_SUCCESS) { - result = Py_NewRef(Py_None); - } - else { - PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValueEx"); - } - -exit: - PyMem_Free(data); - return result; -} - -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) - -/*[clinic input] -winreg.DisableReflectionKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - / - -Disables registry reflection for 32bit processes running on a 64bit OS. - -Will generally raise NotImplementedError if executed on a 32bit OS. - -If the key is not on the reflection list, the function succeeds but has -no effect. Disabling reflection for a key does not affect reflection -of any subkeys. -[clinic start generated code]*/ - -static PyObject * -winreg_DisableReflectionKey_impl(PyObject *module, HKEY key) -/*[clinic end generated code: output=830cce504cc764b4 input=70bece2dee02e073]*/ -{ - HMODULE hMod; - typedef LONG (WINAPI *RDRKFunc)(HKEY); - RDRKFunc pfn = NULL; - LONG rc; - - if (PySys_Audit("winreg.DisableReflectionKey", "n", (Py_ssize_t)key) < 0) { - return NULL; - } - - /* Only available on 64bit platforms, so we must load it - dynamically.*/ - Py_BEGIN_ALLOW_THREADS - hMod = GetModuleHandleW(L"advapi32.dll"); - if (hMod) - pfn = (RDRKFunc)GetProcAddress(hMod, - "RegDisableReflectionKey"); - Py_END_ALLOW_THREADS - if (!pfn) { - PyErr_SetString(PyExc_NotImplementedError, - "not implemented on this platform"); - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = (*pfn)(key); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegDisableReflectionKey"); - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.EnableReflectionKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - / - -Restores registry reflection for the specified disabled key. - -Will generally raise NotImplementedError if executed on a 32bit OS. -Restoring reflection for a key does not affect reflection of any -subkeys. -[clinic start generated code]*/ - -static PyObject * -winreg_EnableReflectionKey_impl(PyObject *module, HKEY key) -/*[clinic end generated code: output=86fa1385fdd9ce57 input=eeae770c6eb9f559]*/ -{ - HMODULE hMod; - typedef LONG (WINAPI *RERKFunc)(HKEY); - RERKFunc pfn = NULL; - LONG rc; - - if (PySys_Audit("winreg.EnableReflectionKey", "n", (Py_ssize_t)key) < 0) { - return NULL; - } - - /* Only available on 64bit platforms, so we must load it - dynamically.*/ - Py_BEGIN_ALLOW_THREADS - hMod = GetModuleHandleW(L"advapi32.dll"); - if (hMod) - pfn = (RERKFunc)GetProcAddress(hMod, - "RegEnableReflectionKey"); - Py_END_ALLOW_THREADS - if (!pfn) { - PyErr_SetString(PyExc_NotImplementedError, - "not implemented on this platform"); - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = (*pfn)(key); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegEnableReflectionKey"); - Py_RETURN_NONE; -} - -/*[clinic input] -winreg.QueryReflectionKey - - key: HKEY - An already open key, or any one of the predefined HKEY_* constants. - / - -Returns the reflection state for the specified key as a bool. - -Will generally raise NotImplementedError if executed on a 32bit OS. -[clinic start generated code]*/ - -static PyObject * -winreg_QueryReflectionKey_impl(PyObject *module, HKEY key) -/*[clinic end generated code: output=4e774af288c3ebb9 input=a98fa51d55ade186]*/ -{ - HMODULE hMod; - typedef LONG (WINAPI *RQRKFunc)(HKEY, BOOL *); - RQRKFunc pfn = NULL; - BOOL result; - LONG rc; - - if (PySys_Audit("winreg.QueryReflectionKey", "n", (Py_ssize_t)key) < 0) { - return NULL; - } - - /* Only available on 64bit platforms, so we must load it - dynamically.*/ - Py_BEGIN_ALLOW_THREADS - hMod = GetModuleHandleW(L"advapi32.dll"); - if (hMod) - pfn = (RQRKFunc)GetProcAddress(hMod, - "RegQueryReflectionKey"); - Py_END_ALLOW_THREADS - if (!pfn) { - PyErr_SetString(PyExc_NotImplementedError, - "not implemented on this platform"); - return NULL; - } - Py_BEGIN_ALLOW_THREADS - rc = (*pfn)(key, &result); - Py_END_ALLOW_THREADS - if (rc != ERROR_SUCCESS) - return PyErr_SetFromWindowsErrWithFunction(rc, - "RegQueryReflectionKey"); - return PyBool_FromLong(result); -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM */ - -static struct PyMethodDef winreg_methods[] = { - WINREG_CLOSEKEY_METHODDEF - WINREG_CONNECTREGISTRY_METHODDEF - WINREG_CREATEKEY_METHODDEF - WINREG_CREATEKEYEX_METHODDEF - WINREG_DELETEKEY_METHODDEF - WINREG_DELETEKEYEX_METHODDEF - WINREG_DELETEVALUE_METHODDEF - WINREG_DISABLEREFLECTIONKEY_METHODDEF - WINREG_ENABLEREFLECTIONKEY_METHODDEF - WINREG_ENUMKEY_METHODDEF - WINREG_ENUMVALUE_METHODDEF - WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF - WINREG_FLUSHKEY_METHODDEF - WINREG_LOADKEY_METHODDEF - WINREG_OPENKEY_METHODDEF - WINREG_OPENKEYEX_METHODDEF - WINREG_QUERYVALUE_METHODDEF - WINREG_QUERYVALUEEX_METHODDEF - WINREG_QUERYINFOKEY_METHODDEF - WINREG_QUERYREFLECTIONKEY_METHODDEF - WINREG_SAVEKEY_METHODDEF - WINREG_SETVALUE_METHODDEF - WINREG_SETVALUEEX_METHODDEF - NULL, -}; - -#define ADD_INT(VAL) do { \ - if (PyModule_AddIntConstant(m, #VAL, VAL) < 0) { \ - return -1; \ - } \ -} while (0) - -static int -inskey(PyObject *mod, const char *name, HKEY key) -{ - return PyModule_Add(mod, name, PyLong_FromVoidPtr(key)); -} - -#define ADD_KEY(VAL) do { \ - if (inskey(m, #VAL, VAL) < 0) { \ - return -1; \ - } \ -} while (0) - -static int -exec_module(PyObject *m) -{ - winreg_state *st = (winreg_state *)_PyModule_GetState(m); - - st->PyHKEY_Type = (PyTypeObject *) - PyType_FromModuleAndSpec(m, &pyhkey_type_spec, NULL); - if (st->PyHKEY_Type == NULL) { - return -1; - } - if (PyModule_AddObjectRef(m, "HKEYType", (PyObject *)st->PyHKEY_Type) < 0) { - return -1; - } - if (PyModule_AddObjectRef(m, "error", PyExc_OSError) < 0) { - return -1; - } - - /* Add the relevant constants */ - ADD_KEY(HKEY_CLASSES_ROOT); - ADD_KEY(HKEY_CURRENT_USER); - ADD_KEY(HKEY_LOCAL_MACHINE); - ADD_KEY(HKEY_USERS); - ADD_KEY(HKEY_PERFORMANCE_DATA); -#ifdef HKEY_CURRENT_CONFIG - ADD_KEY(HKEY_CURRENT_CONFIG); -#endif -#ifdef HKEY_DYN_DATA - ADD_KEY(HKEY_DYN_DATA); -#endif - ADD_INT(KEY_QUERY_VALUE); - ADD_INT(KEY_SET_VALUE); - ADD_INT(KEY_CREATE_SUB_KEY); - ADD_INT(KEY_ENUMERATE_SUB_KEYS); - ADD_INT(KEY_NOTIFY); - ADD_INT(KEY_CREATE_LINK); - ADD_INT(KEY_READ); - ADD_INT(KEY_WRITE); - ADD_INT(KEY_EXECUTE); - ADD_INT(KEY_ALL_ACCESS); -#ifdef KEY_WOW64_64KEY - ADD_INT(KEY_WOW64_64KEY); -#endif -#ifdef KEY_WOW64_32KEY - ADD_INT(KEY_WOW64_32KEY); -#endif - ADD_INT(REG_OPTION_RESERVED); - ADD_INT(REG_OPTION_NON_VOLATILE); - ADD_INT(REG_OPTION_VOLATILE); - ADD_INT(REG_OPTION_CREATE_LINK); - ADD_INT(REG_OPTION_BACKUP_RESTORE); - ADD_INT(REG_OPTION_OPEN_LINK); - ADD_INT(REG_LEGAL_OPTION); - ADD_INT(REG_CREATED_NEW_KEY); - ADD_INT(REG_OPENED_EXISTING_KEY); - ADD_INT(REG_WHOLE_HIVE_VOLATILE); - ADD_INT(REG_REFRESH_HIVE); - ADD_INT(REG_NO_LAZY_FLUSH); - ADD_INT(REG_NOTIFY_CHANGE_NAME); - ADD_INT(REG_NOTIFY_CHANGE_ATTRIBUTES); - ADD_INT(REG_NOTIFY_CHANGE_LAST_SET); - ADD_INT(REG_NOTIFY_CHANGE_SECURITY); - ADD_INT(REG_LEGAL_CHANGE_FILTER); - ADD_INT(REG_NONE); - ADD_INT(REG_SZ); - ADD_INT(REG_EXPAND_SZ); - ADD_INT(REG_BINARY); - ADD_INT(REG_DWORD); - ADD_INT(REG_DWORD_LITTLE_ENDIAN); - ADD_INT(REG_DWORD_BIG_ENDIAN); - ADD_INT(REG_QWORD); - ADD_INT(REG_QWORD_LITTLE_ENDIAN); - ADD_INT(REG_LINK); - ADD_INT(REG_MULTI_SZ); - ADD_INT(REG_RESOURCE_LIST); - ADD_INT(REG_FULL_RESOURCE_DESCRIPTOR); - ADD_INT(REG_RESOURCE_REQUIREMENTS_LIST); - -#undef ADD_INT - return 0; -} - -static PyModuleDef_Slot winreg_slots[] = { - {Py_mod_exec, exec_module}, - {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, - {Py_mod_gil, Py_MOD_GIL_NOT_USED}, - {0, NULL} -}; - -static int -winreg_traverse(PyObject *module, visitproc visit, void *arg) -{ - winreg_state *state = _PyModule_GetState(module); - Py_VISIT(state->PyHKEY_Type); - return 0; -} - -static int -winreg_clear(PyObject *module) -{ - winreg_state *state = _PyModule_GetState(module); - Py_CLEAR(state->PyHKEY_Type); - return 0; -} - -static struct PyModuleDef winregmodule = { - .m_base = PyModuleDef_HEAD_INIT, - .m_name = "winreg", - .m_doc = module_doc, - .m_size = sizeof(winreg_state), - .m_methods = winreg_methods, - .m_slots = winreg_slots, - .m_traverse = winreg_traverse, - .m_clear = winreg_clear, -}; - -PyMODINIT_FUNC PyInit_winreg(void) -{ - return PyModuleDef_Init(&winregmodule); -} - -#endif /* MS_WINDOWS_DESKTOP || MS_WINDOWS_SYSTEM || MS_WINDOWS_GAMES */ diff --git a/PC/winsound.c b/PC/winsound.c deleted file mode 100644 index 1cb42f2f3bdfc6..00000000000000 --- a/PC/winsound.c +++ /dev/null @@ -1,266 +0,0 @@ -/* Author: Toby Dickenson - * - * Copyright (c) 1999 Toby Dickenson - * - * Permission to use this software in any way is granted without - * fee, provided that the copyright notice above appears in all - * copies. This software is provided "as is" without any warranty. - */ - -/* Modified by Guido van Rossum */ -/* Beep added by Mark Hammond */ -/* Win9X Beep and platform identification added by Uncle Timmy */ - -/* Example: - - import winsound - import time - - # Play wav file - winsound.PlaySound('c:/windows/media/Chord.wav', winsound.SND_FILENAME) - - # Play sound from control panel settings - winsound.PlaySound('SystemQuestion', winsound.SND_ALIAS) - - # Play wav file from memory - data=open('c:/windows/media/Chimes.wav',"rb").read() - winsound.PlaySound(data, winsound.SND_MEMORY) - - # Start playing the first bit of wav file asynchronously - winsound.PlaySound('c:/windows/media/Chord.wav', - winsound.SND_FILENAME|winsound.SND_ASYNC) - # But don't let it go for too long... - time.sleep(0.1) - # ...Before stopping it - winsound.PlaySound(None, 0) -*/ - -// Need limited C API version 3.13 for Py_mod_gil -#include "pyconfig.h" // Py_GIL_DISABLED -#ifndef Py_GIL_DISABLED -# define Py_LIMITED_API 0x030d0000 -#endif - -#include -#include -#include - -PyDoc_STRVAR(sound_module_doc, -"PlaySound(sound, flags) - play a sound\n" -"SND_FILENAME - sound is a wav file name\n" -"SND_ALIAS - sound is a registry sound association name\n" -"SND_LOOP - Play the sound repeatedly; must also specify SND_ASYNC\n" -"SND_MEMORY - sound is a memory image of a wav file\n" -"SND_PURGE - stop all instances of the specified sound\n" -"SND_ASYNC - PlaySound returns immediately\n" -"SND_NODEFAULT - Do not play a default beep if the sound can not be found\n" -"SND_NOSTOP - Do not interrupt any sounds currently playing\n" // Raising RuntimeError if needed -"SND_NOWAIT - Return immediately if the sound driver is busy\n" // Without any errors -"SND_APPLICATION - sound is an application-specific alias in the registry." -"\n" -"Beep(frequency, duration) - Make a beep through the PC speaker.\n" -"MessageBeep(type) - Call Windows MessageBeep."); - -/*[clinic input] -module winsound -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=a18401142d97b8d5]*/ - -#include "clinic/winsound.c.h" - -/*[clinic input] -winsound.PlaySound - - sound: object - The sound to play; a filename, data, or None. - flags: int - Flag values, ored together. See module documentation. - -A wrapper around the Windows PlaySound API. -[clinic start generated code]*/ - -static PyObject * -winsound_PlaySound_impl(PyObject *module, PyObject *sound, int flags) -/*[clinic end generated code: output=49a0fd16a372ebeb input=c63e1f2d848da2f2]*/ -{ - int ok; - wchar_t *wsound; - Py_buffer view = {NULL, NULL}; - - if (sound == Py_None) { - wsound = NULL; - } else if (flags & SND_MEMORY) { - if (flags & SND_ASYNC) { - /* Sidestep reference counting headache; unfortunately this also - prevent SND_LOOP from memory. */ - PyErr_SetString(PyExc_RuntimeError, - "Cannot play asynchronously from memory"); - return NULL; - } - if (PyObject_GetBuffer(sound, &view, PyBUF_SIMPLE) < 0) { - return NULL; - } - wsound = (wchar_t *)view.buf; - } else if (PyBytes_Check(sound)) { - PyObject *type_name = PyType_GetQualName(Py_TYPE(sound)); - if (type_name != NULL) { - PyErr_Format(PyExc_TypeError, - "'sound' must be str, os.PathLike, or None, not %S", - type_name); - Py_DECREF(type_name); - } - return NULL; - } else { - PyObject *obj = PyOS_FSPath(sound); - // Either is unicode/bytes/NULL, or a helpful message - // has been surfaced to the user about how they gave a non-path. - if (obj == NULL) return NULL; - if (PyBytes_Check(obj)) { - PyErr_Format(PyExc_TypeError, - "'sound' must resolve to str, not bytes"); - Py_DECREF(obj); - return NULL; - } - wsound = PyUnicode_AsWideCharString(obj, NULL); - Py_DECREF(obj); - if (wsound == NULL) return NULL; - } - - - Py_BEGIN_ALLOW_THREADS - ok = PlaySoundW(wsound, NULL, flags); - Py_END_ALLOW_THREADS - if (view.obj) { - PyBuffer_Release(&view); - } else if (sound != Py_None) { - PyMem_Free(wsound); - } - if (!ok) { - PyErr_SetString(PyExc_RuntimeError, "Failed to play sound"); - return NULL; - } - Py_RETURN_NONE; -} - -/*[clinic input] -winsound.Beep - - frequency: int - Frequency of the sound in hertz. - Must be in the range 37 through 32,767. - duration: int - How long the sound should play, in milliseconds. - -A wrapper around the Windows Beep API. -[clinic start generated code]*/ - -static PyObject * -winsound_Beep_impl(PyObject *module, int frequency, int duration) -/*[clinic end generated code: output=f32382e52ee9b2fb input=40e360cfa00a5cf0]*/ -{ - BOOL ok; - - if (frequency < 37 || frequency > 32767) { - PyErr_SetString(PyExc_ValueError, - "frequency must be in 37 thru 32767"); - return NULL; - } - - Py_BEGIN_ALLOW_THREADS - ok = Beep(frequency, duration); - Py_END_ALLOW_THREADS - if (!ok) { - PyErr_SetString(PyExc_RuntimeError,"Failed to beep"); - return NULL; - } - - Py_RETURN_NONE; -} - -/*[clinic input] -winsound.MessageBeep - - type: int(c_default="MB_OK") = MB_OK - -Call Windows MessageBeep(x). - -x defaults to MB_OK. -[clinic start generated code]*/ - -static PyObject * -winsound_MessageBeep_impl(PyObject *module, int type) -/*[clinic end generated code: output=120875455121121f input=db185f741ae21401]*/ -{ - BOOL ok; - - Py_BEGIN_ALLOW_THREADS - ok = MessageBeep(type); - Py_END_ALLOW_THREADS - - if (!ok) { - PyErr_SetExcFromWindowsErr(PyExc_RuntimeError, 0); - return NULL; - } - - Py_RETURN_NONE; -} - -static struct PyMethodDef sound_methods[] = -{ - WINSOUND_PLAYSOUND_METHODDEF - WINSOUND_BEEP_METHODDEF - WINSOUND_MESSAGEBEEP_METHODDEF - {NULL, NULL} -}; - -#define ADD_DEFINE(CONST) do { \ - if (PyModule_AddIntConstant(module, #CONST, CONST) < 0) { \ - return -1; \ - } \ -} while (0) - -static int -exec_module(PyObject *module) -{ - ADD_DEFINE(SND_ASYNC); - ADD_DEFINE(SND_NODEFAULT); - ADD_DEFINE(SND_NOSTOP); - ADD_DEFINE(SND_NOWAIT); - ADD_DEFINE(SND_ALIAS); - ADD_DEFINE(SND_FILENAME); - ADD_DEFINE(SND_MEMORY); - ADD_DEFINE(SND_PURGE); - ADD_DEFINE(SND_LOOP); - ADD_DEFINE(SND_APPLICATION); - - ADD_DEFINE(MB_OK); - ADD_DEFINE(MB_ICONASTERISK); - ADD_DEFINE(MB_ICONEXCLAMATION); - ADD_DEFINE(MB_ICONHAND); - ADD_DEFINE(MB_ICONQUESTION); - -#undef ADD_DEFINE - - return 0; -} - -static PyModuleDef_Slot sound_slots[] = { - {Py_mod_exec, exec_module}, - {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, - {Py_mod_gil, Py_MOD_GIL_NOT_USED}, - {0, NULL} -}; - -static struct PyModuleDef winsoundmodule = { - .m_base = PyModuleDef_HEAD_INIT, - .m_name = "winsound", - .m_doc = sound_module_doc, - .m_methods = sound_methods, - .m_slots = sound_slots, -}; - -PyMODINIT_FUNC -PyInit_winsound(void) -{ - return PyModuleDef_Init(&winsoundmodule); -} diff --git a/PCbuild/Directory.Build.props b/PCbuild/Directory.Build.props deleted file mode 100644 index 3d2fe55078450a..00000000000000 --- a/PCbuild/Directory.Build.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/PCbuild/Directory.Build.targets b/PCbuild/Directory.Build.targets deleted file mode 100644 index 3d2fe55078450a..00000000000000 --- a/PCbuild/Directory.Build.targets +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/PCbuild/_asyncio.vcxproj b/PCbuild/_asyncio.vcxproj deleted file mode 100644 index 76b0ffd660dba0..00000000000000 --- a/PCbuild/_asyncio.vcxproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {384C224A-7474-476E-A01B-750EA7DE918C} - _asyncio - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_asyncio.vcxproj.filters b/PCbuild/_asyncio.vcxproj.filters deleted file mode 100644 index a09ae928a9b5ea..00000000000000 --- a/PCbuild/_asyncio.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {2422278e-eeeb-4241-8182-433e2bc5a7fc} - - - {41f1cd52-b682-46aa-a7fd-7bdf81a18010} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj deleted file mode 100644 index e0dc6ec187a08d..00000000000000 --- a/PCbuild/_bz2.vcxproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5} - bz2 - Win32Proj - - - - - DynamicLibrary - NotSet - - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(bz2Dir);%(AdditionalIncludeDirectories) - WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - 4244;4267;%(DisableSpecificWarnings) - - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_bz2.vcxproj.filters b/PCbuild/_bz2.vcxproj.filters deleted file mode 100644 index 7c0b5162537e06..00000000000000 --- a/PCbuild/_bz2.vcxproj.filters +++ /dev/null @@ -1,59 +0,0 @@ - - - - - {f53a859d-dad2-4d5b-ae41-f28d8b571f5a} - - - {b90c3cee-7700-4e87-bf85-0801866e8d0d} - - - {7e0bed05-ae33-43b7-8797-656455bbb7f3} - - - {b53f67d8-fdf0-4e10-a987-e44475ff434a} - - - {ed574b89-6983-4cdf-9f98-fe7048d9e89c} - - - - - Source Files - - - Source Files\bzip2 - - - Source Files\bzip2 - - - Source Files\bzip2 - - - Source Files\bzip2 - - - Source Files\bzip2 - - - Source Files\bzip2 - - - Source Files\bzip2 - - - - - Header Files\bzip2 - - - Header Files\bzip2 - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_ctypes.vcxproj b/PCbuild/_ctypes.vcxproj deleted file mode 100644 index 63d5fa49cd4e17..00000000000000 --- a/PCbuild/_ctypes.vcxproj +++ /dev/null @@ -1,123 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {0E9791DB-593A-465F-98BC-681011311618} - _ctypes - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - - - - USING_MALLOC_CLOSURE_DOT_C=1;%(PreprocessorDefinitions) - - - /EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions) - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - - - - diff --git a/PCbuild/_ctypes.vcxproj.filters b/PCbuild/_ctypes.vcxproj.filters deleted file mode 100644 index a38473e3e81de2..00000000000000 --- a/PCbuild/_ctypes.vcxproj.filters +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {806081ee-2af0-48d0-a83e-ee02a74baa0f} - - - {dbdea1f2-ad8b-44ca-b782-fcf65d91559b} - - - {31a37bb4-c384-41ff-9ec1-8ad98d482e22} - - - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_ctypes_test.vcxproj b/PCbuild/_ctypes_test.vcxproj deleted file mode 100644 index 97354739c09834..00000000000000 --- a/PCbuild/_ctypes_test.vcxproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {9EC7190A-249F-4180-A900-548FDCF3055F} - _ctypes_test - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - - - - - - \ No newline at end of file diff --git a/PCbuild/_ctypes_test.vcxproj.filters b/PCbuild/_ctypes_test.vcxproj.filters deleted file mode 100644 index 5174196c52e4d0..00000000000000 --- a/PCbuild/_ctypes_test.vcxproj.filters +++ /dev/null @@ -1,29 +0,0 @@ - - - - - {8fd70119-5481-4e5d-b187-d0b14eb27e38} - - - {38abc486-e143-49dc-8cf0-8aefab0e0d3d} - - - {5030ff8f-daf5-4bc8-b1dd-e8b59d34c511} - - - - - Header Files - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj deleted file mode 100644 index ee7421484b5312..00000000000000 --- a/PCbuild/_decimal.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {0E9791DB-593A-465F-98BC-681011311617} - _decimal - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - - - - BUILD_LIBMPDEC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - CONFIG_32;PPRO;MASM;%(PreprocessorDefinitions) - CONFIG_32;ANSI;%(PreprocessorDefinitions) - CONFIG_64;ANSI;%(PreprocessorDefinitions) - CONFIG_64;MASM;%(PreprocessorDefinitions) - ..\Modules\_decimal;..\Modules\_decimal\windows;$(mpdecimalDir)\libmpdec;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)" - $(IntDir)vcdiv64.obj;%(Outputs) - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - - - - - - diff --git a/PCbuild/_decimal.vcxproj.filters b/PCbuild/_decimal.vcxproj.filters deleted file mode 100644 index e4bdb64ec1fb9f..00000000000000 --- a/PCbuild/_decimal.vcxproj.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {f35a78a6-3ef0-4e36-bd8b-afaef22fbb7c} - - - {138089f8-faba-494f-b6ed-051f31fbaf2d} - - - {632b24a3-0844-4e57-ad34-b0e4cef886dd} - - - {322d127c-1105-4a31-aed2-e29cdececc77} - - - {780c3b7a-7817-4e89-a2f2-fc522f2c5966} - - - - - Header Files - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - Header Files\libmpdec - - - - - Source Files - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - Source Files\libmpdec - - - - - Resource Files - - - - - Source Files\libmpdec - - - diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj deleted file mode 100644 index c102da85e9c516..00000000000000 --- a/PCbuild/_elementtree.vcxproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {17E1E049-C309-4D79-843F-AE483C264AEA} - _elementtree - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ..\Modules\expat;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_elementtree.vcxproj.filters b/PCbuild/_elementtree.vcxproj.filters deleted file mode 100644 index 9e2e062af3f387..00000000000000 --- a/PCbuild/_elementtree.vcxproj.filters +++ /dev/null @@ -1,92 +0,0 @@ - - - - - {643d8607-d024-40fe-8583-1823c96430f0} - - - {7b5335ad-059f-486f-85e4-f4757e26a9bf} - - - {37d3ef0a-1ea6-492d-bba7-b83865198caa} - - - {6099ed72-6668-4779-adb2-a2362e5da3b9} - - - {f99990ba-cd06-40cc-8f28-d2d424ec13be} - - - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - Header Files\expat - - - - - Source Files - - - Source Files\expat - - - Source Files\expat - - - Source Files\expat - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj deleted file mode 100644 index e5e18de60ec349..00000000000000 --- a/PCbuild/_freeze_module.vcxproj +++ /dev/null @@ -1,490 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {19C0C13F-47CA-4432-AFF3-799A296A4DDC} - Win32Proj - _freeze_module - false - - - - - Application - Unicode - - - - - - - - - - - - Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - Disabled - false - - - Console - version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VPATH="$(PyVPath)";%(PreprocessorDefinitions) - - - - - - - - - - - - importlib._bootstrap - $(IntDir)importlib._bootstrap.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\importlib._bootstrap.h - - - importlib._bootstrap_external - $(IntDir)importlib._bootstrap_external.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\importlib._bootstrap_external.h - - - zipimport - $(IntDir)zipimport.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\zipimport.h - - - abc - $(IntDir)abc.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\abc.h - - - codecs - $(IntDir)codecs.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\codecs.h - - - io - $(IntDir)io.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\io.h - - - _collections_abc - $(IntDir)_collections_abc.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\_collections_abc.h - - - _sitebuiltins - $(IntDir)_sitebuiltins.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\_sitebuiltins.h - - - genericpath - $(IntDir)genericpath.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\genericpath.h - - - ntpath - $(IntDir)ntpath.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\ntpath.h - - - posixpath - $(IntDir)posixpath.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\posixpath.h - - - os - $(IntDir)os.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\os.h - - - site - $(IntDir)site.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\site.h - - - stat - $(IntDir)stat.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\stat.h - - - importlib.util - $(IntDir)importlib.util.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\importlib.util.h - - - importlib.machinery - $(IntDir)importlib.machinery.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\importlib.machinery.h - - - runpy - $(IntDir)runpy.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\runpy.h - - - __hello__ - $(IntDir)__hello__.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\__hello__.h - - - __phello__ - $(IntDir)__phello__.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\__phello__.h - - - __phello__.ham - $(IntDir)__phello__.ham.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\__phello__.ham.h - - - __phello__.ham.eggs - $(IntDir)__phello__.ham.eggs.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\__phello__.ham.eggs.h - - - __phello__.spam - $(IntDir)__phello__.spam.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\__phello__.spam.h - - - frozen_only - $(IntDir)frozen_only.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\frozen_only.h - - - - - - - getpath - $(IntDir)getpath.g.h - $(GeneratedFrozenModulesDir)Python\frozen_modules\getpath.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(PyConfigH->'%(FullPath)', ';') - $([System.IO.File]::ReadAllText($(PyConfigH))) - $([System.IO.File]::ReadAllText('$(IntDir)pyconfig.h')) - - - $(PyConfigHText.Replace('#undef Py_GIL_DISABLED', '#define Py_GIL_DISABLED 1')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PCbuild/_freeze_module.vcxproj.filters b/PCbuild/_freeze_module.vcxproj.filters deleted file mode 100644 index 9630f54ae4ea29..00000000000000 --- a/PCbuild/_freeze_module.vcxproj.filters +++ /dev/null @@ -1,570 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {eb238244-ace1-48fc-97a4-16ff886f8642} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Python - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Python - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Python Files - - - - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - - diff --git a/PCbuild/_hashlib.vcxproj b/PCbuild/_hashlib.vcxproj deleted file mode 100644 index 2cd205224bc089..00000000000000 --- a/PCbuild/_hashlib.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {447F05A8-F581-4CAC-A466-5AC7936E207E} - _hashlib - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_hashlib.vcxproj.filters b/PCbuild/_hashlib.vcxproj.filters deleted file mode 100644 index 7a0700c007f644..00000000000000 --- a/PCbuild/_hashlib.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {cc45963d-bd25-4eb8-bdba-a5507090bca4} - - - {67630fa4-76e4-4035-bced-043a6df1e2e0} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj deleted file mode 100644 index 40107d4b76cd53..00000000000000 --- a/PCbuild/_lzma.vcxproj +++ /dev/null @@ -1,122 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {F9D71780-F393-11E0-BE50-0800200C9A66} - lzma - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) - WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) - - - $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - {12728250-16eC-4dc6-94d7-e21dd88947f8} - false - - - - - - diff --git a/PCbuild/_lzma.vcxproj.filters b/PCbuild/_lzma.vcxproj.filters deleted file mode 100644 index e23e5399df449b..00000000000000 --- a/PCbuild/_lzma.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {53e68eda-39fc-4336-a658-dc5f5d598760} - - - {9e5ecf81-2940-4dd5-af98-58e98810d030} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_multiprocessing.vcxproj b/PCbuild/_multiprocessing.vcxproj deleted file mode 100644 index a65397f532aa86..00000000000000 --- a/PCbuild/_multiprocessing.vcxproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {9E48B300-37D1-11DD-8C41-005056C00008} - _multiprocessing - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_multiprocessing.vcxproj.filters b/PCbuild/_multiprocessing.vcxproj.filters deleted file mode 100644 index 85caddb10db28d..00000000000000 --- a/PCbuild/_multiprocessing.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {623c956c-1893-43d9-a7dc-96e4fef20f93} - - - {34615a62-f999-4659-83f5-19d17a644530} - - - {1dcf6347-2248-42e1-ab3c-1b19f4f6f647} - - - - - Header Files - - - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_overlapped.vcxproj b/PCbuild/_overlapped.vcxproj deleted file mode 100644 index 224bf05d5303a0..00000000000000 --- a/PCbuild/_overlapped.vcxproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} - _overlapped - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_overlapped.vcxproj.filters b/PCbuild/_overlapped.vcxproj.filters deleted file mode 100644 index 29a9b77740b15a..00000000000000 --- a/PCbuild/_overlapped.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {6f67c8db-7de7-4714-a967-2b0d4bc71f2e} - - - {83fe502d-eca2-4505-b626-eddec9b6ea9f} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_queue.vcxproj b/PCbuild/_queue.vcxproj deleted file mode 100644 index 80a1c3c6a4ad3e..00000000000000 --- a/PCbuild/_queue.vcxproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687} - _queue - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_queue.vcxproj.filters b/PCbuild/_queue.vcxproj.filters deleted file mode 100644 index ec48e9d3aeddf7..00000000000000 --- a/PCbuild/_queue.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {c56a5dd3-7838-48e9-a781-855d8be7370f} - - - {bc5dc97e-11b8-435a-82e7-2ef3c9b44f5e} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_socket.vcxproj b/PCbuild/_socket.vcxproj deleted file mode 100644 index 41af0895921bbb..00000000000000 --- a/PCbuild/_socket.vcxproj +++ /dev/null @@ -1,117 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {86937F53-C189-40EF-8CE8-8759D8E7D480} - _socket - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_socket.vcxproj.filters b/PCbuild/_socket.vcxproj.filters deleted file mode 100644 index 453175c6a43a6a..00000000000000 --- a/PCbuild/_socket.vcxproj.filters +++ /dev/null @@ -1,29 +0,0 @@ - - - - - {1452207f-707c-4e84-b532-307193a0fd85} - - - {1edfe0d0-7b9d-4dc8-a335-b21fef7cc77a} - - - {f8efff18-28ed-4c6b-8e8d-fa816d9a81a8} - - - - - Header Files - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj deleted file mode 100644 index 9ae0a0fc3a009d..00000000000000 --- a/PCbuild/_sqlite3.vcxproj +++ /dev/null @@ -1,138 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {13CECB97-4119-4316-9D42-8534019A5A44} - _sqlite3 - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(sqlite3Dir);%(AdditionalIncludeDirectories) - PY_SQLITE_HAVE_SERIALIZE;PY_SQLITE_ENABLE_LOAD_EXTENSION;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - {a1a295e5-463c-437f-81ca-1f32367685da} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_sqlite3.vcxproj.filters b/PCbuild/_sqlite3.vcxproj.filters deleted file mode 100644 index f4a265eba7dd80..00000000000000 --- a/PCbuild/_sqlite3.vcxproj.filters +++ /dev/null @@ -1,77 +0,0 @@ - - - - - {dac8ab3b-ce16-4bef-bef9-76463a01f5c4} - - - {814b187d-44ad-4f2b-baa7-18ca8a8a6a77} - - - {225f58de-2bad-4e4d-bc0b-fe74ed6bf5f1} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj deleted file mode 100644 index ce21f992ff8510..00000000000000 --- a/PCbuild/_ssl.vcxproj +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {C6E20F84-3247-4AD6-B051-B073268F73BA} - _ssl - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;crypt32.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - {86937f53-c189-40ef-8ce8-8759d8e7d480} - false - - - - - - diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters deleted file mode 100644 index 8aef9e03fcc429..00000000000000 --- a/PCbuild/_ssl.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {695348f7-e9f6-4fe1-bc03-5f08ffc8095b} - - - {1b18a2e6-040d-46c7-a9ac-ac2ec64fb5d6} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testbuffer.vcxproj b/PCbuild/_testbuffer.vcxproj deleted file mode 100644 index 4e721e8ce09f0c..00000000000000 --- a/PCbuild/_testbuffer.vcxproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {A2697BD3-28C1-4AEC-9106-8B748639FD16} - _testbuffer - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - - - - - - \ No newline at end of file diff --git a/PCbuild/_testbuffer.vcxproj.filters b/PCbuild/_testbuffer.vcxproj.filters deleted file mode 100644 index bea4260b9f7432..00000000000000 --- a/PCbuild/_testbuffer.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {8d232240-921a-4bc2-87c3-93ffd3462f0a} - - - {1e73201a-cca4-4b45-9484-262709cafee7} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj deleted file mode 100644 index 02d755f8d5ce5b..00000000000000 --- a/PCbuild/_testcapi.vcxproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D} - _testcapi - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - {885d4898-d08d-4091-9c40-c700cfe3fc5a} - false - - - - - - diff --git a/PCbuild/_testcapi.vcxproj.filters b/PCbuild/_testcapi.vcxproj.filters deleted file mode 100644 index 63025cecd6d6ed..00000000000000 --- a/PCbuild/_testcapi.vcxproj.filters +++ /dev/null @@ -1,123 +0,0 @@ - - - - - {a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e} - - - {071b2ff4-e5a1-4e79-b0c5-cf46b0094a80} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - diff --git a/PCbuild/_testclinic.vcxproj b/PCbuild/_testclinic.vcxproj deleted file mode 100644 index ef981332c6ab03..00000000000000 --- a/PCbuild/_testclinic.vcxproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {A840DDFB-ED50-484B-B527-B32E7CF90FD5} - _testclinic - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_testclinic.vcxproj.filters b/PCbuild/_testclinic.vcxproj.filters deleted file mode 100644 index 4a2987eb27b223..00000000000000 --- a/PCbuild/_testclinic.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {5b0a9282-a01c-4b83-9fd4-6deb6c558f9c} - - - {6a89c8a9-5b51-4525-ac5c-7d0a22f9657e} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testclinic_limited.vcxproj b/PCbuild/_testclinic_limited.vcxproj deleted file mode 100644 index 95c205309b1f30..00000000000000 --- a/PCbuild/_testclinic_limited.vcxproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410} - _testclinic_limited - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_testclinic_limited.vcxproj.filters b/PCbuild/_testclinic_limited.vcxproj.filters deleted file mode 100644 index 8ecdd99a4ac220..00000000000000 --- a/PCbuild/_testclinic_limited.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {2422278e-eeeb-4241-8182-433e2bc5a7fc} - - - {41f1cd52-b682-46aa-a7fd-7bdf81a18010} - - - - - Source Files - - - - - Resource Files - - - diff --git a/PCbuild/_testconsole.vcxproj b/PCbuild/_testconsole.vcxproj deleted file mode 100644 index 69d312b17a5a62..00000000000000 --- a/PCbuild/_testconsole.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {B244E787-C445-441C-BDF4-5A4F1A3A1E51} - Win32Proj - _testconsole - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_testconsole.vcxproj.filters b/PCbuild/_testconsole.vcxproj.filters deleted file mode 100644 index 321e17785fddbb..00000000000000 --- a/PCbuild/_testconsole.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testembed.vcxproj b/PCbuild/_testembed.vcxproj deleted file mode 100644 index a7ea8787e0cc64..00000000000000 --- a/PCbuild/_testembed.vcxproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {6DAC66D9-E703-4624-BE03-49112AB5AA62} - Win32Proj - _testembed - false - - - - - Application - Unicode - - - - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_testembed.vcxproj.filters b/PCbuild/_testembed.vcxproj.filters deleted file mode 100644 index b90fd85f79425f..00000000000000 --- a/PCbuild/_testembed.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testimportmultiple.vcxproj b/PCbuild/_testimportmultiple.vcxproj deleted file mode 100644 index c35ac83c1c739f..00000000000000 --- a/PCbuild/_testimportmultiple.vcxproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781} - _testimportmultiple - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_testimportmultiple.vcxproj.filters b/PCbuild/_testimportmultiple.vcxproj.filters deleted file mode 100644 index 8f63d13482513d..00000000000000 --- a/PCbuild/_testimportmultiple.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {1ec38ad9-1abf-4b80-8628-ac43ccba324b} - - - {0ff128a6-7814-4f8e-826e-860a858104ee} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testinternalcapi.vcxproj b/PCbuild/_testinternalcapi.vcxproj deleted file mode 100644 index 87db569423de2a..00000000000000 --- a/PCbuild/_testinternalcapi.vcxproj +++ /dev/null @@ -1,120 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {900342D7-516A-4469-B1AD-59A66E49A25F} - _testinternalcapi - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - _Py_JIT;%(PreprocessorDefinitions) - _Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions) - - - - - - diff --git a/PCbuild/_testinternalcapi.vcxproj.filters b/PCbuild/_testinternalcapi.vcxproj.filters deleted file mode 100644 index 27429ea5833077..00000000000000 --- a/PCbuild/_testinternalcapi.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {136fc5eb-7fe4-4486-8c6d-b49f37a00199} - - - {acecc890-f8dd-4942-b6d2-1fd8f73a5d6c} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - diff --git a/PCbuild/_testlimitedcapi.vcxproj b/PCbuild/_testlimitedcapi.vcxproj deleted file mode 100644 index bc187cfeb93af8..00000000000000 --- a/PCbuild/_testlimitedcapi.vcxproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933} - _testlimitedcapi - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - {885d4898-d08d-4091-9c40-c700cfe3fc5a} - false - - - - - - diff --git a/PCbuild/_testlimitedcapi.vcxproj.filters b/PCbuild/_testlimitedcapi.vcxproj.filters deleted file mode 100644 index 22c9ceadd19054..00000000000000 --- a/PCbuild/_testlimitedcapi.vcxproj.filters +++ /dev/null @@ -1,43 +0,0 @@ - - - - - {a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e} - - - {071b2ff4-e5a1-4e79-b0c5-cf46b0094a80} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource Files - - - diff --git a/PCbuild/_testmultiphase.vcxproj b/PCbuild/_testmultiphase.vcxproj deleted file mode 100644 index e730fe308ab835..00000000000000 --- a/PCbuild/_testmultiphase.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {16BFE6F0-22EF-40B5-B831-7E937119EF10} - Win32Proj - _testmultiphase - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_testmultiphase.vcxproj.filters b/PCbuild/_testmultiphase.vcxproj.filters deleted file mode 100644 index 8df0a42e9f3c77..00000000000000 --- a/PCbuild/_testmultiphase.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_testsinglephase.vcxproj b/PCbuild/_testsinglephase.vcxproj deleted file mode 100644 index bf4dabf66c1040..00000000000000 --- a/PCbuild/_testsinglephase.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {2097F1C1-597C-4167-93E3-656A7D6339B2} - Win32Proj - _testsinglephase - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_testsinglephase.vcxproj.filters b/PCbuild/_testsinglephase.vcxproj.filters deleted file mode 100644 index 2a0e0ef66c116f..00000000000000 --- a/PCbuild/_testsinglephase.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj deleted file mode 100644 index 117488a01621cc..00000000000000 --- a/PCbuild/_tkinter.vcxproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF} - _tkinter - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(tcltkDir)include;%(AdditionalIncludeDirectories) - WITH_APPINIT;%(PreprocessorDefinitions) - Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions) - - - $(tcltkLib);%(AdditionalDependencies) - - - - - - - - - - - <_TclTkDLL Include="$(tcltkdir)\bin\$(tclDllName)" /> - <_TclTkDLL Include="$(tcltkdir)\bin\$(tkDllName)" /> - <_TclTkDLL Include="$(tcltkdir)\bin\$(tclZlibDllName)" /> - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/_tkinter.vcxproj.filters b/PCbuild/_tkinter.vcxproj.filters deleted file mode 100644 index 0d919439a76af6..00000000000000 --- a/PCbuild/_tkinter.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - {b9ce64dd-cb95-472d-bbe8-5583b2cd375b} - - - {2bd3a90c-5b2e-45fb-9b2a-fbf1a4faf5f9} - - - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_uuid.vcxproj b/PCbuild/_uuid.vcxproj deleted file mode 100644 index 50d81cc7916dbd..00000000000000 --- a/PCbuild/_uuid.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {CB435430-EBB1-478B-8F4E-C256F6838F55} - _uuid - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - rpcrt4.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_uuid.vcxproj.filters b/PCbuild/_uuid.vcxproj.filters deleted file mode 100644 index 705902ff50c3a6..00000000000000 --- a/PCbuild/_uuid.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {4fa4dbfa-e069-4ab4-86a6-ad389b2ec407} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_wmi.vcxproj b/PCbuild/_wmi.vcxproj deleted file mode 100644 index 22fa8960982528..00000000000000 --- a/PCbuild/_wmi.vcxproj +++ /dev/null @@ -1,119 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {54B1431F-B86B-4ACB-B28C-88BCF93191D8} - _wmi - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - /std:c++20 %(AdditionalOptions) - - - wbemuuid.lib;propsys.lib;%(AdditionalDependencies) - ole32.dll - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/_wmi.vcxproj.filters b/PCbuild/_wmi.vcxproj.filters deleted file mode 100644 index fa8046237a0b71..00000000000000 --- a/PCbuild/_wmi.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {4fa4dbfa-e069-4ab4-86a6-ad389b2ec407} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/_zoneinfo.vcxproj b/PCbuild/_zoneinfo.vcxproj deleted file mode 100644 index 47b5bfa5b8815a..00000000000000 --- a/PCbuild/_zoneinfo.vcxproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742} - _zoneinfo - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_zoneinfo.vcxproj.filters b/PCbuild/_zoneinfo.vcxproj.filters deleted file mode 100644 index 57f31e05d561a3..00000000000000 --- a/PCbuild/_zoneinfo.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {2422278e-eeeb-4241-8182-433e2bc5a7fc} - - - {0616fb85-7891-4790-83c2-005f906cf555} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/blurb.bat b/PCbuild/blurb.bat deleted file mode 100644 index 0be228a2cdeafd..00000000000000 --- a/PCbuild/blurb.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off -rem -rem Runs the blurb tool. If necessary, will install Python and/or blurb. -rem -rem Pass "--update"/"-U" as the first argument to update blurb. -rem - -call "%~dp0find_python.bat" %PYTHON% -if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3) - -if "%1" EQU "--update" (%PYTHON% -m pip install -U blurb && shift) -if "%1" EQU "-U" (%PYTHON% -m pip install -U blurb && shift) - -%PYTHON% -m blurb %1 %2 %3 %4 %5 %6 %7 %8 %9 -if ERRORLEVEL 1 goto :install_and_retry -exit /B 0 - -:install_and_retry -rem Before reporting the error, make sure that blurb is actually installed. -rem If not, install it first and try again. -set _ERR=%ERRORLEVEL% -%PYTHON% -c "import blurb" -if NOT ERRORLEVEL 1 exit /B %_ERR% -echo Installing blurb... -%PYTHON% -m pip install blurb -if ERRORLEVEL 1 exit /B %ERRORLEVEL% -%PYTHON% -m blurb %* -exit /B diff --git a/PCbuild/build.bat b/PCbuild/build.bat deleted file mode 100644 index 6c76f09a071312..00000000000000 --- a/PCbuild/build.bat +++ /dev/null @@ -1,199 +0,0 @@ -@echo off -goto Run -:Usage -echo.%~nx0 [flags and arguments] [quoted MSBuild options] -echo. -echo.Build CPython from the command line. Requires the appropriate -echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt). -echo. -echo.After the flags recognized by this script, up to 9 arguments to be passed -echo.directly to MSBuild may be passed. If the argument contains an '=', the -echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`). -echo.Alternatively you can put extra flags for MSBuild in a file named -echo.`msbuild.rsp` in the `PCbuild` directory, one flag per line. This file -echo.will be picked automatically by MSBuild. Flags put in this file does not -echo.need to be quoted. You can still use environment variables inside the -echo.response file. -echo. -echo.Available flags: -echo. -h Display this help message -echo. -V Display version information for the current build -echo. -r Target Rebuild instead of Build -echo. -d Set the configuration to Debug -echo. -E Don't fetch or build external libraries. Extension modules that -echo. depend on external libraries will not attempt to build if this flag -echo. is present; -e is also accepted to explicitly enable fetching and -echo. building externals. -echo. -m Enable parallel build (enabled by default) -echo. -M Disable parallel build -echo. -v Increased output messages -echo. -vv Verbose output messages -echo. -q Quiet output messages (errors and warnings only) -echo. -k Attempt to kill any running Pythons before building (usually done -echo. automatically by the pythoncore project) -echo. --pgo Build with Profile-Guided Optimization. This flag -echo. overrides -c and -d -echo. --disable-gil Enable experimental support for running without the GIL. -echo. --test-marker Enable the test marker within the build. -echo. --regen Regenerate all opcodes, grammar and tokens. -echo. --experimental-jit Enable the experimental just-in-time compiler. -echo. --experimental-jit-off Ditto but off by default (PYTHON_JIT=1 enables). -echo. --experimental-jit-interpreter Enable the experimental Tier 2 interpreter. -echo. -echo.Available flags to avoid building certain modules. -echo.These flags have no effect if '-e' is not given: -echo. --no-ctypes Do not attempt to build _ctypes -echo. --no-ssl Do not attempt to build _ssl -echo. --no-tkinter Do not attempt to build Tkinter -echo. -echo.Available arguments: -echo. -c Release ^| Debug ^| PGInstrument ^| PGUpdate -echo. Set the configuration (default: Release) -echo. -p x64 ^| Win32 ^| ARM ^| ARM64 -echo. Set the platform (default: x64) -echo. -t Build ^| Rebuild ^| Clean ^| CleanAll -echo. Set the target manually -echo. --pgo-job The job to use for PGO training; implies --pgo -echo. (default: "-m test --pgo") -exit /b 127 - -:Run -setlocal -set platf=x64 -set conf=Release -set target=Build -set dir=%~dp0 -set parallel=/m -set verbose=/nologo /v:m /clp:summary -set kill= -set do_pgo= -set pgo_job=-m test --pgo -set UseTIER2= - -:CheckOpts -if "%~1"=="-h" goto Usage -if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts -if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts -if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts -if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts -if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts -if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts -if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts -if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts -if "%~1"=="-vv" (set verbose=/v:d /ds) & shift & goto CheckOpts -if "%~1"=="-q" (set verbose=/v:q /nologo /clp:summary) & shift & goto CheckOpts -if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts -if "%~1"=="--pgo" (set do_pgo=true) & shift & goto CheckOpts -if "%~1"=="--pgo-job" (set do_pgo=true) & (set pgo_job=%~2) & shift & shift & goto CheckOpts -if "%~1"=="--disable-gil" (set UseDisableGil=true) & shift & goto CheckOpts -if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts -if "%~1"=="-V" shift & goto Version -if "%~1"=="--regen" (set Regen=true) & shift & goto CheckOpts -if "%~1"=="--experimental-jit" (set UseJIT=true) & (set UseTIER2=1) & shift & goto CheckOpts -if "%~1"=="--experimental-jit-off" (set UseJIT=true) & (set UseTIER2=3) & shift & goto CheckOpts -if "%~1"=="--experimental-jit-interpreter" (set UseTIER2=4) & shift & goto CheckOpts -if "%~1"=="--experimental-jit-interpreter-off" (set UseTIER2=6) & shift & goto CheckOpts -rem These use the actual property names used by MSBuild. We could just let -rem them in through the environment, but we specify them on the command line -rem anyway for visibility so set defaults after this -if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts -if "%~1"=="-E" (set IncludeExternals=false) & shift & goto CheckOpts -if "%~1"=="--no-ctypes" (set IncludeCTypes=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=true -if "%IncludeCTypes%"=="" set IncludeCTypes=true -if "%IncludeSSL%"=="" set IncludeSSL=true -if "%IncludeTkinter%"=="" set IncludeTkinter=true - -if "%IncludeExternals%"=="true" call "%dir%get_externals.bat" - -if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" ( - if "%PROCESSOR_ARCHITEW6432%" NEQ "AMD64" if "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" ( - echo.ERROR: Cannot cross-compile with PGO - echo. 32bit operating system detected. Ensure your PROCESSOR_ARCHITECTURE - echo. and PROCESSOR_ARCHITEW6432 environment variables are correct. - exit /b 1 - ) -) - -if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc" -if exist "%GIT%" set GITProperty=/p:GIT="%GIT%" -if not exist "%GIT%" echo Cannot find Git on PATH & set GITProperty= - -rem Setup the environment -call "%dir%find_msbuild.bat" %MSBUILD% -if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) - -call "%dir%find_python.bat" %PYTHON% -if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3) -set PythonForBuild=%PYTHON% - -if "%kill%"=="true" call :Kill -if ERRORLEVEL 1 exit /B %ERRORLEVEL% - -if "%regen%"=="true" goto :Regen - -if "%do_pgo%"=="true" ( - set conf=PGInstrument - call :Build %1 %2 %3 %4 %5 %6 %7 %8 %9 -) -rem %VARS% are evaluated eagerly, which would lose the ERRORLEVEL -rem value if we didn't split it out here. -if "%do_pgo%"=="true" if ERRORLEVEL 1 exit /B %ERRORLEVEL% -if "%do_pgo%"=="true" ( - del /s "%dir%\*.pgc" - del /s "%dir%\..\Lib\*.pyc" - echo on - call "%dir%\..\python.bat" %pgo_job% - @echo off - call :Kill - set conf=PGUpdate - set target=Build -) -goto :Build - -:Kill -echo on -%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^ - /p:Configuration=%conf% /p:Platform=%platf%^ - /p:KillPython=true - -@echo off -exit /B %ERRORLEVEL% - -:Regen -echo on -%MSBUILD% "%dir%\pythoncore.vcxproj" /t:Regen %verbose%^ - /p:Configuration=%conf% /p:Platform=%platf%^ - /p:ForceRegen=true - -@echo off -exit /B %ERRORLEVEL% - -:Build -rem Call on MSBuild to do the work, echo the command. -rem Passing %1-9 is not the preferred option, but argument parsing in -rem batch is, shall we say, "lackluster" -echo on -%MSBUILD% "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^ - /p:Configuration=%conf% /p:Platform=%platf%^ - /p:IncludeExternals=%IncludeExternals%^ - /p:IncludeCTypes=%IncludeCTypes%^ - /p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^ - /p:DisableGil=%UseDisableGil%^ - /p:UseTestMarker=%UseTestMarker% %GITProperty%^ - /p:UseJIT=%UseJIT%^ - /p:UseTIER2=%UseTIER2%^ - %1 %2 %3 %4 %5 %6 %7 %8 %9 - -@echo off -exit /b %ERRORLEVEL% - -:Version -rem Display the current build version information -call "%dir%find_msbuild.bat" %MSBUILD% -if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) -%MSBUILD% "%dir%pythoncore.vcxproj" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9 -if ERRORLEVEL 1 exit /b 3 \ No newline at end of file diff --git a/PCbuild/build_env.bat b/PCbuild/build_env.bat deleted file mode 100644 index 4c67ae3ac253c7..00000000000000 --- a/PCbuild/build_env.bat +++ /dev/null @@ -1 +0,0 @@ -@%comspec% /k env.bat %* diff --git a/PCbuild/clean.bat b/PCbuild/clean.bat deleted file mode 100644 index d75198ae55b96d..00000000000000 --- a/PCbuild/clean.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -rem A batch program to clean a particular configuration, -rem just for convenience. - -call "%~dp0build.bat" -t Clean %* diff --git a/PCbuild/env.bat b/PCbuild/env.bat deleted file mode 100644 index 2820e304582cff..00000000000000 --- a/PCbuild/env.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem This script adds the latest available tools to the path for the current -rem command window. However, most builds of Python will ignore the version -rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of -rem tools should be the same version to avoid potential conflicts. -rem -rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or -rem 'v110', 'v120' or 'v140') to the build script. - -echo Build environments: x86, amd64, x86_amd64 -echo. -set _ARGS=%* -if NOT DEFINED _ARGS set _ARGS=amd64 - -if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto :skip_vswhere -set VSTOOLS= -for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO @(set VSTOOLS=%%i\VC\Auxiliary\Build\vcvarsall.bat) -if not defined VSTOOLS goto :skip_vswhere -call "%VSTOOLS%" %_ARGS% -exit /B 0 - -:skip_vswhere -if not defined VSTOOLS set VSTOOLS=%VS140COMNTOOLS% -if not defined VSTOOLS set VSTOOLS=%VS120COMNTOOLS% -if not defined VSTOOLS set VSTOOLS=%VS110COMNTOOLS% -if not defined VSTOOLS set VSTOOLS=%VS100COMNTOOLS% -call "%VSTOOLS%..\..\VC\vcvarsall.bat" %_ARGS% diff --git a/PCbuild/env.ps1 b/PCbuild/env.ps1 deleted file mode 100644 index 19d7ada4c10798..00000000000000 --- a/PCbuild/env.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -$pcbuild = $script:MyInvocation.MyCommand.Path | Split-Path -parent; -& cmd /K "$pcbuild\env.bat" $args diff --git a/PCbuild/field3.py b/PCbuild/field3.py deleted file mode 100644 index edcbe36ae083ba..00000000000000 --- a/PCbuild/field3.py +++ /dev/null @@ -1,35 +0,0 @@ -# An absurd workaround for the lack of arithmetic in MS's resource compiler. -# After building Python, run this, then paste the output into the appropriate -# part of PC\python_nt.rc. -# Example output: -# -# * For 2.3a0, -# * PY_MICRO_VERSION = 0 -# * PY_RELEASE_LEVEL = 'alpha' = 0xA -# * PY_RELEASE_SERIAL = 1 -# * -# * and 0*1000 + 10*10 + 1 = 101. -# */ -# #define FIELD3 101 - -import sys - -major, minor, micro, level, serial = sys.version_info -levelnum = {'alpha': 0xA, - 'beta': 0xB, - 'candidate': 0xC, - 'final': 0xF, - }[level] -string = sys.version.split()[0] # like '2.3a0' - -print(" * For %s," % string) -print(" * PY_MICRO_VERSION = %d" % micro) -print(" * PY_RELEASE_LEVEL = %r = %s" % (level, hex(levelnum))) -print(" * PY_RELEASE_SERIAL = %d" % serial) -print(" *") - -field3 = micro * 1000 + levelnum * 10 + serial - -print(" * and %d*1000 + %d*10 + %d = %d" % (micro, levelnum, serial, field3)) -print(" */") -print("#define FIELD3", field3) diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat deleted file mode 100644 index ce7e71efa31f6c..00000000000000 --- a/PCbuild/find_msbuild.bat +++ /dev/null @@ -1,63 +0,0 @@ -@rem -@rem Searches for MSBuild.exe. This is the only tool we need to initiate -@rem a build, so we no longer search for the full VC toolset. -@rem -@rem This file is supposed to modify the state of the caller (specifically -@rem the MSBUILD variable), so we do not use setlocal or echo, and avoid -@rem changing any other persistent state. -@rem - -@rem No arguments provided means do full search -@if '%1' EQU '' goto :begin_search - -@rem One argument may be the full path. Use a goto so we don't try to -@rem parse the next if statement - incorrect quoting in the multi-arg -@rem case can cause us to break immediately. -@if '%2' EQU '' goto :one_arg - -@rem Entire command line may represent the full path if quoting failed. -@if exist "%*" (set MSBUILD="%*") & (set _Py_MSBuild_Source=environment) & goto :found -@goto :begin_search - -:one_arg -@if exist "%~1" (set MSBUILD="%~1") & (set _Py_MSBuild_Source=environment) & goto :found - -:begin_search -@set MSBUILD= - -@rem If msbuild.exe is on the PATH, assume that the user wants that one. -@where msbuild > "%TEMP%\msbuild.loc" 2> nul && set /P MSBUILD= < "%TEMP%\msbuild.loc" & del "%TEMP%\msbuild.loc" -@if exist "%MSBUILD%" set MSBUILD="%MSBUILD%" & (set _Py_MSBuild_Source=PATH) & goto :found - -@rem VS 2017 and later provide vswhere.exe, which can be used -@if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto :skip_vswhere -@set _Py_MSBuild_Root= -@for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO @(set _Py_MSBuild_Root=%%i\MSBuild) -@if not defined _Py_MSBuild_Root goto :skip_vswhere -@for %%j in (Current 15.0) DO @if exist "%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe" (set MSBUILD="%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe") -@set _Py_MSBuild_Root= -@if defined MSBUILD @if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio installation) & goto :found -:skip_vswhere - -@rem VS 2015 and earlier register MSBuild separately, so we can find it. -@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32 >nul 2>nul -@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32') DO @( - @if "%%i"=="MSBuildToolsPath" @if exist "%%k\msbuild.exe" @(set MSBUILD="%%k\msbuild.exe") -) -@if exist %MSBUILD% (set _Py_MSBuild_Source=registry) & goto :found - - -@exit /b 1 - -:found -@pushd %MSBUILD% >nul 2>nul -@if not ERRORLEVEL 1 @( - @if exist msbuild.exe @(set MSBUILD="%CD%\msbuild.exe") else @(set MSBUILD=) - @popd -) - -@if defined MSBUILD @echo Using %MSBUILD% (found in the %_Py_MSBuild_Source%) -@if not defined MSBUILD @echo Failed to find MSBuild -@set _Py_MSBuild_Source= -@if not defined MSBUILD @exit /b 1 -@exit /b 0 diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat deleted file mode 100644 index 4824e89de41d69..00000000000000 --- a/PCbuild/find_python.bat +++ /dev/null @@ -1,101 +0,0 @@ -@rem -@rem Searches for python.exe and may download a private copy from nuget. -@rem -@rem This file is supposed to modify the state of the caller (specifically -@rem the MSBUILD variable), so we do not use setlocal or echo, and avoid -@rem changing any other persistent state. -@rem - -@set _Py_D=%~dp0 - -@rem First argument -q means only show the command in output -@if '%1' EQU '-q' (shift && set _Py_Quiet=1) - -@rem No arguments provided means do full search -@if '%1' EQU '' goto :begin_search - -@rem One argument may be the full path. Use a goto so we don't try to -@rem parse the next if statement - incorrect quoting in the multi-arg -@rem case can cause us to break immediately. -@if '%2' EQU '' goto :one_arg - -@rem Entire command line may represent the full path if quoting failed. -@if exist "%*" (set PYTHON="%*") & (set _Py_Python_Source=from environment) & goto :found -@goto :begin_search - -:one_arg -@if exist "%~1" (set PYTHON="%~1") & (set _Py_Python_Source=from environment) & goto :found - -:begin_search -@set PYTHON= - -@rem If PYTHON_FOR_BUILD is set, use that -@if NOT "%PYTHON_FOR_BUILD%"=="" @(set PYTHON="%PYTHON_FOR_BUILD%") && (set _Py_Python_Source=found as PYTHON_FOR_BUILD) && goto :found - -@rem If there is an active virtual env, use that one -@if NOT "%VIRTUAL_ENV%"=="" (set PYTHON="%VIRTUAL_ENV%\Scripts\python.exe") & (set _Py_Python_Source=found in virtual env) & goto :found - -@set _Py_EXTERNALS_DIR=%EXTERNALS_DIR% -@if "%_Py_EXTERNALS_DIR%"=="" (set _Py_EXTERNALS_DIR=%_Py_D%\..\externals) - -@rem If we have Python in externals, use that one -@if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" ("%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" -Ec "import sys; assert sys.version_info[:2] >= (3, 10)" >nul 2>nul) && (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") && (set _Py_Python_Source=found in externals directory) && goto :found || rmdir /Q /S "%_Py_EXTERNALS_DIR%\pythonx86" - -@rem If HOST_PYTHON is recent enough, use that -@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert sys.version_info[:2] >= (3, 10)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && (set _Py_Python_Source=found as HOST_PYTHON) && goto :found - -@rem If py.exe finds a recent enough version, use that one -@rem It is fine to add new versions to this list when they have released, -@rem but we do not use prerelease builds here. -@for %%p in (3.14 3.13 3.12 3.11 3.10) do @py -%%p -EV >nul 2>&1 && (set PYTHON=py -%%p) && (set _Py_Python_Source=found %%p with py.exe) && goto :found - -@if NOT exist "%_Py_EXTERNALS_DIR%" mkdir "%_Py_EXTERNALS_DIR%" -@set _Py_NUGET=%NUGET% -@set _Py_NUGET_URL=%NUGET_URL% -@set _Py_HOST_PYTHON=%HOST_PYTHON% -@if "%_Py_HOST_PYTHON%"=="" set _Py_HOST_PYTHON=py -@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe) -@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe) -@if NOT exist "%_Py_NUGET%" ( - @if not "%_Py_Quiet%"=="1" @echo Downloading nuget... - @rem NB: Must use single quotes around NUGET here, NOT double! - @rem Otherwise, a space in the path would break things - @rem If it fails, retry with any available copy of Python - @powershell.exe -Command Invoke-WebRequest %_Py_NUGET_URL% -OutFile '%_Py_NUGET%' - @if errorlevel 1 ( - @%_Py_HOST_PYTHON% -E "%_Py_D%\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%" - ) -) - -@rem ensure nuget.org source exist -@"%_Py_NUGET%" sources add -Name nuget.org -Source https://api.nuget.org/v3/index.json >nul 2>nul - -@if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget... -@if not "%_Py_Quiet%"=="1" ( - @"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%" -) else ( - @"%_Py_NUGET%" install pythonx86 -Verbosity quiet -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%" -) -@rem Quote it here; it's not quoted later because "py -x.y" wouldn't work -@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found - - -@set _Py_D= -@set _Py_Quiet= -@set _Py_Python_Source= -@set _Py_EXTERNALS_DIR= -@set _Py_NUGET= -@set _Py_NUGET_URL= -@set _Py_HOST_PYTHON= -@exit /b 1 - -:found -@if "%_Py_Quiet%"=="1" (@echo %PYTHON%) else @echo Using %PYTHON% (%_Py_Python_Source%) - -@set _Py_D= -@set _Py_Quiet= -@set _Py_Python_Source= -@set _Py_EXTERNALS_DIR= -@set _Py_NUGET= -@set _Py_NUGET_URL= -@set _Py_HOST_PYTHON= diff --git a/PCbuild/fix_encoding.py b/PCbuild/fix_encoding.py deleted file mode 100755 index 60a892a4f7ad59..00000000000000 --- a/PCbuild/fix_encoding.py +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env python3 -# -# Fixes encoding of the project files to add UTF-8 BOM. -# -# Visual Studio insists on having the BOM in project files, and will -# restore it on first edit. This script will go through the relevant -# files and ensure the BOM is included, which should prevent too many -# irrelevant changesets. -# - -from pathlib import Path - -__author__ = "Steve Dower " -__version__ = "1.0.0.0" - -def fix(p): - with open(p, 'r', encoding='utf-8-sig') as f: - data = f.read() - with open(p, 'w', encoding='utf-8-sig') as f: - f.write(data) - -ROOT_DIR = Path(__file__).resolve().parent - -if __name__ == '__main__': - count = 0 - print('Fixing:') - for f in ROOT_DIR.glob('*.vcxproj'): - print(f' - {f.name}') - fix(f) - count += 1 - for f in ROOT_DIR.glob('*.vcxproj.filters'): - print(f' - {f.name}') - fix(f) - count += 1 - print() - print(f'Fixed {count} files') diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py deleted file mode 100755 index a78aa6a23041ad..00000000000000 --- a/PCbuild/get_external.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import os -import pathlib -import sys -import time -import urllib.error -import urllib.request -import zipfile - - -def retrieve_with_retries(download_location, output_path, reporthook, - max_retries=7): - """Download a file with exponential backoff retry and save to disk.""" - for attempt in range(max_retries + 1): - try: - resp = urllib.request.urlretrieve( - download_location, - output_path, - reporthook=reporthook, - ) - except (urllib.error.URLError, ConnectionError) as ex: - if attempt == max_retries: - msg = f"Download from {download_location} failed." - raise OSError(msg) from ex - time.sleep(2.25**attempt) - else: - return resp - - -def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): - repo = f'cpython-{"bin" if binary else "source"}-deps' - url = f'https://github.com/{org}/{repo}/archive/{commit_hash}.zip' - reporthook = None - if verbose: - reporthook = print - zip_dir.mkdir(parents=True, exist_ok=True) - filename, _headers = retrieve_with_retries( - url, - zip_dir / f'{commit_hash}.zip', - reporthook - ) - return filename - - -def extract_zip(externals_dir, zip_path): - with zipfile.ZipFile(os.fspath(zip_path)) as zf: - zf.extractall(os.fspath(externals_dir)) - return externals_dir / zf.namelist()[0].split('/')[0] - - -def parse_args(): - p = argparse.ArgumentParser() - p.add_argument('-v', '--verbose', action='store_true') - p.add_argument('-b', '--binary', action='store_true', - help='Is the dependency in the binary repo?') - p.add_argument('-O', '--organization', - help='Organization owning the deps repos', default='python') - p.add_argument('-e', '--externals-dir', type=pathlib.Path, - help='Directory in which to store dependencies', - default=pathlib.Path(__file__).parent.parent / 'externals') - p.add_argument('tag', - help='tag of the dependency') - return p.parse_args() - - -def main(): - args = parse_args() - zip_path = fetch_zip( - args.tag, - args.externals_dir / 'zips', - org=args.organization, - binary=args.binary, - verbose=args.verbose, - ) - final_name = args.externals_dir / args.tag - extracted = extract_zip(args.externals_dir, zip_path) - for wait in [1, 2, 3, 5, 8, 0]: - try: - extracted.replace(final_name) - break - except PermissionError as ex: - retry = f" Retrying in {wait}s..." if wait else "" - print(f"Encountered permission error '{ex}'.{retry}", file=sys.stderr) - time.sleep(wait) - else: - print( - f"ERROR: Failed to extract {final_name}.", - "You may need to restart your build", - file=sys.stderr, - ) - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat deleted file mode 100644 index f2539b622fa11f..00000000000000 --- a/PCbuild/get_externals.bat +++ /dev/null @@ -1,117 +0,0 @@ -@echo off -setlocal -rem Simple script to fetch source for external libraries - -if NOT DEFINED PCBUILD (set PCBUILD=%~dp0) -if NOT DEFINED EXTERNALS_DIR (set EXTERNALS_DIR=%PCBUILD%\..\externals) - -set DO_FETCH=true -set DO_CLEAN=false -set IncludeLibffiSrc=false -set IncludeTkinterSrc=false -set IncludeSSLSrc=false - -:CheckOpts -if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts -if "%~1"=="--no-openssl" (set IncludeSSL=false) & shift & goto CheckOpts -if "%~1"=="--no-libffi" (set IncludeLibffi=false) & shift & goto CheckOpts -if "%~1"=="--tkinter-src" (set IncludeTkinterSrc=true) & shift & goto CheckOpts -if "%~1"=="--openssl-src" (set IncludeSSLSrc=true) & shift & goto CheckOpts -if "%~1"=="--libffi-src" (set IncludeLibffiSrc=true) & shift & goto CheckOpts -if "%~1"=="--python" (set PYTHON=%2) & shift & shift & goto CheckOpts -if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts -if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts -if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts -if "%~1"=="--clean-only" (set DO_FETCH=false) & goto clean - -rem Include old options for compatibility -if "%~1"=="--no-tkinter" shift & goto CheckOpts -if "%~1"=="--no-openssl" shift & goto CheckOpts - -if "x%~1" NEQ "x" goto usage - -if "%DO_CLEAN%"=="false" goto fetch -:clean -echo.Cleaning up external libraries. -if exist "%EXTERNALS_DIR%" ( - rem Sometimes this fails the first time; try it twice - rmdir /s /q "%EXTERNALS_DIR%" || rmdir /s /q "%EXTERNALS_DIR%" -) - -if "%DO_FETCH%"=="false" goto end -:fetch - -if "%ORG%"=="" (set ORG=python) -call "%PCBUILD%\find_python.bat" "%PYTHON%" - -if NOT DEFINED PYTHON ( - where /Q git || echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1 -) - -echo.Fetching external libraries... - -set libraries= -set libraries=%libraries% bzip2-1.0.8 -if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.4.4 -if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.5.9 -set libraries=%libraries% mpdecimal-4.0.0 -set libraries=%libraries% sqlite-3.50.4.0 -if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.15.0 -if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.15.0 -set libraries=%libraries% xz-5.2.5 -set libraries=%libraries% zlib-1.3.1 - -for %%e in (%libraries%) do ( - if exist "%EXTERNALS_DIR%\%%e" ( - echo.%%e already exists, skipping. - ) else if NOT DEFINED PYTHON ( - echo.Fetching %%e with git... - git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e" - ) else ( - echo.Fetching %%e... - %PYTHON% -E "%PCBUILD%\get_external.py" -O %ORG% -e "%EXTERNALS_DIR%" %%e - ) -) - -echo.Fetching external binaries... - -set binaries= -if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4 -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.5.9 -if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0 -if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 - -for %%b in (%binaries%) do ( - if exist "%EXTERNALS_DIR%\%%b" ( - echo.%%b already exists, skipping. - ) else if NOT DEFINED PYTHON ( - echo.Fetching %%b with git... - git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b" - ) else ( - echo.Fetching %%b... - %PYTHON% -E "%PCBUILD%\get_external.py" -b -O %ORG% -e "%EXTERNALS_DIR%" %%b - ) -) - -echo Finished. -goto end - -:usage -echo.Valid options: -c, --clean, --clean-only, --organization, --python, -echo.--no-tkinter, --no-openssl -echo. -echo.Pull all sources and binaries necessary for compiling optional extension -echo.modules that rely on external libraries. -echo. -echo.The --organization option determines which github organization to download -echo.from, the --python option determines which Python 3.6+ interpreter to use -echo.with PCbuild\get_external.py. -echo. -echo.Use the -c or --clean option to remove the entire externals directory. -echo. -echo.Use the --clean-only option to do the same cleaning, without pulling in -echo.anything new. -echo. -exit /b -1 - -:end diff --git a/PCbuild/idle.bat b/PCbuild/idle.bat deleted file mode 100644 index 70f3817f09769c..00000000000000 --- a/PCbuild/idle.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off -rem start idle -rem Usage: idle [-d] -rem -d Run Debug build (python_d.exe). Else release build. - -setlocal -set PCBUILD=%~dp0 -set exedir=%PCBUILD%\amd64 -set exe=python -PATH %PATH%;..\externals\tcltk\bin - -:CheckOpts -if "%1"=="-d" (set exe=%exe%_d) & shift & goto :CheckOpts -if "%1"=="-p" (call :SetExeDir %2) & shift & shift & goto :CheckOpts - -set cmd=%exedir%\%exe% %PCBUILD%\..\Lib\idlelib\idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9 - -echo on -%cmd% -exit /B %LASTERRORCODE% - -:SetExeDir -if /I %1 EQU Win32 (set exedir=%PCBUILD%\win32) -if /I %1 EQU x64 (set exedir=%PCBUILD%\amd64) -if /I %1 EQU ARM (set exedir=%PCBUILD%\arm32) -if /I %1 EQU ARM64 (set exedir=%PCBUILD%\arm64) -exit /B 0 diff --git a/PCbuild/libffi.props b/PCbuild/libffi.props deleted file mode 100644 index 22c9550e2c09b8..00000000000000 --- a/PCbuild/libffi.props +++ /dev/null @@ -1,21 +0,0 @@ - - - - - $(libffiIncludeDir);%(AdditionalIncludeDirectories) - - - $(libffiOutDir);%(AdditionalLibraryDirectories) - libffi-8.lib;%(AdditionalDependencies) - - - - <_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" /> - - - - - - - - \ No newline at end of file diff --git a/PCbuild/liblzma.vcxproj b/PCbuild/liblzma.vcxproj deleted file mode 100644 index 4dd42ab98a9759..00000000000000 --- a/PCbuild/liblzma.vcxproj +++ /dev/null @@ -1,246 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - PGInstrument - ARM - - - PGUpdate - ARM - - - Release - ARM - - - PGInstrument - ARM64 - - - PGUpdate - ARM64 - - - Release - ARM64 - - - Release - Win32 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Debug - x64 - - - Release - x64 - - - - {12728250-16EC-4DC6-94D7-E21DD88947F8} - liblzma - true - - - - - - - StaticLibrary - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - WIN32;HAVE_CONFIG_H;_LIB;%(PreprocessorDefinitions) - $(lzmaDir)windows/vs2019;$(lzmaDir)src/liblzma/common;$(lzmaDir)src/common;$(lzmaDir)src/liblzma/api;$(lzmaDir)src/liblzma/check;$(lzmaDir)src/liblzma/delta;$(lzmaDir)src/liblzma/lz;$(lzmaDir)src/liblzma/lzma;$(lzmaDir)src/liblzma/rangecoder;$(lzmaDir)src/liblzma/simple;%(AdditionalIncludeDirectories) - 4028;4113;4133;4244;4267;4996;%(DisableSpecificWarnings) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PCbuild/liblzma.vcxproj.filters b/PCbuild/liblzma.vcxproj.filters deleted file mode 100644 index ebe2a7d5fa9e5d..00000000000000 --- a/PCbuild/liblzma.vcxproj.filters +++ /dev/null @@ -1,435 +0,0 @@ - - - - - {cb1870af-3c7e-48ba-bd7f-3e87468f8ed7} - - - {58761ffe-2af0-42a8-9f93-4e57e1954c36} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props deleted file mode 100644 index 5fd708b211e42d..00000000000000 --- a/PCbuild/openssl.props +++ /dev/null @@ -1,34 +0,0 @@ - - - - - $(opensslIncludeDir);%(AdditionalIncludeDirectories) - - - $(opensslOutDir);%(AdditionalLibraryDirectories) - ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies) - - - - <_DLLSuffix>-3 - <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm - <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64 - $(_DLLSuffix) - - - <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" /> - <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" /> - <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" /> - <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" /> - - - - - - - - diff --git a/PCbuild/openssl.vcxproj b/PCbuild/openssl.vcxproj deleted file mode 100644 index 7ca750dda8f5ef..00000000000000 --- a/PCbuild/openssl.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - Release - ARM - - - Release - ARM64 - - - - {B5FD6F1D-129E-4BFF-9340-03606FAC7283} - - - - - - - Makefile - 32 - x86 - VC-WIN32 - true - - - - Makefile - 64 - amd64 - VC-WIN64A-masm - true - - - - Makefile - ARM - ARM - VC-WIN32-ARM - true - - - - Makefile - ARM64 - ARM64 - VC-WIN64-ARM - true - - - - - - - $(opensslDir)\tmp$(Bitness)dll - $(opensslOutDir) - setlocal -set VCINSTALLDIR=$(VCInstallDir) -if not exist "$(IntDir.TrimEnd('\'))" mkdir "$(IntDir.TrimEnd('\'))" -cd /D "$(IntDir.TrimEnd('\'))" -$(Perl) "$(opensslDir)\configure" $(OpenSSLPlatform) no-asm no-uplink -nmake - - - - - - - - <_Built Include="$(opensslDir)\LICENSE" /> - <_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" /> - <_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" /> - <_Include Include="$(opensslDir)\Include\openssl\*.h" /> - <_Include Include="$(IntDir)\include\openssl\*.h" /> - - - - - - - - - - - - - - - - - - - - - - $(Temp)\nmake.loc - - - <_NMakeExe Include="$(VC_ExecutablePath_x86_x86)\nmake.exe" Condition="$(VC_ExecutablePath_x86_x86) != ''" /> - - - - - - - \ No newline at end of file diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj deleted file mode 100644 index a2a637a3044373..00000000000000 --- a/PCbuild/pcbuild.proj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - {CC9B93A2-439D-4058-9D29-6DCF43774405} - Win32 - Release - true - true - true - true - true - true - false - - - - - $(PreferredToolArchitecture) - $(Configuration) - Release - - Build - Clean - CleanAll - false - - - $(Platform) - $(Configuration) - - Build - Clean - CleanAll - true - - - $(Platform) - $(Configuration) - - Build - Clean - CleanAll - false - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln deleted file mode 100644 index d10e1c46a91480..00000000000000 --- a/PCbuild/pcbuild.sln +++ /dev/null @@ -1,1692 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.8.34525.116 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}" - ProjectSection(SolutionItems) = preProject - ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c - readme.txt = readme.txt - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" - ProjectSection(ProjectDependencies) = postProject - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410} = {01FDF29A-40A1-46DF-84F5-85EBBD2A2410} - {0E9791DB-593A-465F-98BC-681011311617} = {0E9791DB-593A-465F-98BC-681011311617} - {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} - {12728250-16EC-4DC6-94D7-E21DD88947F8} = {12728250-16EC-4DC6-94D7-E21DD88947F8} - {13CECB97-4119-4316-9D42-8534019A5A44} = {13CECB97-4119-4316-9D42-8534019A5A44} - {16BFE6F0-22EF-40B5-B831-7E937119EF10} = {16BFE6F0-22EF-40B5-B831-7E937119EF10} - {17E1E049-C309-4D79-843F-AE483C264AEA} = {17E1E049-C309-4D79-843F-AE483C264AEA} - {18CAE28C-B454-46C1-87A0-493D91D97F03} = {18CAE28C-B454-46C1-87A0-493D91D97F03} - {2097F1C1-597C-4167-93E3-656A7D6339B2} = {2097F1C1-597C-4167-93E3-656A7D6339B2} - {28B5D777-DDF2-4B6B-B34F-31D938813856} = {28B5D777-DDF2-4B6B-B34F-31D938813856} - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781} = {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781} - {384C224A-7474-476E-A01B-750EA7DE918C} = {384C224A-7474-476E-A01B-750EA7DE918C} - {447F05A8-F581-4CAC-A466-5AC7936E207E} = {447F05A8-F581-4CAC-A466-5AC7936E207E} - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF} = {4946ECAC-2E69-4BF8-A90A-F5136F5094DF} - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D} = {494BAC80-A60C-43A9-99E7-ACB691CE2C4D} - {54B1431F-B86B-4ACB-B28C-88BCF93191D8} = {54B1431F-B86B-4ACB-B28C-88BCF93191D8} - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D} = {6901D91C-6E48-4BB7-9FEC-700C8131DF1D} - {6DAC66D9-E703-4624-BE03-49112AB5AA62} = {6DAC66D9-E703-4624-BE03-49112AB5AA62} - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5} = {73FCD2BD-F133-46B7-8EC1-144CD82A59D5} - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687} = {78D80A15-BD8C-44E2-B49E-1F05B0A0A687} - {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} - {885D4898-D08D-4091-9C40-C700CFE3FC5A} = {885D4898-D08D-4091-9C40-C700CFE3FC5A} - {900342D7-516A-4469-B1AD-59A66E49A25F} = {900342D7-516A-4469-B1AD-59A66E49A25F} - {9E48B300-37D1-11DD-8C41-005056C00008} = {9E48B300-37D1-11DD-8C41-005056C00008} - {9EC7190A-249F-4180-A900-548FDCF3055F} = {9EC7190A-249F-4180-A900-548FDCF3055F} - {A2697BD3-28C1-4AEC-9106-8B748639FD16} = {A2697BD3-28C1-4AEC-9106-8B748639FD16} - {A840DDFB-ED50-484B-B527-B32E7CF90FD5} = {A840DDFB-ED50-484B-B527-B32E7CF90FD5} - {B244E787-C445-441C-BDF4-5A4F1A3A1E51} = {B244E787-C445-441C-BDF4-5A4F1A3A1E51} - {C6E20F84-3247-4AD6-B051-B073268F73BA} = {C6E20F84-3247-4AD6-B051-B073268F73BA} - {CB435430-EBB1-478B-8F4E-C256F6838F55} = {CB435430-EBB1-478B-8F4E-C256F6838F55} - {D06B6426-4762-44CC-8BAD-D79052507F2F} = {D06B6426-4762-44CC-8BAD-D79052507F2F} - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} = {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881} = {ECC7CEAC-A5E5-458E-BB9E-2413CC847881} - {F749B822-B489-4CA5-A3AD-CE078F5F338A} = {F749B822-B489-4CA5-A3AD-CE078F5F338A} - {F9D71780-F393-11E0-BE50-0800200C9A66} = {F9D71780-F393-11E0-BE50-0800200C9A66} - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742} = {FCBE1EF2-E0F0-40B1-88B5-00A35D378742} - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D} = {FDB84CBB-2FB6-47C8-A2D6-091E0833239D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - ProjectSection(ProjectDependencies) = postProject - {19C0C13F-47CA-4432-AFF3-799A296A4DDC} = {19C0C13F-47CA-4432-AFF3-799A296A4DDC} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcxproj", "{0E9791DB-593A-465F-98BC-681011311618}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcxproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcxproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcxproj", "{13CECB97-4119-4316-9D42-8534019A5A44}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcxproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testclinic", "_testclinic.vcxproj", "{A840DDFB-ED50-484B-B527-B32E7CF90FD5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcxproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcxproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcxproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxlimited", "xxlimited.vcxproj", "{F749B822-B489-4CA5-A3AD-CE078F5F338A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testbuffer", "_testbuffer.vcxproj", "{A2697BD3-28C1-4AEC-9106-8B748639FD16}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pylauncher", "pylauncher.vcxproj", "{7B2727B5-5A3F-40EE-A866-43A13CD31446}" - ProjectSection(ProjectDependencies) = postProject - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782} = {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pywlauncher", "pywlauncher.vcxproj", "{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}" - ProjectSection(ProjectDependencies) = postProject - {7B2727B5-5A3F-40EE-A866-43A13CD31446} = {7B2727B5-5A3F-40EE-A866-43A13CD31446} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_freeze_module", "_freeze_module.vcxproj", "{19C0C13F-47CA-4432-AFF3-799A296A4DDC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_overlapped", "_overlapped.vcxproj", "{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testembed", "_testembed.vcxproj", "{6DAC66D9-E703-4624-BE03-49112AB5AA62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testsinglephase", "_testsinglephase.vcxproj", "{2097F1C1-597C-4167-93E3-656A7D6339B2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testconsole", "_testconsole.vcxproj", "{B244E787-C445-441C-BDF4-5A4F1A3A1E51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_asyncio", "_asyncio.vcxproj", "{384C224A-7474-476E-A01B-750EA7DE918C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_zoneinfo", "_zoneinfo.vcxproj", "{FCBE1EF2-E0F0-40B1-88B5-00A35D378742}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_uwp", "python_uwp.vcxproj", "{9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}" - ProjectSection(ProjectDependencies) = postProject - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "venvlauncher", "venvlauncher.vcxproj", "{494BAC80-A60C-43A9-99E7-ACB691CE2C4D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "venvwlauncher", "venvwlauncher.vcxproj", "{FDB84CBB-2FB6-47C8-A2D6-091E0833239D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw_uwp", "pythonw_uwp.vcxproj", "{AB603547-1E2A-45B3-9E09-B04596006393}" - ProjectSection(ProjectDependencies) = postProject - {F4229CC3-873C-49AE-9729-DD308ED4CD4A} = {F4229CC3-873C-49AE-9729-DD308ED4CD4A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_uuid", "_uuid.vcxproj", "{CB435430-EBB1-478B-8F4E-C256F6838F55}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_wmi", "_wmi.vcxproj", "{54B1431F-B86B-4ACB-B28C-88BCF93191D8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testclinic_limited", "_testclinic_limited.vcxproj", "{01FDF29A-40A1-46DF-84F5-85EBBD2A2410}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testlimitedcapi", "_testlimitedcapi.vcxproj", "{7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - PGInstrument|ARM = PGInstrument|ARM - PGInstrument|ARM64 = PGInstrument|ARM64 - PGInstrument|Win32 = PGInstrument|Win32 - PGInstrument|x64 = PGInstrument|x64 - PGUpdate|ARM = PGUpdate|ARM - PGUpdate|ARM64 = PGUpdate|ARM64 - PGUpdate|Win32 = PGUpdate|Win32 - PGUpdate|x64 = PGUpdate|x64 - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|ARM.ActiveCfg = Debug|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|ARM.Build.0 = Debug|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|ARM64.Build.0 = Debug|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|ARM.ActiveCfg = Release|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|ARM.Build.0 = Release|ARM - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|ARM64.ActiveCfg = Release|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|ARM64.Build.0 = Release|ARM64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64 - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|ARM.ActiveCfg = Debug|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|ARM.Build.0 = Debug|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|ARM64.Build.0 = Debug|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|ARM.ActiveCfg = Release|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|ARM.Build.0 = Release|ARM - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|ARM64.ActiveCfg = Release|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|ARM64.Build.0 = Release|ARM64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64 - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|ARM.ActiveCfg = Debug|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|ARM.Build.0 = Debug|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|ARM64.Build.0 = Debug|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|ARM.ActiveCfg = Release|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|ARM.Build.0 = Release|ARM - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|ARM64.ActiveCfg = Release|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|ARM64.Build.0 = Release|ARM64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 - {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|ARM.ActiveCfg = Debug|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|ARM.Build.0 = Debug|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|ARM64.Build.0 = Debug|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|ARM.ActiveCfg = Release|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|ARM.Build.0 = Release|ARM - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|ARM64.ActiveCfg = Release|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|ARM64.Build.0 = Release|ARM64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64 - {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|ARM.ActiveCfg = Debug|ARM - {0E9791DB-593A-465F-98BC-681011311617}.Debug|ARM.Build.0 = Debug|ARM - {0E9791DB-593A-465F-98BC-681011311617}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|ARM64.Build.0 = Debug|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311617}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311617}.Release|ARM.ActiveCfg = Release|ARM - {0E9791DB-593A-465F-98BC-681011311617}.Release|ARM.Build.0 = Release|ARM - {0E9791DB-593A-465F-98BC-681011311617}.Release|ARM64.ActiveCfg = Release|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.Release|ARM64.Build.0 = Release|ARM64 - {0E9791DB-593A-465F-98BC-681011311617}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311617}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311617}.Release|x64.Build.0 = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|ARM.ActiveCfg = Debug|ARM - {0E9791DB-593A-465F-98BC-681011311618}.Debug|ARM.Build.0 = Debug|ARM - {0E9791DB-593A-465F-98BC-681011311618}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|ARM64.Build.0 = Debug|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|ARM.ActiveCfg = Release|ARM - {0E9791DB-593A-465F-98BC-681011311618}.Release|ARM.Build.0 = Release|ARM - {0E9791DB-593A-465F-98BC-681011311618}.Release|ARM64.ActiveCfg = Release|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|ARM64.Build.0 = Release|ARM64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64 - {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|ARM.ActiveCfg = Debug|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|ARM.Build.0 = Debug|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|ARM64.Build.0 = Debug|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|ARM.ActiveCfg = Release|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|ARM.Build.0 = Release|ARM - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|ARM64.ActiveCfg = Release|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|ARM64.Build.0 = Release|ARM64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64 - {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|ARM.ActiveCfg = Debug|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|ARM.Build.0 = Debug|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|ARM64.Build.0 = Debug|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|ARM.ActiveCfg = Release|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|ARM.Build.0 = Release|ARM - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|ARM64.ActiveCfg = Release|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|ARM64.Build.0 = Release|ARM64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64 - {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|ARM.ActiveCfg = Debug|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|ARM.Build.0 = Debug|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|ARM64.Build.0 = Debug|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|ARM.ActiveCfg = Release|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|ARM.Build.0 = Release|ARM - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|ARM64.ActiveCfg = Release|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|ARM64.Build.0 = Release|ARM64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64 - {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|ARM.ActiveCfg = Debug|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|ARM.Build.0 = Debug|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|ARM64.Build.0 = Debug|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|ARM.ActiveCfg = Release|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|ARM.Build.0 = Release|ARM - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|ARM64.ActiveCfg = Release|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|ARM64.Build.0 = Release|ARM64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64 - {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|ARM.ActiveCfg = Debug|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|ARM.Build.0 = Debug|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|ARM64.Build.0 = Debug|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|ARM.ActiveCfg = Release|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|ARM.Build.0 = Release|ARM - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|ARM64.ActiveCfg = Release|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|ARM64.Build.0 = Release|ARM64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64 - {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|ARM.ActiveCfg = Debug|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|ARM.Build.0 = Debug|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|ARM64.Build.0 = Debug|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|ARM.ActiveCfg = Release|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|ARM.Build.0 = Release|ARM - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|ARM64.ActiveCfg = Release|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|ARM64.Build.0 = Release|ARM64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64 - {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|ARM.ActiveCfg = Debug|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|ARM.Build.0 = Debug|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|ARM64.Build.0 = Debug|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|Win32.Build.0 = Debug|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|x64.ActiveCfg = Debug|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Debug|x64.Build.0 = Debug|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|ARM.ActiveCfg = Release|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|ARM.Build.0 = Release|ARM - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|ARM64.ActiveCfg = Release|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|ARM64.Build.0 = Release|ARM64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|Win32.ActiveCfg = Release|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|Win32.Build.0 = Release|Win32 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|x64.ActiveCfg = Release|x64 - {A840DDFB-ED50-484B-B527-B32E7CF90FD5}.Release|x64.Build.0 = Release|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|ARM.ActiveCfg = Debug|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|ARM.Build.0 = Debug|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|ARM64.Build.0 = Debug|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|Win32.ActiveCfg = Debug|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|Win32.Build.0 = Debug|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|x64.ActiveCfg = Debug|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Debug|x64.Build.0 = Debug|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|ARM.ActiveCfg = Release|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|ARM.Build.0 = Release|ARM - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|ARM64.ActiveCfg = Release|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|ARM64.Build.0 = Release|ARM64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|Win32.ActiveCfg = Release|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|Win32.Build.0 = Release|Win32 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|x64.ActiveCfg = Release|x64 - {900342D7-516A-4469-B1AD-59A66E49A25F}.Release|x64.Build.0 = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|ARM.ActiveCfg = Debug|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|ARM.Build.0 = Debug|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|ARM64.Build.0 = Debug|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|Win32.ActiveCfg = Debug|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|Win32.Build.0 = Debug|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.ActiveCfg = Debug|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.Build.0 = Debug|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.Build.0 = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.ActiveCfg = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.Build.0 = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.Build.0 = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.ActiveCfg = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.Build.0 = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|ARM.ActiveCfg = Release|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|ARM.Build.0 = Release|ARM - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|ARM64.ActiveCfg = Release|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|ARM64.Build.0 = Release|ARM64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.ActiveCfg = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.Build.0 = Release|Win32 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|x64.ActiveCfg = Release|x64 - {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|x64.Build.0 = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|ARM.ActiveCfg = Debug|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|ARM.ActiveCfg = Release|ARM - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|ARM64.ActiveCfg = Release|ARM64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64 - {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|ARM.ActiveCfg = Debug|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|ARM.Build.0 = Debug|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|ARM64.Build.0 = Debug|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|ARM.ActiveCfg = Release|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|ARM.Build.0 = Release|ARM - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|ARM64.ActiveCfg = Release|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|ARM64.Build.0 = Release|ARM64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64 - {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|ARM.ActiveCfg = Debug|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|ARM.Build.0 = Debug|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|ARM64.Build.0 = Debug|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|ARM.ActiveCfg = Release|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|ARM.Build.0 = Release|ARM - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|ARM64.ActiveCfg = Release|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|ARM64.Build.0 = Release|ARM64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64 - {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|ARM.ActiveCfg = Debug|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|ARM.Build.0 = Debug|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|ARM64.Build.0 = Debug|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.ActiveCfg = Debug|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.Build.0 = Debug|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|ARM.ActiveCfg = Release|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|ARM.Build.0 = Release|ARM - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|ARM64.ActiveCfg = Release|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|ARM64.Build.0 = Release|ARM64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.ActiveCfg = Release|x64 - {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.Build.0 = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|ARM.ActiveCfg = Debug|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|ARM.Build.0 = Debug|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|ARM64.Build.0 = Debug|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|ARM.ActiveCfg = Release|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|ARM.Build.0 = Release|ARM - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|ARM64.ActiveCfg = Release|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|ARM64.Build.0 = Release|ARM64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64 - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|ARM.ActiveCfg = Debug|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|ARM.Build.0 = Debug|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|ARM64.Build.0 = Debug|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|ARM.ActiveCfg = Release|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|ARM.Build.0 = Release|ARM - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|ARM64.ActiveCfg = Release|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|ARM64.Build.0 = Release|ARM64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64 - {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|ARM.ActiveCfg = Debug|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|ARM.Build.0 = Debug|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|ARM64.Build.0 = Debug|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|ARM.ActiveCfg = Release|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|ARM.Build.0 = Release|ARM - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|ARM64.ActiveCfg = Release|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|ARM64.Build.0 = Release|ARM64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64 - {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|ARM.ActiveCfg = Debug|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|ARM.Build.0 = Debug|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|ARM64.Build.0 = Debug|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|ARM.ActiveCfg = Release|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|ARM.Build.0 = Release|ARM - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|ARM64.ActiveCfg = Release|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|ARM64.Build.0 = Release|ARM64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64 - {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|ARM.ActiveCfg = Debug|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|ARM.Build.0 = Debug|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|ARM64.Build.0 = Debug|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|ARM.ActiveCfg = Release|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|ARM.Build.0 = Release|ARM - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|ARM64.ActiveCfg = Release|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|ARM64.Build.0 = Release|ARM64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64 - {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|ARM.ActiveCfg = Debug|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|ARM.Build.0 = Debug|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|ARM64.Build.0 = Debug|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.ActiveCfg = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.Build.0 = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.ActiveCfg = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.Build.0 = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.ActiveCfg = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.Build.0 = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.ActiveCfg = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.Build.0 = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.ActiveCfg = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.Build.0 = Debug|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.ActiveCfg = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.Build.0 = Debug|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|ARM.ActiveCfg = Release|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|ARM.Build.0 = Release|ARM - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|ARM64.ActiveCfg = Release|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|ARM64.Build.0 = Release|ARM64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.ActiveCfg = Release|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.Build.0 = Release|Win32 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|x64.ActiveCfg = Release|x64 - {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|x64.Build.0 = Release|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|ARM.ActiveCfg = Debug|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|Win32.ActiveCfg = Release|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|x64.ActiveCfg = Release|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|x64.ActiveCfg = Release|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|x64.Build.0 = Release|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|ARM.ActiveCfg = Release|ARM - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|ARM64.ActiveCfg = Release|ARM64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|Win32.ActiveCfg = Release|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|Win32.Build.0 = Release|Win32 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|x64.ActiveCfg = Release|x64 - {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|x64.Build.0 = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|ARM.ActiveCfg = Debug|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|ARM.Build.0 = Debug|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|ARM64.Build.0 = Debug|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|Win32.Build.0 = Debug|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.ActiveCfg = Debug|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.Build.0 = Debug|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.Build.0 = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.ActiveCfg = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.Build.0 = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.Build.0 = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.ActiveCfg = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.Build.0 = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|ARM.ActiveCfg = Release|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|ARM.Build.0 = Release|ARM - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|ARM64.ActiveCfg = Release|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|ARM64.Build.0 = Release|ARM64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.ActiveCfg = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.Build.0 = Release|Win32 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|x64.ActiveCfg = Release|x64 - {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|x64.Build.0 = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|ARM.ActiveCfg = Debug|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|ARM.Build.0 = Debug|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|ARM64.Build.0 = Debug|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|Win32.Build.0 = Debug|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|x64.ActiveCfg = Debug|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|x64.Build.0 = Debug|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.Build.0 = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.ActiveCfg = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.Build.0 = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.Build.0 = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.ActiveCfg = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.Build.0 = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|ARM.ActiveCfg = Release|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|ARM.Build.0 = Release|ARM - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|ARM64.ActiveCfg = Release|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|ARM64.Build.0 = Release|ARM64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|Win32.ActiveCfg = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|Win32.Build.0 = Release|Win32 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.ActiveCfg = Release|x64 - {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.Build.0 = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|ARM.ActiveCfg = Debug|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|ARM.Build.0 = Debug|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|ARM64.Build.0 = Debug|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|Win32.Build.0 = Debug|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|x64.ActiveCfg = Debug|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|x64.Build.0 = Debug|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.Build.0 = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.ActiveCfg = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.Build.0 = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.Build.0 = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.ActiveCfg = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.Build.0 = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|ARM.ActiveCfg = Release|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|ARM.Build.0 = Release|ARM - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|ARM64.ActiveCfg = Release|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|ARM64.Build.0 = Release|ARM64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|Win32.ActiveCfg = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|Win32.Build.0 = Release|Win32 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.ActiveCfg = Release|x64 - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.Build.0 = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|ARM.ActiveCfg = Debug|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|ARM.Build.0 = Debug|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|ARM64.ActiveCfg = Debug|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|ARM64.Build.0 = Debug|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|Win32.ActiveCfg = Debug|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|Win32.Build.0 = Debug|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|x64.ActiveCfg = Debug|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|x64.Build.0 = Debug|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|ARM.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|ARM.Build.0 = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|ARM64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|ARM64.Build.0 = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|Win32.Build.0 = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|x64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|x64.Build.0 = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|ARM.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|ARM64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|x64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|ARM.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|ARM.Build.0 = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|ARM64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|ARM64.Build.0 = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|Win32.ActiveCfg = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|Win32.Build.0 = Release|Win32 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|x64.ActiveCfg = Release|x64 - {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|x64.Build.0 = Release|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|ARM.ActiveCfg = Debug|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|ARM.Build.0 = Debug|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|ARM64.Build.0 = Debug|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|Win32.Build.0 = Debug|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|x64.ActiveCfg = Debug|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|x64.Build.0 = Debug|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|ARM.ActiveCfg = Release|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|ARM.Build.0 = Release|ARM - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|ARM64.ActiveCfg = Release|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|ARM64.Build.0 = Release|ARM64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|Win32.ActiveCfg = Release|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|Win32.Build.0 = Release|Win32 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|x64.ActiveCfg = Release|x64 - {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Release|x64.Build.0 = Release|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|ARM.ActiveCfg = Debug|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|ARM.Build.0 = Debug|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|ARM64.Build.0 = Debug|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|Win32.Build.0 = Debug|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|x64.ActiveCfg = Debug|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Debug|x64.Build.0 = Debug|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGInstrument|x64.ActiveCfg = Release|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|Win32.Build.0 = Release|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|x64.ActiveCfg = Release|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.PGUpdate|x64.Build.0 = Release|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|ARM.ActiveCfg = Release|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|ARM.Build.0 = Release|ARM - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|ARM64.ActiveCfg = Release|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|ARM64.Build.0 = Release|ARM64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|Win32.ActiveCfg = Release|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|Win32.Build.0 = Release|Win32 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.ActiveCfg = Release|x64 - {6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.Build.0 = Release|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|ARM.ActiveCfg = Debug|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|ARM.Build.0 = Debug|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|ARM64.Build.0 = Debug|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|Win32.ActiveCfg = Debug|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|Win32.Build.0 = Debug|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|x64.ActiveCfg = Debug|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|x64.Build.0 = Debug|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|x64.ActiveCfg = Release|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|Win32.Build.0 = Release|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|x64.ActiveCfg = Release|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|x64.Build.0 = Release|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|ARM.ActiveCfg = Release|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|ARM.Build.0 = Release|ARM - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|ARM64.ActiveCfg = Release|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|ARM64.Build.0 = Release|ARM64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|Win32.ActiveCfg = Release|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|Win32.Build.0 = Release|Win32 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.ActiveCfg = Release|x64 - {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.Build.0 = Release|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|ARM.ActiveCfg = Debug|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|ARM.Build.0 = Debug|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|ARM64.Build.0 = Debug|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|Win32.Build.0 = Debug|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|x64.ActiveCfg = Debug|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Debug|x64.Build.0 = Debug|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGInstrument|x64.ActiveCfg = Release|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|Win32.Build.0 = Release|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|x64.ActiveCfg = Release|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.PGUpdate|x64.Build.0 = Release|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|ARM.ActiveCfg = Release|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|ARM.Build.0 = Release|ARM - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|ARM64.ActiveCfg = Release|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|ARM64.Build.0 = Release|ARM64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|Win32.ActiveCfg = Release|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|Win32.Build.0 = Release|Win32 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|x64.ActiveCfg = Release|x64 - {2097F1C1-597C-4167-93E3-656A7D6339B2}.Release|x64.Build.0 = Release|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|ARM.ActiveCfg = Debug|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|ARM.Build.0 = Debug|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|ARM64.Build.0 = Debug|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|Win32.Build.0 = Debug|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|x64.ActiveCfg = Debug|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Debug|x64.Build.0 = Debug|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|ARM.ActiveCfg = Release|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|ARM.Build.0 = Release|ARM - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|ARM64.ActiveCfg = Release|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|ARM64.Build.0 = Release|ARM64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|Win32.ActiveCfg = Release|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|Win32.Build.0 = Release|Win32 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|x64.ActiveCfg = Release|x64 - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}.Release|x64.Build.0 = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|ARM.ActiveCfg = Debug|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|ARM.Build.0 = Debug|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|ARM64.Build.0 = Debug|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|Win32.ActiveCfg = Debug|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|Win32.Build.0 = Debug|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|x64.ActiveCfg = Debug|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Debug|x64.Build.0 = Debug|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|Win32.Build.0 = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|x64.ActiveCfg = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGInstrument|x64.Build.0 = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|Win32.Build.0 = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|x64.ActiveCfg = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.PGUpdate|x64.Build.0 = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|ARM.ActiveCfg = Release|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|ARM.Build.0 = Release|ARM - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|ARM64.ActiveCfg = Release|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|ARM64.Build.0 = Release|ARM64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|Win32.ActiveCfg = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|Win32.Build.0 = Release|Win32 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|x64.ActiveCfg = Release|x64 - {B244E787-C445-441C-BDF4-5A4F1A3A1E51}.Release|x64.Build.0 = Release|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|ARM.ActiveCfg = Debug|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|ARM.Build.0 = Debug|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|ARM64.Build.0 = Debug|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|Win32.ActiveCfg = Debug|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|Win32.Build.0 = Debug|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|x64.ActiveCfg = Debug|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Debug|x64.Build.0 = Debug|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|ARM.ActiveCfg = Release|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|ARM.Build.0 = Release|ARM - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|ARM64.ActiveCfg = Release|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|ARM64.Build.0 = Release|ARM64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|Win32.ActiveCfg = Release|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|Win32.Build.0 = Release|Win32 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|x64.ActiveCfg = Release|x64 - {384C224A-7474-476E-A01B-750EA7DE918C}.Release|x64.Build.0 = Release|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|ARM.ActiveCfg = Debug|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|ARM.Build.0 = Debug|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|ARM64.Build.0 = Debug|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|Win32.ActiveCfg = Debug|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|Win32.Build.0 = Debug|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|x64.ActiveCfg = Debug|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Debug|x64.Build.0 = Debug|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|ARM.ActiveCfg = Release|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|ARM.Build.0 = Release|ARM - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|ARM64.ActiveCfg = Release|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|ARM64.Build.0 = Release|ARM64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|Win32.ActiveCfg = Release|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|Win32.Build.0 = Release|Win32 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|x64.ActiveCfg = Release|x64 - {FCBE1EF2-E0F0-40B1-88B5-00A35D378742}.Release|x64.Build.0 = Release|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|ARM.ActiveCfg = Debug|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|ARM.Build.0 = Debug|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|ARM64.Build.0 = Debug|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|Win32.ActiveCfg = Debug|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|Win32.Build.0 = Debug|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|x64.ActiveCfg = Debug|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Debug|x64.Build.0 = Debug|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|ARM.ActiveCfg = Release|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|ARM.Build.0 = Release|ARM - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|ARM64.ActiveCfg = Release|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|ARM64.Build.0 = Release|ARM64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|Win32.ActiveCfg = Release|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|Win32.Build.0 = Release|Win32 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|x64.ActiveCfg = Release|x64 - {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}.Release|x64.Build.0 = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|ARM.ActiveCfg = Debug|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|ARM.Build.0 = Debug|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|ARM64.Build.0 = Debug|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.Build.0 = Debug|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|ARM.ActiveCfg = Release|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|ARM.Build.0 = Release|ARM - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|ARM64.ActiveCfg = Release|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|ARM64.Build.0 = Release|ARM64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.ActiveCfg = Release|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|ARM.ActiveCfg = Debug|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|ARM64.ActiveCfg = Debug|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|Win32.Build.0 = Debug|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|x64.ActiveCfg = Debug|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Debug|x64.Build.0 = Debug|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|ARM.ActiveCfg = PGInstrument|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|ARM64.ActiveCfg = PGInstrument|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|ARM.ActiveCfg = PGUpdate|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|ARM64.ActiveCfg = PGUpdate|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|ARM.ActiveCfg = Release|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|ARM64.ActiveCfg = Release|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|Win32.ActiveCfg = Release|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|Win32.Build.0 = Release|Win32 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|x64.ActiveCfg = Release|x64 - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}.Release|x64.Build.0 = Release|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|ARM.ActiveCfg = Debug|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|ARM.Build.0 = Debug|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|ARM64.Build.0 = Debug|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|Win32.ActiveCfg = Debug|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|Win32.Build.0 = Debug|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|x64.ActiveCfg = Debug|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Debug|x64.Build.0 = Debug|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|ARM.ActiveCfg = Release|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|ARM.Build.0 = Release|ARM - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|ARM64.ActiveCfg = Release|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|ARM64.Build.0 = Release|ARM64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|Win32.ActiveCfg = Release|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|Win32.Build.0 = Release|Win32 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|x64.ActiveCfg = Release|x64 - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D}.Release|x64.Build.0 = Release|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|ARM.ActiveCfg = Debug|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|ARM.Build.0 = Debug|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|ARM64.Build.0 = Debug|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|Win32.ActiveCfg = Debug|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|Win32.Build.0 = Debug|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|x64.ActiveCfg = Debug|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Debug|x64.Build.0 = Debug|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|ARM.ActiveCfg = Release|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|ARM.Build.0 = Release|ARM - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|ARM64.ActiveCfg = Release|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|ARM64.Build.0 = Release|ARM64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|Win32.ActiveCfg = Release|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|Win32.Build.0 = Release|Win32 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|x64.ActiveCfg = Release|x64 - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D}.Release|x64.Build.0 = Release|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|ARM.ActiveCfg = Debug|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|ARM.Build.0 = Debug|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|ARM64.ActiveCfg = Debug|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|Win32.Build.0 = Debug|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|x64.ActiveCfg = Debug|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.Debug|x64.Build.0 = Debug|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|ARM.ActiveCfg = PGInstrument|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|ARM64.ActiveCfg = PGInstrument|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|ARM.ActiveCfg = PGUpdate|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|ARM64.ActiveCfg = PGUpdate|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|ARM.ActiveCfg = Release|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|ARM64.ActiveCfg = Release|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|Win32.ActiveCfg = Release|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|Win32.Build.0 = Release|Win32 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|x64.ActiveCfg = Release|x64 - {AB603547-1E2A-45B3-9E09-B04596006393}.Release|x64.Build.0 = Release|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|ARM.ActiveCfg = Debug|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|ARM.Build.0 = Debug|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|ARM64.Build.0 = Debug|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|Win32.ActiveCfg = Debug|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|Win32.Build.0 = Debug|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|x64.ActiveCfg = Debug|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Debug|x64.Build.0 = Debug|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|ARM.ActiveCfg = Release|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|ARM.Build.0 = Release|ARM - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|ARM64.ActiveCfg = Release|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|ARM64.Build.0 = Release|ARM64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|Win32.ActiveCfg = Release|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|Win32.Build.0 = Release|Win32 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|x64.ActiveCfg = Release|x64 - {CB435430-EBB1-478B-8F4E-C256F6838F55}.Release|x64.Build.0 = Release|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|ARM.ActiveCfg = Debug|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|ARM.Build.0 = Debug|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|ARM64.Build.0 = Debug|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|Win32.ActiveCfg = Debug|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|Win32.Build.0 = Debug|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|x64.ActiveCfg = Debug|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Debug|x64.Build.0 = Debug|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|ARM.ActiveCfg = Release|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|ARM.Build.0 = Release|ARM - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|ARM64.ActiveCfg = Release|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|ARM64.Build.0 = Release|ARM64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|Win32.ActiveCfg = Release|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|Win32.Build.0 = Release|Win32 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|x64.ActiveCfg = Release|x64 - {54B1431F-B86B-4ACB-B28C-88BCF93191D8}.Release|x64.Build.0 = Release|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|ARM.ActiveCfg = Debug|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|ARM.Build.0 = Debug|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|ARM64.Build.0 = Debug|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|Win32.ActiveCfg = Debug|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|Win32.Build.0 = Debug|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|x64.ActiveCfg = Debug|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Debug|x64.Build.0 = Debug|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|ARM.ActiveCfg = Release|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|ARM.Build.0 = Release|ARM - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|ARM64.ActiveCfg = Release|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|ARM64.Build.0 = Release|ARM64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|Win32.ActiveCfg = Release|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|Win32.Build.0 = Release|Win32 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|x64.ActiveCfg = Release|x64 - {01FDF29A-40A1-46DF-84F5-85EBBD2A2410}.Release|x64.Build.0 = Release|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM.ActiveCfg = Debug|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM.Build.0 = Debug|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|ARM64.Build.0 = Debug|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|Win32.ActiveCfg = Debug|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|Win32.Build.0 = Debug|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|x64.ActiveCfg = Debug|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Debug|x64.Build.0 = Debug|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM.Build.0 = PGInstrument|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|Win32.Build.0 = PGInstrument|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|x64.ActiveCfg = PGInstrument|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGInstrument|x64.Build.0 = PGInstrument|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM.Build.0 = PGUpdate|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|Win32.Build.0 = PGUpdate|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|x64.ActiveCfg = PGUpdate|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.PGUpdate|x64.Build.0 = PGUpdate|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM.ActiveCfg = Release|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM.Build.0 = Release|ARM - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM64.ActiveCfg = Release|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|ARM64.Build.0 = Release|ARM64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|Win32.ActiveCfg = Release|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|Win32.Build.0 = Release|Win32 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|x64.ActiveCfg = Release|x64 - {7467D86C-1CEB-4CB9-B65E-E9A54ABDC933}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5C33FFD3-C8DC-4A54-B842-8BA9846BDFFE} - EndGlobalSection -EndGlobal diff --git a/PCbuild/prepare_libffi.bat b/PCbuild/prepare_libffi.bat deleted file mode 100644 index ef36c36e058a15..00000000000000 --- a/PCbuild/prepare_libffi.bat +++ /dev/null @@ -1,212 +0,0 @@ -@echo off -goto :Run - -:Usage -echo. -echo Before running prepare_libffi.bat -echo LIBFFI_SOURCE environment variable must be set to the location of -echo of python-source-deps clone of libffi branch -echo VCVARSALL must be set to location of vcvarsall.bat -echo cygwin must be installed (see below) -echo SH environment variable must be set to the location of sh.exe -echo. -echo Tested with cygwin-x86 from https://www.cygwin.com/install.html -echo Select http://mirrors.kernel.org as the download site -echo Include the following cygwin packages in cygwin configuration: -echo make, autoconf, automake, libtool, dejagnu -echo. -echo NOTE: dejagnu is only required for running tests. -echo set LIBFFI_TEST=1 to run tests (optional) -echo. -echo Based on https://github.com/libffi/libffi/blob/master/.appveyor.yml -echo. -echo. -echo.Available flags: -echo. -x64 enable x64 build -echo. -x86 enable x86 build -echo. -arm32 enable arm32 build -echo. -arm64 enable arm64 build -echo. -? this help -echo. --install-cygwin install cygwin to c:\cygwin -exit /b 127 - -:Run - -set BUILD_X64= -set BUILD_X86= -set BUILD_ARM32= -set BUILD_ARM64= -set BUILD_PDB= -set BUILD_NOOPT= -set COPY_LICENSE= -set INSTALL_CYGWIN= - -:CheckOpts -if "%1"=="" goto :CheckOptsDone -if /I "%1"=="-x64" (set BUILD_X64=1) & shift & goto :CheckOpts -if /I "%1"=="-x86" (set BUILD_X86=1) & shift & goto :CheckOpts -if /I "%1"=="-win32" (set BUILD_X86=1) & shift & goto :CheckOpts -if /I "%1"=="-arm32" (set BUILD_ARM32=1) & shift & goto :CheckOpts -if /I "%1"=="-arm64" (set BUILD_ARM64=1) & shift & goto :CheckOpts -if /I "%1"=="-pdb" (set BUILD_PDB=-g) & shift & goto :CheckOpts -if /I "%1"=="-noopt" (set BUILD_NOOPT=CFLAGS='-Od -warn all') & shift & goto :CheckOpts -if /I "%1"=="-license" (set COPY_LICENSE=1) & shift & goto :CheckOpts -if /I "%1"=="-?" goto :Usage -if /I "%1"=="--install-cygwin" (set INSTALL_CYGWIN=1) & shift & goto :CheckOpts -goto :Usage - -:CheckOptsDone - -if NOT DEFINED BUILD_X64 if NOT DEFINED BUILD_X86 if NOT DEFINED BUILD_ARM32 if NOT DEFINED BUILD_ARM64 ( - set BUILD_X64=1 - set BUILD_X86=1 - set BUILD_ARM32=0 - set BUILD_ARM64=1 - set COPY_LICENSE=1 -) - -if "%INSTALL_CYGWIN%"=="1" call :InstallCygwin - -setlocal -if NOT DEFINED SH if exist c:\cygwin\bin\sh.exe set SH=c:\cygwin\bin\sh.exe - -if NOT DEFINED VCVARSALL ( - for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO @(set VCVARSALL="%%i\VC\Auxiliary\Build\vcvarsall.bat") -) -if ^%VCVARSALL:~0,1% NEQ ^" SET VCVARSALL="%VCVARSALL%" - -if NOT DEFINED LIBFFI_SOURCE echo.&&echo ERROR LIBFFI_SOURCE environment variable not set && goto :Usage -if NOT DEFINED SH echo ERROR SH environment variable not set && goto :Usage - -if not exist %SH% echo ERROR %SH% does not exist && goto :Usage -if not exist %LIBFFI_SOURCE% echo ERROR %LIBFFI_SOURCE% does not exist && goto :Usage - -set OLDPWD=%LIBFFI_SOURCE% -pushd %LIBFFI_SOURCE% - -%SH% --login -lc "cygcheck -dc cygwin" -set GET_MSVCC=%SH% -lc "cd $OLDPWD; export MSVCC=`/usr/bin/find $PWD -name msvcc.sh`; echo ${MSVCC};" -FOR /F "usebackq delims==" %%i IN (`%GET_MSVCC%`) do @set MSVCC=%%i - -echo. -echo VCVARSALL : %VCVARSALL% -echo SH : %SH% -echo LIBFFI_SOURCE: %LIBFFI_SOURCE% -echo MSVCC : %MSVCC% -echo. - -if not exist Makefile.in ( - %SH% -lc "(cd $LIBFFI_SOURCE; ./autogen.sh;)" - if errorlevel 1 exit /B 1 -) - -if "%BUILD_X64%"=="1" call :BuildOne x64 x86_64-w64-cygwin x86_64-w64-cygwin -if errorlevel 1 exit /B %ERRORLEVEL% -if "%BUILD_X86%"=="1" call :BuildOne x86 i686-pc-cygwin i686-pc-cygwin -if errorlevel 1 exit /B %ERRORLEVEL% -if "%BUILD_ARM32%"=="1" call :BuildOne x86_arm i686-pc-cygwin arm-w32-cygwin -if errorlevel 1 exit /B %ERRORLEVEL% -if "%BUILD_ARM64%"=="1" call :BuildOne x86_arm64 i686-pc-cygwin aarch64-w64-cygwin -if errorlevel 1 exit /B %ERRORLEVEL% -if "%COPY_LICENSE%"=="1" copy /y "%LIBFFI_SOURCE%\LICENSE" "%LIBFFI_OUT%\LICENSE" - -popd -endlocal -exit /b 0 -REM all done - - -REM this subroutine is called once for each architecture -:BuildOne - -setlocal - -REM Initialize variables -set VCVARS_PLATFORM=%1 -set BUILD=%2 -set HOST=%3 -set ASSEMBLER= -set SRC_ARCHITECTURE=x86 - -if NOT DEFINED VCVARS_PLATFORM echo ERROR bad VCVARS_PLATFORM&&exit /b 123 - -if /I "%VCVARS_PLATFORM%" EQU "x64" ( - set ARCH=amd64 - set ARTIFACTS=%LIBFFI_SOURCE%\x86_64-w64-cygwin - set ASSEMBLER=-m64 - set SRC_ARCHITECTURE=x86 -) -if /I "%VCVARS_PLATFORM%" EQU "x86" ( - set ARCH=win32 - set ARTIFACTS=%LIBFFI_SOURCE%\i686-pc-cygwin - set ASSEMBLER= - set SRC_ARCHITECTURE=x86 -) -if /I "%VCVARS_PLATFORM%" EQU "x86_arm" ( - set ARCH=arm32 - set ARTIFACTS=%LIBFFI_SOURCE%\arm-w32-cygwin - set ASSEMBLER=-marm - set SRC_ARCHITECTURE=ARM -) -if /I "%VCVARS_PLATFORM%" EQU "x86_arm64" ( - set ARCH=arm64 - set ARTIFACTS=%LIBFFI_SOURCE%\aarch64-w64-cygwin - set ASSEMBLER=-marm64 - set SRC_ARCHITECTURE=aarch64 -) - -if NOT DEFINED LIBFFI_OUT set LIBFFI_OUT=%~dp0\..\externals\libffi -set _LIBFFI_OUT=%LIBFFI_OUT%\%ARCH% - -echo get VS build environment -call %VCVARSALL% %VCVARS_PLATFORM% - -echo clean %_LIBFFI_OUT% -if exist %_LIBFFI_OUT% (rd %_LIBFFI_OUT% /s/q) - -echo ================================================================ -echo Configure the build to generate fficonfig.h and ffi.h -echo ================================================================ -%SH% -lc "(cd $OLDPWD; ./configure CC='%MSVCC% %ASSEMBLER% %BUILD_PDB%' CXX='%MSVCC% %ASSEMBLER% %BUILD_PDB%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' %BUILD_NOOPT% NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST;)" -if errorlevel 1 exit /B %ERRORLEVEL% - -echo ================================================================ -echo Building libffi -echo ================================================================ -%SH% -lc "(cd $OLDPWD; export PATH=/usr/bin:$PATH; cp src/%SRC_ARCHITECTURE%/ffitarget.h include; make; find .;)" -if errorlevel 1 exit /B %ERRORLEVEL% - -REM Tests are not needed to produce artifacts -if "%LIBFFI_TEST%" EQU "1" ( - echo "Running tests..." - %SH% -lc "(cd $OLDPWD; export PATH=/usr/bin:$PATH; cp `find $PWD -name 'libffi-?.dll'` $HOST/testsuite/; make check; cat `find ./ -name libffi.log`)" -) else ( - echo "Not running tests" -) - - -echo copying files to %_LIBFFI_OUT% -if not exist %_LIBFFI_OUT%\include (md %_LIBFFI_OUT%\include) -copy %ARTIFACTS%\.libs\libffi-*.dll %_LIBFFI_OUT% || exit /B 1 -copy %ARTIFACTS%\.libs\libffi-*.lib %_LIBFFI_OUT% || exit /B 1 -copy %ARTIFACTS%\.libs\libffi-*.pdb %_LIBFFI_OUT% -copy %ARTIFACTS%\fficonfig.h %_LIBFFI_OUT%\include || exit /B 1 -copy %ARTIFACTS%\include\*.h %_LIBFFI_OUT%\include || exit /B 1 - -endlocal -exit /b - -:InstallCygwin -setlocal - -if NOT DEFINED CYG_ROOT (set CYG_ROOT=c:/cygwin) -if NOT DEFINED CYG_CACHE (set CYG_CACHE=C:/cygwin/var/cache/setup) -if NOT DEFINED CYG_MIRROR (set CYG_MIRROR=http://mirrors.kernel.org/sourceware/cygwin/) - -powershell -c "md $env:CYG_ROOT -ErrorAction SilentlyContinue" -powershell -c "$setup = $env:CYG_ROOT+'/setup.exe'; if (!(Test-Path $setup)){invoke-webrequest https://cygwin.com/setup-x86_64.exe -outfile $setup} -%CYG_ROOT%/setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P make -P autoconf -P automake -P libtool -P dejagnu - -endlocal -exit /b - diff --git a/PCbuild/prepare_ssl.bat b/PCbuild/prepare_ssl.bat deleted file mode 100644 index 88fd0225f5ea94..00000000000000 --- a/PCbuild/prepare_ssl.bat +++ /dev/null @@ -1,58 +0,0 @@ -@echo off -rem Downloads and build sources for libraries we depend upon - -goto Run -:Usage -echo.%~nx0 [flags and arguments] -echo. -echo.Download and build OpenSSL. This should only be performed in order to -echo.update the binaries kept online - in most cases, the files downloaded -echo.by the get_externals.bat script are sufficient for building CPython. -echo. -echo.Available flags: -echo. -h Display this help message -echo. -echo.Available arguments: -echo. --certificate (-c) The signing certificate to use for binaries. -echo. --organization The github organization to obtain sources from. -echo. -exit /b 127 - -:Run -setlocal -if "%PCBUILD%"=="" (set PCBUILD=%~dp0) -if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals) - -set ORG_SETTING= - -:CheckOpts -if "%~1"=="-h" shift & goto Usage -if "%~1"=="--certificate" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts -if "%~1"=="-c" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts -if "%~1"=="--organization" (set ORG_SETTING=--organization "%~2") && shift && shift && goto CheckOpts - -if "%~1"=="" goto Build -echo Unrecognized option: %1 -goto Usage - -:Build -call "%PCBUILD%\find_msbuild.bat" %MSBUILD% -if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) - -call "%PCBUILD%\find_python.bat" "%PYTHON%" -if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3) - -call "%PCBUILD%\get_externals.bat" --openssl-src --no-openssl %ORG_SETTING% - -if "%PERL%" == "" where perl > "%TEMP%\perl.loc" 2> nul && set /P PERL= <"%TEMP%\perl.loc" & del "%TEMP%\perl.loc" -if "%PERL%" == "" (echo Cannot locate perl.exe on PATH or as PERL variable & exit /b 4) - -%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32 -if errorlevel 1 exit /b -%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=x64 -if errorlevel 1 exit /b -%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM -if errorlevel 1 exit /b -%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM64 -if errorlevel 1 exit /b - diff --git a/PCbuild/prepare_ssl.py b/PCbuild/prepare_ssl.py deleted file mode 100755 index 0f3c63ee24ffba..00000000000000 --- a/PCbuild/prepare_ssl.py +++ /dev/null @@ -1,203 +0,0 @@ -#! /usr/bin/env python3 -# Script for preparing OpenSSL for building on Windows. -# Uses Perl to create nmake makefiles and otherwise prepare the way -# for building on 32 or 64 bit platforms. - -# Script originally authored by Mark Hammond. -# Major revisions by: -# Martin v. Löwis -# Christian Heimes -# Zachary Ware - -# THEORETICALLY, you can: -# * Unpack the latest OpenSSL release where $(opensslDir) in -# PCbuild\pyproject.props expects it to be. -# * Install ActivePerl and ensure it is somewhere on your path. -# * Run this script with the OpenSSL source dir as the only argument. -# -# it should configure OpenSSL such that it is ready to be built by -# ssl.vcxproj on 32 or 64 bit platforms. - -from __future__ import print_function - -import os -import re -import sys -import subprocess -from shutil import copy - -# Find all "foo.exe" files on the PATH. -def find_all_on_path(filename, extras=None): - entries = os.environ["PATH"].split(os.pathsep) - ret = [] - for p in entries: - fname = os.path.abspath(os.path.join(p, filename)) - if os.path.isfile(fname) and fname not in ret: - ret.append(fname) - if extras: - for p in extras: - fname = os.path.abspath(os.path.join(p, filename)) - if os.path.isfile(fname) and fname not in ret: - ret.append(fname) - return ret - - -# Find a suitable Perl installation for OpenSSL. -# cygwin perl does *not* work. ActivePerl does. -# Being a Perl dummy, the simplest way I can check is if the "Win32" package -# is available. -def find_working_perl(perls): - for perl in perls: - try: - subprocess.check_output([perl, "-e", "use Win32;"]) - except subprocess.CalledProcessError: - continue - else: - return perl - - if perls: - print("The following perl interpreters were found:") - for p in perls: - print(" ", p) - print(" None of these versions appear suitable for building OpenSSL") - else: - print("NO perl interpreters were found on this machine at all!") - print(" Please install ActivePerl and ensure it appears on your path") - - -def copy_includes(makefile, suffix): - dir = 'inc'+suffix+'\\openssl' - try: - os.makedirs(dir) - except OSError: - pass - copy_if_different = r'$(PERL) $(SRC_D)\util\copy-if-different.pl' - with open(makefile) as fin: - for line in fin: - if copy_if_different in line: - perl, script, src, dest = line.split() - if not '$(INCO_D)' in dest: - continue - # We're in the root of the source tree - src = src.replace('$(SRC_D)', '.').strip('"') - dest = dest.strip('"').replace('$(INCO_D)', dir) - print('copying', src, 'to', dest) - copy(src, dest) - - -def run_configure(configure, do_script): - print("perl Configure "+configure+" no-idea no-mdc2") - os.system("perl Configure "+configure+" no-idea no-mdc2") - print(do_script) - os.system(do_script) - -def fix_uplink(): - # uplink.c tries to find the OPENSSL_Applink function exported from the current - # executable. However, we export it from _ssl[_d].pyd instead. So we update the - # module name here before building. - with open('ms\\uplink.c', 'r', encoding='utf-8') as f1: - code = list(f1) - os.replace('ms\\uplink.c', 'ms\\uplink.c.orig') - already_patched = False - with open('ms\\uplink.c', 'w', encoding='utf-8') as f2: - for line in code: - if not already_patched: - if re.search('MODIFIED FOR CPYTHON _ssl MODULE', line): - already_patched = True - elif re.match(r'^\s+if\s*\(\(h\s*=\s*GetModuleHandle[AW]?\(NULL\)\)\s*==\s*NULL\)', line): - f2.write("/* MODIFIED FOR CPYTHON _ssl MODULE */\n") - f2.write('if ((h = GetModuleHandleW(L"_ssl.pyd")) == NULL) if ((h = GetModuleHandleW(L"_ssl_d.pyd")) == NULL)\n') - already_patched = True - f2.write(line) - if not already_patched: - print("WARN: failed to patch ms\\uplink.c") - -def prep(arch): - makefile_template = "ms\\ntdll{}.mak" - generated_makefile = makefile_template.format('') - if arch == "x86": - configure = "VC-WIN32" - do_script = "ms\\do_nasm" - suffix = "32" - elif arch == "amd64": - configure = "VC-WIN64A" - do_script = "ms\\do_win64a" - suffix = "64" - else: - raise ValueError('Unrecognized platform: %s' % arch) - - print("Creating the makefiles...") - sys.stdout.flush() - # run configure, copy includes, patch files - run_configure(configure, do_script) - makefile = makefile_template.format(suffix) - try: - os.unlink(makefile) - except FileNotFoundError: - pass - os.rename(generated_makefile, makefile) - copy_includes(makefile, suffix) - - print('patching ms\\uplink.c...') - fix_uplink() - -def main(): - if len(sys.argv) == 1: - print("Not enough arguments: directory containing OpenSSL", - "sources must be supplied") - sys.exit(1) - - if len(sys.argv) == 3 and sys.argv[2] not in ('x86', 'amd64'): - print("Second argument must be x86 or amd64") - sys.exit(1) - - if len(sys.argv) > 3: - print("Too many arguments supplied, all we need is the directory", - "containing OpenSSL sources and optionally the architecture") - sys.exit(1) - - ssl_dir = sys.argv[1] - arch = sys.argv[2] if len(sys.argv) >= 3 else None - - if not os.path.isdir(ssl_dir): - print(ssl_dir, "is not an existing directory!") - sys.exit(1) - - # perl should be on the path, but we also look in "\perl" and "c:\\perl" - # as "well known" locations - perls = find_all_on_path("perl.exe", [r"\perl\bin", - r"C:\perl\bin", - r"\perl64\bin", - r"C:\perl64\bin", - ]) - perl = find_working_perl(perls) - if perl: - print("Found a working perl at '%s'" % (perl,)) - else: - sys.exit(1) - if not find_all_on_path('nmake.exe'): - print('Could not find nmake.exe, try running env.bat') - sys.exit(1) - if not find_all_on_path('nasm.exe'): - print('Could not find nasm.exe, please add to PATH') - sys.exit(1) - sys.stdout.flush() - - # Put our working Perl at the front of our path - os.environ["PATH"] = os.path.dirname(perl) + \ - os.pathsep + \ - os.environ["PATH"] - - old_cwd = os.getcwd() - try: - os.chdir(ssl_dir) - if arch: - prep(arch) - else: - for arch in ['amd64', 'x86']: - prep(arch) - finally: - os.chdir(old_cwd) - -if __name__=='__main__': - main() diff --git a/PCbuild/prepare_tcltk.bat b/PCbuild/prepare_tcltk.bat deleted file mode 100644 index ecef247282094d..00000000000000 --- a/PCbuild/prepare_tcltk.bat +++ /dev/null @@ -1,56 +0,0 @@ -@echo off -rem Downloads and build sources for libraries we depend upon - -goto Run -:Usage -echo.%~nx0 [flags and arguments] -echo. -echo.Download and build Tcl/Tk. This should only be performed in order to -echo.update the binaries kept online - in most cases, the files downloaded -echo.by the get_externals.bat script are sufficient for building CPython. -echo. -echo.Available flags: -echo. -h Display this help message -echo. -echo.Available arguments: -echo. --certificate (-c) The signing certificate to use for binaries. -echo. --organization The github organization to obtain sources from. -echo. -exit /b 127 - -:Run -setlocal - -if "%PCBUILD%"=="" (set PCBUILD=%~dp0) -if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals) - -set CERT_SETTING= -set ORG_SETTING= - -:CheckOpts -if "%~1"=="-h" shift & goto Usage -if "%~1"=="--certificate" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts -if "%~1"=="-c" (set SigningCertificate=%~2) && shift && shift & goto CheckOpts -if "%~1"=="--organization" (set ORG_SETTING=--organization "%~2") && shift && shift && goto CheckOpts - -if "%~1"=="" goto Build -echo Unrecognized option: %1 -goto Usage - -:Build -call "%PCBUILD%\find_msbuild.bat" %MSBUILD% -if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) - -rem call "%PCBUILD%\find_python.bat" "%PYTHON%" -rem if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3) - -call "%PCBUILD%\get_externals.bat" --tkinter-src %ORG_SETTING% - -%MSBUILD% "%PCBUILD%\tcl.vcxproj" /p:Configuration=Release /p:Platform=Win32 -%MSBUILD% "%PCBUILD%\tk.vcxproj" /p:Configuration=Release /p:Platform=Win32 - -%MSBUILD% "%PCBUILD%\tcl.vcxproj" /p:Configuration=Release /p:Platform=x64 -%MSBUILD% "%PCBUILD%\tk.vcxproj" /p:Configuration=Release /p:Platform=x64 - -%MSBUILD% "%PCBUILD%\tcl.vcxproj" /p:Configuration=Release /p:Platform=ARM64 -%MSBUILD% "%PCBUILD%\tk.vcxproj" /p:Configuration=Release /p:Platform=ARM64 diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj deleted file mode 100644 index 92ecac2f7a2255..00000000000000 --- a/PCbuild/pyexpat.vcxproj +++ /dev/null @@ -1,122 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - <_ProjectFileVersion>10.0.30319.1 - {D06B6426-4762-44CC-8BAD-D79052507F2F} - pyexpat - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - - $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/pyexpat.vcxproj.filters b/PCbuild/pyexpat.vcxproj.filters deleted file mode 100644 index e63cb9c63063ac..00000000000000 --- a/PCbuild/pyexpat.vcxproj.filters +++ /dev/null @@ -1,50 +0,0 @@ - - - - - {ddae77a6-7ca0-4a1b-b71c-deea5f4025de} - - - {5af9d40c-fc46-4640-ad84-3d1dd34a71d7} - - - {f1dbbdb5-41e5-4a88-bf8e-13da010c0ce4} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/pylauncher.vcxproj b/PCbuild/pylauncher.vcxproj deleted file mode 100644 index 35f2f7e505bf92..00000000000000 --- a/PCbuild/pylauncher.vcxproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {7B2727B5-5A3F-40EE-A866-43A13CD31446} - pylauncher - py - false - - - - - Application - Unicode - - - - - - ClCompile - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - shell32.lib;pathcch.lib;%(AdditionalDependencies) - Console - - - - - - - - - - - - - - - diff --git a/PCbuild/pylauncher.vcxproj.filters b/PCbuild/pylauncher.vcxproj.filters deleted file mode 100644 index 17d0389ca50f1c..00000000000000 --- a/PCbuild/pylauncher.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props deleted file mode 100644 index c4cdef87dbfdeb..00000000000000 --- a/PCbuild/pyproject.props +++ /dev/null @@ -1,270 +0,0 @@ - - - - - <__PyProject_Props_Imported>true - <_ProjectFileVersion>10.0.30319.1 - 10.0 - $(BuildPath) - $(OutDir)\ - $(MSBuildThisFileDirectory)obj\ - $(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\$(ProjectName)\ - $(IntDir.Replace(`\\`, `\`)) - - $(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\pythoncore\ - $(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)_frozen\ - $(ProjectName) - $(TargetName)$(PyDebugExt) - false - false - true - true - false - false - false - - - - $(TargetName)$(TargetExt) - <_TargetNameSep>$(TargetNameExt.LastIndexOf(`.`)) - $(TargetNameExt.Substring(0, $(_TargetNameSep))) - $(TargetNameExt.Substring($(_TargetNameSep))) - - - - <_VCToolsVersion>$([System.Version]::Parse(`$(VCToolsVersion)`).Major).$([System.Version]::Parse(`$(VCToolsVersion)`).Minor) - - - true - true - - - - <_DebugPreprocessorDefinition>NDEBUG; - <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG; - <_PlatformPreprocessorDefinition>_WIN32; - <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64; - <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64' and $(PlatformToolset) != 'ClangCL'">_M_X64;$(_PlatformPreprocessorDefinition) - <_Py3NamePreprocessorDefinition>PY3_DLLNAME=L"$(Py3DllName)$(PyDebugExt)"; - - - - $(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)Include\internal\mimalloc;$(GeneratedPyConfigDir);$(PySourcePath)PC;%(AdditionalIncludeDirectories) - WIN32;$(_Py3NamePreprocessorDefinition);$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions) - _Py_USING_PGO=1;%(PreprocessorDefinitions) - - MaxSpeed - true - true - - MultiThreadedDLL - true - Level3 - ProgramDatabase - Default - true - true - $(EnableControlFlowGuard) - true - /utf-8 %(AdditionalOptions) - -Wno-deprecated-non-prototype -Wno-unused-label -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions) - -flto %(AdditionalOptions) - -d2pattern-opt-disable:-932189325 %(AdditionalOptions) - -d2ssa-patterns-all- %(AdditionalOptions) - /sourceDependencies "$(IntDir.Trim(`\`))" %(AdditionalOptions) - - - OnlyExplicitInline - Disabled - false - MultiThreadedDebugDLL - - - Strict - - - $(OutDir);%(AdditionalLibraryDirectories) - true - $(OutDir)$(TargetName).pdb - Windows - true - true - true - LIBC;%(IgnoreSpecificDefaultLibraries) - MachineX86 - MachineX64 - MachineARM - MachineARM64 - UseLinkTimeCodeGeneration - advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies) - /OPT:REF,NOICF %(AdditionalOptions) - -d2:-pattern-opt-disable:-932189325 %(AdditionalOptions) - /GENPROFILE %(AdditionalOptions) - /USEPROFILE %(AdditionalOptions) - - - false - true - - - $(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories) - ORIGINAL_FILENAME=\"$(TargetName)$(TargetExt)\";FIELD3=$(Field3Value);$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions) - 0x0409 - - - $(_DebugPreprocessorDefinition)%(PreprocessorDefinitions) - true - true - Win32 - X64 - $(IntDir) - $(MSBuildProjectName)_i.c - $(MSBuildProjectName)_p.c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_PGCFiles Include="$(OutDir)instrumented\$(TargetName)!*.pgc" /> - <_PGDFile Include="$(OutDir)instrumented\$(TargetName).pgd" /> - <_CopyFiles Include="@(_PGCFiles);@(_PGDFile)" Condition="Exists(%(FullPath))" /> - - - - - - - - $(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\$(DefaultWindowsSDKVersion)\x86 - $(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86 - $(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86 - $(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86 - $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\ - <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificate)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /a /n "$(SigningCertificate)" /fd sha256 /tr http://timestamp.digicert.com/ /td sha256 /d "Python $(PythonVersion)" - <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificateSha1)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /a /sha1 "$(SigningCertificateSha1)" /fd sha256 /tr http://timestamp.digicert.com/ /td sha256 /d "Python $(PythonVersion)" - <_MakeCatCommand Condition="Exists($(SdkBinPath))">"$(SdkBinPath)\makecat.exe" - - - - - - - - - - - - $(VCInstallDir)\redist\ - - - - - <_RedistFiles Include="$(VCInstallDir)\Redist\MSVC\*\*.*" /> - - - <_RedistDir>%(_RedistFiles.Directory) - $([System.IO.Path]::GetFileName($(_RedistDir.Trim(`\`)))) - - - - - $(VCInstallDir)\Redist\MSVC\$(VCToolsRedistVersion)\ - - - - $(VCRedistDir)x86\ - $(VCRedistDir)$(Platform)\ - - - - - - - - - - - - - - - - - - - - - - - - @(_CmdExeLines) - - - - - diff --git a/PCbuild/pyshellext.vcxproj b/PCbuild/pyshellext.vcxproj deleted file mode 100644 index ea432d6bc9a3f3..00000000000000 --- a/PCbuild/pyshellext.vcxproj +++ /dev/null @@ -1,117 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782} - pyshellext - pyshellext - false - - - - - DynamicLibrary - Unicode - - - - - - ClCompile - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - version.lib;shlwapi.lib;%(AdditionalDependencies) - Console - ..\PC\pyshellext.def - - - true - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/pyshellext.vcxproj.filters b/PCbuild/pyshellext.vcxproj.filters deleted file mode 100644 index 77cd3060857a80..00000000000000 --- a/PCbuild/pyshellext.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/python.props b/PCbuild/python.props deleted file mode 100644 index 93af005c0f8bf4..00000000000000 --- a/PCbuild/python.props +++ /dev/null @@ -1,285 +0,0 @@ - - - - <__Python_Props_Imported>true - Win32 - Release - - v143 - v143 - v142 - v141 - v140 - v120 - v110 - v100 - - $(BasePlatformToolset) - false - true - - - amd64 - arm32 - arm64 - win32 - - - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\)) - $(PySourcePath)\ - - - $(PySourcePath)PCbuild\win32\ - $(Py_OutDir)\win32\ - $(PySourcePath)PCbuild\amd64\ - $(Py_OutDir)\amd64\ - $(PySourcePath)PCbuild\arm32\ - $(Py_OutDir)\arm32\ - $(PySourcePath)PCbuild\arm64\ - $(Py_OutDir)\arm64\ - $(BuildPath32) - $(BuildPath64) - $(BuildPathArm32) - $(BuildPathArm64) - $(PySourcePath)PCbuild\$(ArchName)\ - $(BuildPath)\ - $(BuildPath)instrumented\ - - - ..\\.. - ..\\..\\.. - - - - - $(EXTERNALS_DIR) - $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) - $(ExternalsDir)\ - - - - - - $(ExternalsDir)sqlite-3.50.4.0\ - $(ExternalsDir)bzip2-1.0.8\ - $(ExternalsDir)xz-5.2.5\ - $(ExternalsDir)libffi-3.4.4\ - $(libffiDir)$(ArchName)\ - $(libffiOutDir)include - $(ExternalsDir)\mpdecimal-4.0.0\ - $(ExternalsDir)openssl-3.5.9\ - $(ExternalsDir)openssl-bin-3.5.9\$(ArchName)\ - $(opensslOutDir)include - $(ExternalsDir)\nasm-2.11.06\ - $(ExternalsDir)\zlib-1.3.1\ - - - - - _d - - - -test - - - -32 - -arm32 - -arm64 - - - true - - - - true - - - - true - - - - - <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) - <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) - - <_RegistryVersion Condition="$(_RegistryVersion) != '' and !$(_RegistryVersion.EndsWith('.0'))">$(_RegistryVersion).0 - - - 10.0.10586.0 - $(_RegistryVersion) - - - - - <_Message>Failed to locate a Windows SDK installation. - <_Message>$(_Message) If the build fails, please use the Visual Studio Installer to install the Windows SDK. - <_Message>$(_Message) (Ignore the version number specified in the error message and select the latest.) - - - - - - $(DefaultWindowsSDKVersion) - - - - - <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`)) - $([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value) - $([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value) - $([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value) - <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value) - $([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value) - 15 - 10 - 11 - 12 - a$(ReleaseSerial) - b$(ReleaseSerial) - rc$(ReleaseSerial) - - - - - $([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value) - $([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value) - $([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value) - $([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value) - <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value) - $([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value) - 0 - 15 - 10 - 11 - 12 - - - - $(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber) - $(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName) - $([msbuild]::BitwiseOr( - $([msbuild]::Multiply($(MajorVersionNumber), 16777216)), - $([msbuild]::BitwiseOr( - $([msbuild]::Multiply($(MinorVersionNumber), 65536)), - $([msbuild]::BitwiseOr( - $([msbuild]::Multiply($(MicroVersionNumber), 256)), - $([msbuild]::BitwiseOr( - $([msbuild]::Multiply($(ReleaseLevelNumber), 16)), - $(ReleaseSerial) - )) - )) - )) - )) - $([msbuild]::Add( - $(ReleaseSerial), - $([msbuild]::Add( - $([msbuild]::Multiply($(ReleaseLevelNumber), 10)), - $([msbuild]::Multiply($(MicroVersionNumber), 1000)) - )) - )) - $([msbuild]::Add($(Field3Value), 9000)) - - - python$(MajorVersionNumber).$(MinorVersionNumber)t - python - $(BuildPath)$(PyExeName)$(PyDebugExt).exe - pythonw$(MajorVersionNumber).$(MinorVersionNumber)t - pythonw - - - python$(MajorVersionNumber)$(MinorVersionNumber)t$(PyDebugExt) - python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt) - - python3t - python3 - - - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win32 - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm32 - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm64 - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64 - - - $(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt) - - - .cp$(MajorVersionNumber)$(MinorVersionNumber)t-win32 - .cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_arm32 - .cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_arm64 - .cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_amd64 - - - $(MajorVersionNumber).$(MinorVersionNumber)t$(PyArchExt)$(PyTestExt) - - - - - .pyd - - - - $(FreethreadedPydTag) - - - $(PydTag).pyd - - - $(FreethreadedSysWinVer) - - - - - - - - - - - - - - diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj deleted file mode 100644 index 4a99ffc677c287..00000000000000 --- a/PCbuild/python.vcxproj +++ /dev/null @@ -1,166 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} - - - - - $(PyExeName) - Application - false - MultiByte - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions) - - - Console - 2000000 - 12000000 - 12000000 - - 3000000 - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - - - - - - - - - ucrtbase - ucrtbased - - - - - - <_Content>@rem This script invokes the most recently built Python with all arguments -@rem passed through to the interpreter. This file is generated by the -@rem build process and any changes *will* be thrown away by the next -@rem rebuild. -@rem This is only meant as a convenience for developing CPython -@rem and using it outside of that context is ill-advised. -@echo Running $(Configuration)^|$(Platform) interpreter... -@setlocal -@set PYTHONHOME=$(PySourcePath) -@"$(OutDir)$(PyExeName)$(PyDebugExt).exe" %* - - <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat')) - - - - - - <_PGORT Include="$(VCToolsInstallDir)bin\Hostx86\x86\pgort140.dll" Condition="$(Platform) == 'Win32'" /> - <_PGORT Include="$(VCToolsInstallDir)bin\Hostx64\x64\pgort140.dll" Condition="$(Platform) == 'x64'" /> - <_PGORT Include="$(VCToolsInstallDir)bin\arm64\pgort140.dll" Condition="$(Platform) == 'ARM64'" /> - - - - - - - diff --git a/PCbuild/python.vcxproj.filters b/PCbuild/python.vcxproj.filters deleted file mode 100644 index 0662a4e7f5f933..00000000000000 --- a/PCbuild/python.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {2d690795-de83-4a33-8235-3c5dafe45efa} - - - {8b010a19-5b29-45f1-a8a0-f672e2bbb11a} - - - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj deleted file mode 100644 index 235ea1cf9d33fb..00000000000000 --- a/PCbuild/python3dll.vcxproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {885D4898-D08D-4091-9C40-C700CFE3FC5A} - python3dll - Win32Proj - false - - - - - $(Py3DllName) - DynamicLibrary - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - PYTHON_DLL_NAME="$(PyDllName)";%(PreprocessorDefinitions) - false - - - true - - - - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/python3dll.vcxproj.filters b/PCbuild/python3dll.vcxproj.filters deleted file mode 100644 index ba562dfae02a79..00000000000000 --- a/PCbuild/python3dll.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/python_uwp.vcxproj b/PCbuild/python_uwp.vcxproj deleted file mode 100644 index fb27e9e71222e3..00000000000000 --- a/PCbuild/python_uwp.vcxproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF} - - - - - Application - false - Unicode - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - %(PreprocessorDefinitions) - /EHsc /std:c++17 %(AdditionalOptions) - - - windowsapp.lib;%(AdditionalDependencies) - Console - 2000000 - - - - - Multithreaded - - - ucrt.lib;%(AdditionalDependencies) - libucrt;%(IgnoreSpecificDefaultLibraries) - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/python_uwp.vcxproj.filters b/PCbuild/python_uwp.vcxproj.filters deleted file mode 100644 index 79e87461eb1b7c..00000000000000 --- a/PCbuild/python_uwp.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {fd8bf000-0bbe-4fd4-ac49-29036e5a5c5a} - - - {a0d4ce0b-a7b5-4a77-b6c2-d2ddb9bd49b8} - - - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj deleted file mode 100644 index 70212903c83781..00000000000000 --- a/PCbuild/pythoncore.vcxproj +++ /dev/null @@ -1,742 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - pythoncore - - - - - DynamicLibrary - false - - - - - - true - true - true - false - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(PyDllName) - - - Link - - - - /Zm200 %(AdditionalOptions) - $(PySourcePath)Modules\_hacl\include;$(PySourcePath)Modules\_hacl\internal;$(PySourcePath)Python;%(AdditionalIncludeDirectories) - $(zlibDir);%(AdditionalIncludeDirectories) - _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) - _Py_HAVE_ZLIB;%(PreprocessorDefinitions) - _Py_JIT;%(PreprocessorDefinitions) - _Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions) - - - version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies) - - - - - $(GeneratedFrozenModulesDir);%(AdditionalIncludeDirectories) - - PREFIX=NULL; - EXEC_PREFIX=NULL; - VERSION=NULL; - VPATH="$(PyVPath)"; - PYDEBUGEXT="$(PyDebugExt)"; - PLATLIBDIR="DLLs"; - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - USE_ZLIB_CRC32;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(GeneratedFrozenModulesDir)Python;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VPATH="$(PyVPath)";%(PreprocessorDefinitions) - - - - - - - - - - - - 4244 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(PyConfigH->'%(FullPath)', ';') - $([System.IO.File]::ReadAllText($(PyConfigH))) - $([System.IO.File]::ReadAllText('$(IntDir)pyconfig.h')) - - - $(PyConfigHText.Replace('/* #define Py_GIL_DISABLED 1 */', '#define Py_GIL_DISABLED 1')) - - - - - - - - - - - - - - git - <_GIT>$(GIT) - <_GIT Condition="$(GIT.Contains(` `))">"$(GIT)" - - - - - - - - $([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim()) - $([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim()) - $([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim()) - - - - - GITVERSION="$(GitVersion)";GITTAG="$(GitTag)";GITBRANCH="$(GitBranch)";%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters deleted file mode 100644 index 3eed5a9465bca4..00000000000000 --- a/PCbuild/pythoncore.vcxproj.filters +++ /dev/null @@ -1,1613 +0,0 @@ - - - - - {086b0afb-270c-4603-a02a-63d46f0b2b92} - - - {1dc8d8bd-d493-478e-9b7a-7eb108bb8bd5} - - - {8e81609f-13ca-4eae-9fdb-f8af20c710c7} - - - {8787c5bb-bab6-4586-a42e-4a27c7b3ffb6} - - - {5d6d2d6c-9e61-4a1d-b0b2-5cc2f446d69e} - - - {9f12c4b1-322e-431e-abf1-e02550f50032} - - - {ab29a558-143d-4fe7-a039-b431fb429856} - - - {ad449c55-23cb-44f8-ada4-04b23c9ec388} - - - {97349fee-0abf-48b0-a8f5-771bf39b8aee} - - - {ea21fc98-de89-4746-a979-c5616964329a} - - - {f2696406-14bc-48bd-90c5-e93ab82a21ac} - - - {c3e03a5c-56c7-45fd-8543-e5d2326b907d} - - - {86ffb5eb-c423-43aa-b736-a8850d3277df} - - - {875bf4f2-ac42-46bd-b703-8371a824ec32} - - - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Modules - - - Modules - - - Modules\_io - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - PC - - - PC - - - Python - - - Python - - - Python - - - Include - - - Modules - - - Parser - - - Parser - - - Include - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include - - - Include - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include - - - Include\cpython - - - Include - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include - - - Include\cpython - - - Include\cpython - - - Include - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\cpython - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\cpython - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal - - - Include\internal\mimalloc - - - Include\internal\mimalloc - - - Include\internal\mimalloc - - - Include\internal\mimalloc - - - Include\internal\mimalloc - - - Include\internal\mimalloc - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Include\internal - - - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\_io - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Modules\cjkcodecs - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Objects - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - PC - - - PC - - - PC - - - PC - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Source Files - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Modules - - - Python - - - Python - - - Python - - - Python - - - Source Files - - - Source Files - - - Source Files - - - Python - - - Source Files - - - Source Files - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - Python - - - PC - - - Modules - - - Python - - - Objects - - - Modules - - - Modules - - - PC - - - Objects - - - Modules - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Modules\zlib - - - Python - - - Parser - - - Parser - - - Parser - - - Parser - - - Parser - - - Modules - - - Modules - - - Modules - - - Parser - - - Python - - - Objects - - - Objects - - - Objects - - - Python - - - Modules - - - Python - - - Python - - - Modules - - - - - Resource Files - - - diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj deleted file mode 100644 index d08c210ef8a1dc..00000000000000 --- a/PCbuild/pythonw.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {F4229CC3-873C-49AE-9729-DD308ED4CD4A} - false - - - - - $(PyWExeName) - Application - false - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - 2000000 - 12000000 - 12000000 - - 3000000 - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/pythonw.vcxproj.filters b/PCbuild/pythonw.vcxproj.filters deleted file mode 100644 index 20d87051e2511d..00000000000000 --- a/PCbuild/pythonw.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {0434cf11-a311-4a92-8a6c-4164aa79a7f2} - - - {e1d8ea6b-c65d-42f4-9eed-6010846ed378} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/pythonw_uwp.vcxproj b/PCbuild/pythonw_uwp.vcxproj deleted file mode 100644 index e21e46a1b722ed..00000000000000 --- a/PCbuild/pythonw_uwp.vcxproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {AB603547-1E2A-45B3-9E09-B04596006393} - - - - - Application - false - Unicode - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - PYTHONW;%(PreprocessorDefinitions) - /EHsc /std:c++17 %(AdditionalOptions) - - - windowsapp.lib;%(AdditionalDependencies) - Windows - 2000000 - - - - - Multithreaded - - - ucrt.lib;%(AdditionalDependencies) - libucrt;%(IgnoreSpecificDefaultLibraries) - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/pythonw_uwp.vcxproj.filters b/PCbuild/pythonw_uwp.vcxproj.filters deleted file mode 100644 index 2f39bdea9e910d..00000000000000 --- a/PCbuild/pythonw_uwp.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {de05f656-4dcb-4fe7-9946-5c325ea2d842} - - - {4102e199-3e5c-42d0-b37b-d42394b20d9e} - - - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/pywlauncher.vcxproj b/PCbuild/pywlauncher.vcxproj deleted file mode 100644 index e50b69aefe2b9c..00000000000000 --- a/PCbuild/pywlauncher.vcxproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {1D4B18D3-7C12-4ECB-9179-8531FF876CE6} - pywlauncher - pyw - false - - - - - Application - Unicode - - - - - - ClCompile - - - - - - - - - _WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - shell32.lib;pathcch.lib;%(AdditionalDependencies) - Windows - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/pywlauncher.vcxproj.filters b/PCbuild/pywlauncher.vcxproj.filters deleted file mode 100644 index 17d0389ca50f1c..00000000000000 --- a/PCbuild/pywlauncher.vcxproj.filters +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt deleted file mode 100644 index 9ce016705c1f46..00000000000000 --- a/PCbuild/readme.txt +++ /dev/null @@ -1,333 +0,0 @@ -Quick Start Guide ------------------ - -1. Install Microsoft Visual Studio 2017 or later with Python workload and - Python native development component. -1a. Optionally install Python 3.6 or later. If not installed, - get_externals.bat (via build.bat) will download and use Python via - NuGet. -2. Run "build.bat" to build Python in 32-bit Release configuration. -3. (Optional, but recommended) Run the test suite with "rt.bat -q". - - -Building Python using Microsoft Visual C++ ------------------------------------------- - -This directory is used to build CPython for Microsoft Windows on 32- and 64- -bit platforms. Using this directory requires an installation of -Microsoft Visual Studio (MSVC) with the *Python workload* and -its optional *Python native development* component selected. - -Building from the command line is recommended in order to obtain any -external dependencies. To build, simply run the "build.bat" script without -any arguments. After this succeeds, you can open the "pcbuild.sln" -solution in Visual Studio to continue development. - -To build an installer package, refer to the README in the Tools/msi folder. - -The solution currently supports two platforms. The Win32 platform is -used to build standard x86-compatible 32-bit binaries, output into the -win32 sub-directory. The x64 platform is used for building 64-bit AMD64 -(aka x86_64 or EM64T) binaries, output into the amd64 sub-directory. -The Itanium (IA-64) platform is no longer supported. - -Four configuration options are supported by the solution: -Debug - Used to build Python with extra debugging capabilities, equivalent - to using ./configure --with-pydebug on UNIX. All binaries built - using this configuration have "_d" added to their name: - python310_d.dll, python_d.exe, parser_d.pyd, and so on. Both the - build and rt (run test) batch files in this directory accept a -d - option for debug builds. If you are building Python to help with - development of CPython, you will most likely use this configuration. -PGInstrument, PGUpdate - Used to build Python in Release configuration using PGO, which - requires Premium Edition of Visual Studio. See the "Profile - Guided Optimization" section below for more information. Build - output from each of these configurations lands in its own - sub-directory of this directory. The official Python releases may - be built using these configurations. -Release - Used to build Python as it is meant to be used in production - settings, though without PGO. - - -Building Python using the build.bat script ----------------------------------------------- - -In this directory you can find build.bat, a script designed to make -building Python on Windows simpler. This script will use the env.bat -script to detect either Visual Studio 2017 or 2015, either of -which may be used to build Python. Currently Visual Studio 2017 is -officially supported. - -By default, build.bat will build Python in Release configuration for -the 32-bit Win32 platform. It accepts several arguments to change -this behavior, try `build.bat -h` to learn more. - - -C Runtime ---------- - -Visual Studio 2017 uses version 14.0 of the C runtime (vcruntime140). -The executables no longer use the "Side by Side" assemblies used in -previous versions of the compiler. This simplifies distribution of -applications. - -The run time libraries are available under the redist folder of your -Visual Studio distribution. For more info, see the Readme in the -redist folder. - - -Sub-Projects ------------- - -The CPython project is split up into several smaller sub-projects which -are managed by the pcbuild.sln solution file. Each sub-project is -represented by a .vcxproj and a .vcxproj.filters file starting with the -name of the sub-project. These sub-projects fall into a few general -categories: - -The following sub-projects represent the bare minimum required to build -a functioning CPython interpreter. If nothing else builds but these, -you'll have a very limited but usable python.exe: -pythoncore - .dll and .lib -python - .exe - -These sub-projects provide extra executables that are useful for running -CPython in different ways: -pythonw - pythonw.exe, a variant of python.exe that doesn't open a Command - Prompt window -pylauncher - py.exe, the Python Launcher for Windows, see - https://docs.python.org/3/using/windows.html#launcher -pywlauncher - pyw.exe, a variant of py.exe that doesn't open a Command Prompt - window -_testembed - _testembed.exe, a small program that embeds Python for testing - purposes, used by test_capi.py - -These are miscellaneous sub-projects that don't really fit the other -categories: -_freeze_module - _freeze_module.exe, used to regenerate frozen modules in Python - after changes have been made to the corresponding source files - (e.g. Lib\importlib\_bootstrap.py). -pyshellext - pyshellext.dll, the shell extension deployed with the launcher -python3dll - python3.dll, the PEP 384 Stable ABI dll -xxlimited - builds an example module that makes use of the PEP 384 Stable ABI, - see Modules\xxlimited.c -xxlimited_35 - ditto for testing the Python 3.5 stable ABI, see - Modules\xxlimited_35.c - -The following sub-projects are for individual modules of the standard -library which are implemented in C; each one builds a DLL (renamed to -.pyd) of the same name as the project: - * _asyncio - * _ctypes - * _ctypes_test - * _zoneinfo - * _decimal - * _elementtree - * _hashlib - * _multiprocessing - * _overlapped - * _socket - * _testbuffer - * _testcapi - * _testlimitedcapi - * _testinternalcapi - * _testclinic - * _testclinic_limited - * _testconsole - * _testimportmultiple - * _testmultiphase - * _testsinglephase - * _tkinter - * pyexpat - * select - * unicodedata - * winsound - -The following Python-controlled sub-projects wrap external projects. -Note that these external libraries are not necessary for a working -interpreter, but they do implement several major features. See the -"Getting External Sources" section below for additional information -about getting the source for building these libraries. The sub-projects -are: -_bz2 - Python wrapper for version 1.0.8 of the libbzip2 compression library - Homepage: - http://www.bzip.org/ -_lzma - Python wrapper for version 5.2.2 of the liblzma compression library - Homepage: - https://tukaani.org/xz/ -_ssl - Python wrapper for version 3.5 of the OpenSSL secure sockets - library, which is downloaded from our binaries repository at - https://github.com/python/cpython-bin-deps. - - Homepage: - https://www.openssl.org/ - - Building OpenSSL requires Perl on your path, and can be performed by - running PCbuild\prepare_ssl.bat. This will retrieve the version of - the sources matched to the current commit from the OpenSSL branch - in our source repository at - https://github.com/python/cpython-source-deps. - - To use an alternative build of OpenSSL completely, you should replace - the files in the externals/openssl-bin- folder with your own. - As long as this folder exists, its contents will not be downloaded - again when building. - -_sqlite3 - Wraps SQLite 3.50.4, which is itself built by sqlite3.vcxproj - Homepage: - https://www.sqlite.org/ -_tkinter - Wraps version 8.6.15 of the Tk windowing system, which is downloaded - from our binaries repository at - https://github.com/python/cpython-bin-deps. - - Homepage: - https://www.tcl.tk/ - - Building Tcl and Tk can be performed by running - PCbuild\prepare_tcltk.bat. This will retrieve the version of the - sources matched to the current commit from the Tcl and Tk branches - in our source repository at - https://github.com/python/cpython-source-deps. - - The two projects install their respective components in a - directory alongside the source directories called "tcltk" on - Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs - into the current output directory, which should ensure that Tkinter - is able to load Tcl/Tk without having to change your PATH. - - -Getting External Sources ------------------------- - -The last category of sub-projects listed above wrap external projects -Python doesn't control, and as such a little more work is required in -order to download the relevant source files for each project before they -can be built. However, a simple script is provided to make this as -painless as possible, called "get_externals.bat" and located in this -directory. This script extracts all the external sub-projects from - https://github.com/python/cpython-source-deps -and - https://github.com/python/cpython-bin-deps -via a Python script called "get_external.py", located in this directory. -Everything downloaded by these scripts is stored in ..\externals -(relative to this directory), or the path specified by the EXTERNALS_DIR -environment variable. - -The path or command to use for Python can be provided with the -PYTHON_FOR_BUILD environment variable. If this is not set, an active -virtual environment will be used. If none is active, and HOST_PYTHON is -set to a recent enough version or "py.exe" is able to find a recent -enough version, those will be used. If all else fails, a copy of Python -will be downloaded from NuGet and extracted to the externals directory. -This will then be used for later builds (see PCbuild/find_python.bat -for the full logic). - -It is also possible to download sources from each project's homepage, -though you may have to change folder names or pass the names to MSBuild -as the values of certain properties in order for the build solution to -find them. This is an advanced topic and not necessarily fully -supported. - -The get_externals.bat script is called automatically by build.bat -unless you pass the '-E' option. - - -Profile Guided Optimization ---------------------------- - -The solution has two configurations for PGO. The PGInstrument -configuration must be built first. The PGInstrument binaries are linked -against a profiling library and contain extra debug information. The -PGUpdate configuration takes the profiling data and generates optimized -binaries. - -The build.bat script has an argument `--pgo` that automate the creation -of optimized binaries. -It creates the PGI files, runs the unit test suite with the PGI python, -and finally creates the optimized files. -You can customize the job for profiling with `--pgo-job ` option. - -See - https://docs.microsoft.com/en-us/cpp/build/profile-guided-optimizations -for more on this topic. - - -Static library --------------- - -The solution has no configuration for static libraries. However it is -easy to build a static library instead of a DLL. You simply have to set -the "Configuration Type" to "Static Library (.lib)" and alter the -preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may -also have to change the "Runtime Library" from "Multi-threaded DLL -(/MD)" to "Multi-threaded (/MT)". - - -Visual Studio properties ------------------------- - -The PCbuild solution makes use of Visual Studio property files (*.props) -to simplify each project. The properties can be viewed in the Property -Manager (View -> Other Windows -> Property Manager) but should be -carefully modified by hand. - -The property files used are: - * python (versions, directories and build names) - * pyproject (base settings for all projects) - * openssl (used by projects dependent upon OpenSSL) - * tcltk (used by _tkinter, tcl, and tk projects) - -The pyproject property file defines all of the build settings for each -project, with some projects overriding certain specific values. The GUI -doesn't always reflect the correct settings and may confuse the user -with false information, especially for settings that automatically adapt -for different configurations. - -Add a new project ------------------ - -For example, add a new _testclinic_limited project to build a new -_testclinic_limited extension, the file Modules/_testclinic_limited.c: - -* In PCbuild/, copy _testclinic.vcxproj to _testclinic_limited.vcxproj, - replace RootNamespace value with `_testclinic_limited`, replace - `_asyncio.c` with `_testclinic_limited.c`. -* In PCbuild/, copy _testclinic.vcxproj.filters to - _testclinic_limited.vcxproj.filters, edit the list of files in the new file. -* Open Visual Studio, open PCbuild\pcbuild.sln solution, add the - PCbuild\_testclinic_limited.vcxproj project to the solution ("add existing - project). -* Add a dependency on the python project to the new _testclinic_limited - project. -* Save and exit Visual Studio. -* Add `;_testclinic_limited` to `` in - PCbuild\pcbuild.proj. -* Update "exts" in Tools\msi\lib\lib_files.wxs file or in - Tools\msi\test\test_files.wxs file (for tests). -* PC\layout\main.py needs updating if you add a test-only extension whose name - doesn't start with "_test". -* Add the extension to PCbuild\readme.txt (this file). -* Build Python from scratch (clean the solution) to check that the new project - is built successfully. -* Ensure the new .vcxproj and .vcxproj.filters files are added to your commit, - as well as the changes to pcbuild.sln, pcbuild.proj and any other modified - files. diff --git a/PCbuild/regen.targets b/PCbuild/regen.targets deleted file mode 100644 index 416241d9d0df10..00000000000000 --- a/PCbuild/regen.targets +++ /dev/null @@ -1,183 +0,0 @@ - - - - <_PegenSources Include="$(PySourcePath)Grammar\python.gram;$(PySourcePath)Grammar\Tokens" /> - <_PegenOutputs Include="$(PySourcePath)Parser\parser.c" /> - <_ASTSources Include="$(PySourcePath)Parser\Python.asdl" /> - <_ASTOutputs Include="$(PySourcePath)Include\internal\pycore_ast.h"> - -H - - <_ASTOutputs Include="$(PySourcePath)Include\internal\pycore_ast_state.h"> - -I - - <_ASTOutputs Include="$(PySourcePath)Python\Python-ast.c"> - -C - - <_TokenSources Include="$(PySourcePath)Grammar\Tokens" /> - <_TokenOutputs Include="$(PySourcePath)Doc\library\token-list.inc"> - rst - - <_TokenOutputs Include="$(PySourcePath)Include\internal\pycore_token.h"> - h - - <_TokenOutputs Include="$(PySourcePath)Parser\token.c"> - c - - <_TokenOutputs Include="$(PySourcePath)Lib\token.py"> - py - - <_KeywordSources Include="$(PySourcePath)Grammar\python.gram;$(PySourcePath)Grammar\Tokens" /> - <_KeywordOutputs Include="$(PySourcePath)Lib\keyword.py" /> - - <_JITSources Include="$(PySourcePath)Python\executor_cases.c.h;$(GeneratedPyConfigDir)pyconfig.h;$(PySourcePath)Tools\jit\**"/> - <_JITOutputs Include="$(GeneratedPyConfigDir)jit_stencils.h"/> - <_CasesSources Include="$(PySourcePath)Python\bytecodes.c;$(PySourcePath)Python\optimizer_bytecodes.c;"/> - <_CasesOutputs Include="$(PySourcePath)Python\generated_cases.c.h;$(PySourcePath)Include\opcode_ids.h;$(PySourcePath)Include\internal\pycore_uop_ids.h;$(PySourcePath)Python\opcode_targets.h;$(PySourcePath)Include\internal\pycore_opcode_metadata.h;$(PySourcePath)Include\internal\pycore_uop_metadata.h;$(PySourcePath)Python\optimizer_cases.c.h;$(PySourcePath)Lib\_opcode_metadata.py"/> - <_SbomSources Include="$(PySourcePath)PCbuild\get_externals.bat" /> - <_SbomOutputs Include="$(PySourcePath)Misc\externals.spdx.json;$(PySourcePath)Misc\sbom.spdx.json"> - json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - aarch64-pc-windows-msvc - i686-pc-windows-msvc - x86_64-pc-windows-msvc - $(JITArgs) --debug - - - - - - - - - - - - - - - - - - <_TestFrozenSources Include="$(PySourcePath)Programs\freeze_test_frozenmain.py; - $(PySourcePath)Programs\test_frozenmain.py; - @(_OpcodeOutputs)" /> - <_TestFrozenOutputs Include="$(PySourcePath)Programs\test_frozenmain.h" /> - <_LicenseSources Include="$(PySourcePath)LICENSE; - $(PySourcePath)PC\crtlicense.txt; - $(bz2Dir)LICENSE; - $(libffiDir)LICENSE;" /> - <_LicenseSources Include="$(opensslOutDir)LICENSE.txt" Condition="Exists('$(opensslOutDir)LICENSE.txt')" /> - <_LicenseSources Include="$(opensslOutDir)LICENSE" Condition="!Exists('$(opensslOutDir)LICENSE.txt')" /> - <_LicenseSources Include="$(tcltkDir)tcllicense.terms; - $(tcltkDir)tklicense.terms" Condition="$(IncludeTkinter)" /> - - - - - - - - - - <_Text1 Include="@(_LicenseSources)"> - $([System.IO.File]::ReadAllText(%(FullPath))) - - <_Text Include="@(_Text1->'%(Content)')" /> - - - - - - - - - diff --git a/PCbuild/rmpyc.py b/PCbuild/rmpyc.py deleted file mode 100644 index 0b58f687729f7e..00000000000000 --- a/PCbuild/rmpyc.py +++ /dev/null @@ -1,19 +0,0 @@ -# Remove all the .pyc files under ../Lib. - - -def deltree(root): - import os - from os.path import join - - npyc = 0 - for root, dirs, files in os.walk(root): - for name in files: - # to be thorough - if name.endswith(('.pyc', '.pyo')): - npyc += 1 - os.remove(join(root, name)) - - return npyc - -npyc = deltree("../Lib") -print(npyc, ".pyc deleted") diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat deleted file mode 100644 index ac530a5206271f..00000000000000 --- a/PCbuild/rt.bat +++ /dev/null @@ -1,83 +0,0 @@ -@echo off -rem Run Tests. Run the regression test suite. -rem Usage: rt [-d] [-O] [-q] [-x64] regrtest_args -rem -d Run Debug build (python_d.exe). Else release build. -rem -O Run python.exe or python_d.exe (see -d) with -O. -rem -q "quick" -- normally the tests are run twice, the first time -rem after deleting all the .pyc files reachable from Lib/. -rem -q runs the tests just once, and without deleting .pyc files. -rem -p or -win32, -x64, -arm32, -arm64 -rem Run the specified architecture of python (or python_d if -d -rem was specified). If omitted, uses %PREFIX% if set or 64-bit. -rem --disable-gil Run free-threaded build. -rem All leading instances of these switches are shifted off, and -rem whatever remains (up to 9 arguments) is passed to regrtest.py. -rem For example, -rem rt -O -d -x test_thread -rem runs -rem python_d -O ../lib/test/regrtest.py -x test_thread -rem twice, and -rem rt -q -g test_binascii -rem runs -rem python_d ../lib/test/regrtest.py -g test_binascii -rem to generate the expected-output file for binascii quickly. -rem -rem Confusing: if you want to pass a comma-separated list, like -rem -u network,largefile -rem then you have to quote it on the rt line, like -rem rt -u "network,largefile" - -setlocal - -set pcbuild=%~dp0 -set pyname=python -set suffix= -set qmode= -set dashO= -set regrtestargs=--fast-ci -set exe= - -:CheckOpts -if "%~1"=="-O" (set dashO=-O) & shift & goto CheckOpts -if "%~1"=="-q" (set qmode=yes) & shift & goto CheckOpts -if "%~1"=="-d" (set suffix=_d) & shift & goto CheckOpts -rem HACK: Need some way to infer the version number in this script -if "%~1"=="--disable-gil" (set pyname=python3.13t) & shift & goto CheckOpts -if "%~1"=="-win32" (set prefix=%pcbuild%win32) & shift & goto CheckOpts -if "%~1"=="-x64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts -if "%~1"=="-amd64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts -if "%~1"=="-arm64" (set prefix=%pcbuild%arm64) & shift & goto CheckOpts -if "%~1"=="-arm32" (set prefix=%pcbuild%arm32) & shift & goto CheckOpts -if "%~1"=="-p" (call :SetPlatform %~2) & shift & shift & goto CheckOpts -if NOT "%~1"=="" (set regrtestargs=%regrtestargs% %~1) & shift & goto CheckOpts - -if not defined prefix set prefix=%pcbuild%amd64 -set exe=%prefix%\%pyname%%suffix%.exe -set cmd="%exe%" %dashO% -m test %regrtestargs% -if defined qmode goto Qmode - -echo Deleting .pyc files ... -"%exe%" "%pcbuild%rmpyc.py" - -echo Cleaning _pth files ... -if exist %prefix%\*._pth del %prefix%\*._pth - -echo on -%cmd% -@echo off - -echo About to run again without deleting .pyc first: -pause -goto Qmode - -:SetPlatform -if /I %1 EQU Win32 (set prefix=%pcbuild%win32) & exit /B 0 -if /I %1 EQU x64 (set prefix=%pcbuild%amd64) & exit /B 0 -if /I %1 EQU ARM64 (set prefix=%pcbuild%arm64) & exit /B 0 -if /I %1 EQU ARM (set prefix=%pcbuild%arm32) & exit /B 0 -echo Invalid platform "%1" -exit /B 1 - -:Qmode -echo on -%cmd% diff --git a/PCbuild/select.vcxproj b/PCbuild/select.vcxproj deleted file mode 100644 index d7448fd4d72380..00000000000000 --- a/PCbuild/select.vcxproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {18CAE28C-B454-46C1-87A0-493D91D97F03} - select - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/select.vcxproj.filters b/PCbuild/select.vcxproj.filters deleted file mode 100644 index 5354820dd49ccd..00000000000000 --- a/PCbuild/select.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {98346077-900c-4c7a-852f-a23470e37b40} - - - {b47a8e6c-47c0-4490-aa91-1a3624a0905c} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj deleted file mode 100644 index 6bcc4e913c8e77..00000000000000 --- a/PCbuild/sqlite3.vcxproj +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {A1A295E5-463C-437F-81CA-1F32367685DA} - sqlite3 - false - - - - - $(PyStdlibPydExt) - DynamicLibrary - NotSet - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups) - $(_SqliteVersion.Split(`;`)[1]) - $(_SqliteVersion.Split(`;`)[2]) - $(_SqliteVersion.Split(`;`)[3]) - $(_SqliteVersion.Split(`;`)[4]) - $(_SqliteVersion.Split(`;`)[5]) - - - - $(sqlite3Dir);%(AdditionalIncludeDirectories) - SQLITE_ENABLE_MATH_FUNCTIONS;SQLITE_ENABLE_FTS4;SQLITE_ENABLE_FTS5;SQLITE_ENABLE_RTREE;SQLITE_OMIT_AUTOINIT;SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions) - Level1 - - - SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - diff --git a/PCbuild/sqlite3.vcxproj.filters b/PCbuild/sqlite3.vcxproj.filters deleted file mode 100644 index 76662ed68d0240..00000000000000 --- a/PCbuild/sqlite3.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {ce5b649d-a6f7-4459-9425-c883795d79df} - - - {0e842fe2-176b-4e83-9d1f-0ad13a859efd} - - - {0248795a-00c9-4090-ad61-55ae23438598} - - - - - Header Files - - - Header Files - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/tcl.vcxproj b/PCbuild/tcl.vcxproj deleted file mode 100644 index ab68db9210fbe4..00000000000000 --- a/PCbuild/tcl.vcxproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Debug - x64 - - - Release - x64 - - - Release - ARM64 - - - - {B5FD6F1D-129E-4BFF-9340-03606FAC7283} - - - - - - - - Makefile - $(tcltkDir) - $(OutDir)bin\$(tclDLLName) - - - - - - msvcrt - symbols,msvcrt - BUILDDIRTOP="$(BuildDirTop)" INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))" - DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996" - WARNINGS="-W3 -wd4311 -wd4312" - setlocal -set VCINSTALLDIR=$(VCInstallDir) -cd /D "$(tclDir)win" -nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) $(WarningsFlags) TCLSH_NATIVE="$(tclWin32Exe)" core shell dlls -nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) $(WarningsFlags) TCLSH_NATIVE="$(tclWin32Exe)" install-binaries install-libraries -copy /Y ..\license.terms "$(OutDir)\tcllicense.terms" - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props deleted file mode 100644 index 2aa3b7a1e42683..00000000000000 --- a/PCbuild/tcltk.props +++ /dev/null @@ -1,59 +0,0 @@ - - - - - 8.6.15.0 - $(TclVersion) - $([System.Version]::Parse($(TclVersion)).Major) - $([System.Version]::Parse($(TclVersion)).Minor) - $([System.Version]::Parse($(TclVersion)).Build) - $([System.Version]::Parse($(TclVersion)).Revision) - $([System.Version]::Parse($(TkVersion)).Major) - $([System.Version]::Parse($(TkVersion)).Minor) - $([System.Version]::Parse($(TkVersion)).Build) - $([System.Version]::Parse($(TkVersion)).Revision) - $(ExternalsDir)tcl-core-$(TclVersion)\ - $(ExternalsDir)tk-$(TkVersion)\ - $(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\ - $(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe - $(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe - - - tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll - tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib - tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe - tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).dll - tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib - zlib1.dll - $(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib - IX86 - AMD64 - ARM64 - TCL_MAJOR_VERSION=$(TclMajorVersion) TCL_MINOR_VERSION=$(TclMinorVersion) TCL_PATCH_LEVEL=$(TclPatchLevel) - TCL_MAJOR=$(TclMajorVersion) TCL_MINOR=$(TclMinorVersion) TCL_PATCH=$(TclPatchLevel) - TK_MAJOR_VERSION=$(TkMajorVersion) TK_MINOR_VERSION=$(TkMinorVersion) TK_PATCH_LEVEL=$(TkPatchLevel) - - Release - Debug - $(BuildDirTop)_$(TclMachine) - $(BuildDirTop)_VC13 - $(BuildDirTop)_VC12 - $(BuildDirTop)_VC11 - $(BuildDirTop)_VC10 - - - - - - <_TclTkLib Include="$(tcltkdir)\lib\**\*" /> - - - - diff --git a/PCbuild/tk.vcxproj b/PCbuild/tk.vcxproj deleted file mode 100644 index b111969ca5de6c..00000000000000 --- a/PCbuild/tk.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Debug - x64 - - - Release - x64 - - - Release - ARM64 - - - - {7E85ECCF-A72C-4DA4-9E52-884508E80BA1} - tk - - - - - - - - Makefile - $(tcltkDir) - $(OutDir)bin\$(tkDLLName) - - - - - - msvcrt - symbols,msvcrt - BUILDDIRTOP="$(BuildDirTop)" TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))" - DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996" - WARNINGS="-W3 -wd4244 -wd4267 -wd4311 -wd4312 -wd4334" - setlocal -set VCINSTALLDIR=$(VCInstallDir) -cd /D "$(tkDir)win" -nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) $(WarningsFlags) TCLSH_NATIVE="$(tclWin32Exe)" all -nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) $(WarningsFlags) TCLSH_NATIVE="$(tclWin32Exe)" install-binaries install-libraries -copy /Y ..\license.terms "$(OutDir)\tklicense.terms" - - - - - {b5fd6f1d-129e-4bff-9340-03606fac7283} - false - - - - - - - - \ No newline at end of file diff --git a/PCbuild/unicodedata.vcxproj b/PCbuild/unicodedata.vcxproj deleted file mode 100644 index 781f938e2ab78e..00000000000000 --- a/PCbuild/unicodedata.vcxproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {ECC7CEAC-A5E5-458E-BB9E-2413CC847881} - unicodedata - Win32Proj - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/unicodedata.vcxproj.filters b/PCbuild/unicodedata.vcxproj.filters deleted file mode 100644 index 7ff97835c9623a..00000000000000 --- a/PCbuild/unicodedata.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {b939a8f1-ccd7-420a-974a-243606dccd74} - - - {e2c055bb-ec62-4bbc-aa1c-d88da4d4ad1c} - - - {d04f3447-67b0-42aa-b84f-9fc0029d5af7} - - - - - Header Files - - - Header Files - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/urlretrieve.py b/PCbuild/urlretrieve.py deleted file mode 100644 index 9df773c35d7ed6..00000000000000 --- a/PCbuild/urlretrieve.py +++ /dev/null @@ -1,39 +0,0 @@ -# Simple Python script to download a file. Used as a fallback -# when other more reliable methods fail. -# -from __future__ import print_function -import sys - -try: - from requests import get -except ImportError: - try: - from urllib.request import urlretrieve - USING = "urllib.request.urlretrieve" - except ImportError: - try: - from urllib import urlretrieve - USING = "urllib.retrieve" - except ImportError: - print("Python at", sys.executable, "is not suitable", - "for downloading files.", file=sys.stderr) - sys.exit(2) -else: - USING = "requests.get" - - def urlretrieve(url, filename): - r = get(url, stream=True) - r.raise_for_status() - with open(filename, 'wb') as f: - for chunk in r.iter_content(chunk_size=1024): - f.write(chunk) - return filename - -if __name__ == '__main__': - if len(sys.argv) != 3: - print("Usage: urlretrieve.py [url] [filename]", file=sys.stderr) - sys.exit(1) - URL = sys.argv[1] - FILENAME = sys.argv[2] - print("Downloading from", URL, "to", FILENAME, "using", USING) - urlretrieve(URL, FILENAME) diff --git a/PCbuild/venvlauncher.vcxproj b/PCbuild/venvlauncher.vcxproj deleted file mode 100644 index 1193e032245c94..00000000000000 --- a/PCbuild/venvlauncher.vcxproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {494BAC80-A60C-43A9-99E7-ACB691CE2C4D} - venvlauncher - false - - - - - venvlauncher - $(TargetName)t - Application - MultiByte - - - - - - ClCompile - - - - - - - - - EXENAME=L"$(PyExeName)$(PyDebugExt).exe";_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - PY_ICON;%(PreprocessorDefinitions) - - - pathcch.lib;%(AdditionalDependencies) - Console - - - - - - - - - - - - - - - diff --git a/PCbuild/venvlauncher.vcxproj.filters b/PCbuild/venvlauncher.vcxproj.filters deleted file mode 100644 index 56a0f005a3fa2a..00000000000000 --- a/PCbuild/venvlauncher.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {8f3ab79e-3cba-4e6d-82b2-559ce946de58} - - - {4a2423af-e5d1-4c88-b308-d71b768977df} - - - - - Resource Files - - - - - Resource Files - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/venvwlauncher.vcxproj b/PCbuild/venvwlauncher.vcxproj deleted file mode 100644 index db7128272f06db..00000000000000 --- a/PCbuild/venvwlauncher.vcxproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {FDB84CBB-2FB6-47C8-A2D6-091E0833239D} - venvwlauncher - false - - - - - venvwlauncher - $(TargetName)t - Application - MultiByte - - - - - - ClCompile - - - - - - - - - EXENAME=L"$(PyWExeName)$(PyDebugExt).exe";_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - - - PYW_ICON;%(PreprocessorDefinitions) - - - pathcch.lib;%(AdditionalDependencies) - Windows - - - - - - - - - - - - - - - diff --git a/PCbuild/venvwlauncher.vcxproj.filters b/PCbuild/venvwlauncher.vcxproj.filters deleted file mode 100644 index 61a514395e82dc..00000000000000 --- a/PCbuild/venvwlauncher.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {7683f248-9c32-4e72-a329-5bd84993f63a} - - - {61b34b26-ce53-405d-a743-b370ff505887} - - - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/winsound.vcxproj b/PCbuild/winsound.vcxproj deleted file mode 100644 index c26029b15a339f..00000000000000 --- a/PCbuild/winsound.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {28B5D777-DDF2-4B6B-B34F-31D938813856} - winsound - Win32Proj - false - - - - - DynamicLibrary - NotSet - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - winmm.lib;%(AdditionalDependencies) - - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - \ No newline at end of file diff --git a/PCbuild/winsound.vcxproj.filters b/PCbuild/winsound.vcxproj.filters deleted file mode 100644 index 6775802638205b..00000000000000 --- a/PCbuild/winsound.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {6be42502-398f-4bec-8677-8809a2da0eef} - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj deleted file mode 100644 index 093e6920c0b76c..00000000000000 --- a/PCbuild/xxlimited.vcxproj +++ /dev/null @@ -1,111 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {F749B822-B489-4CA5-A3AD-CE078F5F338A} - xxlimited - Win32Proj - - - - - DynamicLibrary - NotSet - false - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - wsock32.lib;%(AdditionalDependencies) - - - - - - - - {885d4898-d08d-4091-9c40-c700cfe3fc5a} - - - - - - diff --git a/PCbuild/xxlimited.vcxproj.filters b/PCbuild/xxlimited.vcxproj.filters deleted file mode 100644 index 21db468001d224..00000000000000 --- a/PCbuild/xxlimited.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - {eb5eebc7-3787-4f8f-b282-204db2962cc3} - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj deleted file mode 100644 index 3f4d4463f24af0..00000000000000 --- a/PCbuild/xxlimited_35.vcxproj +++ /dev/null @@ -1,111 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - ARM64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - ARM64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {fb868ea7-f93a-4d9b-be78-ca4e9ba14fff} - xxlimited_35 - Win32Proj - - - - - DynamicLibrary - NotSet - false - - - - $(PyStdlibPydExt) - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - wsock32.lib;%(AdditionalDependencies) - - - - - - - - {885d4898-d08d-4091-9c40-c700cfe3fc5a} - - - - - - diff --git a/PCbuild/xxlimited_35.vcxproj.filters b/PCbuild/xxlimited_35.vcxproj.filters deleted file mode 100644 index 35bfb05c239c35..00000000000000 --- a/PCbuild/xxlimited_35.vcxproj.filters +++ /dev/null @@ -1,13 +0,0 @@ - - - - - {5be27194-6530-452d-8d86-3767b991fa83} - - - - - Source Files - - - diff --git a/iOS/README.rst b/iOS/README.rst deleted file mode 100644 index 4d38e5d7c307d1..00000000000000 --- a/iOS/README.rst +++ /dev/null @@ -1,352 +0,0 @@ -==================== -Python on iOS README -==================== - -:Authors: - Russell Keith-Magee (2023-11) - -This document provides a quick overview of some iOS specific features in the -Python distribution. - -These instructions are only needed if you're planning to compile Python for iOS -yourself. Most users should *not* need to do this. If you're looking to -experiment with writing an iOS app in Python, tools such as `BeeWare's Briefcase -`__ and `Kivy's Buildozer -`__ will provide a much more approachable -user experience. - -Compilers for building on iOS -============================= - -Building for iOS requires the use of Apple's Xcode tooling. It is strongly -recommended that you use the most recent stable release of Xcode. This will -require the use of the most (or second-most) recently released macOS version, -as Apple does not maintain Xcode for older macOS versions. The Xcode Command -Line Tools are not sufficient for iOS development; you need a *full* Xcode -install. - -If you want to run your code on the iOS simulator, you'll also need to install -an iOS Simulator Platform. You should be prompted to select an iOS Simulator -Platform when you first run Xcode. Alternatively, you can add an iOS Simulator -Platform by selecting an open the Platforms tab of the Xcode Settings panel. - -iOS specific arguments to configure -=================================== - -* ``--enable-framework[=DIR]`` - - This argument specifies the location where the Python.framework will be - installed. If ``DIR`` is not specified, the framework will be installed into - a subdirectory of the ``iOS/Frameworks`` folder. - - This argument *must* be provided when configuring iOS builds. iOS does not - support non-framework builds. - -* ``--with-framework-name=NAME`` - - Specify the name for the Python framework; defaults to ``Python``. - - .. admonition:: Use this option with care! - - Unless you know what you're doing, changing the name of the Python - framework on iOS is not advised. If you use this option, you won't be able - to run the ``make testios`` target without making significant manual - alterations, and you won't be able to use any binary packages unless you - compile them yourself using your own framework name. - -Building Python on iOS -====================== - -ABIs and Architectures ----------------------- - -iOS apps can be deployed on physical devices, and on the iOS simulator. Although -the API used on these devices is identical, the ABI is different - you need to -link against different libraries for an iOS device build (``iphoneos``) or an -iOS simulator build (``iphonesimulator``). - -Apple uses the ``XCframework`` format to allow specifying a single dependency -that supports multiple ABIs. An ``XCframework`` is a wrapper around multiple -ABI-specific frameworks that share a common API. - -iOS can also support different CPU architectures within each ABI. At present, -there is only a single supported architecture on physical devices - ARM64. -However, the *simulator* supports 2 architectures - ARM64 (for running on Apple -Silicon machines), and x86_64 (for running on older Intel-based machines). - -To support multiple CPU architectures on a single platform, Apple uses a "fat -binary" format - a single physical file that contains support for multiple -architectures. It is possible to compile and use a "thin" single architecture -version of a binary for testing purposes; however, the "thin" binary will not be -portable to machines using other architectures. - -Building a single-architecture framework ----------------------------------------- - -The Python build system will create a ``Python.framework`` that supports a -*single* ABI with a *single* architecture. Unlike macOS, iOS does not allow a -framework to contain non-library content, so the iOS build will produce a -``bin`` and ``lib`` folder in the same output folder as ``Python.framework``. -The ``lib`` folder will be needed at runtime to support the Python library. - -If you want to use Python in a real iOS project, you need to produce multiple -``Python.framework`` builds, one for each ABI and architecture. iOS builds of -Python *must* be constructed as framework builds. To support this, you must -provide the ``--enable-framework`` flag when configuring the build. The build -also requires the use of cross-compilation. The minimal commands for building -Python for the ARM64 iOS simulator will look something like:: - - $ export PATH="$(pwd)/iOS/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin" - $ ./configure \ - --enable-framework \ - --host=arm64-apple-ios-simulator \ - --build=arm64-apple-darwin \ - --with-build-python=/path/to/python.exe - $ make - $ make install - -In this invocation: - -* ``iOS/Resources/bin`` has been added to the path, providing some shims for the - compilers and linkers needed by the build. Xcode requires the use of ``xcrun`` - to invoke compiler tooling. However, if ``xcrun`` is pre-evaluated and the - result passed to ``configure``, these results can embed user- and - version-specific paths into the sysconfig data, which limits the portability - of the compiled Python. Alternatively, if ``xcrun`` is used *as* the compiler, - it requires that compiler variables like ``CC`` include spaces, which can - cause significant problems with many C configuration systems which assume that - ``CC`` will be a single executable. - - To work around this problem, the ``iOS/Resources/bin`` folder contains some - wrapper scripts that present as simple compilers and linkers, but wrap - underlying calls to ``xcrun``. This allows configure to use a ``CC`` - definition without spaces, and without user- or version-specific paths, while - retaining the ability to adapt to the local Xcode install. These scripts are - included in the ``bin`` directory of an iOS install. - - These scripts will, by default, use the currently active Xcode installation. - If you want to use a different Xcode installation, you can use - ``xcode-select`` to set a new default Xcode globally, or you can use the - ``DEVELOPER_DIR`` environment variable to specify an Xcode install. The - scripts will use the default ``iphoneos``/``iphonesimulator`` SDK version for - the select Xcode install; if you want to use a different SDK, you can set the - ``IOS_SDK_VERSION`` environment variable. (e.g, setting - ``IOS_SDK_VERSION=17.1`` would cause the scripts to use the ``iphoneos17.1`` - and ``iphonesimulator17.1`` SDKs, regardless of the Xcode default.) - - The path has also been cleared of any user customizations. A common source of - bugs is for tools like Homebrew to accidentally leak macOS binaries into an iOS - build. Resetting the path to a known "bare bones" value is the easiest way to - avoid these problems. - -* ``--host`` is the architecture and ABI that you want to build, in GNU compiler - triple format. This will be one of: - - - ``arm64-apple-ios`` for ARM64 iOS devices. - - ``arm64-apple-ios-simulator`` for the iOS simulator running on Apple - Silicon devices. - - ``x86_64-apple-ios-simulator`` for the iOS simulator running on Intel - devices. - -* ``--build`` is the GNU compiler triple for the machine that will be running - the compiler. This is one of: - - - ``arm64-apple-darwin`` for Apple Silicon devices. - - ``x86_64-apple-darwin`` for Intel devices. - -* ``/path/to/python.exe`` is the path to a Python binary on the machine that - will be running the compiler. This is needed because the Python compilation - process involves running some Python code. On a normal desktop build of - Python, you can compile a python interpreter and then use that interpreter to - run Python code. However, the binaries produced for iOS won't run on macOS, so - you need to provide an external Python interpreter. This interpreter must be - the same version as the Python that is being compiled. To be completely safe, - this should be the *exact* same commit hash. However, the longer a Python - release has been stable, the more likely it is that this constraint can be - relaxed - the same micro version will often be sufficient. - -* The ``install`` target for iOS builds is slightly different to other - platforms. On most platforms, ``make install`` will install the build into - the final runtime location. This won't be the case for iOS, as the final - runtime location will be on a physical device. - - However, you still need to run the ``install`` target for iOS builds, as it - performs some final framework assembly steps. The location specified with - ``--enable-framework`` will be the location where ``make install`` will - assemble the complete iOS framework. This completed framework can then - be copied and relocated as required. - -For a full CPython build, you also need to specify the paths to iOS builds of -the binary libraries that CPython depends on (XZ, BZip2, LibFFI and OpenSSL). -This can be done by defining the ``LIBLZMA_CFLAGS``, ``LIBLZMA_LIBS``, -``BZIP2_CFLAGS``, ``BZIP2_LIBS``, ``LIBFFI_CFLAGS``, and ``LIBFFI_LIBS`` -environment variables, and the ``--with-openssl`` configure option. Versions of -these libraries pre-compiled for iOS can be found in `this repository -`__. LibFFI is -especially important, as many parts of the standard library (including the -``platform``, ``sysconfig`` and ``webbrowser`` modules) require the use of the -``ctypes`` module at runtime. - -By default, Python will be compiled with an iOS deployment target (i.e., the -minimum supported iOS version) of 13.0. To specify a different deployment -target, provide the version number as part of the ``--host`` argument - for -example, ``--host=arm64-apple-ios15.4-simulator`` would compile an ARM64 -simulator build with a deployment target of 15.4. - -Merge thin frameworks into fat frameworks ------------------------------------------ - -Once you've built a ``Python.framework`` for each ABI and architecture, you -must produce a "fat" framework for each ABI that contains all the architectures -for that ABI. - -The ``iphoneos`` build only needs to support a single architecture, so it can be -used without modification. - -If you only want to support a single simulator architecture, (e.g., only support -ARM64 simulators), you can use a single architecture ``Python.framework`` build. -However, if you want to create ``Python.xcframework`` that supports *all* -architectures, you'll need to merge the ``iphonesimulator`` builds for ARM64 and -x86_64 into a single "fat" framework. - -The "fat" framework can be constructed by performing a directory merge of the -content of the two "thin" ``Python.framework`` directories, plus the ``bin`` and -``lib`` folders for each thin framework. When performing this merge: - -* The pure Python standard library content is identical for each architecture, - except for a handful of platform-specific files (such as the ``sysconfig`` - module). Ensure that the "fat" framework has the union of all standard library - files. - -* Any binary files in the standard library, plus the main - ``libPython3.X.dylib``, can be merged using the ``lipo`` tool, provide by - Xcode:: - - $ lipo -create -output module.dylib path/to/x86_64/module.dylib path/to/arm64/module.dylib - -* The header files will be identical on both architectures, except for - ``pyconfig.h``. Copy all the headers from one platform (say, arm64), rename - ``pyconfig.h`` to ``pyconfig-arm64.h``, and copy the ``pyconfig.h`` for the - other architecture into the merged header folder as ``pyconfig-x86_64.h``. - Then copy the ``iOS/Resources/pyconfig.h`` file from the CPython sources into - the merged headers folder. This will allow the two Python architectures to - share a common ``pyconfig.h`` header file. - -At this point, you should have 2 Python.framework folders - one for ``iphoneos``, -and one for ``iphonesimulator`` that is a merge of x86+64 and ARM64 content. - -Merge frameworks into an XCframework ------------------------------------- - -Now that we have 2 (potentially fat) ABI-specific frameworks, we can merge those -frameworks into a single ``XCframework``. - -The initial skeleton of an ``XCframework`` is built using:: - - xcodebuild -create-xcframework -output Python.xcframework -framework path/to/iphoneos/Python.framework -framework path/to/iphonesimulator/Python.framework - -Then, copy the ``bin`` and ``lib`` folders into the architecture-specific slices of -the XCframework:: - - cp path/to/iphoneos/bin Python.xcframework/ios-arm64 - cp path/to/iphoneos/lib Python.xcframework/ios-arm64 - - cp path/to/iphonesimulator/bin Python.xcframework/ios-arm64_x86_64-simulator - cp path/to/iphonesimulator/lib Python.xcframework/ios-arm64_x86_64-simulator - -Note that the name of the architecture-specific slice for the simulator will -depend on the CPU architecture(s) that you build. - -You now have a Python.xcframework that can be used in a project. - -Testing Python on iOS -===================== - -The ``iOS/testbed`` folder that contains an Xcode project that is able to run -the iOS test suite. This project converts the Python test suite into a single -test case in Xcode's XCTest framework. The single XCTest passes if the test -suite passes. - -To run the test suite, configure a Python build for an iOS simulator (i.e., -``--host=arm64-apple-ios-simulator`` or ``--host=x86_64-apple-ios-simulator`` -), specifying a framework build (i.e. ``--enable-framework``). Ensure that your -``PATH`` has been configured to include the ``iOS/Resources/bin`` folder and -exclude any non-iOS tools, then run:: - - $ make all - $ make install - $ make testios - -This will: - -* Build an iOS framework for your chosen architecture; -* Finalize the single-platform framework; -* Make a clean copy of the testbed project; -* Install the Python iOS framework into the copy of the testbed project; and -* Run the test suite on an "iPhone SE (3rd generation)" simulator. - -On success, the test suite will exit and report successful completion of the -test suite. On a 2022 M1 MacBook Pro, the test suite takes approximately 15 -minutes to run; a couple of extra minutes is required to compile the testbed -project, and then boot and prepare the iOS simulator. - -Debugging test failures ------------------------ - -Running ``make testios`` generates a standalone version of the ``iOS/testbed`` -project, and runs the full test suite. It does this using ``iOS/testbed`` -itself - the folder is an executable module that can be used to create and run -a clone of the testbed project. - -You can generate your own standalone testbed instance by running:: - - $ python iOS/testbed clone --framework iOS/Frameworks/arm64-iphonesimulator my-testbed - -This invocation assumes that ``iOS/Frameworks/arm64-iphonesimulator`` is the -path to the iOS simulator framework for your platform (ARM64 in this case); -``my-testbed`` is the name of the folder for the new testbed clone. - -You can then use the ``my-testbed`` folder to run the Python test suite, -passing in any command line arguments you may require. For example, if you're -trying to diagnose a failure in the ``os`` module, you might run:: - - $ python my-testbed run -- test -W test_os - -This is the equivalent of running ``python -m test -W test_os`` on a desktop -Python build. Any arguments after the ``--`` will be passed to testbed as if -they were arguments to ``python -m`` on a desktop machine. - -Testing in Xcode -^^^^^^^^^^^^^^^^ - -You can also open the testbed project in Xcode by running:: - - $ open my-testbed/iOSTestbed.xcodeproj - -This will allow you to use the full Xcode suite of tools for debugging. - -The arguments used to run the test suite are defined as part of the test plan. -To modify the test plan, select the test plan node of the project tree (it -should be the first child of the root node), and select the "Configurations" -tab. Modify the "Arguments Passed On Launch" value to change the testing -arguments. - -The test plan also disables parallel testing, and specifies the use of the -``iOSTestbed.lldbinit`` file for providing configuration of the debugger. The -default debugger configuration disables automatic breakpoints on the -``SIGINT``, ``SIGUSR1``, ``SIGUSR2``, and ``SIGXFSZ`` signals. - -Testing on an iOS device -^^^^^^^^^^^^^^^^^^^^^^^^ - -To test on an iOS device, the app needs to be signed with known developer -credentials. To obtain these credentials, you must have an iOS Developer -account, and your Xcode install will need to be logged into your account (see -the Accounts tab of the Preferences dialog). - -Once the project is open, and you're signed into your Apple Developer account, -select the root node of the project tree (labeled "iOSTestbed"), then the -"Signing & Capabilities" tab in the details page. Select a development team -(this will likely be your own name), and plug in a physical device to your -macOS machine with a USB cable. You should then be able to select your physical -device from the list of targets in the pulldown in the Xcode titlebar. diff --git a/iOS/Resources/Info.plist.in b/iOS/Resources/Info.plist.in deleted file mode 100644 index c3e261ecd9eff7..00000000000000 --- a/iOS/Resources/Info.plist.in +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - Python - CFBundleGetInfoString - Python Runtime and Library - CFBundleIdentifier - @PYTHONFRAMEWORKIDENTIFIER@ - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Python - CFBundlePackageType - FMWK - CFBundleShortVersionString - @VERSION@ - CFBundleLongVersionString - %VERSION%, (c) 2001-2024 Python Software Foundation. - CFBundleSignature - ???? - CFBundleVersion - 1 - CFBundleSupportedPlatforms - - iPhoneOS - - MinimumOSVersion - @IPHONEOS_DEPLOYMENT_TARGET@ - - diff --git a/iOS/Resources/bin/arm64-apple-ios-ar b/iOS/Resources/bin/arm64-apple-ios-ar deleted file mode 100755 index 3cf3eb218741fa..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-ar +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphoneos${IOS_SDK_VERSION} ar "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-clang b/iOS/Resources/bin/arm64-apple-ios-clang deleted file mode 100755 index f50d5b5142fc76..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-clang +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-clang++ b/iOS/Resources/bin/arm64-apple-ios-clang++ deleted file mode 100755 index 0794731d7dcbda..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-clang++ +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphoneos${IOS_SDK_VERSION} clang++ -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-cpp b/iOS/Resources/bin/arm64-apple-ios-cpp deleted file mode 100755 index 24fa1506bab827..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-cpp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} -E "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-ar b/iOS/Resources/bin/arm64-apple-ios-simulator-ar deleted file mode 100755 index b836b6db9025bb..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-simulator-ar +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} ar "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-clang b/iOS/Resources/bin/arm64-apple-ios-simulator-clang deleted file mode 100755 index 4891a00876e0bd..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-simulator-clang +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-clang++ b/iOS/Resources/bin/arm64-apple-ios-simulator-clang++ deleted file mode 100755 index 58b2a5f6f18c2b..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-simulator-clang++ +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-cpp b/iOS/Resources/bin/arm64-apple-ios-simulator-cpp deleted file mode 100755 index c9df94e8b7c837..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-simulator-cpp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator -E "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-strip b/iOS/Resources/bin/arm64-apple-ios-simulator-strip deleted file mode 100755 index fd59d309b73a20..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-simulator-strip +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} strip -arch arm64 "$@" diff --git a/iOS/Resources/bin/arm64-apple-ios-strip b/iOS/Resources/bin/arm64-apple-ios-strip deleted file mode 100755 index 75e823a3d02d61..00000000000000 --- a/iOS/Resources/bin/arm64-apple-ios-strip +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphoneos${IOS_SDK_VERSION} strip -arch arm64 "$@" diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-ar b/iOS/Resources/bin/x86_64-apple-ios-simulator-ar deleted file mode 100755 index b836b6db9025bb..00000000000000 --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-ar +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} ar "$@" diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang deleted file mode 100755 index f4739a7b945d01..00000000000000 --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@" diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++ deleted file mode 100755 index c348ae4c10395b..00000000000000 --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++ +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@" diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp b/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp deleted file mode 100755 index 6d7f8084c9fdcc..00000000000000 --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator -E "$@" diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-strip b/iOS/Resources/bin/x86_64-apple-ios-simulator-strip deleted file mode 100755 index c5cfb28929195a..00000000000000 --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-strip +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xcrun --sdk iphonesimulator${IOS_SDK_VERSION} strip -arch x86_64 "$@" diff --git a/iOS/Resources/dylib-Info-template.plist b/iOS/Resources/dylib-Info-template.plist deleted file mode 100644 index f652e272f71c88..00000000000000 --- a/iOS/Resources/dylib-Info-template.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - iPhoneOS - - MinimumOSVersion - 12.0 - CFBundleVersion - 1 - - diff --git a/iOS/Resources/pyconfig.h b/iOS/Resources/pyconfig.h deleted file mode 100644 index 4acff2c6051637..00000000000000 --- a/iOS/Resources/pyconfig.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef __arm64__ -#include "pyconfig-arm64.h" -#endif - -#ifdef __x86_64__ -#include "pyconfig-x86_64.h" -#endif diff --git a/iOS/testbed/Python.xcframework/Info.plist b/iOS/testbed/Python.xcframework/Info.plist deleted file mode 100644 index c6418de6e74a4e..00000000000000 --- a/iOS/testbed/Python.xcframework/Info.plist +++ /dev/null @@ -1,44 +0,0 @@ - - - - - AvailableLibraries - - - BinaryPath - Python.framework/Python - LibraryIdentifier - ios-arm64 - LibraryPath - Python.framework - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - - - BinaryPath - Python.framework/Python - LibraryIdentifier - ios-arm64_x86_64-simulator - LibraryPath - Python.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - ios - SupportedPlatformVariant - simulator - - - CFBundlePackageType - XFWK - XCFrameworkFormatVersion - 1.0 - - diff --git a/iOS/testbed/Python.xcframework/ios-arm64/README b/iOS/testbed/Python.xcframework/ios-arm64/README deleted file mode 100644 index c1b076d12cddb7..00000000000000 --- a/iOS/testbed/Python.xcframework/ios-arm64/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory is intentionally empty. - -It should be used as a target for `--enable-framework` when compiling an iOS on-device -build for testing purposes. diff --git a/iOS/testbed/Python.xcframework/ios-arm64_x86_64-simulator/README b/iOS/testbed/Python.xcframework/ios-arm64_x86_64-simulator/README deleted file mode 100644 index ae334e5d769d9d..00000000000000 --- a/iOS/testbed/Python.xcframework/ios-arm64_x86_64-simulator/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory is intentionally empty. - -It should be used as a target for `--enable-framework` when compiling an iOS simulator -build for testing purposes (either x86_64 or ARM64). diff --git a/iOS/testbed/__main__.py b/iOS/testbed/__main__.py deleted file mode 100644 index 4caa9e3dfdb681..00000000000000 --- a/iOS/testbed/__main__.py +++ /dev/null @@ -1,349 +0,0 @@ -import argparse -import json -import re -import shlex -import shutil -import subprocess -import sys -from pathlib import Path - - -DECODE_ARGS = ("UTF-8", "backslashreplace") - -# The system log prefixes each line: -# 2025-01-17 16:14:29.093742+0800 iOSTestbed[23987:1fd393b4] ... -# 2025-01-17 16:14:29.093742+0800 iOSTestbed[23987:1fd393b4] ... - -LOG_PREFIX_REGEX = re.compile( - r"^\d{4}-\d{2}-\d{2}" # YYYY-MM-DD - r"\s+\d+:\d{2}:\d{2}\.\d+\+\d{4}" # HH:MM:SS.ssssss+ZZZZ - r"\s+iOSTestbed\[\d+:\w+\] " # Process/thread ID -) - - -# Select a simulator device to use. -def select_simulator_device(): - # List the testing simulators, in JSON format - raw_json = subprocess.check_output(["xcrun", "simctl", "list", "-j"]) - json_data = json.loads(raw_json) - - # Any device will do; we'll look for "SE" devices - but the name isn't - # consistent over time. Older Xcode versions will use "iPhone SE (Nth - # generation)"; As of 2025, they've started using "iPhone 16e". - # - # When Xcode is updated after a new release, new devices will be available - # and old ones will be dropped from the set available on the latest iOS - # version. Select the one with the highest minimum runtime version - this - # is an indicator of the "newest" released device, which should always be - # supported on the "most recent" iOS version. - se_simulators = sorted( - (devicetype["minRuntimeVersion"], devicetype["name"]) - for devicetype in json_data["devicetypes"] - if devicetype["productFamily"] == "iPhone" - and ( - ( - "iPhone " in devicetype["name"] - and devicetype["name"].endswith("e") - ) - or "iPhone SE " in devicetype["name"] - ) - ) - - return se_simulators[-1][1] - - -def xcode_test(location, simulator, verbose): - # Build and run the test suite on the named simulator. - args = [ - "-project", - str(location / "iOSTestbed.xcodeproj"), - "-scheme", - "iOSTestbed", - "-destination", - f"platform=iOS Simulator,name={simulator}", - "-derivedDataPath", - str(location / "DerivedData"), - ] - verbosity_args = [] if verbose else ["-quiet"] - - print("Building test project...") - subprocess.run( - ["xcodebuild", "build-for-testing"] + args + verbosity_args, - check=True, - ) - - print("Running test project...") - # Test execution *can't* be run -quiet; verbose mode - # is how we see the output of the test output. - process = subprocess.Popen( - ["xcodebuild", "test-without-building"] + args, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - while line := (process.stdout.readline()).decode(*DECODE_ARGS): - # Strip the timestamp/process prefix from each log line - line = LOG_PREFIX_REGEX.sub("", line) - sys.stdout.write(line) - sys.stdout.flush() - - status = process.wait(timeout=5) - exit(status) - - -def clone_testbed( - source: Path, - target: Path, - framework: Path, - apps: list[Path], -) -> None: - if target.exists(): - print(f"{target} already exists; aborting without creating project.") - sys.exit(10) - - if framework is None: - if not ( - source / "Python.xcframework/ios-arm64_x86_64-simulator/bin" - ).is_dir(): - print( - f"The testbed being cloned ({source}) does not contain " - f"a simulator framework. Re-run with --framework" - ) - sys.exit(11) - else: - if not framework.is_dir(): - print(f"{framework} does not exist.") - sys.exit(12) - elif not ( - framework.suffix == ".xcframework" - or (framework / "Python.framework").is_dir() - ): - print( - f"{framework} is not an XCframework, " - f"or a simulator slice of a framework build." - ) - sys.exit(13) - - print("Cloning testbed project:") - print(f" Cloning {source}...", end="") - shutil.copytree(source, target, symlinks=True) - print(" done") - - xc_framework_path = target / "Python.xcframework" - sim_framework_path = xc_framework_path / "ios-arm64_x86_64-simulator" - if framework is not None: - if framework.suffix == ".xcframework": - print(" Installing XCFramework...", end="") - if xc_framework_path.is_dir(): - shutil.rmtree(xc_framework_path) - else: - xc_framework_path.unlink(missing_ok=True) - xc_framework_path.symlink_to( - framework.relative_to(xc_framework_path.parent, walk_up=True) - ) - print(" done") - else: - print(" Installing simulator framework...", end="") - if sim_framework_path.is_dir(): - shutil.rmtree(sim_framework_path) - else: - sim_framework_path.unlink(missing_ok=True) - sim_framework_path.symlink_to( - framework.relative_to(sim_framework_path.parent, walk_up=True) - ) - print(" done") - else: - if ( - xc_framework_path.is_symlink() - and not xc_framework_path.readlink().is_absolute() - ): - # XCFramework is a relative symlink. Rewrite the symlink relative - # to the new location. - print(" Rewriting symlink to XCframework...", end="") - orig_xc_framework_path = ( - source / xc_framework_path.readlink() - ).resolve() - xc_framework_path.unlink() - xc_framework_path.symlink_to( - orig_xc_framework_path.relative_to( - xc_framework_path.parent, walk_up=True - ) - ) - print(" done") - elif ( - sim_framework_path.is_symlink() - and not sim_framework_path.readlink().is_absolute() - ): - print(" Rewriting symlink to simulator framework...", end="") - # Simulator framework is a relative symlink. Rewrite the symlink - # relative to the new location. - orig_sim_framework_path = ( - source / "Python.XCframework" / sim_framework_path.readlink() - ).resolve() - sim_framework_path.unlink() - sim_framework_path.symlink_to( - orig_sim_framework_path.relative_to( - sim_framework_path.parent, walk_up=True - ) - ) - print(" done") - else: - print(" Using pre-existing iOS framework.") - - for app_src in apps: - print(f" Installing app {app_src.name!r}...", end="") - app_target = target / f"iOSTestbed/app/{app_src.name}" - if app_target.is_dir(): - shutil.rmtree(app_target) - shutil.copytree(app_src, app_target) - print(" done") - - print(f"Successfully cloned testbed: {target.resolve()}") - - -def update_test_plan(testbed_path, args): - # Modify the test plan to use the requested test arguments. - test_plan_path = testbed_path / "iOSTestbed.xctestplan" - with test_plan_path.open("r", encoding="utf-8") as f: - test_plan = json.load(f) - - test_plan["defaultOptions"]["commandLineArgumentEntries"] = [ - {"argument": shlex.quote(arg)} for arg in args - ] - - with test_plan_path.open("w", encoding="utf-8") as f: - json.dump(test_plan, f, indent=2) - - -def run_testbed(simulator: str | None, args: list[str], verbose: bool = False): - location = Path(__file__).parent - print("Updating test plan...", end="") - update_test_plan(location, args) - print(" done.") - - # xcodebuild doesn't guarantee that the CoreSimulatorService daemon is - # running prior to using a simulator, but calling `xcrun simctl list` does. - # Determining the default simulator that *would* be used is a cheap action; - # so use that as a way to ensure that the CoreSimulatorService daemon is - # running. - default_simulator = select_simulator_device() - if simulator is None: - simulator = default_simulator - print(f"Running test on {simulator}") - - xcode_test(location, simulator=simulator, verbose=verbose) - - -def main(): - parser = argparse.ArgumentParser( - description=( - "Manages the process of testing a Python project in the iOS simulator." - ), - ) - - subcommands = parser.add_subparsers(dest="subcommand") - - clone = subcommands.add_parser( - "clone", - description=( - "Clone the testbed project, copying in an iOS Python framework and" - "any specified application code." - ), - help="Clone a testbed project to a new location.", - ) - clone.add_argument( - "--framework", - help=( - "The location of the XCFramework (or simulator-only slice of an " - "XCFramework) to use when running the testbed" - ), - ) - clone.add_argument( - "--app", - dest="apps", - action="append", - default=[], - help="The location of any code to include in the testbed project", - ) - clone.add_argument( - "location", - help="The path where the testbed will be cloned.", - ) - - run = subcommands.add_parser( - "run", - usage="%(prog)s [-h] [--simulator SIMULATOR] -- [ ...]", - description=( - "Run a testbed project. The arguments provided after `--` will be " - "passed to the running iOS process as if they were arguments to " - "`python -m`." - ), - help="Run a testbed project", - ) - run.add_argument( - "--simulator", - help=( - "The name of the simulator to use (eg: 'iPhone 16e'). Defaults to " - "the most recently released 'entry level' iPhone device. Device " - "architecture and OS version can also be specified; e.g., " - "`--simulator 'iPhone 16 Pro,arch=arm64,OS=26.0'` would run on " - "an ARM64 iPhone 16 Pro simulator running iOS 26.0." - ), - ) - run.add_argument( - "-v", - "--verbose", - action="store_true", - help="Enable verbose output", - ) - - try: - pos = sys.argv.index("--") - testbed_args = sys.argv[1:pos] - test_args = sys.argv[pos + 1 :] - except ValueError: - testbed_args = sys.argv[1:] - test_args = [] - - context = parser.parse_args(testbed_args) - - if context.subcommand == "clone": - clone_testbed( - source=Path(__file__).parent.resolve(), - target=Path(context.location).resolve(), - framework=Path(context.framework).resolve() - if context.framework - else None, - apps=[Path(app) for app in context.apps], - ) - elif context.subcommand == "run": - if test_args: - if not ( - Path(__file__).parent - / "Python.xcframework/ios-arm64_x86_64-simulator/bin" - ).is_dir(): - print( - f"Testbed does not contain a compiled iOS framework. Use " - f"`python {sys.argv[0]} clone ...` to create a runnable " - f"clone of this testbed." - ) - sys.exit(20) - - run_testbed( - simulator=context.simulator, - verbose=context.verbose, - args=test_args, - ) - else: - print( - f"Must specify test arguments (e.g., {sys.argv[0]} run -- test)" - ) - print() - parser.print_help(sys.stderr) - sys.exit(21) - else: - parser.print_help(sys.stderr) - sys.exit(1) - - -if __name__ == "__main__": - main() diff --git a/iOS/testbed/iOSTestbed.lldbinit b/iOS/testbed/iOSTestbed.lldbinit deleted file mode 100644 index 4cf00dd0f9de1d..00000000000000 --- a/iOS/testbed/iOSTestbed.lldbinit +++ /dev/null @@ -1,4 +0,0 @@ -process handle SIGINT -n true -p true -s false -process handle SIGUSR1 -n true -p true -s false -process handle SIGUSR2 -n true -p true -s false -process handle SIGXFSZ -n true -p true -s false diff --git a/iOS/testbed/iOSTestbed.xcodeproj/project.pbxproj b/iOS/testbed/iOSTestbed.xcodeproj/project.pbxproj deleted file mode 100644 index 183dc6aa9ecaa6..00000000000000 --- a/iOS/testbed/iOSTestbed.xcodeproj/project.pbxproj +++ /dev/null @@ -1,588 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66162B0EFA380010BFC8 /* AppDelegate.m */; }; - 71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */; }; - 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607A66212B0EFA390010BFC8 /* Assets.xcassets */; }; - 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */; }; - 607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; }; - 607A66322B0EFA3A0010BFC8 /* iOSTestbedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66312B0EFA3A0010BFC8 /* iOSTestbedTests.m */; }; - 607A664C2B0EFC080010BFC8 /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 607A664A2B0EFB310010BFC8 /* Python.xcframework */; }; - 607A664D2B0EFC080010BFC8 /* Python.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 607A664A2B0EFB310010BFC8 /* Python.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 607A66502B0EFFE00010BFC8 /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 607A664A2B0EFB310010BFC8 /* Python.xcframework */; }; - 607A66512B0EFFE00010BFC8 /* Python.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 607A664A2B0EFB310010BFC8 /* Python.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */ = {isa = PBXBuildFile; fileRef = 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */; }; - 608619542CB77BA900F46182 /* app_packages in Resources */ = {isa = PBXBuildFile; fileRef = 608619532CB77BA900F46182 /* app_packages */; }; - 608619562CB7819B00F46182 /* app in Resources */ = {isa = PBXBuildFile; fileRef = 608619552CB7819B00F46182 /* app */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 607A662E2B0EFA3A0010BFC8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607A660A2B0EFA380010BFC8 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607A66112B0EFA380010BFC8; - remoteInfo = iOSTestbed; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 607A664E2B0EFC080010BFC8 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 607A664D2B0EFC080010BFC8 /* Python.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - 607A66522B0EFFE00010BFC8 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 607A66512B0EFFE00010BFC8 /* Python.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 607A66122B0EFA380010BFC8 /* iOSTestbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; - D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; - 607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 607A662D2B0EFA3A0010BFC8 /* iOSTestbedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSTestbedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 607A66312B0EFA3A0010BFC8 /* iOSTestbedTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iOSTestbedTests.m; sourceTree = ""; }; - 607A664A2B0EFB310010BFC8 /* Python.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Python.xcframework; sourceTree = ""; }; - 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "dylib-Info-template.plist"; sourceTree = ""; }; - 607A66592B0F08600010BFC8 /* iOSTestbed-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iOSTestbed-Info.plist"; sourceTree = ""; }; - 608619532CB77BA900F46182 /* app_packages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app_packages; sourceTree = ""; }; - 608619552CB7819B00F46182 /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app; sourceTree = ""; }; - 60FE0EFB2E56BB6D00524F87 /* iOSTestbed.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = iOSTestbed.xctestplan; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 607A660F2B0EFA380010BFC8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 607A664C2B0EFC080010BFC8 /* Python.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607A662A2B0EFA3A0010BFC8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 607A66502B0EFFE00010BFC8 /* Python.xcframework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 607A66092B0EFA380010BFC8 = { - isa = PBXGroup; - children = ( - 60FE0EFB2E56BB6D00524F87 /* iOSTestbed.xctestplan */, - 607A664A2B0EFB310010BFC8 /* Python.xcframework */, - 607A66142B0EFA380010BFC8 /* iOSTestbed */, - 607A66302B0EFA3A0010BFC8 /* iOSTestbedTests */, - 607A66132B0EFA380010BFC8 /* Products */, - 607A664F2B0EFFE00010BFC8 /* Frameworks */, - ); - sourceTree = ""; - }; - 607A66132B0EFA380010BFC8 /* Products */ = { - isa = PBXGroup; - children = ( - 607A66122B0EFA380010BFC8 /* iOSTestbed.app */, - 607A662D2B0EFA3A0010BFC8 /* iOSTestbedTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 607A66142B0EFA380010BFC8 /* iOSTestbed */ = { - isa = PBXGroup; - children = ( - 608619552CB7819B00F46182 /* app */, - 608619532CB77BA900F46182 /* app_packages */, - 607A66592B0F08600010BFC8 /* iOSTestbed-Info.plist */, - 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */, - 607A66152B0EFA380010BFC8 /* AppDelegate.h */, - 607A66162B0EFA380010BFC8 /* AppDelegate.m */, - 83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */, - D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */, - 607A66212B0EFA390010BFC8 /* Assets.xcassets */, - 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */, - 607A66272B0EFA390010BFC8 /* main.m */, - ); - path = iOSTestbed; - sourceTree = ""; - }; - 607A66302B0EFA3A0010BFC8 /* iOSTestbedTests */ = { - isa = PBXGroup; - children = ( - 607A66312B0EFA3A0010BFC8 /* iOSTestbedTests.m */, - ); - path = iOSTestbedTests; - sourceTree = ""; - }; - 607A664F2B0EFFE00010BFC8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 607A66112B0EFA380010BFC8 /* iOSTestbed */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607A66412B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "iOSTestbed" */; - buildPhases = ( - 607A660E2B0EFA380010BFC8 /* Sources */, - 607A660F2B0EFA380010BFC8 /* Frameworks */, - 607A66102B0EFA380010BFC8 /* Resources */, - 607A66552B0F061D0010BFC8 /* Install Target Specific Python Standard Library */, - 607A66562B0F06200010BFC8 /* Prepare Python Binary Modules */, - 607A664E2B0EFC080010BFC8 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iOSTestbed; - productName = iOSTestbed; - productReference = 607A66122B0EFA380010BFC8 /* iOSTestbed.app */; - productType = "com.apple.product-type.application"; - }; - 607A662C2B0EFA3A0010BFC8 /* iOSTestbedTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607A66442B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "iOSTestbedTests" */; - buildPhases = ( - 607A66292B0EFA3A0010BFC8 /* Sources */, - 607A662A2B0EFA3A0010BFC8 /* Frameworks */, - 607A662B2B0EFA3A0010BFC8 /* Resources */, - 607A66522B0EFFE00010BFC8 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 607A662F2B0EFA3A0010BFC8 /* PBXTargetDependency */, - ); - name = iOSTestbedTests; - productName = iOSTestbedTests; - productReference = 607A662D2B0EFA3A0010BFC8 /* iOSTestbedTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 607A660A2B0EFA380010BFC8 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastUpgradeCheck = 1500; - TargetAttributes = { - 607A66112B0EFA380010BFC8 = { - CreatedOnToolsVersion = 15.0.1; - }; - 607A662C2B0EFA3A0010BFC8 = { - CreatedOnToolsVersion = 15.0.1; - TestTargetID = 607A66112B0EFA380010BFC8; - }; - }; - }; - buildConfigurationList = 607A660D2B0EFA380010BFC8 /* Build configuration list for PBXProject "iOSTestbed" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 607A66092B0EFA380010BFC8; - productRefGroup = 607A66132B0EFA380010BFC8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 607A66112B0EFA380010BFC8 /* iOSTestbed */, - 607A662C2B0EFA3A0010BFC8 /* iOSTestbedTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 607A66102B0EFA380010BFC8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */, - 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */, - 608619562CB7819B00F46182 /* app in Resources */, - 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */, - 608619542CB77BA900F46182 /* app_packages in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607A662B2B0EFA3A0010BFC8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 607A66552B0F061D0010BFC8 /* Install Target Specific Python Standard Library */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Install Target Specific Python Standard Library"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nmkdir -p \"$CODESIGNING_FOLDER_PATH/python/lib\"\nif [ \"$EFFECTIVE_PLATFORM_NAME\" = \"-iphonesimulator\" ]; then\n echo \"Installing Python modules for iOS Simulator\"\n rsync -au --delete \"$PROJECT_DIR/Python.xcframework/ios-arm64_x86_64-simulator/lib/\" \"$CODESIGNING_FOLDER_PATH/python/lib/\" \nelse\n echo \"Installing Python modules for iOS Device\"\n rsync -au --delete \"$PROJECT_DIR/Python.xcframework/ios-arm64/lib/\" \"$CODESIGNING_FOLDER_PATH/python/lib/\" \nfi\n"; - showEnvVarsInLog = 0; - }; - 607A66562B0F06200010BFC8 /* Prepare Python Binary Modules */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Prepare Python Binary Modules"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\ninstall_dylib () {\n INSTALL_BASE=$1\n FULL_EXT=$2\n\n # The name of the extension file\n EXT=$(basename \"$FULL_EXT\")\n # The location of the extension file, relative to the bundle\n RELATIVE_EXT=${FULL_EXT#$CODESIGNING_FOLDER_PATH/} \n # The path to the extension file, relative to the install base\n PYTHON_EXT=${RELATIVE_EXT/$INSTALL_BASE/}\n # The full dotted name of the extension module, constructed from the file path.\n FULL_MODULE_NAME=$(echo $PYTHON_EXT | cut -d \".\" -f 1 | tr \"/\" \".\"); \n # A bundle identifier; not actually used, but required by Xcode framework packaging\n FRAMEWORK_BUNDLE_ID=$(echo $PRODUCT_BUNDLE_IDENTIFIER.$FULL_MODULE_NAME | tr \"_\" \"-\")\n # The name of the framework folder.\n FRAMEWORK_FOLDER=\"Frameworks/$FULL_MODULE_NAME.framework\"\n\n # If the framework folder doesn't exist, create it.\n if [ ! -d \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\" ]; then\n echo \"Creating framework for $RELATIVE_EXT\" \n mkdir -p \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\"\n cp \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n plutil -replace CFBundleExecutable -string \"$FULL_MODULE_NAME\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n plutil -replace CFBundleIdentifier -string \"$FRAMEWORK_BUNDLE_ID\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n fi\n \n echo \"Installing binary for $FRAMEWORK_FOLDER/$FULL_MODULE_NAME\" \n mv \"$FULL_EXT\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/$FULL_MODULE_NAME\"\n # Create a placeholder .fwork file where the .so was\n echo \"$FRAMEWORK_FOLDER/$FULL_MODULE_NAME\" > ${FULL_EXT%.so}.fwork\n # Create a back reference to the .so file location in the framework\n echo \"${RELATIVE_EXT%.so}.fwork\" > \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/$FULL_MODULE_NAME.origin\" \n}\n\nPYTHON_VER=$(ls -1 \"$CODESIGNING_FOLDER_PATH/python/lib\")\necho \"Install Python $PYTHON_VER standard library extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/python/lib/$PYTHON_VER/lib-dynload\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib python/lib/$PYTHON_VER/lib-dynload/ \"$FULL_EXT\"\ndone\necho \"Install app package extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/app_packages\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib app_packages/ \"$FULL_EXT\"\ndone\necho \"Install app extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/app\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib app/ \"$FULL_EXT\"\ndone\n\n# Clean up dylib template \nrm -f \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\"\necho \"Signing frameworks as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)...\"\nfind \"$CODESIGNING_FOLDER_PATH/Frameworks\" -name \"*.framework\" -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" ${OTHER_CODE_SIGN_FLAGS:-} -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der \"{}\" \\; \n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 607A660E2B0EFA380010BFC8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */, - 71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */, - 607A66282B0EFA390010BFC8 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607A66292B0EFA3A0010BFC8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607A66322B0EFA3A0010BFC8 /* iOSTestbedTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 607A662F2B0EFA3A0010BFC8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607A66112B0EFA380010BFC8 /* iOSTestbed */; - targetProxy = 607A662E2B0EFA3A0010BFC8 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 607A66242B0EFA390010BFC8 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 607A663F2B0EFA3A0010BFC8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 607A66402B0EFA3A0010BFC8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 607A66422B0EFA3A0010BFC8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; - INFOPLIST_FILE = "iOSTestbed/iOSTestbed-Info.plist"; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 3.13.0a1; - PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbed; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 607A66432B0EFA3A0010BFC8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; - INFOPLIST_FILE = "iOSTestbed/iOSTestbed-Info.plist"; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 3.13.0a1; - PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbed; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 607A66452B0EFA3A0010BFC8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3HEZE76D99; - GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iOSTestbed"; - }; - name = Debug; - }; - 607A66462B0EFA3A0010BFC8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 3HEZE76D99; - GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.python.iOSTestbedTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iOSTestbed"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 607A660D2B0EFA380010BFC8 /* Build configuration list for PBXProject "iOSTestbed" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607A663F2B0EFA3A0010BFC8 /* Debug */, - 607A66402B0EFA3A0010BFC8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607A66412B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "iOSTestbed" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607A66422B0EFA3A0010BFC8 /* Debug */, - 607A66432B0EFA3A0010BFC8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607A66442B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "iOSTestbedTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607A66452B0EFA3A0010BFC8 /* Debug */, - 607A66462B0EFA3A0010BFC8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 607A660A2B0EFA380010BFC8 /* Project object */; -} diff --git a/iOS/testbed/iOSTestbed.xcodeproj/xcshareddata/xcschemes/iOSTestbed.xcscheme b/iOS/testbed/iOSTestbed.xcodeproj/xcshareddata/xcschemes/iOSTestbed.xcscheme deleted file mode 100644 index d093a46f02e95d..00000000000000 --- a/iOS/testbed/iOSTestbed.xcodeproj/xcshareddata/xcschemes/iOSTestbed.xcscheme +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS/testbed/iOSTestbed.xctestplan b/iOS/testbed/iOSTestbed.xctestplan deleted file mode 100644 index 0c4ab9eb2bad30..00000000000000 --- a/iOS/testbed/iOSTestbed.xctestplan +++ /dev/null @@ -1,46 +0,0 @@ -{ - "configurations" : [ - { - "id" : "F5A95CE4-1ADE-4A6E-A0E1-CDBAE26DF0C5", - "name" : "Test Scheme Action", - "options" : { - - } - } - ], - "defaultOptions" : { - "commandLineArgumentEntries" : [ - { - "argument" : "test" - }, - { - "argument" : "-uall" - }, - { - "argument" : "--single-process" - }, - { - "argument" : "--rerun" - }, - { - "argument" : "-W" - } - ], - "targetForVariableExpansion" : { - "containerPath" : "container:iOSTestbed.xcodeproj", - "identifier" : "607A66112B0EFA380010BFC8", - "name" : "iOSTestbed" - } - }, - "testTargets" : [ - { - "parallelizable" : false, - "target" : { - "containerPath" : "container:iOSTestbed.xcodeproj", - "identifier" : "607A662C2B0EFA3A0010BFC8", - "name" : "iOSTestbedTests" - } - } - ], - "version" : 1 -} diff --git a/iOS/testbed/iOSTestbed/AppDelegate.h b/iOS/testbed/iOSTestbed/AppDelegate.h deleted file mode 100644 index f695b3b5efc08b..00000000000000 --- a/iOS/testbed/iOSTestbed/AppDelegate.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// AppDelegate.h -// iOSTestbed -// - -#import - -@interface AppDelegate : UIResponder - - -@end diff --git a/iOS/testbed/iOSTestbed/AppDelegate.m b/iOS/testbed/iOSTestbed/AppDelegate.m deleted file mode 100644 index fbe71bae23b718..00000000000000 --- a/iOS/testbed/iOSTestbed/AppDelegate.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// AppDelegate.m -// iOSTestbed -// - -#import "AppDelegate.h" -#import "SceneDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - -- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { - UISceneConfiguration *configuration = [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; - configuration.delegateClass = [SceneDelegate class]; - return configuration; -} - -- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { -} - -@end diff --git a/iOS/testbed/iOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json b/iOS/testbed/iOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970081645..00000000000000 --- a/iOS/testbed/iOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/iOS/testbed/iOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS/testbed/iOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3ee1a934..00000000000000 --- a/iOS/testbed/iOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/iOS/testbed/iOSTestbed/Assets.xcassets/Contents.json b/iOS/testbed/iOSTestbed/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7fca3..00000000000000 --- a/iOS/testbed/iOSTestbed/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/iOS/testbed/iOSTestbed/Base.lproj/LaunchScreen.storyboard b/iOS/testbed/iOSTestbed/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 5daafe73a866b7..00000000000000 --- a/iOS/testbed/iOSTestbed/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/iOS/testbed/iOSTestbed/SceneDelegate.h b/iOS/testbed/iOSTestbed/SceneDelegate.h deleted file mode 100644 index 264aacadca16e5..00000000000000 --- a/iOS/testbed/iOSTestbed/SceneDelegate.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// SceneDelegate.h -// iOSTestbed -// - -#import - -@interface SceneDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/iOS/testbed/iOSTestbed/SceneDelegate.m b/iOS/testbed/iOSTestbed/SceneDelegate.m deleted file mode 100644 index e82e447985d2e9..00000000000000 --- a/iOS/testbed/iOSTestbed/SceneDelegate.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// SceneDelegate.m -// iOSTestbed -// - -#import "SceneDelegate.h" - -@interface SceneDelegate () - -@end - -@implementation SceneDelegate - -- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { - UIWindowScene *windowScene = (UIWindowScene *)scene; - self.window = [[UIWindow alloc] initWithWindowScene:windowScene]; - self.window.rootViewController = [[UIViewController alloc] init]; - [self.window makeKeyAndVisible]; -} - -@end diff --git a/iOS/testbed/iOSTestbed/app/README b/iOS/testbed/iOSTestbed/app/README deleted file mode 100644 index af22c685f87976..00000000000000 --- a/iOS/testbed/iOSTestbed/app/README +++ /dev/null @@ -1,7 +0,0 @@ -This folder can contain any Python application code. - -During the build, any binary modules found in this folder will be processed into -iOS Framework form. - -When the test suite runs, this folder will be on the PYTHONPATH, and will be the -working directory for the test suite. diff --git a/iOS/testbed/iOSTestbed/app_packages/README b/iOS/testbed/iOSTestbed/app_packages/README deleted file mode 100644 index 42d7fdeb813250..00000000000000 --- a/iOS/testbed/iOSTestbed/app_packages/README +++ /dev/null @@ -1,7 +0,0 @@ -This folder can be a target for installing any Python dependencies needed by the -test suite. - -During the build, any binary modules found in this folder will be processed into -iOS Framework form. - -When the test suite runs, this folder will be on the PYTHONPATH. diff --git a/iOS/testbed/iOSTestbed/dylib-Info-template.plist b/iOS/testbed/iOSTestbed/dylib-Info-template.plist deleted file mode 100644 index f652e272f71c88..00000000000000 --- a/iOS/testbed/iOSTestbed/dylib-Info-template.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - iPhoneOS - - MinimumOSVersion - 12.0 - CFBundleVersion - 1 - - diff --git a/iOS/testbed/iOSTestbed/iOSTestbed-Info.plist b/iOS/testbed/iOSTestbed/iOSTestbed-Info.plist deleted file mode 100644 index 3a560656972aec..00000000000000 --- a/iOS/testbed/iOSTestbed/iOSTestbed-Info.plist +++ /dev/null @@ -1,62 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.python.iOSTestbed - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiresFullScreen - - UILaunchStoryboardName - Launch Screen - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - - - - - - diff --git a/iOS/testbed/iOSTestbed/main.m b/iOS/testbed/iOSTestbed/main.m deleted file mode 100644 index e32bd78c9b42ee..00000000000000 --- a/iOS/testbed/iOSTestbed/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// iOSTestbed -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - NSString * appDelegateClassName; - @autoreleasepool { - appDelegateClassName = NSStringFromClass([AppDelegate class]); - - return UIApplicationMain(argc, argv, nil, appDelegateClassName); - } -} diff --git a/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m b/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m deleted file mode 100644 index cc0a6e4639762a..00000000000000 --- a/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m +++ /dev/null @@ -1,195 +0,0 @@ -#import -#import - -@interface iOSTestbedTests : XCTestCase - -@end - -@implementation iOSTestbedTests - - -- (void)testPython { - const char **argv; - int exit_code; - int failed; - PyStatus status; - PyPreConfig preconfig; - PyConfig config; - PyObject *app_packages_path; - PyObject *method_args; - PyObject *result; - PyObject *site_module; - PyObject *site_addsitedir_attr; - PyObject *sys_module; - PyObject *sys_path_attr; - NSArray *test_args; - NSString *python_home; - NSString *path; - wchar_t *wtmp_str; - - NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; - - // Set some other common environment indicators to disable color, as the - // Xcode log can't display color. Stdout will report that it is *not* a - // TTY. - setenv("NO_COLOR", "1", true); - setenv("PYTHON_COLORS", "0", true); - - // Arguments to pass into the test suite runner. - // argv[0] must identify the process; any subsequent arg - // will be handled as if it were an argument to `python -m test` - // The processInfo arguments contain the binary that is running, - // followed by the arguments defined in the test plan. This means: - // run_module = test_args[1] - // argv = ["iOSTestbed"] + test_args[2:] - test_args = [[NSProcessInfo processInfo] arguments]; - if (test_args == NULL) { - NSLog(@"Unable to identify test arguments."); - } - NSLog(@"Test arguments: %@", test_args); - argv = malloc(sizeof(char *) * ([test_args count] - 1)); - argv[0] = "iOSTestbed"; - for (int i = 1; i < [test_args count] - 1; i++) { - argv[i] = [[test_args objectAtIndex:i+1] UTF8String]; - } - - // Generate an isolated Python configuration. - NSLog(@"Configuring isolated Python..."); - PyPreConfig_InitIsolatedConfig(&preconfig); - PyConfig_InitIsolatedConfig(&config); - - // Configure the Python interpreter: - // Enforce UTF-8 encoding for stderr, stdout, file-system encoding and locale. - // See https://docs.python.org/3/library/os.html#python-utf-8-mode. - preconfig.utf8_mode = 1; - // Don't buffer stdio. We want output to appears in the log immediately - config.buffered_stdio = 0; - // Don't write bytecode; we can't modify the app bundle - // after it has been signed. - config.write_bytecode = 0; - // Ensure that signal handlers are installed - config.install_signal_handlers = 1; - // Run the test module. - config.run_module = Py_DecodeLocale([[test_args objectAtIndex:1] UTF8String], NULL); - // For debugging - enable verbose mode. - // config.verbose = 1; - - NSLog(@"Pre-initializing Python runtime..."); - status = Py_PreInitialize(&preconfig); - if (PyStatus_Exception(status)) { - XCTFail(@"Unable to pre-initialize Python interpreter: %s", status.err_msg); - PyConfig_Clear(&config); - return; - } - - // Set the home for the Python interpreter - python_home = [NSString stringWithFormat:@"%@/python", resourcePath, nil]; - NSLog(@"PythonHome: %@", python_home); - wtmp_str = Py_DecodeLocale([python_home UTF8String], NULL); - status = PyConfig_SetString(&config, &config.home, wtmp_str); - if (PyStatus_Exception(status)) { - XCTFail(@"Unable to set PYTHONHOME: %s", status.err_msg); - PyConfig_Clear(&config); - return; - } - PyMem_RawFree(wtmp_str); - - // Read the site config - status = PyConfig_Read(&config); - if (PyStatus_Exception(status)) { - XCTFail(@"Unable to read site config: %s", status.err_msg); - PyConfig_Clear(&config); - return; - } - - NSLog(@"Configure argc/argv..."); - status = PyConfig_SetBytesArgv(&config, [test_args count] - 1, (char**) argv); - if (PyStatus_Exception(status)) { - XCTFail(@"Unable to configure argc/argv: %s", status.err_msg); - PyConfig_Clear(&config); - return; - } - - NSLog(@"Initializing Python runtime..."); - status = Py_InitializeFromConfig(&config); - if (PyStatus_Exception(status)) { - XCTFail(@"Unable to initialize Python interpreter: %s", status.err_msg); - PyConfig_Clear(&config); - return; - } - - // Add app_packages as a site directory. This both adds to sys.path, - // and ensures that any .pth files in that directory will be executed. - site_module = PyImport_ImportModule("site"); - if (site_module == NULL) { - XCTFail(@"Could not import site module"); - return; - } - - site_addsitedir_attr = PyObject_GetAttrString(site_module, "addsitedir"); - if (site_addsitedir_attr == NULL || !PyCallable_Check(site_addsitedir_attr)) { - XCTFail(@"Could not access site.addsitedir"); - return; - } - - path = [NSString stringWithFormat:@"%@/app_packages", resourcePath, nil]; - NSLog(@"App packages path: %@", path); - wtmp_str = Py_DecodeLocale([path UTF8String], NULL); - app_packages_path = PyUnicode_FromWideChar(wtmp_str, wcslen(wtmp_str)); - if (app_packages_path == NULL) { - XCTFail(@"Could not convert app_packages path to unicode"); - return; - } - PyMem_RawFree(wtmp_str); - - method_args = Py_BuildValue("(O)", app_packages_path); - if (method_args == NULL) { - XCTFail(@"Could not create arguments for site.addsitedir"); - return; - } - - result = PyObject_CallObject(site_addsitedir_attr, method_args); - if (result == NULL) { - XCTFail(@"Could not add app_packages directory using site.addsitedir"); - return; - } - - // Add test code to sys.path - sys_module = PyImport_ImportModule("sys"); - if (sys_module == NULL) { - XCTFail(@"Could not import sys module"); - return; - } - - sys_path_attr = PyObject_GetAttrString(sys_module, "path"); - if (sys_path_attr == NULL) { - XCTFail(@"Could not access sys.path"); - return; - } - - path = [NSString stringWithFormat:@"%@/app", resourcePath, nil]; - NSLog(@"App path: %@", path); - wtmp_str = Py_DecodeLocale([path UTF8String], NULL); - failed = PyList_Insert(sys_path_attr, 0, PyUnicode_FromString([path UTF8String])); - if (failed) { - XCTFail(@"Unable to add app to sys.path"); - return; - } - PyMem_RawFree(wtmp_str); - - // Ensure the working directory is the app folder. - chdir([path UTF8String]); - - // Start the test suite. Print a separator to differentiate Python startup logs from app logs - NSLog(@"---------------------------------------------------------------------------"); - - exit_code = Py_RunMain(); - XCTAssertEqual(exit_code, 0, @"Test suite did not pass"); - - NSLog(@"---------------------------------------------------------------------------"); - - Py_Finalize(); -} - - -@end