summaryrefslogtreecommitdiffstats
path: root/data/defscript/theme-install.kvs
blob: febbbbc07fbf7db61512725901222d846f788a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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