GeoEco.Dependencies.WindowsDependency

class GeoEco.Dependencies.WindowsDependency(minimumMajorVersion, minimumMinorVersion=None, minimumServicePack=None, minimumBuild=None)

Bases: Dependency

A Dependency that checks that the operating system is Microsoft Windows, and its version.

Parameters:
  • minimumMajorVersion (int) – Minimum major version number (the first number reported by the ver command executed from the Windows Command Prompt) of Microsoft Windows that must be installed. Minimum value꞉ 5.

  • minimumMinorVersion (int, optional) – Minimum minor version number (the second number reported by the ver command executed from the Windows Command Prompt) of Microsoft Windows that must be installed, or None to indicate the minor version number should not be checked. Minimum value꞉ 0.

  • minimumServicePack (int, optional) – Minimum Windows service pack number that must be installed, or None to indicate the service pack number should not be checked. Minimum value꞉ 0.

  • minimumBuild (int, optional) – Minimum Windows build number that must be installed, or None to indicate the build number should not be checked. Starting with Windows 10, the build number should always be given. Minimum value꞉ 0.

Returns:

New WindowsDependency instance.

Return type:

WindowsDependency

Properties

property MinimumBuild

(int or None) Minimum Windows build number that must be installed, or None to indicate the build number should not be checked. Starting with Windows 10, the build number should always be given. Read only. Minimum value꞉ 0.

property MinimumMajorVersion

(int) Minimum major version number (the first number reported by the ver command executed from the Windows Command Prompt) of Microsoft Windows that must be installed. Read only. Minimum value꞉ 5.

property MinimumMinorVersion

(int or None) Minimum minor version number (the second number reported by the ver command executed from the Windows Command Prompt) of Microsoft Windows that must be installed, or None to indicate the minor version number should not be checked. Read only. Minimum value꞉ 0.

property MinimumServicePack

(int or None) Minimum Windows service pack number that must be installed, or None to indicate the service pack number should not be checked. Read only. Minimum value꞉ 0.

Methods

GetConstraintDescriptionStrings

Returns the names of the software identified by this dependency, suitable to display to the user.

GetInstalledVersion

Returns the major version, minor version, service pack number, and build number of Microsoft Windows, as obtained from Python's sys.getwindowsversion().

GetProductNameFromVersionNumbers

Given version numbers, returns a descriptive name of the corresponding Microsoft Windows product.

Initialize

Check that the operating system is Microsoft Windows and that its version meets or exceeds what we require.

SetVersion

Sets the minimum version number of Microsoft Windows that is required.