diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index 9b74cae..a14d5d9 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,32 +55,49 @@ else endif Message "Installing " + $ProductId$ + " ..." - - comment "Copy files" - Files_install /32Bit - - comment "Patch Registry" - Registry_install /32Bit - -; comment "Create shortcuts" -; LinkFolder_install + + 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 - DosInAnIcon_Create - - comment "Reboot" - ExitWindows /Reboot + 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 "Reboot" + ExitWindows /Reboot endif -[Files_install] -copy -s "$Drv_Dir$ger\*.*" "$InstallDir$\opsi_projects_drivers" +[Files_install_32] +copy -s "$Drv_Dir32$ger\*.*" "$LogDir$\X86" -[Registry_install] -; Example of setting some values of an registry key: -openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion] -set "DevicePath" = "%SystemRoot%\inf;$InstallDir$\opsi_projects_drivers" +[Files_install_64] +copy -s "$Drv_Dir64$ger\*.*" "$LogDir$\X64" +[Winbatch_install_32] +$LogDir$\X86\DPInst.exe /S -[DosInAnIcon_Create] -rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brim7320.inf -rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brpo7320.inf -rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brpr7320.inf +[Winbatch_install_64] +$LogDir$\X64\DPInst.exe /S + +[Files_Delete_32] +delete -sf $LogDir$\X86 + +[Files_Delete_64] +delete -sf $LogDir$\X64 + +[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/OPSI/control b/OPSI/control index 605fc6c..13b598e 100644 --- a/OPSI/control +++ b/OPSI/control @@ -6,7 +6,7 @@ incremental: False [Product] type: localboot id: brother.mfc7320 -name: brother.mfc-7320 +name: brother.mfc7320 description: Brother 7320: Drucker und Scantreiber advice: ADVICE version: VERSION diff --git a/brother7320_64.exe.sha1sum b/brother7320_64.exe.sha1sum new file mode 100644 index 0000000..ec25aa8 --- /dev/null +++ b/brother7320_64.exe.sha1sum @@ -0,0 +1 @@ +fdf52feb76d1b38d01106a44654618fadb30fad3 /home/dtrinks/.opsi-dist-cache/brother.com/brother.mfc7320/1/X64/brother7320_64.exe diff --git a/builder-product.cfg b/builder-product.cfg index 8369b83..2db5041 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -16,16 +16,26 @@ DL_FILE[0]="brother7320.png" DL_SOURCE[0]="http://www.tinte.ch/shop/images/1118254629.jpg" DL_FILE[1]="brother7320.exe" -DL_SOURCE[1]="http://welcome.solutions.brother.com/BSC/public/files/dlf/dlf003548/7320-USB2KXPVISTA-32-B-DE.EXE" +DL_SOURCE[1]="http://opsi-builder.dtnet.de/dist/brother.com/brother.mfc7320/1/brother7320.exe" DL_ARCH[1]="X86" #DL_WINST_NAME[1]=Install32Exe DL_DOWNLOADER[1]="wget" DL_EXTRACT_FORMAT[1]="7zip" +DL_FILE[2]="brother7320_64.exe" +DL_SOURCE[2]="http://opsi-builder.dtnet.de/dist/brother.com/brother.mfc7320/1/brother7320_64.exe" +DL_ARCH[2]="X64" +#DL_WINST_NAME[1]=Install64Exe + +DL_DOWNLOADER[2]="wget" +DL_EXTRACT_FORMAT[2]="7zip" + # 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]@\\"