summaryrefslogtreecommitdiffstats
path: root/data/defscript/theme-install.kvs
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:13:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:13:59 +0000
commita6d58bb6052ac8cb01805a48c4ad2f129126116f (patch)
treedd867a099fcbb263a8009a9fb22695b87855dad6 /data/defscript/theme-install.kvs
downloadkvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.tar.gz
kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.zip
Added KDE3 version of kvirc
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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