VirtualBox

Changeset 109120 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Apr 30, 2025 3:01:33 PM (9 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168672
Message:

Windows Additions installer: Got rid of strstr.nsh and use the official (included with NSIS) StrFunc.nsh library.

Location:
trunk/src/VBox/Additions/WINNT/Installer
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r108683 r109120  
    311311                $(PATH_SUB_CURRENT)/ReplaceDLL.nsh \
    312312                $(PATH_SUB_CURRENT)/servicepack.nsh \
    313                 $(PATH_SUB_CURRENT)/strstr.nsh \
    314313                $(PATH_SUB_CURRENT)/winver.nsh \
    315314                $(PATH_SUB_CURRENT)/Languages/English.nsh \
     
    366365                $(PATH_SUB_CURRENT)/ReplaceDLL.nsh \
    367366                $(PATH_SUB_CURRENT)/servicepack.nsh \
    368                 $(PATH_SUB_CURRENT)/strstr.nsh \
    369367                $(PATH_SUB_CURRENT)/winver.nsh \
    370368                $(PATH_SUB_CURRENT)/Languages/English.nsh \
     
    491489        ReplaceDLL.nsh \
    492490        servicepack.nsh \
    493         strstr.nsh \
    494491        VBoxGuestAdditionsCommon.nsh \
    495492        VBoxGuestAdditionsExternal.nsh \
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi

    r108772 r109120  
    9595!include "Library.nsh"
    9696!include "Sections.nsh"
    97 !include "strstr.nsh"         ; Function "strstr".
     97
     98; String functions.
     99!include "StrFunc.nsh"
     100${Using:StrFunc} StrStr
     101${Using:StrFunc} UnStrStr
     102${Using:StrFunc} StrStrAdv
     103; Provide a custom define for ${UnStrStr} so that we can make use of it in
     104; macro function which are (also) being used in the uninstaller (functions must begin with ".un").
     105!define `un.StrStr` `${UnStrStr}`
     106
    98107!if $%KBUILD_TARGET_ARCH% == "x86" ; Only needed for NT4 SP6 recommendation.
    99108  !include "servicepack.nsh"  ; Function "GetServicePack".
     
    615624  ${LogVerbose} "Installer runs in debug mode"
    616625!endif
     626
     627    Abort
    617628
    618629  ;
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r108936 r109120  
    288288  Pop $0         ; Windows Version.
    289289
    290   Push $0        ; The windows version string.
    291   Push "NT"      ; String to search for. W2K+ returns no string containing "NT".
    292   Call ${un}StrStr
    293   Pop $1
     290  ; Param "$1"        ; Result string.
     291  ; Param "$0"        ; The windows version string.
     292  ; Param "NT"        ; String to search for. W2K+ returns no string containing "NT".
     293  ${${un}StrStr} "$1" "$0" "NT"
    294294
    295295  ${If} $1 == "" ; If empty -> not NT 3.XX or 4.XX.
     
    297297  ${Else}
    298298    ; Ok we know it is NT. Must be a string like NT X.XX.
    299     Push $0        ; The windows version string.
    300     Push "4."      ; String to search for.
    301     Call ${un}StrStr
    302     Pop $1
     299    ; Param "$1"      ; Result string.
     300    ; Param "$0"      ; The windows version string.
     301    ; Param "4."      ; String to search for.
     302    ${${un}StrStr} "$1" "$0" "4."
    303303    ${If} $1 == "" ; If empty -> not NT 4.
    304304      ;; @todo NT <= 3.x ?
     
    342342
    343343  ; Extract major version.
    344   Push "$0"       ; String
    345   Push "."        ; SubString
    346   Push ">"        ; SearchDirection
    347   Push "<"        ; StrInclusionDirection
    348   Push "0"        ; IncludeSubString
    349   Push "0"        ; Loops
    350   Push "0"        ; CaseSensitive
    351   Call ${un}StrStrAdv
    352   Pop $g_strAddVerMaj
     344  ; Param "$g_strAddVerMaj"   ; Result string
     345  ; Param "$0"                ; String to search for
     346  ; Param "."                 ; SubString
     347  ; Param ">"                 ; SearchDirection
     348  ; Param "<"                 ; StrInclusionDirection
     349  ; Param "0"                 ; IncludeSubString
     350  ; Param "0"                 ; Loops
     351  ; Param "0"                 ; CaseSensitive
     352  ${${un}StrStrAdv} "$g_strAddVerMaj" "$0" "." ">" "<" "0" "0" "0"
    353353
    354354  ; Extract minor version.
    355   Push "$0"       ; String
    356   Push "."        ; SubString
    357   Push ">"        ; SearchDirection
    358   Push ">"        ; StrInclusionDirection
    359   Push "0"        ; IncludeSubString
    360   Push "0"        ; Loops
    361   Push "0"        ; CaseSensitive
    362   Call ${un}StrStrAdv
    363   Pop $1          ; Got first part (e.g. "1.5")
    364 
    365   Push "$1"       ; String
    366   Push "."        ; SubString
    367   Push ">"        ; SearchDirection
    368   Push "<"        ; StrInclusionDirection
    369   Push "0"        ; IncludeSubString
    370   Push "0"        ; Loops
    371   Push "0"        ; CaseSensitive
    372   Call ${un}StrStrAdv
    373   Pop $g_strAddVerMin   ; Extracted second part (e.g. "5" from "1.5")
     355  ; Param "$1"                ; Result string
     356  ; Param "$0"                ; String
     357  ; Param "."                 ; SubString
     358  ; Param ">"                 ; SearchDirection
     359  ; Param ">"                 ; StrInclusionDirection
     360  ; Param "0"                 ; IncludeSubString
     361  ; Param "0"                 ; Loops
     362  ; Param "0"                 ; CaseSensitive
     363  ${${un}StrStrAdv} "$1" "$0" "." ">" ">" "0" "0" "0"
     364
     365  ; Param "$g_strAddVerMin"   ; Result string
     366  ; Param "$1"                ; String
     367  ; Param "."                 ; SubString
     368  ; Param ">"                 ; SearchDirection
     369  ; Param "<"                 ; StrInclusionDirection
     370  ; Param "0"                 ; IncludeSubString
     371  ; Param "0"                 ; Loops
     372  ; Param "0"                 ; CaseSensitive
     373  ${${un}StrStrAdv} "$g_strAddVerMin" "$1" "." ">" "<" "0" "0" "0"
    374374
    375375  ; Extract build number.
    376   Push "$0"       ; String
    377   Push "."        ; SubString
    378   Push "<"        ; SearchDirection
    379   Push ">"        ; StrInclusionDirection
    380   Push "0"        ; IncludeSubString
    381   Push "0"        ; Loops
    382   Push "0"        ; CaseSensitive
    383   Call ${un}StrStrAdv
    384   Pop $g_strAddVerBuild
     376  ; Param "$g_strAddVerBuild" ; Result string
     377  ; Param "$0"                ; String
     378  ; Param "."                 ; SubString
     379  ; Param "<"                 ; SearchDirection
     380  ; Param ">"                 ; StrInclusionDirection
     381  ; Param "0"                 ; IncludeSubString
     382  ; Param "0"                 ; Loops
     383  ; Param "0"                 ; CaseSensitive
     384  ${${un}StrStrAdv} "$g_strAddVerBuild" "$0" "." "<" ">" "0" "0" "0"
    385385
    386386  Pop $1
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh

    r108948 r109120  
    6161    ; Or: \Registry\Machine\System\CurrentControlSet\Control\Video\vboxvideo\Device0
    6262    ; Result: Machine\System\CurrentControlSet\Control\Video\{28B74D2B-F0A9-48E0-8028-D76F6BB1AE65}\0000
    63     Push "$tmp" ; String
    64     Push "\" ; SubString
    65     Push ">" ; SearchDirection
    66     Push ">" ; StrInclusionDirection
    67     Push "0" ; IncludeSubString
    68     Push "2" ; Loops
    69     Push "0" ; CaseSensitive
    70     Call StrStrAdv
    71     Pop $tmppath ; $1 only contains the full path
     63    ; Param: "$tmppath" ; Result string
     64    ; Param: "$tmp"     ; String to be searched
     65    ; Param: "\"        ; SubString
     66    ; Param: ">"        ; SearchDirection
     67    ; Param: ">"        ; StrInclusionDirection
     68    ; Param: "0"        ; IncludeSubString
     69    ; Param: "2"        ; Loops
     70    ; Param: "0"        ; CaseSensitive
     71    ${StrStrAdv} "$tmppath" "$tmp" "\" ">" ">" "0" "2" "0"
    7272    StrCmp $tmppath "" dev_not_found
    7373
Note: See TracChangeset for help on using the changeset viewer.

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