Changeset 35701


Ignore:
Timestamp:
2021-10-25T12:09:20+13:00 (2 years ago)
Author:
davidb
Message:

LSS only works on integer nums, so need to extract Major version from VISUAL_STUDIO_VERSION first

Location:
main/trunk/greenstone2/common-src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/winMake.bat

    r35696 r35701  
    5252
    5353    cd packages\windows\iconv
    54     set ICONVZIP=iconv-VS14-PLUS.zip   
    55     if %VISUAL_STUDIO_VERSION% LSS 14.0 set ICONVZIP=iconv-PRE-VS14.zip
     54    set ICONVZIP=iconv-VS14-PLUS.zip
     55    :: Following line loosely based on
     56    ::   https://stackoverflow.com/questions/32578014/how-to-extract-version-number-in-a-windows-batch-file/32578368
     57    set "VSMajor=%VISUAL_STUDIO_VERSION:.= & set VSMinor=%"
     58   
     59    if %VSMajor% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip
    5660    echo Selected iconvzip: %ICONVZIP%
    5761    if NOT EXIST "iconv" unzip "%ICONVZIP%"
  • main/trunk/greenstone2/common-src/win32.mak

    r35696 r35701  
    143143    cd indexers\packages\windows\iconv
    144144    @ set ICONVZIP=iconv-VS14-PLUS.zip
    145     @ if $(VISUAL_STUDIO_VERSION) LSS 14.0 set ICONVZIP=iconv-PRE-VS14.zip
     145
     146# Following line loosely based on
     147#   https://stackoverflow.com/questions/32578014/how-to-extract-version-number-in-a-windows-batch-file/32578368
     148    @ set "VSMajor=$(VISUAL_STUDIO_VERSION):.= & set VSMinor=%"
     149    @ echo VSMajor = %VSMajor%
     150   
     151    @ if %VSMajor% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip
    146152    @ echo Selected iconv to unzip: %ICONVZIP%
    147153    if NOT EXIST "iconv" unzip "%ICONVZIP%"
Note: See TracChangeset for help on using the changeset viewer.