| Python Script Engine 8.3 GL Studio Editor Python Script API

List of all members
PackageManager Class Reference

## Module Methods
Methods that can be called on the module.
int | InstallPackageIntoRepo (PackageManager::Package &package, bool installDependencies=true)
int | InstallPackageIntoProject (PackageManager::Package &package, Project &projectToInstallInto, Kitting::ComparableVersion *referencedVersion)
void | UninstallPackage (PackageManager::Package &package)
PackageManager::Package | CreatePackage (String packagePath)
std::vector< PackageManager::Package > | GetPackagesFor (Project &project)
std::vector< PackageManager::Package > | GetRepoPackages ()
DependencyInfo | GetDependencies (PackageManager::Package &package)

## Detailed Description

Package Manager module that contains methods to run on the PackageManager instance itself.

## Member Function Documentation

## ◆ CreatePackage()

PackageManager::Package CreatePackage | ( | String | packagePath | ) |

Creates a package from a given packagePath.

Parameters

  packagePath | Either a zip file or a folder containing a package manifest.

## ◆ GetDependencies()

DependencyInfo GetDependencies | ( | PackageManager::Package & | package | ) |

Retrieves a list of dependencies for a package that are next to the specified package in the file system.

## ◆ GetPackagesFor()

std::vector< PackageManager::Package > GetPackagesFor | ( | Project & | project | ) |

Retrieves a list of packages for a given project.

## ◆ GetRepoPackages()

std::vector< PackageManager::Package > GetRepoPackages | ( |  | ) |

Retrieves a list of packages installed in the repo.

## ◆ InstallPackageIntoProject()

int InstallPackageIntoProject | ( | PackageManager::Package & | package,
|  | Project & | projectToInstallInto,
|  | Kitting::ComparableVersion * | referencedVersion
| ) |  |

Installs the package into the project.

Does not install dependencies. If the package is already installed, it attempts to resolve the conflict.

Parameters

  package | The package object to be installed.
  projectToInstallInto | The project to install into.
  referencedVersion | The comparable version used to find the correct package version if the package is a reference

Returns
  status of the installation
  PACKAGE_INSTALLATION_SUCCESS if the package was installed into the project.
  PACKAGE_INSTALLATION_FAILED_LOCAL_MODIFICATIONS if the package was already installed (i.e., the names and versions numbers match), but the PackageManager detected that the two packages were not equivalent.
  PACKAGE_INSTALLATION_FAILED_USER_ABORTED if the package had a conflict and the user elected to abort the installation rather than ignore or overwrite the conflict.

Exceptions

  If | there is a catastrophic error such as write permission is denied, the project file is invalid (see IsValidPackage()), or the given project does not exist on disk.

## ◆ InstallPackageIntoRepo()

int InstallPackageIntoRepo | ( | PackageManager::Package & | package,
|  | bool | installDependencies = `true`
| ) |  |

Installs the package into the global package space for all projects to use If the package is already installed, it attempts to resolve the conflict.

Parameters

  package | The package object to be installed.
  installDependencies | whether or not to install the package's dependencies

Returns
  status of the installation
  PACKAGE_INSTALLATION_SUCCESS if the package was installed into the local repo
  PACKAGE_INSTALLATION_FAILED_LOCAL_MODIFICATIONS if the package was already installed (i.e., the names and versions numbers match), but the PackageManager detected that the two packages were not equivalent.
  PACKAGE_INSTALLATION_FAILED_MISSING_DEPENDENCIES if installDependencies was true, but some dependencies could not be found, either in the local package repo or in the folder with the given package.
  PACKAGE_INSTALLATION_FAILED_USER_ABORTED if the package had a conflict and the user elected to abort the installation rather than ignore or overwrite the conflict.

Exceptions

  If | there is a catastrophic error such as write permission is denied

## ◆ UninstallPackage()

void UninstallPackage | ( | PackageManager::Package & | package | ) |

Uninstalls the package.

Parameters

  package | The package object to be uninstalled.

Exceptions

  If | there is a catastrophic error such as write permission is denied

The documentation for this class was generated from the following file:

- PackageManager.i