Opened 16 years ago
Closed 16 years ago
#4270 closed patch (fixed)
MythTV on Windows (with MinGW)
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | Windows |
Cc: | Ticket locked: | no |
Description
The attached patches for MytTV and MythPlugins? allow building native Windows port of MythTV. It's very buggy at this point, but it works. See mythtv-dev mailing list for details.
Attachments (17)
Change History (49)
Changed 16 years ago by
Attachment: | mythtv.patch.gz added |
---|
Changed 16 years ago by
Attachment: | mythplugins.patch.gz added |
---|
Changed 16 years ago by
Attachment: | qt.patch.gz added |
---|
comment:1 Changed 16 years ago by
config script parameters that I used (debug): MythTV ./configure --prefix=/usr --disable-dbox2 --disable-hdhomerun \
--disable-dvb --disable-ivtv --disable-iptv \ --disable-joystick-menu \ --disable-xvmc-vld \ --disable-x11 \ --disable-xvmc \ --enable-directx \ --enable-memalign-hack \ --cpu=k8 \ --compile-type=debug
MythPlugins?: ./configure --prefix=/usr \
--disable-mytharchive \ --disable-mythbrowser \ --disable-mythflix \ --disable-mythgame \ --disable-mythnews \ --disable-mythphone \ --enable-aac \ --disable-mythzoneminder \ --disable-mythweb \ --enable-libvisual \ --enable-fftw \ --compile-type=debug
comment:2 Changed 16 years ago by
Owner: | changed from Isaac Richards to danielk |
---|---|
Priority: | major → minor |
Can you regenerate the mythtv patch against the current trunk?
Also the qt patch could be shrunk a bit by just defining Q_EXPORT as a follows: #undef Q_EXPORT #define Q_EXPORT
comment:3 Changed 16 years ago by
(In [15068]) Refs #4270. Weather and SourceManager? define some methods without an implementations. Confusing the MS Windows linker.
comment:4 Changed 16 years ago by
(In [15069]) Refs #4270. "LoadImage?" is an MS Windows macro, this renames the "LoadImage?" method to "Load" to avoid the collision.
comment:5 Changed 16 years ago by
(In [15070]) Refs #4270. Two small fixes for mythcontrols, bzero->memset (POSIX) + dummy definition for method defined but not implemented in MythControls? (confuses MS Windows linker).
comment:6 Changed 16 years ago by
Changed 16 years ago by
Attachment: | mythtv.patch.2.gz added |
---|
comment:7 Changed 16 years ago by
comment:8 Changed 16 years ago by
comment:9 Changed 16 years ago by
comment:10 Changed 16 years ago by
comment:11 Changed 16 years ago by
comment:12 Changed 16 years ago by
Changed 16 years ago by
Attachment: | 4270-plugins-v1.patch added |
---|
What is left of the plugins patch; mythmusic & mythgallery.
Changed 16 years ago by
Attachment: | 4270-plugins-v2.patch.gz added |
---|
can't submit uncompressed - gets rejected as "spam"
Changed 16 years ago by
Attachment: | 4270-mythtv-v1.patch added |
---|
Version of mythtv portion after reading it over and making small edits (the .pro files still need some work).
comment:13 Changed 16 years ago by
Daniel, I am working on the patch right now (it's 11:30PM here, so I'll wrap up soon and resume tomorrow), should I read your 4270-mythtv-v1.patch file and try to incorporate the changes or should I wait untill you commit the changes to SVN and then do it?
comment:14 Changed 16 years ago by
(In [15120]) Refs #4270. Applies patch for MinGW compiling.
Mostly this does three things:
- Renames methods that conflict with MS Windows defines/functions, or undefs the MS Windows defines.
- Rearranges headers so things will compile under MingGW
- Adds a some platform specific code, almost all isolated to compat.h or util.{h,cpp}
This won't fully compile under MinGW yet. I've removed all the suspect changes and code changes that require more extensive testing. The idea is to shrink the MinGW by taking out all the boilerplate stuff in this patch + bits that are only compiled under MinGW and can't break other builds.
Due to the header changes this may break the compile for you, please just post any compile error to the dev mailing list and I'll fix it.
PS The MYTH_BINARY_VERSION has changed, so plugins need to be recompiled.
comment:15 Changed 16 years ago by
Andrei, make the next patch against the current svn now that I've applied the patch.
Try to explain each change and new file so I know why it is needed, and can suggest/implement a better solution if there is a problem with the current solution.
comment:18 Changed 16 years ago by
compat.h:
use pragma warning(disable) only with Visual C++ gmtime_r and localtime_r are not needed here, they are only
used once and if left here generate "redefinition" warnings (they are defined in pthred.h, but not implemented)
#define lseek lseek64 creates two lseek64 defines with different
signatures - the compiler is not happy
operator==(pthread.... - not needed anymore signal() is actually supported in MinGW, just not all signals,
and besides, "signal" is used by QT, so this didn't work
ThreadedFileWriter?.cpp: see signal() explanation above
RingBuffer?.cpp: see lseek64() explanation
vsync.h, vsync.cpp: doesn't compile if not protected by #ifdef's
mythmainwindow.cpp: implement "get display dpi"
libmythui.def, libmythupnp.def: these are needed to create "import libraries" to
work around circular references between Myth libraries (e.g.: libmyth uses libmythui which uses libmyth)
mpegts.c: needs compat.h
os_support.c: if #ifdef CONFIG_NETWORK is where it is, it tries
unnecessarily to include <winsock2.h> and fails due to conflict between winsock close() and io close() and a bunch of other errors
audiooutputwin: fixes (didn't compile) (by the way, why do we need
to move Windows stuff to private class, if the header file is only included when compiling on Windows?)
util.cpp: new char[MAX_PATH+1] allocates memory, who frees it?
MAX_PATH is 260, actual restriction is 256, +1 is not necessary. Considering that it's just 260, I think stack allocation makes sense. I think we actually want to mkdir/create file, and then show error message if something went wrong.
upnptasknotify.h, httpserver.h: typo? (should be #ifndef, not #ifdef)
mythbackend/main.cpp: there's no fork() on Windows, new process does not
have open handles. Or am I missing something?
postprocess/postprocess.pro: hack, but I nelieve that postprocess.c is
not compiled on any other platform either. Excluding filter_postprocess.c gets rid of "undefined symbol" errors.
Changed 16 years ago by
Attachment: | mingw-svn15128.2.patch added |
---|
comment:19 Changed 16 years ago by
comment:21 Changed 16 years ago by
comment:22 Changed 16 years ago by
Changed 16 years ago by
Attachment: | mingw.patch added |
---|
one of the latest commits broke upnputil.h (suseconds_t is not a type in MinGW and/or Windows)
Changed 16 years ago by
Attachment: | mythplugins.patch added |
---|
comment:24 Changed 16 years ago by
The last mythplugins.patch allows mythmusic to compile with CDDA functionality disabled.
comment:25 Changed 16 years ago by
1) suseconds_t should now be something like:
Index: compat.h =================================================================== --- compat.h (revision 15161) +++ compat.h (working copy) @@ -240,6 +240,10 @@ // suseconds_t #include <sys/types.h> +#ifdef USING_MINGW + typedef long long suseconds_t; +#endif + #include "mythconfig.h" #if defined(CONFIG_DARWIN) && ! defined (_SUSECONDS_T) typedef int32_t suseconds_t; // 10.3 or earlier don't have this
but could it be int32_t (like Darwin) instead of long long?
2) For MythMusic, instead of the #ifdefs, it might be better to make a mostly empty cddecoder implementation? e.g.cddecoder-windows.cpp? I can knock one up if you like?
Changed 16 years ago by
Attachment: | mingw.2.patch added |
---|
suseconds_t, enable mediamonitor in mythfrontend
comment:26 Changed 16 years ago by
comment:27 Changed 16 years ago by
comment:28 Changed 16 years ago by
Changed 16 years ago by
Attachment: | mythplugins-configure.patch added |
---|
this was supposed to be substring extraction in Bash. Changeset 15183 was not applied correctly.
Changed 16 years ago by
Attachment: | mythmusic.patch added |
---|
allow mythmusic to compile using cddecoder_windows, use parent's implementation of some methods (for now)
comment:32 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
qt-3.3.x-p8 for mingw patch