How To Use the macOS SDK

  1. Download and install the following:
  2. Start Qt Creator and choose Qt Creator > Preferences… > Kits
    Configure all of your settings in the Kits section.
    • Manually set the Qt version. Qt Versions
    • Configure the project kit from the previously set Qt version. Kits
  3. Extract the Shotcut SDK .txz file to a new folder in $HOME called “Projects”.
  4. In Qt Creator open shotcut.pro from $HOME/Projects/Shotcut/src/shotcut.
  5. In the Shotcut project configuration screen find Build Settings.
    • Under Build steps > qmake > Additional arguments enter
      PREFIX=../../.. QMAKE_RPATHDIR=@executable_path/../Frameworks
    • Under Build Steps > Make > Make arguments add “-j” for faster parallel compilation.
  6. In the Shotcut project configuration screen find Run Settings.
    • Under Deployment click Add Deploy Step > Make, and in Make arguments add “install”.
    • Under Deployment click Add Deploy Step > Custom Process Step, in Command enter “cp”, and in Arguments enter
      -p src/Shotcut.app/Contents/MacOS/Shotcut ../../Contents/MacOS
    • Under Run > Run configuration click Add > Custom Executable > Executable add $HOME/Projects/Shotcut/Contents/MacOS/Shotcut
    • Under Run Environment > Details add the following environment variables:
    • Set QML2_IMPORT_PATH to ${QTDIR}/qml
    • Set QT_PLUGIN_PATH to ${QTDIR}/plugins
  1. After clicking Run, you can confirm the newly built executable is the one that is running from the About dialog: the version will be today’s date.

Rebuilding Dependencies

You still might need to get some dependencies from MacPorts (or Homebrew, untested).

You can use the following command to revise all of the pkg-config files to your installation path:

for f in Shotcut/Contents/Frameworks/lib/pkgconfig/*.pc; do sed -i .bak -e "s,/Users/ddennedy/BuildAgent/work/ef55b932ce3c3e94/shotcut/build,$HOME/Projects/Shotcut/Contents/Frameworks," -e 's,Frameworks/lib,Frameworks,' -e 's,${exec_prefix}/lib,${exec_prefix},' $f ; done

You might want to put the following into ~/.profile or a setup script:

export PATH="$HOME/Projects/Shotcut/Contents/MacOS:$PATH"
export QTDIR="$HOME/Qt/5.6.1/clang_64"
export PKG_CONFIG_PATH="$HOME/Projects/Shotcut/Contents/Frameworks/lib/pkgconfig"
export CFLAGS="-I/opt/local/include -DRELOCATABLE"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L/opt/local/lib/libomp"

Sometimes, you need to make distclean and re-run configure to make a clean in-tree (non-shadow) build. MLT has a ./reconfigure script that invokes the configure with the same arguments as the previous run.

Search

Subscribe

Subscribe to this blog via RSS.

Recent Posts

About

Shotcut is a free, open source, cross-platform video editor for Windows, Mac and Linux. Major features include support for a wide range of formats; no import required meaning native timeline editing; Blackmagic Design support for input and preview monitoring; and resolution support to 4k.

Social Links

Copyright © 2011-2018 by Meltytech, LLC
Shotcut is a trademark of Meltytech, LLC.

Site design by Magnetic Image. Magnetic Image, Inc.