addon.register("Theme: @THEMENAME@","@THEMEVERSION@",$tr("@THEMENAME@"),$tr("@THEMEDESCRIPTION@"),"3.2.0.99") { # This is our uninstall callback: it will be called by KVIrc when addon.uninstall is invoked # This is an automatically generated alias that will erase the installed files @ALIASNAME@_uninstallfiles file.rmdir $file.localdir("themes/@SUBDIR@") alias(@ALIASNAME@_uninstallfiles) {} # Done } # Ok, addon.register succeeded. We can go on with the installation. # Get the path that this script was launched from %mypath = $file.extractPath($0) # get the installer helper class (this is pretty standard and included in the distro) parse %mypath/utils/installer.kvs # The installer will copy our files and generate automatically # an uninstallation alias for them %installer = $new(installer,0,myinstaller) # copy files in each subdirectory # the pics %installer->$copyFiles("%mypath/files/","*",$file.localdir("themes/@SUBDIR@")) %installer->$generateUninstallAlias("@ALIASNAME@_uninstallfiles") # finally kill the installer helper delete %installer