Changeset 3725


Ignore:
Timestamp:
Nov 22, 2019, 4:19:01 PM (5 years ago)
Author:
Andreas Schnellbacher
Message:
Location:
trunk/src/netlabs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/netlabs/bin/defaults.cfg

    r3623 r3725  
    264264\NEPMD\User\Encoding\EditCmdBefore  = 0
    265265
     266; Check NEPMD Version
     267\NEPMD\User\VersionCheck\CheckUrl = ftp://ftp.netlabs.org/pub/nepmd/version.cfg
     268
    266269; Spell check dictionaries
    267270;    %u = URL spec
  • TabularUnified trunk/src/netlabs/macros/stdctrl.e

    r3689 r3725  
    18581858         fQuery = 1
    18591859      endif
     1860      --dprintf( 'CheckNepmdVersion: fQuery = 'fQuery)
    18601861
    18611862      if fQuery then
     
    18641865         call EditNepmdVersionLine( 'Checking for new version...')
    18651866
    1866          CheckFileUrl = 'ftp://ftp.netlabs.org/pub/nepmd/version.cfg'
    18671867         WgetCmd = ''
    18681868         do once2 = 1 to 1
     
    18721872            endif
    18731873
    1874             p1 = lastpos( '/', CheckFileUrl)
    1875             Name = substr( CheckFileUrl, p1 + 1)
     1874            KeyPathCheckUrl = '\NEPMD\User\VersionCheck\CheckUrl'
     1875            CheckUrl = QueryConfigKey( KeyPathCheckUrl)
     1876            p1 = lastpos( '/', CheckUrl)
     1877            Name = substr( CheckUrl, p1 + 1)
    18761878            TmpFile = GetTmpPath()''Name
    18771879            EnqTmpFile = EnquoteFileSpec( TmpFile)
     
    18801882            endif
    18811883
    1882             WgetCmd = 'wget -T 2 -t 1 "'CheckFileUrl'" -O 'EnqTmpFile
     1884            WgetCmd = 'wget -T 2 -t 1 "'CheckUrl'" -O 'EnqTmpFile
    18831885            EpmCmd = "start epm /r 'postme VersionParseTmpFile "EnqTmpFile CurDate CurTime"'"
    18841886
     
    19021904            insertline 'do 1'
    19031905            insertline '   '''WgetCmd''''
    1904             insertline '   if rc <> 0 then'
    1905             insertline '      leave'
     1906            --insertline '   if rc <> 0 then'
     1907            --insertline '      leave'
    19061908            insertline '   "'EpmCmd'"'
    19071909            insertline 'end'
     
    19131915
    19141916            -- Execute CmdFile
     1917            --dprintf( 'CmdFile = 'CmdFile', WgetCmd = 'WgetCmd)
    19151918            'postme os2 /c /min 'CmdFile
    19161919         enddo
     
    19361939      Date     = ''
    19371940      Url      = ''
     1941      CheckResult = 1
    19381942
    19391943      getfileid tmpfid, TmpFile
     
    19901994      call DeleteFile( TmpFile)
    19911995
    1992       CheckResult = 0
    19931996      KeyPath = '\NEPMD\Var\VersionCheck'
    19941997
    1995       --    Save as last check data to ini
     1998      -- Save as last check data to ini
    19961999      call WriteConfigKey( KeyPath'\Version', Version)
    19972000      call WriteConfigKey( KeyPath'\ReleaseDate', Date)
     
    20012004      call WriteConfigKey( KeyPath'\CheckDateTime', CurDate CurTime)
    20022005
    2003       -- Change CheckResult to 0 (success)
    2004       CheckResult = 0
     2006      if Version = '' then
     2007      elseif Date = '' then
     2008      elseif Url = '' then
     2009      else
     2010         -- Change CheckResult to 0 (success)
     2011         CheckResult = 0
     2012      endif
    20052013      call WriteConfigKey( KeyPath'\Result', CheckResult)
    20062014
     
    20142022   do once = 1 to 1
    20152023      KeyPath = '\NEPMD\Var\VersionCheck'
    2016 
    2017       CheckResult     = QueryConfigKey( KeyPath'\Result')
    2018       Version         = QueryConfigKey( KeyPath'\Version')
    2019       ReleaseDateTime = QueryConfigKey( KeyPath'\ReleaseDateTime')
    2020       Url             = QueryConfigKey( KeyPath'\Url')
    2021       CheckDateTime   = QueryConfigKey( KeyPath'\CheckDateTime')
     2024      CheckResult   = QueryConfigKey( KeyPath'\Result')
     2025      Version       = QueryConfigKey( KeyPath'\Version')
     2026      ReleaseDate   = QueryConfigKey( KeyPath'\ReleaseDate')
     2027      Url           = QueryConfigKey( KeyPath'\Url')
     2028      CheckDateTime = QueryConfigKey( KeyPath'\CheckDateTime')
     2029
     2030      KeyPathCheckUrl = '\NEPMD\User\VersionCheck\CheckUrl'
     2031      CheckUrl = QueryConfigKey( KeyPathCheckUrl)
     2032      --dprintf( 'EditNepmdVersionResult: CheckResult = 'CheckResult', Version = 'Version', NepmdVersion = 'GetNepmdVersion()', ReleaseDate = 'ReleaseDate', CheckDateTime = 'CheckDateTime)
    20222033
    20232034      CheckedOn = '(checked on 'CheckDateTime')'
    2024       if Url = '' then
     2035      if CheckResult <> 0 then
     2036         Text = 'Connection failed: 'CheckUrl CheckedOn
     2037      elseif Url = '' then
    20252038         Text = 'Check failed, URL is missing'
    2026       elseif CheckResult <> 0 then
    2027          Text = 'Connection failed: 'Url CheckedOn
    20282039      else
    20292040         if Version = GetNepmdVersion() then
Note: See TracChangeset for help on using the changeset viewer.