diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-04-09 19:56:12 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-04-09 19:56:12 +0000 |
| commit | 4008075712363ed133940e8edd98348b924d1b85 (patch) | |
| tree | 9c651329e6f4537da66174d198354d251624a883 | |
| parent | a7f6d7b496b40690716af72caa4efceb58c03e7a (diff) | |
| download | qmmp-4008075712363ed133940e8edd98348b924d1b85.tar.gz qmmp-4008075712363ed133940e8edd98348b924d1b85.tar.bz2 qmmp-4008075712363ed133940e8edd98348b924d1b85.zip | |
partial mingw support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@899 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmp/streamreader.cpp | 4 | ||||
| -rw-r--r-- | src/qmmpui/playstate.cpp | 2 | ||||
| -rw-r--r-- | src/qmmpui/playstate.h | 2 | ||||
| -rw-r--r-- | src/qmmpui/qmmpui.pro | 18 | ||||
| -rw-r--r-- | src/ui/balancebar.h | 2 | ||||
| -rw-r--r-- | src/ui/eqslider.h | 2 | ||||
| -rw-r--r-- | src/ui/eqtitlebar.h | 2 | ||||
| -rw-r--r-- | src/ui/eqwidget.h | 2 | ||||
| -rw-r--r-- | src/ui/mainwindow.cpp | 2 | ||||
| -rw-r--r-- | src/ui/monostereo.h | 2 | ||||
| -rw-r--r-- | src/ui/playstatus.h | 2 | ||||
| -rw-r--r-- | src/ui/qmmpstarter.cpp | 14 | ||||
| -rw-r--r-- | src/ui/symboldisplay.cpp | 2 | ||||
| -rw-r--r-- | src/ui/timeindicator.h | 2 | ||||
| -rw-r--r-- | src/ui/togglebutton.h | 2 | ||||
| -rw-r--r-- | src/ui/ui.pro | 25 | ||||
| -rw-r--r-- | src/ui/volumebar.h | 2 |
17 files changed, 55 insertions, 32 deletions
diff --git a/src/qmmp/streamreader.cpp b/src/qmmp/streamreader.cpp index 6c9a9835a..5d61c76d1 100644 --- a/src/qmmp/streamreader.cpp +++ b/src/qmmp/streamreader.cpp @@ -98,13 +98,13 @@ qint64 StreamReader::size () const bool StreamReader::waitForBytesWritten ( int msecs ) { - usleep(msecs*1000); + //usleep(msecs*1000); return TRUE; } bool StreamReader::waitForReadyRead ( int msecs ) { - usleep(msecs*1000); + //usleep(msecs*1000); return TRUE; } diff --git a/src/qmmpui/playstate.cpp b/src/qmmpui/playstate.cpp index 713b23058..ad9da3bdf 100644 --- a/src/qmmpui/playstate.cpp +++ b/src/qmmpui/playstate.cpp @@ -18,7 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <playstate.h> +#include "playstate.h" ShufflePlayState::ShufflePlayState(PlayListModel * model) : PlayState(model) { diff --git a/src/qmmpui/playstate.h b/src/qmmpui/playstate.h index 554afcf11..a61ea3d66 100644 --- a/src/qmmpui/playstate.h +++ b/src/qmmpui/playstate.h @@ -21,7 +21,7 @@ #ifndef _PLAYSTATE_H #define _PLAYSTATE_H -#include <playlistmodel.h> +#include "playlistmodel.h" /*! @internal * @brief Abstract class that represents data model playing states. diff --git a/src/qmmpui/qmmpui.pro b/src/qmmpui/qmmpui.pro index af48ad1fa..1b0f99f6a 100644 --- a/src/qmmpui/qmmpui.pro +++ b/src/qmmpui/qmmpui.pro @@ -1,14 +1,17 @@ include(../../qmmp.pri) -TARGET = ../../lib/qmmpui +unix:TARGET = ../../lib/qmmpui +win32:TARGET = ../../../bin/qmmpui CONFIG += release \ warn_on \ +shared \ qt \ thread QMAKE_LIBDIR += ../../lib qmmpui LIBS += -Wl,-rpath,./ -LIBS += -L../../lib -lqmmp +unix:LIBS += -L../../lib -lqmmp +win32:LIBS += -L../../bin -lqmmp0 INCLUDEPATH += ../ TEMPLATE = lib @@ -19,7 +22,7 @@ unix : isEmpty(LIB_DIR){ VERSION = $$QMMP_VERSION -target.path = $$LIB_DIR +unix:target.path = $$LIB_DIR HEADERS += general.h \ generalfactory.h \ @@ -37,7 +40,7 @@ HEADERS += general.h \ playstate.h \ fileloader.h \ mediaplayer.h \ - playlistsettings.h + playlistsettings.h SOURCES += general.cpp \ generalhandler.cpp \ playlistparser.cpp \ @@ -50,9 +53,9 @@ SOURCES += general.cpp \ playlistitem.cpp \ fileloader.cpp \ mediaplayer.cpp \ - playlistsettings.cpp + playlistsettings.cpp -DESTDIR = . +unix:DESTDIR = . RESOURCES += translations/libqmmpui_locales.qrc @@ -64,7 +67,7 @@ TRANSLATIONS = translations/libqmmpui_ru.ts \ translations/libqmmpui_uk_UA.ts \ translations/libqmmpui_zh_TW.ts \ translations/libqmmpui_de.ts - +unix { devel.files += abstractplaylistitem.h \ commandlinemanager.h \ commandlineoption.h \ @@ -82,3 +85,4 @@ devel.files += abstractplaylistitem.h \ devel.path = /include/qmmpui INSTALLS += target devel +} diff --git a/src/ui/balancebar.h b/src/ui/balancebar.h index 6704671f9..70fab2968 100644 --- a/src/ui/balancebar.h +++ b/src/ui/balancebar.h @@ -20,7 +20,7 @@ #ifndef BALANCEBAR_H #define BALANCEBAR_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" class Skin; diff --git a/src/ui/eqslider.h b/src/ui/eqslider.h index 3915ec05b..bc92bad14 100644 --- a/src/ui/eqslider.h +++ b/src/ui/eqslider.h @@ -20,7 +20,7 @@ #ifndef EQSLIDER_H #define EQSLIDER_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/ui/eqtitlebar.h b/src/ui/eqtitlebar.h index 70ef88fe4..75eec3dfa 100644 --- a/src/ui/eqtitlebar.h +++ b/src/ui/eqtitlebar.h @@ -20,7 +20,7 @@ #ifndef EQTITLEBAR_H #define EQTITLEBAR_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/ui/eqwidget.h b/src/ui/eqwidget.h index 4d37d11f1..9345e2e40 100644 --- a/src/ui/eqwidget.h +++ b/src/ui/eqwidget.h @@ -20,7 +20,7 @@ #ifndef EQWIDGET_H #define EQWIDGET_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" #include <qmmp/output.h> /** diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index fdd2cb722..239014710 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -142,9 +142,11 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option //m_playListModel->readSettings(); m_playListModel->doCurrentVisibleRequest(); updateEQ(); +#ifndef Q_OS_WIN32 char buf[PATH_MAX + 1]; QString cwd = QString::fromLocal8Bit(getcwd(buf,PATH_MAX)); processCommandArgs(args,cwd); +#endif if (m_startHidden && m_generalHandler->visibilityControl()) toggleVisibility(); } diff --git a/src/ui/monostereo.h b/src/ui/monostereo.h index 936cf0607..d666fedcf 100644 --- a/src/ui/monostereo.h +++ b/src/ui/monostereo.h @@ -20,7 +20,7 @@ #ifndef MONOSTEREO_H #define MONOSTEREO_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/ui/playstatus.h b/src/ui/playstatus.h index b050de1ca..1ddf9748c 100644 --- a/src/ui/playstatus.h +++ b/src/ui/playstatus.h @@ -20,7 +20,7 @@ #ifndef PLAYSTATUS_H #define PLAYSTATUS_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/ui/qmmpstarter.cpp b/src/ui/qmmpstarter.cpp index 6dd467344..6570ef6ac 100644 --- a/src/ui/qmmpstarter.cpp +++ b/src/ui/qmmpstarter.cpp @@ -27,7 +27,9 @@ #include <string.h> #include <qmmpui/commandlinemanager.h> +#ifndef Q_OS_WIN32 #include "unixdomainsocket.h" +#endif #include "mainwindow.h" #include "qmmpstarter.h" #include "builtincommandlineoption.h" @@ -66,7 +68,7 @@ QMMPStarter::QMMPStarter(int argc,char **argv, QObject* parent) : QObject(parent qFatal("QMMP: Unknown command..."); exit(1); } - +#ifndef Q_OS_WIN32 m_sock = new UnixDomainSocket(this); if (m_sock->bind(UDS_PATH)) { @@ -88,6 +90,9 @@ QMMPStarter::QMMPStarter(int argc,char **argv, QObject* parent) : QObject(parent } else // socket is alive, qmmp application is already running. passing command to it! writeCommand(); +#else + startMainWindow(); +#endif } QMMPStarter::~ QMMPStarter() @@ -97,13 +102,16 @@ QMMPStarter::~ QMMPStarter() void QMMPStarter::startMainWindow() { +#ifndef Q_OS_WIN32 connect(m_sock, SIGNAL(readyRead()),this, SLOT(readCommand())); +#endif QStringList arg_l = argString.split("\n", QString::SkipEmptyParts); mw = new MainWindow(arg_l,m_option_manager,0); } void QMMPStarter::writeCommand() { +#ifndef Q_OS_WIN32 if (!argString.isEmpty()) { char buf[PATH_MAX + 1]; @@ -120,10 +128,12 @@ void QMMPStarter::writeCommand() } exit(0); +#endif } void QMMPStarter::readCommand() { +#ifndef Q_OS_WIN32 QByteArray inputArray; inputArray.resize(MAXCOMMANDSIZE); bzero(inputArray.data(),inputArray.size()); @@ -134,7 +144,7 @@ void QMMPStarter::readCommand() { mw->processCommandArgs(slist,cwd); } - +#endif } void QMMPStarter::printUsage() diff --git a/src/ui/symboldisplay.cpp b/src/ui/symboldisplay.cpp index b3942a6bb..253214016 100644 --- a/src/ui/symboldisplay.cpp +++ b/src/ui/symboldisplay.cpp @@ -32,7 +32,7 @@ SymbolDisplay::SymbolDisplay ( QWidget *parent, int digits ) connect ( m_skin, SIGNAL ( skinChanged() ), this, SLOT (draw())); draw(); for (int i=0; i<m_digits; ++i) -#ifdef Q_OS_FREEBSD +#if defined(Q_OS_FREEBSD) || defined(Q_OS_WIN32) m_max += 9 * (int) pow(10,i); #else m_max += 9 * (int) exp10(i); diff --git a/src/ui/timeindicator.h b/src/ui/timeindicator.h index f5608b21c..55e74c43f 100644 --- a/src/ui/timeindicator.h +++ b/src/ui/timeindicator.h @@ -20,7 +20,7 @@ #ifndef TIMEINDICATOR_H #define TIMEINDICATOR_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" class QMouseEvent; class QTimer; diff --git a/src/ui/togglebutton.h b/src/ui/togglebutton.h index 0071e0321..754d5fc32 100644 --- a/src/ui/togglebutton.h +++ b/src/ui/togglebutton.h @@ -20,7 +20,7 @@ #ifndef TOGGLEBUTTON_H #define TOGGLEBUTTON_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/ui/ui.pro b/src/ui/ui.pro index 75649715f..5b2072b9f 100644 --- a/src/ui/ui.pro +++ b/src/ui/ui.pro @@ -49,7 +49,6 @@ HEADERS += mainwindow.h \ aboutdialog.h \ timeindicator.h \ keyboardmanager.h \ - unixdomainsocket.h \ addurldialog.h \ skinreader.h \ visualmenu.h \ @@ -96,7 +95,6 @@ SOURCES += mainwindow.cpp \ aboutdialog.cpp \ timeindicator.cpp \ keyboardmanager.cpp \ - unixdomainsocket.cpp \ addurldialog.cpp \ skinreader.cpp \ visualmenu.cpp \ @@ -105,6 +103,13 @@ SOURCES += mainwindow.cpp \ shadedbar.cpp \ builtincommandlineoption.cpp +win32:HEADERS += ../qmmp/visual.h + +unix{ +HEADERS += unixdomainsocket.h +SOURCES += unixdomainsocket.cpp +} + #Some conf to redirect intermediate stuff in separate dirs UI_DIR =./.build/ui/ MOC_DIR =./.build/moc/ @@ -112,16 +117,22 @@ OBJECTS_DIR =./.build/obj QT += network -TARGET = ../../bin/qmmp +unix:TARGET = ../../bin/qmmp +win32:TARGET = ../../../bin/qmmp CONFIG += thread release \ warn_on QMAKE_LIBDIR += ../../lib qmmpui LIBS += -Wl,-rpath,../lib -LIBS += -L../../lib -lqmmp -lqmmpui +unix:LIBS += -L../../lib -lqmmp -lqmmpui +win32:LIBS += -L../../bin -lqmmp0 -lqmmpui0 + + INCLUDEPATH += ../ RESOURCES = images/images.qrc \ stuff.qrc TEMPLATE = app + +unix{ target.path = /bin desktop.files = qmmp.desktop \ @@ -137,7 +148,7 @@ icon32.path = /share/icons/hicolor/32x32/apps icon48.path = /share/icons/hicolor/48x48/apps INSTALLS += desktop target icon16 icon32 icon48 - +} RESOURCES += translations/qmmp_locales.qrc @@ -150,7 +161,3 @@ TRANSLATIONS = translations/qmmp_ru.ts \ translations/qmmp_zh_TW.ts \ translations/qmmp_de.ts \ translations/qmmp_pl_PL.ts - - - - diff --git a/src/ui/volumebar.h b/src/ui/volumebar.h index 51bc7ac46..45fb84321 100644 --- a/src/ui/volumebar.h +++ b/src/ui/volumebar.h @@ -20,7 +20,7 @@ #ifndef VOLUMEBAR_H #define VOLUMEBAR_H -#include <pixmapwidget.h> +#include "pixmapwidget.h" /** @author Ilya Kotov <forkotov02@hotmail.ru> |
