How To Use the Windows SDK

  1. Download and install the following:
  1. Check that the following files are in the correct directories:
  • C:\Qt\x86_64-5.4.0-release-posix-seh-rt_v5-rev0\mingw64\bin\g++.exe
  • C:\Qt\qt-5.9.7-x64-mingw540-seh\bin\qmake.exe
  1. Start Qt Creator and choose Tools > Options > Kits
    Configure the compilers and SDKs settings in the Kits section.
  • Manually add MinGW’s gdb.exe debugger: Debugger Settings
  • Manually add MinGW’s g++.exe C++ compiler: Compiler Settings
  • Manually add the Qt version: Qt Version Settings
  • Add a project kit from the previously set debug, compiler, and Qt version: Kit Settings
  • Click OK
  1. Extract the Shotcut SDK .zip file to a new folder in C:\ named “Projects” (C:\Projects).
  2. In Qt Creator open shotcut.pro from C:\Projects\Shotcut\src\shotcut.
  3. In the Configure Project screen, select your previously configured Kit and click Configure Project: Configure Project

  4. Click Projects in the navigation bar on the left side of the Qt Creator window.
    In the left column of the Shotcut project configuration screen click Run to show the Run Settings: Run Settings
  • In Deployment click Add Deploy Step > Make.
  • In Make arguments: enter “install”.
  • In Run click Add… > Custom Executable;
    in Executable: enter “C:\Projects\Shotcut\shotcut.exe”: Run Settings
  1. After clicking Run (the green play button in bottom left of Qt Creator), you can confirm the newly built executable is the one that is running from the Help > About Shotcut… dialog: the version will be “adhoc”.

Final Project

Project Final

Rebuilding Dependencies

The section above just gets you a working environment for the Shotcut code, but not any of its dependencies. Some of the dependencies included in the SDK with source code can be opened and used within Qt Creator - frei0r and webvfx. Instructions for that are not yet included. In other cases you can use the Git Bash shell environment. Upon opening a Git Bash shell, enter (or add to ~/.profile and restart the shell):

export PATH="/c/Qt/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin:$PATH"
export QTDIR="c:/Qt/qt-5.9.7-x64-mingw540-seh"
export CC=gcc
export CXX=g++
export PKG_CONFIG_PATH="c:/Projects/Shotcut/lib/pkgconfig"
export CFLAGS="-Ic:/Projects/Shotcut/include -DHAVE_STRUCT_TIMESPEC"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-Lc:/Projects/Shotcut/lib -Lc:/Projects/Shotcut"
alias make=mingw32-make

For a project’s configure step, often you can supply the prefix as /c/Projects/Shotcut and make install will work as expected. However, sometimes you need to copy DLLs from bin/ or lib/ into /c/Projects/Shotcut where shotcut.exe resides.

When working with git repos from the SDK on Windows, it can helpful to issue git config core.fileMode false to prevent unchanged files from appearing in git status and git diff.

Command Line Debugging

When using gdb at the command line to debug, using Ctrl+C to break execution will also exit the debugger. There is a program called breakgdb.exe (source) that can be used to break execution.

Search

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-2019 by Meltytech, LLC
Shotcut is a trademark of Meltytech, LLC.