port minidlna on Windows

hiero
2011-03-05
2015-02-19
  • hiero

    hiero - 2011-03-05

    I ported minidlna on Windows using cygwin, it works.
    Is there anyone who is interested in it?

     
  • Kayl

    Kayl - 2011-03-15

    Hello,

    I'm really interested. I try to port minidlna on Windows by myself. But I don't find the solution.
    Is it possible for you to detail how you have done?

    Thank you by advance.

     
  • hiero

    hiero - 2011-03-17

    Hello,

    I uploaded.
    3219737  minidlna port on Windows w/Cygwin

    I hope it will be useful.

    hiero

     
  • Justin Maggard

    Justin Maggard - 2011-03-18

    Very cool!  Nice work hieroun.  I need to start pulling in some of these patches soon.

     
  • hiero

    hiero - 2011-03-19

    Thanks jmaggard to pull in patches. I added patch against 1.0.19.

     
  • Florian Kusche

    Florian Kusche - 2011-06-02

    Thanks hieroun!
    I compiled minidlna successfully on cygwin.
    However, I hat some trouble setting the db_dir. It turned out, that make_dir() was not working correctly.
    I supplied patch 3310785

    Justin, it would be really cool, if you would incorporate hieroun's patch!

     
  • hiero

    hiero - 2011-06-05

    Thanks fku for the information and the patch.

    It seems EACCES is returned in case system directory is included in the db_dir path.

    I will upload the new patch after 1.0.20 is released.

    hiero

     
  • Florian Kusche

    Florian Kusche - 2011-06-05

    Great. I know of one more thing which is still to fix: system( "rm -rf files.db….." ) is called in at least 2 locations. This should be changed to unlink() an rmdir() calls. I will look into it as soon as I can (might take some days)

     
  • hiero

    hiero - 2011-06-06

    It is easier to use win32 API for recursive delete.
    Following works.

    #include <sys/cygwin.h>
    #include <windows.h>
    void delete_db(char *db_path)
    {
        char real_path[PATH_MAX*2+1], path_tmp[PATH_MAX];
        int ret, len1, len2;
        SHFILEOPSTRUCT file_op = {
            NULL,
            FO_DELETE,
            real_path,
            NULL,
            FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI,
            FALSE,
            NULL,
            ""
        };
        snprintf(path_tmp, sizeof(path_tmp), "%s/files.db", db_path);
        len1 = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path, 0);
        cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path, PATH_MAX);
        snprintf(path_tmp, sizeof(path_tmp), "%s/art_cache", db_path);
        len2 = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path+len1, 0);
        cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path+len1, PATH_MAX);
        real_path[len1+len2] = '\0';
        ret = SHFileOperationA(&file_op);
        if (ret != 0)
            fprintf(stderr, "cannot delete files.db, art_cache\n");
    }
    
     
  • Anonymous - 2012-04-06

    Hi!
    Can anyone upload and paste here link to download compilable windows source?
    Thanks!
    Mark

    P.S.
    Happy Easter!

     
  • Genmei Mori

    Genmei Mori - 2012-06-25

    Great work! Running very fine here. Thank you so much.
    This is my installation memo.

    Based on:
      Files: MiniDLNA-memo-1.0.22.txt, Note-for-MiniDLNA-cygwin-1.0.22.txt
      In: minidlna_cygwin_port_1.0.22.tar.gz
      From: http://sourceforge.net/tracker/?func=detail&aid=3219737&group_id=243163&atid=1121518

    Environment:
      cygwin 1.7.11
      Windows7 Home Premium 64bit/SP1

    Install ffmpeg's static libraries:
      Install cyg-pkgs: gcc4-core, make, pkg-config
     
      Download src: http://ffmpeg.org/releases/ffmpeg-0.10.4.tar.bz2
      Note: I recommend ver.0.10.x. Because ver.0.11.x no longer supports an api 'av_open_input_file'.
            This causes an incompatibility issue in minidlna's configuration check.

      Build:
        $ ./configure -disable-shared -enable-static -enable-pthreads -disable-yasm -enable-gpl -enable-version3
        $ make
        $ make install

      CHECK: 'libavutil.a' and others appeared in /usr/local/lib folder.

    Install minidlna:
      Install cyg-pkgs:
        patchutil, autoconf, automake, libiconv, gettext-devel, libsqlite3-devel
        libjpeg-devel, libexif-devel, libid3tag-devel, libogg-devel, libvorbis-devel, flac-devel
      Note: I recommend libsqlite3-devel ver.3.7.3-1. Because ver.3.7.12.1-1 seems defected (Does not contain a static library).

      Checkout src (rev. 2011-11-10):
        $ cvs -d:pserver:anonymous@minidlna.cvs.sourceforge.net:/cvsroot/minidlna login
        $ cvs -z3 -d:pserver:anonymous@minidlna.cvs.sourceforge.net:/cvsroot/minidlna co -D 2011-11-11 -P minidlna

      Download and apply patch:
        File: minidlna_CVS_20111110-454_cygwin.patch
        In: minidlna_CVS_20111110-454_cygwin_patch.tar.gz

      Build:
        $ ./autogen.sh
        $ ./configure
        $ make
        $ make install

    Configure and start:
      $ cp /tmp/minidlna/minidlna.conf /etc/minidlna.conf
      $ vi /etc/minidlna.conf (modify 'media_dir')
      $ minidlna -f /etc/minidlna.conf

    Please try! > marverix

     
  • Antoine Turmel

    Antoine Turmel - 2013-01-03

    Can anyone distribute a working binary for Windows ?
    Does it work the same as linux ?

     
  • Craig Chambers

    Craig Chambers - 2013-01-08

    minidlna is not designed to run on Windows.
    Instructions for running under cygwin (a Unix-like environment and command-line interface for Microsoft Windows) are included in the post above yours.

    If you are running Windows, there are other DLNA servers available, so I'm curious as to why you want a Windows version of minidlna.

    /Craig

     
  • bagu

    bagu - 2013-06-07

    Maybe because other dlna server sucks...

    The only dlna serve wich can serve HD files on eee-pc without lags is windows media player (yerk).
    So a windows port of minidlna will be a good news.

     
  • Craig Chambers

    Craig Chambers - 2013-06-12

    This is Sourceforge... welcome. There are very good reasons why there is no Windows port. Windows is significantly different to Unix like environments, hence why no-one has successfully ported minidlna to Windows natively.

    Install the Cygwin version as described above, or undertake the task of porting to Windows yourself. Good luck.

     
  • Bob Dellaca

    Bob Dellaca - 2015-02-19

    A standalone Windows version I made with Cygwin seems to work well. The necessary files for a binary installation are:

    minidlnad.exe
    58 Cygwin DLLs
    minidlna.conf

    Three source edits were required: (a) to getifaddr.c, to use Linux-type sockets; (b) to minidlna.c, to use remove(...) statements instead of a system(...) statement; (c) to utils.c, so that make_dir(...) works with Cygwin-style filenames.

    Cygwin "mounts" Windows drives as /cygwin/drive_letter e.g. /cygwin/c for C:. A standalone minidlnad made with Cygwin understands file and directory names that begin with /cygwin/[a-z]/ as referring to the appropriate Windows drive; it knows nothing of the default file and directory names in minidlnad (e.g. /var/run), so that it is neccesary to override the defaults with a config file.

    The command line (or shortcut) to start minidlnad, with command-line parameters in Cygwin-style, and with the .exe, .dll and .conf (and pid, database and log) files in path1 on the C drive, is then something like:

    c:\[path1]\minidlnad.exe -P /cygdrive/c/[path1]/pid -f /cygdrive/c/[path1]/minidlna.conf -R

    The config file, with a media_dir on path2 on the C drive, is then something like:

    media_dir=/cygdrive/c/[path2]
    db_dir=/cygdrive/c/[path1]
    log_dir=/cygdrive/c/[path1]

    Cygwin implements fork(), so that a standalone minidlnad started under Windows [7] forks to leave a detached minidlnad process, with no window and no tray icon; it is not a service, but the end effect is the same as though it were. If it is necessary to kill the process, a control program such as the Task Manager has to be used.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks