change LogDir; add ProductProperty desktoplink, custom-post-install, custom-post-uninstall
This commit is contained in:
parent
eaa95e2a83
commit
5535847497
@ -71,6 +71,17 @@ endif
|
|||||||
comment "Delete program shortcuts"
|
comment "Delete program shortcuts"
|
||||||
LinkFolder_uninstall
|
LinkFolder_uninstall
|
||||||
|
|
||||||
|
DefVar $Property_CustomPostUninstall$
|
||||||
|
Set $Property_CustomPostUninstall$ = getProductProperty("custom-post-uninstall","none")
|
||||||
|
if not ($Property_CustomPostUninstall$ = "none")
|
||||||
|
comment "Include custom post uninstall file"
|
||||||
|
if FileExists("%ScriptPath%\custom\" + $Property_CustomPostUninstall$)
|
||||||
|
sub_CustomPostUninstall
|
||||||
|
else
|
||||||
|
LogError "Include script NOT exists (" + $Property_CustomPostUninstall$ +")"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
[Winbatch_uninstall_old_32]
|
[Winbatch_uninstall_old_32]
|
||||||
"$UninstallProgramOld32$" /S
|
"$UninstallProgramOld32$" /S
|
||||||
|
|
||||||
@ -106,9 +117,12 @@ del -sf "$InstallDir64$\"
|
|||||||
;
|
;
|
||||||
; Example of deleting a shortcut from AllUsers desktop:
|
; Example of deleting a shortcut from AllUsers desktop:
|
||||||
;
|
;
|
||||||
; set_basefolder common_desktopdirectory
|
set_basefolder common_desktopdirectory
|
||||||
; set_subfolder ""
|
set_subfolder ""
|
||||||
; delete_element $ProductId$
|
delete_element $NAME$
|
||||||
|
|
||||||
|
[sub_CustomPostUninstall]
|
||||||
|
include_insert "%ScriptPath%\custom\" + $Property_CustomPostUninstall$
|
||||||
|
|
||||||
[Sub_check_exitcode]
|
[Sub_check_exitcode]
|
||||||
comment "Test for installation success via exit code"
|
comment "Test for installation success via exit code"
|
||||||
|
@ -25,10 +25,14 @@ DefVar $OLD_VERSION$
|
|||||||
DefVar $OLD_CREATOR_TAG$
|
DefVar $OLD_CREATOR_TAG$
|
||||||
DefVar $OLD_RELEASE$
|
DefVar $OLD_RELEASE$
|
||||||
|
|
||||||
|
;Property Variables
|
||||||
|
DefVar $Property_CustomPostInstall$
|
||||||
|
DefVar $Property_DesktopLink$
|
||||||
|
|
||||||
Set $INST_SystemType$ = GetSystemType
|
Set $INST_SystemType$ = GetSystemType
|
||||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%opsiLogDir%"
|
||||||
|
|
||||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||||
; and adds the following variables:
|
; and adds the following variables:
|
||||||
@ -81,6 +85,10 @@ else
|
|||||||
Registry_install /32Bit
|
Registry_install /32Bit
|
||||||
comment "Create shortcuts"
|
comment "Create shortcuts"
|
||||||
LinkFolder_install
|
LinkFolder_install
|
||||||
|
Set $Property_DesktopLink$ = GetProductProperty("DesktopLink","false")
|
||||||
|
if ($Property_DesktopLink$ = "true")
|
||||||
|
LinkFolder_install_DesktopLink_32
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
||||||
@ -95,6 +103,20 @@ else
|
|||||||
Registry_install /64Bit
|
Registry_install /64Bit
|
||||||
comment "Create shortcuts"
|
comment "Create shortcuts"
|
||||||
LinkFolder_install
|
LinkFolder_install
|
||||||
|
Set $Property_DesktopLink$ = GetProductProperty("DesktopLink","false")
|
||||||
|
if ($Property_DesktopLink$ = "true")
|
||||||
|
LinkFolder_install_DesktopLink_64
|
||||||
|
endif
|
||||||
|
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
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@ -163,6 +185,41 @@ copy "$IniCfgFile$" "$InstallDir64$"
|
|||||||
; icon_index: 2
|
; icon_index: 2
|
||||||
; end_link
|
; end_link
|
||||||
|
|
||||||
|
[LinkFolder_install_DesktopLink_32]
|
||||||
|
;
|
||||||
|
; Example of creating an shortcut to the installed exe on AllUsers desktop:
|
||||||
|
;
|
||||||
|
set_basefolder common_desktopdirectory
|
||||||
|
set_subfolder ""
|
||||||
|
;
|
||||||
|
set_link
|
||||||
|
name: $NAME$
|
||||||
|
target: "$InstallDir32$\Wireshark.exe"
|
||||||
|
parameters:
|
||||||
|
working_dir: $InstallDir32$
|
||||||
|
icon_file:
|
||||||
|
icon_index:
|
||||||
|
end_link
|
||||||
|
|
||||||
|
[LinkFolder_install_DesktopLink_64]
|
||||||
|
;
|
||||||
|
; Example of creating an shortcut to the installed exe on AllUsers desktop:
|
||||||
|
;
|
||||||
|
set_basefolder common_desktopdirectory
|
||||||
|
set_subfolder ""
|
||||||
|
;
|
||||||
|
set_link
|
||||||
|
name: $NAME$
|
||||||
|
target: "$InstallDir64$\Wireshark.exe"
|
||||||
|
parameters:
|
||||||
|
working_dir: $InstallDir64$
|
||||||
|
icon_file:
|
||||||
|
icon_index:
|
||||||
|
end_link
|
||||||
|
|
||||||
|
[sub_CustomPostInstall]
|
||||||
|
include_insert "%ScriptPath%\custom\" + $Property_CustomPostInstall$
|
||||||
|
|
||||||
[Sub_check_exitcode]
|
[Sub_check_exitcode]
|
||||||
comment "Test for installation success via exit code"
|
comment "Test for installation success via exit code"
|
||||||
set $ExitCode$ = getLastExitCode
|
set $ExitCode$ = getLastExitCode
|
||||||
|
@ -27,7 +27,7 @@ DefVar $OLD_RELEASE$
|
|||||||
Set $INST_SystemType$ = GetSystemType
|
Set $INST_SystemType$ = GetSystemType
|
||||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%opsiLogDir%"
|
||||||
|
|
||||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||||
; and adds the following variables:
|
; and adds the following variables:
|
||||||
|
24
OPSI/control
24
OPSI/control
@ -30,6 +30,30 @@ description: which architecture (32/64 bit) has to be installed
|
|||||||
values: ["32 only", "64 only", "both", "system specific"]
|
values: ["32 only", "64 only", "both", "system specific"]
|
||||||
default: ["system specific"]
|
default: ["system specific"]
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
type: bool
|
||||||
|
name: desktoplink
|
||||||
|
description: Show Desktop Link on/off
|
||||||
|
default: False
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
type: unicode
|
||||||
|
name: custom-post-install
|
||||||
|
multivalue: False
|
||||||
|
editable: True
|
||||||
|
description: Define filename for include script in custom directory after installation
|
||||||
|
values: ["none"]
|
||||||
|
default: ["none"]
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
type: unicode
|
||||||
|
name: custom-post-uninstall
|
||||||
|
multivalue: False
|
||||||
|
editable: True
|
||||||
|
description: Define filename for include script in custom directory after uninstallation
|
||||||
|
values: ["none"]
|
||||||
|
default: ["none"]
|
||||||
|
|
||||||
[ProductDependency]
|
[ProductDependency]
|
||||||
action: setup
|
action: setup
|
||||||
requiredProduct: sereby.aio
|
requiredProduct: sereby.aio
|
||||||
|
Loading…
Reference in New Issue
Block a user