Changeset 1017


Ignore:
Timestamp:
Apr 28, 2017, 1:52:24 PM (8 years ago)
Author:
Alex Taylor
Message:

Update logic for locating Samba Client Tools binaries to support ArcaOS (and be slightly smarter in some other cases).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/cltinit.vrs

    r719 r1017  
    22
    33/*:VRX */
    4 _CltInit: 
     4_CltInit:
    55    IF options.!debug == 1 THEN say time()' _CltInit() started'
    66    IF options.!debug == 1 THEN say '  Checking Samba Client setup...'
    77
    8     /* debuglevel when executing Samba binaries */ 
     8    /* debuglevel when executing Samba binaries */
    99    debuglevel = ' --debuglevel=0'
    1010
     
    2323        ok = value("UNIXROOT",UnixRoot,'OS2ENVIRONMENT')
    2424    end
    25    
     25
    2626    IF options.!debug == 1 THEN say '  UnixRoot       = "'UnixRoot'"'
    2727
     
    4343    samba.!smbclientexe = ""
    4444    if samba.!smbclientexe = "" then do /* wellknown locations */
    45         WellKnown = sysBootdrive()"\ecs\system\samba;"sysBootdrive()"\samba"
     45        Osdir = value("OSDIR",,'OS2ENVIRONMENT')
     46        if Osdir <> '' THEN
     47            WellKnown = Osdir"\apps\smbclnt;"Osdir"\system\samba;"sysBootdrive()"\samba"
     48        else
     49            WellKnown = sysBootdrive()"\ecs\system\samba;"sysBootdrive()"\samba"
    4650        Programs = value("PROGRAMS",,'OS2ENVIRONMENT')
    4751        if Programs <> "" then WellKnown = Wellknown';'Programs'\samba'
     
    184188
    185189    IF options.!debug == 1 then do
    186         if ErrorState then say "  One or more  basic Samba Client setup errors detected!" 
     190        if ErrorState then say "  One or more  basic Samba Client setup errors detected!"
    187191                      else say "  No basic Samba Client setup errors detected!"
    188192    end
     
    201205
    202206/*:VRX */
    203 _ErrorBinaryNotFound: 
     207_ErrorBinaryNotFound:
    204208    /* Set error status variable and show a short message - incomplete! */
    205209    msg = arg(1)
     
    210214
    211215/*:VRX */
    212 _ErrorDataFileNotFound: 
     216_ErrorDataFileNotFound:
    213217    /* Set error status variable and show a short message - incomplete! */
    214218    msg = arg(1)
     
    229233    end
    230234    drop old_path
    231    
     235
    232236    /* Add binary and tools path to the BEGINLIBPATH variable */
    233237    old_beginlibpath = SysQueryExtLibPath("B")
     
    242246    /* Set LIBPATHSTRICT (this is an option - disabled by default) */
    243247    /* ok = value('LIBPATHSTRICT','T', 'OS2ENVIRONMENT') */
    244    
     248
    245249    IF options.!debug == 1 THEN say time()' _SambaExtendSearchPath() done'
    246250return
Note: See TracChangeset for help on using the changeset viewer.