Ticket #3468: cygwin-16may07.diff

File cygwin-16may07.diff, 33.0 KB (added by andrew@…, 14 years ago)

cygwin patch

  • libs/libmythtv/eit.cpp

     
    142142        "      manualid = 0       AND "
    143143        "      ( ( starttime >= :STIME1 AND starttime <  :ETIME1 ) OR "
    144144        "        ( endtime   >  :STIME2 AND endtime   <= :ETIME2 ) )");
    145     query.bindValue(":CHANID", chanid);
     145    query.bindValue(":CHANID", (uint)chanid);
    146146    query.bindValue(":STIME1", starttime);
    147147    query.bindValue(":ETIME1", endtime);
    148148    query.bindValue(":STIME2", starttime);
     
    355355        "WHERE chanid    = :CHANID AND "
    356356        "      starttime = :OLDSTART ");
    357357
    358     query.bindValue(":CHANID",      chanid);
     358    query.bindValue(":CHANID",      (uint)chanid);
    359359    query.bindValue(":OLDSTART",    match.starttime);
    360360    query.bindValue(":TITLE",       ltitle.utf8());
    361361    query.bindValue(":SUBTITLE",    lsubtitle.utf8());
     
    515515
    516516    QString cattype = myth_category_type_to_string(category_type);
    517517
    518     query.bindValue(":CHANID",      chanid);
     518    query.bindValue(":CHANID",      (uint)chanid);
    519519    query.bindValue(":TITLE",       title.utf8());
    520520    query.bindValue(":SUBTITLE",    subtitle.utf8());
    521521    query.bindValue(":DESCRIPTION", description.utf8());
     
    561561        "FROM channel "
    562562        "WHERE chanid    = :CHANID");
    563563
    564     query.bindValue(":CHANID",      chanid);
     564    query.bindValue(":CHANID",      (uint)chanid);
    565565
    566566    if (!query.exec())
    567567    {
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    7373#undef GetFileSize
    7474#ifdef CONFIG_CYGWIN
    7575#undef DialogBox
     76#undef GetCurrentTime
    7677#endif
    7778#endif
    7879
     
    56385639    if (ringBuffer->isDVD())
    56395640    {
    56405641        if (!ringBuffer->DVD()->IsInMenu())
    5641 #ifndef CONFIG_CYGWIN
    56425642            secsplayed = ringBuffer->DVD()->GetCurrentTime();
    5643 #else
    5644             // DVD playing non-functional under windows for now
    5645             secsplayed = 0;
    5646 #endif
    56475643    }
    56485644    else
    56495645        secsplayed = ((float)framesPlayed / video_frame_rate);
  • libs/libmythtv/NuppelVideoRecorder.cpp

     
    735735 */
    736736bool NuppelVideoRecorder::MJPEGInit(void)
    737737{
     738#if defined(CONFIG_CYGWIN)
     739    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     740#else
    738741    bool we_opened_fd = false;
    739742    int init_fd = fd;
    740743    if (init_fd < 0)
     
    777780    }
    778781
    779782    VERBOSE(VB_IMPORTANT, LOC_ERR + "MJPEG not supported by device");
     783#endif
    780784    return false;
    781785}
    782786
     
    895899
    896900bool NuppelVideoRecorder::Open(void)
    897901{
     902#if defined(CONFIG_CYGWIN)
     903    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     904    errored = true;
     905    return false;
     906#else
    898907    if (channelfd>0)
    899908        return true;
    900909
     
    970979
    971980    channelfd = fd;
    972981    return true;
     982#endif
    973983}
    974984
    975985void NuppelVideoRecorder::StartRecording(void)
    976986{
     987#if defined(CONFIG_CYGWIN)
     988    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     989#else
    977990    if (lzo_init() != LZO_E_OK)
    978991    {
    979992        VERBOSE(VB_IMPORTANT, LOC_ERR + "lzo_init() failed, exiting");
     
    12141227
    12151228    recording = false;
    12161229    close(fd);
     1230#endif
    12171231}
    12181232
    12191233void NuppelVideoRecorder::DoV4L2(void)
    12201234{
     1235#if defined(CONFIG_CYGWIN)
     1236    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     1237#else
    12211238    struct v4l2_format     vfmt;
    12221239    struct v4l2_buffer     vbuf;
    12231240    struct v4l2_requestbuffers vrbuf;
     
    15421559    recording = false;
    15431560    close(fd);
    15441561    close(channelfd);
     1562#endif
    15451563}
    15461564
    15471565void NuppelVideoRecorder::DoMJPEG(void)
    15481566{
     1567#if defined(CONFIG_CYGWIN)
     1568    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     1569#else
    15491570    struct mjpeg_params bparm;
    15501571
    15511572    if (ioctl(fd, MJPIOC_G_PARAMS, &bparm) < 0)
     
    16731694           
    16741695    recording = false;
    16751696    close(fd);
     1697#endif
    16761698}
    16771699
    16781700int NuppelVideoRecorder::SpawnChildren(void)
     
    25902612
    25912613void NuppelVideoRecorder::doVbiThread(void)
    25922614{
     2615#if defined(CONFIG_CYGWIN)
     2616    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     2617#else
    25932618    //VERBOSE(VB_IMPORTANT, LOC + "vbi begin");
    25942619    struct VBIData vbicallbackdata;
    25952620    struct vbi *pal_tt = NULL;
     
    27302755        cc_close(ntsc_cc);
    27312756
    27322757    //VERBOSE(VB_RECORD, LOC + "vbi end");
     2758#endif
    27332759}
    27342760
    27352761
  • libs/libmythtv/videoout_dx.h

     
    11#ifndef VIDEOOUT_DX_H_
    22#define VIDEOOUT_DX_H_
    33
    4 /* ACK! <windows.h> and <ddraw.h> should only be in cpp's compiled in
     4/* HACK! <windows.h> and <ddraw.h> should only be in cpp's compiled in
    55 * windows only. Some of the variables in VideoOutputDX need to be
    66 * moved to a private class before removing these includes though.
    77 */
  • libs/libmythtv/libmythtv.pro

     
    2727DEPENDPATH  += ../libmythlivemedia/UsageEnvironment/include
    2828DEPENDPATH  += ../libmythlivemedia/UsageEnvironment
    2929
     30cygwin:LIBS += -L./ -lmythui-$${LIBVERSION} -lGdi32 -L../libmythfreemheg -lmythfreemheg-$${LIBVERSION}
    3031LIBS += -L../libmyth -L../libavutil -L../libavcodec -L../libavformat
    3132LIBS += -L../libmythmpeg2 -L../libmythdvdnav
    3233LIBS += -lmyth-$${LIBVERSION} -lmythavutil-$${LIBVERSION}
     
    4243}
    4344
    4445cygwin {
    45   QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     46        target.path = $${PREFIX}/bin
     47        implib.target = libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN
     48        implib.commands = test -e libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN || dlltool --input-def ../libmythui/libmythui.def --dllname cygmythui-$${LIBVERSION}-0.$$QMAKE_EXTENSION_SHLIB --output-lib libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN -k
     49        QMAKE_EXTRA_UNIX_TARGETS += implib
     50        POST_TARGETDEPS += libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN
     51        TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     52        TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     53        TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     54        TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     55        TARGETDEPS += ../libmythfreemheg/libmythfreemheg-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     56} else {
     57        TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     58        TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     59        TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     60        TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    4661}
    47 
    48 TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    49 TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    50 TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    51 TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    5262TARGETDEPS += ../libmythmpeg2/libmythmpeg2-$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    5363TARGETDEPS += ../libmythdvdnav/libmythdvdnav-$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    5464
    55 
    5665DEFINES += _LARGEFILE_SOURCE
    5766QMAKE_CXXFLAGS_RELEASE += $${FREETYPE_CFLAGS}
    5867QMAKE_CXXFLAGS_DEBUG += $${FREETYPE_CFLAGS}
     
    94103    QMAKE_LFLAGS_SHLIB += -seg1addr 0xC9000000
    95104}
    96105
    97 cygwin:QMAKE_LFLAGS_SHLIB += -Wl,--noinhibit-exec
    98106cygwin:DEFINES += _WIN32
    99107
    100108# Enable Linux Open Sound System support
  • libs/libmythtv/videodev_myth.h

     
    1111typedef uint8_t  __u8;
    1212typedef uint32_t __u64;
    1313typedef int32_t  __s64;  // HACK. Non 64bit FreeBSD kernels require this for ioctls
     14#elif defined(CONFIG_CYGWIN)
     15#include <sys/types.h>
     16typedef uint32_t __u32;
     17typedef uint16_t __u16;
     18typedef int32_t  __s32;
     19typedef uint8_t  __u8;
     20typedef uint64_t __u64;
     21typedef int64_t  __s64;
    1422#else
    1523#include <linux/types.h>
    1624#include <linux/version.h>
  • libs/libmythtv/videoout_dx.cpp

     
    1818#include "../libavcodec/avcodec.h"
    1919}
    2020
     21#define PRINT_FOURCC(c) ((char) (c & 0xFF)) << ((char) ((c >> 8) & 0xFF)) << ((char) ((c >> 16) & 0xFF)) << ((char) ((c >> 24) & 0xFF))
     22
    2123const int kNumBuffers = 31;
    2224const int kNeedFreeFrames = 1;
    2325const int kPrebufferFramesNormal = 12;
     
    159161    VideoOutput::Init(width, height, aspect, winid,
    160162                      winx, winy, winw, winh, embedid);
    161163
    162     wnd = winid;
     164    wnd = (HWND)winid;
    163165
    164166    XJ_width  = width;
    165167    XJ_height = height;
     
    792794
    793795    /* Create the actual brush */
    794796    SetClassLong(wnd, GCL_HBRBACKGROUND,
    795                   (LONG)CreateSolidBrush(rgb_colorkey));
     797                  (LONG)CreateSolidBrush((COLORREF)rgb_colorkey));
    796798    InvalidateRect(wnd, NULL, TRUE);
    797799    //DirectXUpdateRects(true);
    798800
     
    13491351        int diff_x  = display_visible_rect.left();
    13501352        diff_x     -= display_video_rect.left();
    13511353        int diff_w  = display_video_rect.width();
    1352         diff_x     -= display_visible_rect.width()
     1354        diff_x     -= display_visible_rect.width();
    13531355
    13541356        rect_src.left  += (XJ_width * diff_x) / display_video_rect.width();
    13551357        rect_src.right -= ((XJ_width * (diff_w - diff_x)) /
     
    13671369        rect_dest.top    = display_visible_rect.top();
    13681370        rect_dest.bottom = display_visible_rect.bottom();
    13691371
     1372        int diff_x  = display_visible_rect.left();
     1373        diff_x     -= display_video_rect.left();
    13701374        int diff_y  = display_visible_rect.top();
    13711375        diff_y     -= display_video_rect.top();
    13721376        int diff_h  = display_video_rect.height();
  • libs/libavformat/libavformat.pro

     
    1313
    1414LIBS += $$LOCAL_LIBDIR_X11
    1515
    16 cygwin :LIBS += -lz
     16cygwin {
     17        LIBS += -lz
     18        target.path = $${PREFIX}/bin
     19}
    1720
    1821QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)
    1922
  • libs/libmythui/mythmainwindow.cpp

     
    520520    fonTweak = gContext->GetNumSetting("QtFonTweak", 0);
    521521
    522522    bool hideCursor = gContext->GetNumSetting("HideMouseCursor", 1);
    523 #ifdef QWS
    524 #if QT_VERSION >= 0x030300
     523#if defined(QWS) && QT_VERSION >= 0x030300 && !defined(CONFIG_CYGWIN)
    525524    QWSServer::setCursorVisible(!hideCursor);
    526525#endif
    527 #endif
    528526
    529527    if (gContext->GetNumSetting("RunFrontendInWindow", 0))
    530528        d->does_fill_screen = false;
     
    537535        flags = Qt::WStyle_Customize  |
    538536                Qt::WStyle_NoBorder;
    539537    else
     538#if defined(CONFIG_CYGWIN)
     539                flags = Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title | Qt::WStyle_SysMenu;
     540#else
    540541        flags = Qt::WStyle_Customize | Qt::WStyle_NormalBorder;
     542#endif
    541543
    542544    // Workarounds for Qt/Mac bugs
    543545#ifdef Q_WS_MACX
     
    574576    // Set cursor call must come after Show() to work on some systems.
    575577    setCursor((hideCursor) ? (Qt::BlankCursor) : (Qt::ArrowCursor));
    576578
     579#if defined(CONFIG_CYGWIN)
     580        if (d->does_fill_screen)
     581#endif
    577582    move(d->xbase, d->ybase);
    578583}
    579584
     
    9951000                                          int            mediaType,
    9961001                                          const QString &extensions)
    9971002{
    998 #ifndef _WIN32
     1003#ifndef CONFIG_CYGWIN
    9991004    if (d->mediaHandlerMap.count(destination) == 0)
    10001005    {
    10011006        MHData mhd = { callback, mediaType, destination, description };
     
    10171022       VERBOSE(VB_GENERAL, QString("%1 is already registered as a media "
    10181023                                   "handler.").arg(destination));
    10191024    }
    1020 #endif // !_WIN32
     1025#endif // !CONFIG_CYGWIN
    10211026}
    10221027
    10231028void MythMainWindow::RegisterMediaPlugin(const QString &name,
  • libs/libmythui/mythpainter_ogl.cpp

     
    1515#include <OpenGL/glext.h>
    1616#endif
    1717
    18 #ifdef _WIN32
     18#if defined(CONFIG_CYGWIN)
    1919#include <GL/glext.h>
    2020#endif
    2121
  • libs/libmythui/libmythui.def

     
     1LIBRARY
     2EXPORTS
     3;       GetMythMainWindow()
     4        _Z17GetMythMainWindowv
     5;       DestroyMythMainWindow()
     6        _Z21DestroyMythMainWindowv
     7;       MythMainWindow::NormalizeFontSize(int)
     8        _ZN14MythMainWindow17NormalizeFontSizeEi
     9;       MythMainWindow::TranslateKeyPress(QString const&, QKeyEvent*, QStringList&, bool)
     10        _ZN14MythMainWindow17TranslateKeyPressERK7QStringP9QKeyEventR11QStringListb
     11;       MythMainWindow::detach(QWidget*)
     12        _ZN14MythMainWindow6detachEP7QWidget
     13;       MythMainWindow::attach(QWidget*)
     14        _ZN14MythMainWindow6attachEP7QWidget
     15;       MythMainWindow::RegisterKey(QString const&, QString const&, QString const&, QString const&)
     16        _ZN14MythMainWindow11RegisterKeyERK7QStringS2_S2_S2_ @ 737
     17;       MythMainWindow::GetKey(QString const&, QString const&) const
     18        _ZNK14MythMainWindow6GetKeyERK7QStringS2_
     19;       MythMainWindow::currentWidget()
     20        _ZN14MythMainWindow13currentWidgetEv
  • libs/libmythui/libmythui.pro

    Property changes on: libs/libmythui/libmythui.def
    ___________________________________________________________________
    Name: svn:executable
       + *
    
     
    7171    DEFINES += USE_LIRC
    7272}
    7373
    74 cygwin:DEFINES += _WIN32
     74cygwin {
     75        LIBS += $$LOCAL_LIBDIR_X11
     76        target.path = $${PREFIX}/bin
     77}
     78 No newline at end of file
  • libs/libmyth/mythcontext.cpp

     
    3737
    3838// These defines provide portability for different
    3939// plugin file names.
    40 #ifdef CONFIG_DARWIN
     40#if defined(CONFIG_DARWIN)
    4141const QString kPluginLibPrefix = "lib";
    4242const QString kPluginLibSuffix = ".dylib";
     43#elif defined(CONFIG_CYGWIN)
     44const QString kPluginLibPrefix = "lib";
     45const QString kPluginLibSuffix = ".dll";
    4346#else
    4447const QString kPluginLibPrefix = "lib";
    4548const QString kPluginLibSuffix = ".so";
  • libs/libmyth/qmdcodec.cpp

     
    473473            data[count] == '\t' || data[count] == ' ') )
    474474        count++;
    475475
    476 #ifdef _WIN32
     476#if defined(CONFIG_CYGWIN)
    477477    if ( strnicmp(data+count, "begin", 5) == 0 )
    478478#else
    479479        if ( strncasecmp(data+count, "begin", 5) == 0 )
  • libs/libmyth/screensaver.cpp

     
    33#include "screensaver.h"
    44#include "screensaver-null.h"
    55
    6 #ifdef _WIN32
     6#if defined(CONFIG_CYGWIN)
    77#undef Q_WS_X11 /* Even if we have an X server in WIN32, don't use X11... */
    88#endif // _WIN32
    99
  • libs/libmyth/audiooutput.cpp

     
    88#include "audiooutput.h"
    99
    1010/* Required to define BOOL first with friendly _WINDEF_H */
    11 #ifdef _WIN32
     11#if defined(CONFIG_CYGWIN)
    1212#include <windows.h>
    1313#endif
    1414
  • libs/libmyth/util-x11.cpp

     
    66#include "config.h" // for CONFIG_DARWIN
    77#include "mythcontext.h"
    88
     9#if defined(CONFIG_CYGWIN)
     10#undef Q_WS_X11 /* Even if we have an X server in WIN32, don't use X11... */
     11#endif // CONFIG_CYGWIN
     12
    913QMutex x11_lock;
    1014
    1115#ifdef Q_WS_X11
  • libs/libmyth/libmyth.pro

     
    7373}
    7474
    7575cygwin {
    76     QMAKE_LFLAGS_SHLIB += -Wl,--noinhibit-exec
    7776    DEFINES += _WIN32
    78     #HEADERS += mediamonitor-windows.h
    79     #SOURCES += mediamonitor-windows.cpp
     77    HEADERS += mediamonitor-windows.h mythhdd.h   mythcdrom.h
     78    SOURCES += mediamonitor-windows.cpp mythhdd.cpp mythcdrom.cpp
     79        LIBS += $$LOCAL_LIBDIR_X11
     80        target.path = $${PREFIX}/bin
     81        LIBS += -L./ -lmythui-$${LIBVERSION}
     82        implib.target = libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN
     83        implib.commands = test -e libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN || dlltool --input-def ../libmythui/libmythui.def --dllname cygmythui-$${LIBVERSION}-0.$$QMAKE_EXTENSION_SHLIB --output-lib libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN -k
     84        QMAKE_EXTRA_UNIX_TARGETS += implib
     85        POST_TARGETDEPS += libmythui-$${LIBVERSION}$$QMAKE_EXTENSION_CYGWIN
    8086}
    8187
    8288macx {
  • libs/libmyth/mediamonitor-windows.h

     
    44class MediaMonitorWindows : public MediaMonitor
    55{
    66  public:
    7     MediaMonitorWindows(QObject* par, unsigned long interval, bool allowEject)
    8         : MediaMonitor(par, interval, allowEject) {};
     7    MediaMonitorWindows(QObject* par, unsigned long interval, bool allowEject);
    98
    109    QStringList GetCDROMBlockDevices(void);
     10    virtual bool AddDevice(MythMediaDevice* pDevice);
    1111};
    1212#endif // MYTH_MEDIA_MONITOR_WINDOWS_H
  • libs/libmyth/mediamonitor-windows.cpp

     
    55
    66#include "mythmediamonitor.h"
    77#include "mediamonitor-windows.h"
     8#include "mythcontext.h"
    89#include "mythcdrom.h"
    910#include "mythhdd.h"
     11#define _WIN32_WINNT 0x0500
     12#include <windows.h>
    1013
    11 
    1214/**
    1315 * \class MediaMonitorWindows
    1416 *
     
    2022                                         bool allowEject)
    2123                   : MediaMonitor(par, interval, allowEject)
    2224{
    23     for (each device)
    24         if (device.isRemovable())
    25         {
    26             MythMediaDevice  *media;
    27    
    28             if (device.isCDorDVD())
    29                 media = MythCDROM::get(this, device.letter(),
    30                                        false, AllowEject);
    31             else
    32                 media = MythHDD::Get(this, device.letter(),
    33                                      false, allowEject);
     25        char strDrives[128];
     26        if (::GetLogicalDriveStrings(sizeof(strDrives), strDrives)) {
     27                for (char* driveName = strDrives; *driveName; driveName += strlen(driveName) + 1) {
     28                        UINT type = ::GetDriveType(driveName);
     29                        if (type == DRIVE_REMOVABLE || type == DRIVE_CDROM)
     30                        {
     31                                MythMediaDevice  *media;
     32           
     33                                if (type == DRIVE_CDROM)
     34                                        media = MythCDROM::get(this, driveName, false, allowEject);
     35                                else
     36                                        media = MythHDD::Get(this, driveName, false, allowEject);
    3437
    35             if (!media)
    36             {
    37                 VERBOSE(VB_IMPORTANT,
    38                         "Error. Couldn't create MythMediaDevice.");
    39                 return;
    40             }
     38                                if (!media)
     39                                {
     40                                        VERBOSE(VB_IMPORTANT,
     41                                                        "Error. Couldn't create MythMediaDevice.");
     42                                        return;
     43                                }
    4144
    42             // We store the volume name to improve
    43             // user activities like ChooseAndEjectMedia().
    44             media->setVolumeID(device.volName());
     45                                // We store the volume name to improve
     46                                // user activities like ChooseAndEjectMedia().
     47                                char volumeName[256];
     48                                if (GetVolumeNameForVolumeMountPoint(driveName, volumeName, sizeof(volumeName))) {
     49                                        media->setVolumeID(volumeName);
     50                                } else {
     51                                        media->setVolumeID(driveName);
     52                                }
    4553
    46             AddDevice(media);
    47         }
     54                                AddDevice(media);
     55                        }
     56                }
     57        }
    4858}
    4959
    5060
     
    5262{
    5363    QStringList  list;
    5464
     65        char strDrives[128];
     66        if (::GetLogicalDriveStrings(sizeof(strDrives), strDrives)) {
     67                for (char* driveName = strDrives; *driveName; driveName += strlen(driveName) + 1) {
     68                        if (::GetDriveType(driveName) == DRIVE_CDROM)
     69                                list.append(driveName);
     70                }
     71        }
    5572
    56     for (each device)
    57         if (device.isCDorDVD())
    58             list.append(device.letter());
    59 
    6073    return list;
    6174}
     75
     76// Given a media deivce add it to our collection.
     77bool MediaMonitorWindows::AddDevice(MythMediaDevice* pDevice)
     78{
     79    if ( ! pDevice )
     80    {
     81        VERBOSE(VB_IMPORTANT, "Error - MediaMonitorUnix::AddDevice(null)");
     82        return false;
     83    }
     84
     85    //
     86    // Check if this is a duplicate of a device we have already added
     87    //
     88    QValueList<MythMediaDevice*>::const_iterator itr = m_Devices.begin();
     89    for (; itr != m_Devices.end(); ++itr)
     90    {
     91        if ((*itr)->getDevicePath() == pDevice->getDevicePath())
     92                {
     93            VERBOSE(VB_MEDIA, "MediamonitorWindows::AddDevice() -- " +
     94                    QString("Not adding '%1', it appears to be a duplicate.")
     95                    .arg(pDevice->getDevicePath()));
     96
     97            return false;
     98        }
     99    }
     100
     101    pDevice->setDeviceModel(pDevice->getDevicePath());
     102
     103        QMutexLocker locker(&m_DevicesLock);
     104    connect(pDevice, SIGNAL(statusChanged(MediaStatus, MythMediaDevice*)),
     105            this, SLOT(mediaStatusChanged(MediaStatus, MythMediaDevice*)));
     106    m_Devices.push_back( pDevice );
     107    m_UseCount[pDevice] = 0;
     108
     109    return true;
     110}
  • libs/libs.pro

     
    88# Directories
    99SUBDIRS += libavutil libavcodec libavformat libmythsamplerate
    1010SUBDIRS += libmythsoundtouch libmythmpeg2 libmythdvdnav
    11 SUBDIRS += libmyth libmythtv libmythui libmythfreemheg
     11SUBDIRS += libmythfreemheg libmyth libmythtv libmythui
    1212SUBDIRS += libmythupnp
    1313SUBDIRS += libmythlivemedia
    1414
  • libs/libavcodec/libavcodec.pro

     
    2323    }
    2424}
    2525
    26 cygwin:LIBS += -lz
     26cygwin {
     27        LIBS += -lz
     28        target.path = $${PREFIX}/bin
     29}
    2730
    2831QMAKE_CFLAGS_DEBUG += -O
    2932
  • libs/libavutil/libavutil.pro

     
    2020    }
    2121}
    2222
     23cygwin {
     24        target.path = $${PREFIX}/bin
     25}
     26
    2327QMAKE_CFLAGS_DEBUG += -O
    2428
    2529QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)
  • libs/libmythdvdnav/dvdnav.h

     
    369369dvdnav_status_t dvdnav_time_search(dvdnav_t *self,
    370370                                   uint64_t time, uint search_to_nearest_cell);
    371371
    372 int dvdnav_time_search_within_cell(dvdnav_t *self,
     372dvdnav_status_t dvdnav_time_search_within_cell(dvdnav_t *self,
    373373                   int relative_time);
    374374/*
    375375 * Stop playing current position and play the "GoUp"-program chain.
  • libs/libmythfreemheg/libmythfreemheg.pro

     
    2424
    2525LIBS += $$EXTRA_LIBS
    2626
     27cygwin {
     28        target.path = $${PREFIX}/bin
     29}
     30 No newline at end of file
  • libs/libmythupnp/ssdp.cpp

     
    5252
    5353    // Setup SearchSocket
    5454
    55     m_Sockets[ SocketIdx_Search ]->bind( INADDR_ANY, m_nSearchPort );
     55    m_Sockets[ SocketIdx_Search ]->bind( (uint)INADDR_ANY, m_nSearchPort );
    5656
    5757    m_pNotifyTask   = NULL;
    5858
  • libs/libmythupnp/libmythupnp.pro

     
    4949}
    5050
    5151cygwin {
    52   QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     52        target.path = $${PREFIX}/bin
     53        TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     54        TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     55        TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     56        TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     57} else {
     58        TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     59        TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     60        TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     61        TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    5362}
    5463
    55 TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    56 TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    57 TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    58 TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    59 
    6064inc.path = $${PREFIX}/include/mythtv/upnp/
    6165
    6266inc.files  = httprequest.h upnp.h ssdp.h taskqueue.h bufferedsocketdevice.h
  • programs/mythuitest/mythuitest.pro

     
    11INCLUDEPATH += ../../libs/libmythui ../../libs/libmyth
    22
    3 LIBS += -L../../libs/libmyth -L../../libs/libmythui
     3LIBS += -L../../libs/libmythui -L../../libs/libmyth
    44
    55include ( ../../config.mak )
    66include ( ../../settings.pro )
     
    1717isEmpty(QMAKE_EXTENSION_LIB) {
    1818  QMAKE_EXTENSION_LIB=a
    1919}
     20cygwin {
     21  QMAKE_EXTENSION_SHLIB=$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     22}
     23
    2024TARGETDEPS += ../../libs/libmythui/libmythui-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    2125TARGETDEPS += ../../libs/libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    2226
  • programs/programs-libs.pro

     
    33INCLUDEPATH += ../../libs/libmythupnp ../../libs/libmythui
    44INCLUDEPATH += ../../libs/libmythlivemedia
    55
     6LIBS += -L../../libs/libmythui
    67LIBS += -L../../libs/libmyth -L../../libs/libmythtv
    78LIBS += -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat
    89LIBS += -L../../libs/libmythfreemheg
    9 LIBS += -L../../libs/libmythui
    1010LIBS += -L../../libs/libmythupnp
    1111LIBS += -L../../libs/libmythlivemedia
    1212
     
    2525}
    2626
    2727cygwin {
    28   QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     28  QMAKE_EXTENSION_SHLIB=$$QMAKE_EXTENSION_SHLIB$${QMAKE_EXTENSION_CYGWIN}
     29  LIBS += -lGdi32
    2930}
    3031
    3132TARGETDEPS += ../../libs/libmythui/libmythui-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
  • programs/mythfrontend/statusbox.cpp

     
    13241324    // weighted average loads
    13251325    contentLines[count].append(".   " + QObject::tr("Load") + ": ");
    13261326
    1327 #ifdef _WIN32
     1327#if defined(CONFIG_CYGWIN)
    13281328    contentLines[count].append(
    13291329        QObject::tr("unknown") + " - getloadavg() " + QObject::tr("failed"));
    13301330#else // if !_WIN32
  • programs/mythtranscode/replex/replex.pro

     
    2727  QMAKE_EXTENSION_SHLIB=so
    2828}
    2929
     30cygwin {
     31  QMAKE_EXTENSION_SHLIB=$$QMAKE_EXTENSION_SHLIB$$QMAKE_EXTENSION_CYGWIN
     32  LIBS += -L../../../libs/libavcodec -lmythavcodec-$${LIBVERSION}
     33  LIBS += -L../../../libs/libavutil -lmythavutil-$$LIBVERSION
     34  LIBS += $$EXTRA_LIBS
     35}
     36
    3037TARGETDEPS += ../../../libs/libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    3138TARGETDEPS += ../../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    3239TARGETDEPS += ../../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
  • programs/mythbackend/mainserver.cpp

     
    21112111
    21122112    QStringList strlist;
    21132113
     2114#if !defined(CONFIG_CYGWIN)
    21142115    double loads[3];
    21152116    if (getloadavg(loads,3) == -1)
    21162117        strlist << "getloadavg() failed";
     
    21182119        strlist << QString::number(loads[0])
    21192120                << QString::number(loads[1])
    21202121                << QString::number(loads[2]);
     2122#else
     2123    strlist << "getloadavg() not supported";
     2124#endif
    21212125
    21222126    SendResponse(pbssock, strlist);
    21232127}
  • programs/mythbackend/httpstatus.cpp

     
    357357 
    358358    storage.setAttribute("fsids", ids);
    359359
     360#if !defined(CONFIG_CYGWIN)
    360361    // load average ---------------------
    361362
    362363    double rgdAverages[3];
     
    367368        load.setAttribute("avg2", rgdAverages[1]);
    368369        load.setAttribute("avg3", rgdAverages[2]);
    369370    }
    370 
     371#endif
    371372 
    372373    //temperature -----------------
    373374    // Try ACPI first, then lmsensor 2nd
  • programs/mythbackend/backendutil.cpp

     
    44#if defined(CONFIG_DARWIN) || defined(__FreeBSD__)
    55#include <sys/param.h>
    66#include <sys/mount.h>
    7 #elif __linux__
     7#elif __linux__ || defined(CONFIG_CYGWIN)
    88#include <sys/vfs.h>
    99#endif
    1010
  • programs/mythtv-setup/mythtv-setup.pro

     
    2525        QMAKE_POST_LINK = ../../contrib/OSX/makebundle.sh mythtv-setup
    2626    }
    2727}
     28
     29cygwin {
     30  LIBS += -L../../libs/libmyth -lmyth-$$LIBVERSION
     31}
     32 No newline at end of file
  • filters/postprocess/postprocess.pro

     
    44INCLUDEPATH += ../../libs/libmythtv
    55DEPENDPATH  += ../../libs/libmythtv
    66
    7 SOURCES += filter_postprocess.c
     7SOURCES += filter_postprocess.c ../../libs/libavcodec/libpostproc/postprocess.c
    88
    99# Lots of symbols like pp_free_context, pp_free_mode, pp_get_context, pp_help
    1010# are used but not defined, which sometimes prevents linking on OS X.
  • filters/filter-avcodec.pro

     
    1313isEmpty(QMAKE_EXTENSION_SHLIB) {
    1414    QMAKE_EXTENSION_SHLIB=so
    1515}
    16 TARGETDEPS += ../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    17 TARGETDEPS += ../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     16cygwin {
     17        TARGETDEPS += ../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     18        TARGETDEPS += ../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     19} else {
     20        TARGETDEPS += ../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     21        TARGETDEPS += ../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     22}