change LogDir; add ProductProperty desktoplink, custom-post-install, custom-post-uninstall

This commit is contained in:
Dominik Daehn
2019-06-19 06:54:20 +02:00
parent 21832d78fe
commit 942e7778d7
4 changed files with 65 additions and 7 deletions

View File

@@ -19,7 +19,11 @@ DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $LogDir$ = "%SystemDrive%\tmp"
;Property Variables
DefVar $Property_CustomPostInstall$
DefVar $Property_DesktopLink$
Set $LogDir$ = "%opsiLogDir%"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
@@ -70,8 +74,21 @@ else
comment "Patch Registry"
Registry_install /32Bit
comment "Create shortcuts"
LinkFolder_install
Set $Property_DesktopLink$ = GetProductProperty("DesktopLink","false")
if ($Property_DesktopLink$ = "false")
comment "Create shortcuts"
LinkFolder_install
endif
Set $Property_CustomPostInstall$ = getProductProperty("custom-post-install","none")
if not ($Property_CustomPostInstall$ = "none")
comment "Include custom post install file"
if FileExists("%ScriptPath%\custom\" + $Property_CustomPostInstall$)
sub_CustomPostInstall
else
LogError "Include script NOT exists (" + $Property_CustomPostInstall$ +")"
endif
endif
endif
@@ -131,6 +148,9 @@ set_basefolder common_desktopdirectory
set_subfolder ""
delete_element WinSCP
[sub_CustomPostInstall]
include_insert "%ScriptPath%\custom\" + $Property_CustomPostInstall$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode