Changeset 29 for trunk/qmake/project.cpp


Ignore:
Timestamp:
Jun 12, 2009, 1:32:11 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: More OS/2-specific fixes. Enabled GNUMakefileGenerator (turned on by MAKEFILE_GENERATOR=GNUMAKE).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/project.cpp

    r28 r29  
    5959#elif defined(Q_OS_WIN32)
    6060#include <Windows.h>
     61#elif defined(Q_OS_OS2)
     62#include <qt_os2.h>
    6163#endif
    6264#include <stdio.h>
     
    31763178            }
    31773179        }
     3180#elif defined(Q_OS_OS2)
     3181        if(type == "os") {
     3182            ret = "OS2";
     3183        } else if(type == "name") {
     3184            ret = QString::fromLocal8Bit(qgetenv("HOSTNAME"));
     3185        } else if(type == "version" || type == "version_string") {
     3186            ULONG buf [3];
     3187            DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_REVISION,
     3188                            &buf, sizeof(buf));
     3189            if(type == "version")
     3190                ret = QString().sprintf("%u.%u.%u", buf[0], buf[1], buf[2]);
     3191            else {
     3192                /* Warp 3 is reported as 20.30 */
     3193                /* Warp 4 is reported as 20.40 */
     3194                /* Aurora and eCS are reported as 20.45 */
     3195                if (buf[0] == 20 && buf[1] == 30)
     3196                    ret = "Warp3";
     3197                else if (buf[0] == 20 && buf[1] == 40)
     3198                    ret = "Warp4";
     3199                else if (buf[0] == 20 && buf[1] == 45) {
     3200                    if (QString::fromLocal8Bit(qgetenv("OS")) == "ecs")
     3201                        ret = "eComStation";
     3202                    else
     3203                        ret = "Aurora";
     3204                }
     3205                else
     3206                    ret = "Unknown";
     3207            }
     3208        } else if(type == "arch") {
     3209            ret = "x86";
     3210        }
    31783211#elif defined(Q_OS_UNIX)
    31793212        struct utsname name;
Note: See TracChangeset for help on using the changeset viewer.