Changeset 1582 for trunk/gsinstaller


Ignore:
Timestamp:
2000-10-04T04:48:28+13:00 (24 years ago)
Author:
cs025
Message:

Improved tolerance to odd win32s installations by checking for w32sys.dll
in the windows\system folder as well as in the windows\system\win32s folder.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsinstaller/gs16bit.cpp

    r1549 r1582  
    7575    OFSTRUCT of;
    7676
    77     if (GetSystemDirectory(buffer, MAX_PATH) != 0)
    78   { if (!appendPath(buffer, "win32s\\w32sys.dll", MAX_PATH))
    79     { return FALSE;
    80     }
    81     strcpy(buffer, "win32s\\w32.dll");
     77    if (GetSystemDirectory(buffer, MAX_PATH) == 0)
     78  { return true;
     79  }
     80
     81  if (!appendPath(buffer, "win32s\\w32sys.dll", MAX_PATH))
     82  { return FALSE;
     83  }
     84
     85  strcpy(buffer, "win32s\\w32.dll");
     86  if (OpenFile((LPCSTR) buffer, (LPOFSTRUCT) &of, OF_EXIST) == HFILE_ERROR)
     87  { // try system directory directly; no need to error check - we know that
     88    // we don't have a length problem
     89    GetSystemDirectory(buffer, MAX_PATH);
     90    appendPath(buffer, "w32sys.dll", MAX_PATH);
     91
     92    // if it isn't there either, return false
    8293    if (OpenFile((LPCSTR) buffer, (LPOFSTRUCT) &of, OF_EXIST) == HFILE_ERROR)
    83     { return false;
     94    {   return false;
    8495    }
    8596  }
Note: See TracChangeset for help on using the changeset viewer.