Installlib
From EventScripts Community Encyclopedia
|
[edit] Module: installlib[edit] Module OverviewEventScripts version: 2.0.0.248a or later [edit] Table of Contents
[edit] DescriptionInstalls ES addons and keeps file information for uninstall [edit] Quick ExampleInstalling an addon from the ESAM: >>> import installlib >>> randmaps = installlib.getInstaller('randmaps') >>> randmaps.install(True) # Install RandMaps with it autoloaded 0 # Install successful >>> randmaps.update() 4 # Already up to date >>> randmaps.update(True) # Force update 0 # Update successful >>> randmaps.uninstall() 0 # Uninstall successful Designating a file as part of your addon: import es import installlib basename = 'iptocountry' # Change to the name of your addon # Designate a file as part of your addon, to be cleaned up when updated or uninstalled if installlib.infomanager.hasInstallInfo(basename): installinfo = installlib.infomanager.getInstallInfo(basename) installinfo.addFile(es.getAddonPath('_libs') + '/python/iptocountry.db') # This file is generated by IPToCountry installlib.infomanager.saveInstallInfo(basename, installinfo) [edit] Module Content[edit] Classes
[edit] Methods
[edit] See Also[edit] Notes |
|
