How to Build MediaElch from Source

MediaElch is an excellent, free, cross-platform tool for managing a media library (Kodi users take note).

This short tutorial will explain how to build MediaElch from source. Nightly source tarballs/builds are available on the community site for donating users. There's also a mirror on GitHub, but it hasn't been updated in a while as of this writing. If you like MediaElch, please donate a few bucks.

Note: This guide is Mac-specific, but the process should be similar on Windows or Linux. YMMV.

  1. Install Qt Creator. This will download an installer app. Accept all defaults. Providing personal information is optional. Fair warning: it's a large (~17GB) download. You can continue to the next step(s) while this is downloading. Mac users will likely need to ensure the XCode tools are installed; Windows and Linux users may need a build toolchain (make, gcc, etc) if Qt doesn't bundle one.
  2. Grab the latest source tarball from "Nightly Builds" on the community site. If you don't have access to "Nightly Builds", download/clone from GitHub, or donate. The filename will be something like MediaElch-src-YYYY-MM-DD_HH-SS.tar.gz.
  3. If you downloaded a tarball, unarchive it (tar zxvf MediaElch-src-YYYY-MM-DD_HH-SS.tar.gz). This should extract into a dir called something like mediaelch-yyyy-mm-dd_hh-mm. If you cloned, the dir is just MediaElch. Let's call it "the MediaElch source directory".
  4. Before you build, you will need two dependencies. There's no package manager at work here, so you have to manually download them. The first dep we need is MediaInfoLib.
    1. Download a tarball or clone from here.
    2. If downloading, unarchive the tarball similarly to step 3 above.
    3. Copy the entire Source/MediaInfoDLL/ dir (not just its contents) into the MediaElch source dir.
  5. The second dep is ZenLib. Get it from here. Repeat step 4 above for ZenLib; copy Source/ZenLib/ into the MediaElch source dir.
  6. Assuming QT Creator is installed, run it. On Mac, it's installed into /Users/you/Qt/Qt Creator.app. Linux users probably have an executable in /home/you/Qt/ (but not sure); Windows users probably get a shortcut.
  7. On the welcome screen, choose to open an existing project. Navigate to the MediaElch source dir. You may need to monkey with the dialog to allow you to open a .pro file. Open MediaElch.pro.
  8. Choose "Build All" from the "Build" menu. This should work without error (though you will have warnings).
  9. Choose "Run" from the "Build" menu. You will see some debug output in Qt Creator. Good work!

Addendums/corrections appreciated.

Update (Oct 29, 2016)

After upgrading to macOS Sierra, I've found that you may need to add the following lines to MediaElch.pro:

macx {
    QMAKE_MAC_SDK=macosx10.12
}

I was receiving an error about "sysroot" being incorrect; it was pointing to a non-existent SDK version (MacOS X 10.11).