diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-12-17 12:39:23 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-12-17 12:39:23 +0000 |
commit | f378ea279b6547b4b98f0dede8b775c55cba2560 (patch) | |
tree | dd0469113ff3495c5e76653950e094c6e22500e7 /src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh | |
parent | f9d4570663ffdc2e075053a3639c865e49ec5c1f (diff) | |
download | VirtualBox-svn-f378ea279b6547b4b98f0dede8b775c55cba2560.tar.gz |
Windows Additions/Installer: Simplified ${un}VerifyFile.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@82606 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh')
-rw-r--r-- | src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh b/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh index a02652fa4db..73e5f75c20b 100644 --- a/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh +++ b/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh @@ -611,10 +611,25 @@ Function ${un}VerifyFile Exch $2 ; Architecture; S: old$2 old$1 old$0 Push $3 ; S: old$3 old$2 old$1 old$0 - IfFileExists "$0" check_vendor + ${LogVerbose} "Verifying file $\"$0$\" (vendor: $1, arch: $2) ..." + + IfFileExists "$0" check_arch Goto not_found - ${LogVerbose} "Verifying file $\"$0$\" ..." +check_arch: + + ${LogVerbose} "File $\"$0$\" found" + + Push $0 + Call ${un}GetFileArchitecture + Pop $3 + + ${LogVerbose} "Architecture is: $3" + + ${If} $3 == $2 + Goto check_vendor + ${EndIf} + Goto invalid check_vendor: @@ -622,31 +637,30 @@ check_vendor: Call ${un}GetFileVendor Pop $3 - ${LogVerbose} "Vendor is: $3 (wanted: $2)" + ${LogVerbose} "Vendor is: $3" ${If} $3 == $1 - Goto check_arch + Goto valid ${EndIf} + +invalid: + + ${LogVerbose} "File $\"$0$\" is invalid" + StrCpy $3 "1" ; Invalid Goto end -check_arch: +valid: - Push $0 - Call ${un}GetFileArchitecture - Pop $3 + ${LogVerbose} "File $\"$0$\" is valid" - ${LogVerbose} "Architecture is: $3 (wanted: $2)" - - ${If} $3 == $2 - StrCpy $3 "0" ; Valid - ${Else} - StrCpy $3 "1" ; Invalid - ${EndIf} + StrCpy $3 "0" ; Valid Goto end not_found: + ${LogVerbose} "File $\"$0$\" was not found" + StrCpy $3 "2" ; Not found Goto end |