VirtualBox

Changeset 82606 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
Dec 17, 2019 12:39:23 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135493
Message:

Windows Additions/Installer: Simplified ${un}VerifyFile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r82604 r82606  
    612612  Push $3 ;               S: old$3 old$2 old$1 old$0
    613613
    614   IfFileExists "$0" check_vendor
     614  ${LogVerbose} "Verifying file $\"$0$\" (vendor: $1, arch: $2) ..."
     615
     616  IfFileExists "$0" check_arch
    615617  Goto not_found
    616618
    617   ${LogVerbose} "Verifying file $\"$0$\" ..."
     619check_arch:
     620
     621  ${LogVerbose} "File $\"$0$\" found"
     622
     623  Push $0
     624  Call ${un}GetFileArchitecture
     625  Pop $3
     626
     627  ${LogVerbose} "Architecture is: $3"
     628
     629  ${If} $3 == $2
     630    Goto check_vendor
     631  ${EndIf}
     632  Goto invalid
    618633
    619634check_vendor:
     
    623638  Pop $3
    624639
    625   ${LogVerbose} "Vendor is: $3 (wanted: $2)"
     640  ${LogVerbose} "Vendor is: $3"
    626641
    627642  ${If} $3 == $1
    628     Goto check_arch
    629   ${EndIf}
     643    Goto valid
     644  ${EndIf}
     645
     646invalid:
     647
     648  ${LogVerbose} "File $\"$0$\" is invalid"
     649
    630650  StrCpy $3 "1" ; Invalid
    631651  Goto end
    632652
    633 check_arch:
    634 
    635   Push $0
    636   Call ${un}GetFileArchitecture
    637   Pop $3
    638 
    639   ${LogVerbose} "Architecture is: $3 (wanted: $2)"
    640 
    641   ${If} $3 == $2
    642     StrCpy $3 "0" ; Valid
    643   ${Else}
    644     StrCpy $3 "1" ; Invalid
    645   ${EndIf}
     653valid:
     654
     655  ${LogVerbose} "File $\"$0$\" is valid"
     656
     657  StrCpy $3 "0" ; Valid
    646658  Goto end
    647659
    648660not_found:
     661
     662  ${LogVerbose} "File $\"$0$\" was not found"
    649663
    650664  StrCpy $3 "2" ; Not found
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette