summaryrefslogtreecommitdiffstats
path: root/data/defscript/theme-install.kvs
diff options
context:
space:
mode:
Diffstat (limited to 'data/defscript/theme-install.kvs')
-rw-r--r--data/defscript/theme-install.kvs30
1 files changed, 30 insertions, 0 deletions
diff --git a/data/defscript/theme-install.kvs b/data/defscript/theme-install.kvs
new file mode 100644
index 00000000..febbbbc0
--- /dev/null
+++ b/data/defscript/theme-install.kvs
@@ -0,0 +1,30 @@
+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