From e1997234149eec4a7440956c9bbcfcd379ddc764 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Mon, 25 Mar 2013 20:16:02 +0100 Subject: [PATCH] First try to add a userlogin script to set the profile --- CLIENT_DATA/delsub3264.ins | 4 +-- CLIENT_DATA/login.ins | 34 +++++++++++++---------- CLIENT_DATA/setup3264.ins | 56 ++++++++++++++++++++++++++++++-------- OPSI/control | 14 +++++++++- builder-product.cfg | 2 +- 5 files changed, 80 insertions(+), 30 deletions(-) diff --git a/CLIENT_DATA/delsub3264.ins b/CLIENT_DATA/delsub3264.ins index 6d14d6a..ae85153 100644 --- a/CLIENT_DATA/delsub3264.ins +++ b/CLIENT_DATA/delsub3264.ins @@ -133,8 +133,8 @@ del -sf "$InstallDir64$\" [LinkFolder_uninstall] ; Example of deleting a folder from AllUsers startmenu: ; -; set_basefolder common_programs -; delete_subfolder $ProductId$ +set_basefolder common_programs +delete_subfolder $NAME$ ; ; Example of deleting a shortcut from AllUsers desktop: ; diff --git a/CLIENT_DATA/login.ins b/CLIENT_DATA/login.ins index 7b85744..3a7a663 100644 --- a/CLIENT_DATA/login.ins +++ b/CLIENT_DATA/login.ins @@ -4,21 +4,25 @@ ; credits: http://www.opsi.org/en/credits/ [Actions] -Message "Profile Patch for VLC ...." - -comment "Did we run this script before ? - and set version stamp in profile" -if getValue("installationstate", getProductMap) = "installed" - comment "Product is installed" - if not (scriptWasExecutedBefore) - comment "loginscript was not run yet " - Files_profile_copy - Registry_currentuser_set - endif +Message "XnViewMP Profile Patch ...." +if GetScriptMode = "LoginSetup" + comment "Product is installed" + Winbatch_profile_init endif -[Files_profile_copy] -copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME" +if GetScriptMode = "LoginUninstall" + comment "Product was uninstalled" + Files_profile_del +endif + +[Winbatch_profile_init] +mkdir "%CurrentAppdataDir%\XnViewMP" +touch "%CurrentAppdataDir%\XnViewMP\xnview.ini" +inifile "%CurrentAppdataDir%\XnViewMP\xnview.ini" [Start] updater=0 +inifile "%CurrentAppdataDir%\XnViewMP\xnview.ini" [Start] otherFlag=0 +inifile "%CurrentAppdataDir%\XnViewMP\xnview.ini" [Start] dbFlag=0 +inifile "%CurrentAppdataDir%\XnViewMP\xnview.ini" [Start] language= + +[Files_profile_del] +del -s -f "%CurrentAppdataDir%\XnViewMP" -[Registry_currentuser_set] -openkey [HKCU\Software\ACME] -set "show_greeting_window" = "no" diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index cb95989..174a2e1 100644 --- a/CLIENT_DATA/setup3264.ins +++ b/CLIENT_DATA/setup3264.ins @@ -80,7 +80,7 @@ else comment "Patch Registry" Registry_install /32Bit comment "Create shortcuts" - LinkFolder_install + LinkFolder_install_64 endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) @@ -94,7 +94,7 @@ else comment "Patch Registry" Registry_install /64Bit comment "Create shortcuts" - LinkFolder_install + LinkFolder_install_64 endif endif @@ -179,25 +179,59 @@ copy -s "%ScriptPath%\X86_64\XnViewMP\*.*" "$InstallDir64$" ; set "name2" = REG_DWORD:0001 ; set "name3" = REG_BINARY:00 af 99 cd -[LinkFolder_install] +[LinkFolder_install_32] ; Example of deleting a folder from AllUsers startmenu: ; -; set_basefolder common_programs -; delete_subfolder $ProductId$ +set_basefolder common_programs +delete_subfolder $NAME$ ; ; Example of creating an shortcut to the installed exe in AllUsers startmenu: ; -; set_basefolder common_programs -; set_subfolder $ProductId$ +set_basefolder common_programs +set_subfolder $NAME$ + +set_link + name: $NAME$ + target: xnview.exe + parameters: + working_dir: $InstallDir$ + icon_file: + icon_index: +end_link +; +; Example of creating an shortcut to the installed exe on AllUsers desktop: +; +; set_basefolder common_desktopdirectory +; set_subfolder "" ; ; set_link ; name: $ProductId$ ; target: -; parameters: -; working_dir: $InstallDir$ -; icon_file: -; icon_index: +; parameters: +; working_dir: $InstallDir32$ +; icon_file: +; icon_index: 2 ; end_link + +[LinkFolder_install_64] +; Example of deleting a folder from AllUsers startmenu: +; +set_basefolder common_programs +delete_subfolder $NAME$ +; +; Example of creating an shortcut to the installed exe in AllUsers startmenu: +; +set_basefolder common_programs +set_subfolder $NAME$ + +set_link + name: $NAME$ + target: xnview.exe + parameters: + working_dir: $InstallDir64$ + icon_file: + icon_index: +end_link ; ; Example of creating an shortcut to the installed exe on AllUsers desktop: ; diff --git a/OPSI/control b/OPSI/control index d3f60e3..bf03615 100644 --- a/OPSI/control +++ b/OPSI/control @@ -19,7 +19,7 @@ updateScript: alwaysScript: onceScript: customScript: -userLoginScript: +userLoginScript: login.ins [ProductProperty] type: unicode @@ -36,4 +36,16 @@ requiredProduct: sereby.aio requiredStatus: installed requirementType: before +[ProductDependency] +action: setup +requiredProduct: codeproject.touch +requiredStatus: installed +requirementType: before + +[ProductDependency] +action: setup +requiredProduct: horstmuc.inifile +requiredStatus: installed +requirementType: before + diff --git a/builder-product.cfg b/builder-product.cfg index e7cad78..e7bbb82 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -3,7 +3,7 @@ ############################ VENDOR="xnview.com" PN="xnview.xnviewmp" -NAME="XnView Multi Plattform" +NAME="XnView MP" DESCRIPTION="XnViewMP is XnView successor, it's a powerfull cross-platform multimedia browser, viewer and converter. Compatible with more than 500 image formats." VERSION="0.53" RELEASE="3"