Python Script Engine  7.2
GL Studio Editor Python Script API
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::PackageGetPackagesFor (Project &project)
 
std::vector< PackageManager::PackageGetRepoPackages ()
 
DependencyInfo GetDependencies (PackageManager::Package &package)
 

Detailed Description

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

Member Function Documentation

PackageManager::Package CreatePackage ( String  packagePath)

Creates a package from a given packagePath.

Parameters
packagePathEither a zip file or a folder containing a package manifest.
DependencyInfo GetDependencies ( PackageManager::Package package)

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

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

Retrieves a list of packages for a given project.

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

Retrieves a list of packages installed in the repo.

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
packageThe package object to be installed.
projectToInstallIntoThe project to install into.
referencedVersionThe 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
Ifthere 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.
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
packageThe package object to be installed.
installDependencieswhether 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
Ifthere is a catastrophic error such as write permission is denied
void UninstallPackage ( PackageManager::Package package)

Uninstalls the package.

Parameters
packageThe package object to be uninstalled.
Exceptions
Ifthere is a catastrophic error such as write permission is denied

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