From 451a1631ea90e2e5a0078a2f54b869c596353c4e Mon Sep 17 00:00:00 2001 From: Dennis Trinks Date: Tue, 21 Apr 2015 16:04:58 +0200 Subject: [PATCH] done --- CLIENT_DATA/setup3264.ins | 64 +++++++++++++++++++++++++++++++++------ brother7360.png.sha1sum | 2 +- builder-product.cfg | 16 ++++++---- 3 files changed, 65 insertions(+), 17 deletions(-) diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index a368c6d..07cde36 100644 --- a/CLIENT_DATA/setup3264.ins +++ b/CLIENT_DATA/setup3264.ins @@ -12,7 +12,11 @@ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ +DefVar $INST_SystemType$ +DefVar $INST_architecture$ +Set $INST_SystemType$ = GetSystemType +Set $INST_architecture$ = GetProductProperty("install_architecture","system specific") Set $LogDir$ = "%SystemDrive%\tmp" ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh @@ -51,22 +55,51 @@ else endif Message "Installing " + $ProductId$ + " ..." - - comment "Copy files" - Files_install /32Bit + + if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) + Files_install_64 + Winbatch_install_64 + Sub_check_exitcode + Files_Delete_64 + endif + + if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") + Files_install_32 + Winbatch_install_32 + Sub_check_exitcode + Files_Delete_32 + endif + +; comment "Copy files" +; Files_install /32Bit - comment "Patch Registry" - Registry_install /32Bit +; comment "Patch Registry" +; Registry_install /32Bit - DosInAnIcon_Create +; DosInAnIcon_Create - comment "Reboot" - ExitWindows /Reboot +; comment "Reboot" +; ExitWindows /Reboot endif -[Files_install] -copy -s "$Drv_Dir$32\*.*" "$InstallDir$\opsi_projects_drivers" +[Files_install_32] +copy -s "$Drv_Dir32$*.*" "$LogDir$\X86" + +[Files_install_64] +copy -s "$Drv_Dir64$*.*" "$LogDir$\X64" + +[Winbatch_install_32] +$LogDir$\X86\DPInst.exe /S + +[Winbatch_install_64] +$LogDir$\X64\DPInst.exe /S + +[Files_Delete_32] +delete -sf $LogDir$\X86 + +[Files_Delete_64] +delete -sf $LogDir$\X64 [Registry_install] ; Example of setting some values of an registry key: @@ -78,3 +111,14 @@ set "DevicePath" = "%SystemRoot%\inf;$InstallDir$\opsi_projects_drivers" rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brpom10a.inf rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brimm10a.inf rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\BRPRM10A.INF + +[Sub_check_exitcode] +comment "Test for installation success via exit code" +set $ExitCode$ = getLastExitCode +if ($ExitCode$ = "0") or ($ExitCode$ = "768") + comment "Looks good: setup program gives exitcode zero" +else + comment "Setup program gives a exitcode unequal zero: "+ $ExitCode$ + isFatalError +endif + diff --git a/brother7360.png.sha1sum b/brother7360.png.sha1sum index 9a0a527..2f4e451 100644 --- a/brother7360.png.sha1sum +++ b/brother7360.png.sha1sum @@ -1 +1 @@ -1182219249c94ccae001dfa6e93b2c92b07234b2 /home/dtrinks/.opsi-dist-cache/brother.com/brother7360/1//brother7360.png +1182219249c94ccae001dfa6e93b2c92b07234b2 /home/dtrinks/.opsi-dist-cache/brother.com/brother.mfc7360/1//brother7360.png diff --git a/builder-product.cfg b/builder-product.cfg index 874ad28..2ed938b 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -15,17 +15,21 @@ TYPE="public" DL_FILE[0]="brother7360.png" DL_SOURCE[0]="http://www.brother.com/library/fragments/brother_common_header_com/images/head_brotherlogo.gif" -DL_FILE[1]="brother7360.exe" -DL_SOURCE[1]="http://welcome.solutions.brother.com/BSC/public/files/dlf/dlf004578/Y10E_C1-gdi-32-B1.EXE" +DL_FILE[1]="brother7360_32.zip" +DL_SOURCE[1]="http://opsi-builder.dtnet.de/dist/brother.com/brother.mfc7360/1/brother7360_x86.zip" DL_ARCH[1]="X86" -#DL_WINST_NAME[1]=Install32Exe +DL_EXTRACT_FORMAT[1]="unzip" -DL_DOWNLOADER[1]="wget" -DL_EXTRACT_FORMAT[1]="7zip" +DL_FILE[2]="brother7360_64.zip" +DL_SOURCE[2]="http://opsi-builder.dtnet.de/dist/brother.com/brother.mfc7360/1/brother7360_x64.zip" +DL_ARCH[2]="X64" +DL_EXTRACT_FORMAT[2]="unzip" # File array index for the image showing while installing the program ICON_DL_INDEX=0 -WINST_NAME[0]="Drv_Dir" +WINST_NAME[0]="Drv_Dir32" WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[1]@\\" +WINST_NAME[1]="Drv_Dir64" +WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[2]@\\"