summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Daehn <[email protected]>2019-06-19 05:25:29 (GMT)
committer Dominik Daehn <[email protected]>2019-06-19 05:25:29 (GMT)
commit308fafc6b51faa2f4c61a239149c03557187b0aa (patch)
tree9e9834533e26c30659830a7bc7e91575a413e056
parent8e8cf27f7f1c165b57fee464cda73a2773cf7b2d (diff)
change LogDir; add ProductProperty desktoplink, custom-post-install, custom-post-uninstall
-rw-r--r--CLIENT_DATA/delsub64.ins20
-rw-r--r--CLIENT_DATA/setup64.ins46
-rw-r--r--CLIENT_DATA/uninstall64.ins2
-rw-r--r--OPSI/control24
4 files changed, 75 insertions, 17 deletions
diff --git a/CLIENT_DATA/delsub64.ins b/CLIENT_DATA/delsub64.ins
index a5684ca..86dfb53 100644
--- a/CLIENT_DATA/delsub64.ins
+++ b/CLIENT_DATA/delsub64.ins
@@ -36,6 +36,17 @@ Registry_uninstall /64Bit
comment "Delete program shortcuts"
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_msi_old]
msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
@@ -60,9 +71,12 @@ del -sf "$InstallDir$\"
;
; Example of deleting a shortcut from AllUsers desktop:
;
-; set_basefolder common_desktopdirectory
-; set_subfolder ""
-; delete_element $ProductId$
+set_basefolder common_desktopdirectory
+set_subfolder ""
+delete_element $NAME$
+
+[sub_CustomPostUninstall]
+include_insert "%ScriptPath%\custom\" + $Property_CustomPostUninstall$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
diff --git a/CLIENT_DATA/setup64.ins b/CLIENT_DATA/setup64.ins
index b5300b6..27f5cc2 100644
--- a/CLIENT_DATA/setup64.ins
+++ b/CLIENT_DATA/setup64.ins
@@ -18,7 +18,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:
@@ -68,9 +72,22 @@ else
comment "Patch Registry"
Registry_install /64Bit
+
+ Set $Property_DesktopLink$ = GetProductProperty("DesktopLink","false")
+ if ($Property_DesktopLink$ = "true")
+ comment "Create shortcuts"
+ LinkFolder_install
+ endif
- comment "Create shortcuts"
- LinkFolder_install
+ 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
@@ -115,17 +132,20 @@ copy "$IniCfgFile$" "$InstallDir$"
;
; Example of creating an shortcut to the installed exe on AllUsers desktop:
;
-; set_basefolder common_desktopdirectory
-; set_subfolder ""
+set_basefolder common_desktopdirectory
+set_subfolder ""
;
-; set_link
-; name: $ProductId$
-; target: <path to the program>
-; parameters: <some_param>
-; working_dir: $InstallDir$
-; icon_file: <path to icon file>
-; icon_index: 2
-; end_link
+set_link
+ name: $NAME$
+ target: "$InstallDir$\MySQLWorkbench.exe"
+ parameters:
+ working_dir: $InstallDir$
+ icon_file:
+ icon_index:
+end_link
+
+[sub_CustomPostInstall]
+include_insert "%ScriptPath%\custom\" + $Property_CustomPostInstall$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
diff --git a/CLIENT_DATA/uninstall64.ins b/CLIENT_DATA/uninstall64.ins
index f08e624..a71f78c 100644
--- a/CLIENT_DATA/uninstall64.ins
+++ b/CLIENT_DATA/uninstall64.ins
@@ -17,7 +17,7 @@ DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
-Set $LogDir$ = "%SystemDrive%\tmp"
+Set $LogDir$ = "%opsiLogDir%"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
diff --git a/OPSI/control b/OPSI/control
index 847dbe0..023f383 100644
--- a/OPSI/control
+++ b/OPSI/control
@@ -27,4 +27,28 @@ requiredProduct: sereby.aio
requiredStatus: installed
requirementType: before
+[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"]
+

Powered by Domaintechnik.at | Hosting - Domain - Webspace