I have compiled from source, but the inotify event does not seem to be working on soft links. I first tried to compile in Cygwin x64 which was missing dependencies. I then compiled using 32 bit with the old dependencies with static libraries and minidlna works fine except for the database does not remove files when they are deleted or added. I recompiled from clean source and will be testing tonight.
Last edit: Patrick Cartwright 2014-03-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to compile minidlan 1.1.1 on cygwin (1.7.29 64bits on Win 7 64).
It compiles fine.
But when run, all the socket() calls return -1 with an errno of 17 : File exists ...
Any idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that linking and using "IP Helper API" of windows makes problem on Cygwin64.
"IP Helper API" is used only for "Don't require a configured network interface to start up, and add network interface monitoring support" functionality.
Workaround is as follows.
Not to link "IP Helper API":
comment out LIBS="$LIBS -lws2_32 -liphlpapi" in configure.ac.
Not to use "IP Helper API":
replace "#elif defined(CYGWIN)" with "#elif defined(CYGWIN) && !defined(__x86_64)" in getifaddr.c.
There are two above lines.
Anyway I think it is easier to use 32 bit version of Cygwin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
add "--disable-static" option to configure
add workaround for cygwin64 ("Don't require a configured network interface to start up, and add network interface monitoring support" is not supported)
building missing static libraries is described in "How to build on Cygwin -1.1.3.txt"
First of all, thanks for your great work, I had no problems compiling and running the port.
But it has a bug serving external subtitles to Samsung and LG players.
The problem is withing the following block in upnphttp.c, near line 1926.
if( h->reqflags & FLAG_CAPTION )
{
if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%lld'", id) > 0 )
strcatf(&str, "CaptionInfo.sec: http://%s:%d/Captions/%lld.srt\r\n",
lan_addr[h->iface].str, runtime_vars.port, id);
}
This code is running after process fork and seems to unable to connect to database to run: it writes to logs "SQL logic error or missing database". So, code won't send correct headers and TV won't see any external subtitles. Not sure if it works in vanila minidlna on linux.
This can be easily fixed by checking database before forking.
Last edit: nymous 2014-08-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems inherited database handle does not work in child process.
This might be bug or restriction of cygwin, because this issue does not occur on other OSs.
Following workaround works.
if( h->reqflags & FLAG_CAPTION )
{
char path[PATH_MAX];
snprintf(path, sizeof(path), "%s/files.db", db_path);
if (sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL) != SQLITE_OK)
DPRINTF(E_DEBUG, L_HTTP, "Failed to open sqlite database!\n");
if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%lld'", (long long)id) > 0 )
strcatf(&str, "CaptionInfo.sec: http://%s:%d/Captions/%lld.srt\r\n",
lan_addr[h->iface].str, runtime_vars.port, (long long)id);
sqlite3_close(db);
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello folks.
I've updated patch to 1.1.5. I've made it compatible with cygport infrastructure. I don't have a script to build all prereqs this time (sorry, no time to make it). But hiero's manual for 1.1.4 should work too.
To actually build the port, after you have installed prerequisites and compiled ffmpeg, installed cygport utility, extract the archive to your /usr/src/ directory, go there and execute:
This would fetch actual sources of minidlna, patch them, compile and package into mere cygwin package which you can reuse. It would be in dist subfolder.
To act like a normal cygwin app, dynamic build with cygwin config locations (/etc/minidlna.conf) is built by default.
To build hiero's like version, use minidlna_static_winprofile.cygport instead of minidlna.cygport.
If you do not like windows logo icon, remove the corresponding patch from cygport file.
To add another patches, simply place them in that folders and add them to the list in cygport file.
changelog:
- updated to 1.1.5
- cygport script
- dynamic build by default
- proper client MAC addresses on status page
Ok, here are build scripts for automatic build of minidlna and all dependencies.
Build scripts tested with Cygwin 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64.
Library versions at the time of writing:
All you need is to install base Cygwin system, unpack the following archive to a folder and run one of the following scripts.
- build.sh - Builds standard cygwin shared binary, which has many dll dependencies.
- build_static.sh - Builds static versions of dependencies and static minidlna. The binary would need only cygwin1.dll from the base system.
All dependencies are fetched and built automatically using apt-cyg and cygports.
Everything is built in /usr/src/ folder, you might rebuild by yourself manually using cygports.
If you want to build hiero's like build which uses %APPDATA% folder as default location for database and media cache, use winprofile cygport.
I have compiled from source, but the inotify event does not seem to be working on soft links. I first tried to compile in Cygwin x64 which was missing dependencies. I then compiled using 32 bit with the old dependencies with static libraries and minidlna works fine except for the database does not remove files when they are deleted or added. I recompiled from clean source and will be testing tonight.
Last edit: Patrick Cartwright 2014-03-12
... allways get this error ... can anybody explain what is wrong?
Try to install older version of libogg, libFLAC and libvorbis as folows:
libogg 1.3.1-1
libFLAC 1.3.0-1
libvorbis 1.3.3-1
Latest version of above libraries do not include static libraries.
HI,
I'm trying to compile minidlan 1.1.1 on cygwin (1.7.29 64bits on Win 7 64).
It compiles fine.
But when run, all the socket() calls return -1 with an errno of 17 : File exists ...
Any idea ?
It seems that linking and using "IP Helper API" of windows makes problem on Cygwin64.
"IP Helper API" is used only for "Don't require a configured network interface to start up, and add network interface monitoring support" functionality.
Workaround is as follows.
Not to link "IP Helper API":
comment out LIBS="$LIBS -lws2_32 -liphlpapi" in configure.ac.
Not to use "IP Helper API":
replace "#elif defined(CYGWIN)" with "#elif defined(CYGWIN) && !defined(__x86_64)" in getifaddr.c.
There are two above lines.
Anyway I think it is easier to use 32 bit version of Cygwin.
After the latest Cygwin update I had to back off three libraries to these versions:
sqlite3 3.7.17-4
flac 1.2.1-2
libvorbis 1.3.3-1
Last edit: Jenks Crayton 2014-06-12
minidlna(1.1.3) port on Windows w/Cygwin
add "--disable-static" option to configure
add workaround for cygwin64 ("Don't require a configured network interface to start up, and add network interface monitoring support" is not supported)
building missing static libraries is described in "How to build on Cygwin -1.1.3.txt"
hiero
First of all, thanks for your great work, I had no problems compiling and running the port.
But it has a bug serving external subtitles to Samsung and LG players.
The problem is withing the following block in upnphttp.c, near line 1926.
This code is running after process fork and seems to unable to connect to database to run: it writes to logs "SQL logic error or missing database". So, code won't send correct headers and TV won't see any external subtitles. Not sure if it works in vanila minidlna on linux.
This can be easily fixed by checking database before forking.
Last edit: nymous 2014-08-10
It seems inherited database handle does not work in child process.
This might be bug or restriction of cygwin, because this issue does not occur on other OSs.
Following workaround works.
I've fixed it without reopening database. Just run the query before fork and save it's returning value for later check.
minidlna(1.1.4) port on Windows w/Cygwin
hiero
The following piece should be outside if, or subtitles support is broken on Samsung TVs.
Move it 1 line down, just before #if USE_FORK
Last edit: nymous 2015-04-06
Here is the build guys 1.1.4. Enjoy!
minidlna(1.1.4) port on Windows w/Cygwin
including:
- fixed compile error on latest cygwin32
- fixed subtitle issue on Samsung TVs (thanks to nymous)
- build-static-libraries-for-minidlna.sh for latest cygwin libraries
hiero
Hello folks.
I've updated patch to 1.1.5. I've made it compatible with cygport infrastructure. I don't have a script to build all prereqs this time (sorry, no time to make it). But hiero's manual for 1.1.4 should work too.
To actually build the port, after you have installed prerequisites and compiled ffmpeg, installed cygport utility, extract the archive to your /usr/src/ directory, go there and execute:
cygport minidlna.cygport fetch prep compile install package
This would fetch actual sources of minidlna, patch them, compile and package into mere cygwin package which you can reuse. It would be in
dist
subfolder.To act like a normal cygwin app, dynamic build with cygwin config locations (
/etc/minidlna.conf
) is built by default.To build hiero's like version, use
minidlna_static_winprofile.cygport
instead ofminidlna.cygport
.If you do not like windows logo icon, remove the corresponding patch from cygport file.
To add another patches, simply place them in that folders and add them to the list in cygport file.
changelog:
- updated to 1.1.5
- cygport script
- dynamic build by default
- proper client MAC addresses on status page
Prerequisites build manual next time, sorry.
Last edit: nymous 2016-05-24
Ok, here are build scripts for automatic build of minidlna and all dependencies.
Build scripts tested with Cygwin 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64.
Library versions at the time of writing:
flac-1.3.1-1
libexif-0.6.21-2
libid3tag-0.15.1b-10
libjpeg-turbo-1.4.2-1
libogg-1.3.1-1
libvorbis-1.3.5-1
sqlite3-3.12.2-1
ffmpeg-3.0.2-1
minidlna-1.1.5-1
All you need is to install base Cygwin system, unpack the following archive to a folder and run one of the following scripts.
- build.sh - Builds standard cygwin shared binary, which has many dll dependencies.
- build_static.sh - Builds static versions of dependencies and static minidlna. The binary would need only cygwin1.dll from the base system.
All dependencies are fetched and built automatically using apt-cyg and cygports.
Everything is built in /usr/src/ folder, you might rebuild by yourself manually using cygports.
If you want to build hiero's like build which uses %APPDATA% folder as default location for database and media cache, use winprofile cygport.
Last edit: nymous 2016-05-29
Hi!
I added the cygwin patches to my github account:
https://github.com/Portisch/minidlna-compile
https://github.com/Portisch/minidlna/tree/cygwin