What is the "official" way of building in 2020?

Shotcut builds do use industry standard tools, but there is no industry standard way to build a C++ project with all of its dependencies across most Linux distributions as well as macOS that is not based strictly on a package system. Yes, there are some things you can do with CMake and Conan, but with just as much as work as this script in my experience.

All you really need to hack on Shotcut is a rather complete installation of MLT and frei0r based on their latest release versions and Qt 5.12 or higher. That is the primary reason I discontinued the Linux SDK after dropping the esoteric WebVfx and QtWebKit dependencies. With that out-of-the way most developers on Linux do not work a SDK but rather distro packages. Unfortunately, many Linux distributions are slow to provide the latest MLT version, and many users are not running a rolling or bleeding edge distro version. Debian testing and unstable and Arch has it but not Ubuntu.

Often another way to get the latest MLT if you do not have it, is to install all of MLT’s build dependencies using something like apt build-dep libmlt6 and then manually compile and install MLT.

Shame on me (really!) I thought I tried to run the script in the same directory as the conf file but I don’t know, I missed something maybe.
Indeed going on the same directory makes the script find the config file and I can now have a more quick compilation process :slight_smile: Thanks

So this is an important thing to note for newcomers: the script is intended to be started from within script/ sub-directory. I presume this is not a good idea to run ./scripts/build-shotcut.sh -c scripts/build-shotcut.conf from the project root ?

So ACTION_GET_COMPILE_INSTALL have no effect on controlling any compilation if I got the point ? (I had a look to the script source code, in set_globals(), I’ve seen that

  • a combination of ACTION_GET_ONLY and ACTION_GET_COMPILE_INSTALL controls GET that controls the call of get_all_sources()
  • a combination of ACTION_GET_COMPILE_INSTALL and ACTION_COMPILE_INSTALL controls COMPILE_INSTALL that controls the call of configure_compile_install_all() that configures, compiles, and installs all subprojects
ACTION_GET_ONLY ACTION_GET_COMPILE_INSTALL ACTION_COMPILE_INSTALL => GET COMPILE_INSTALL
0 0 0 0 0
0 0 1 0 1
0 1 0 1 1
0 1 1 1 1
1 0 0 1 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1

I’m right ?
Sorry for this long message but I don’t want to miss something here, but I don’t understand why is there 3 boolean variables to control only 2 quite simple steps:

  • get_all_sources()
  • configure_compile_install_all()

I suppose this is for historical reasons, no offence ! But maybe could I suggest a PR to merge those 3 variables onto 2:

  • GET_ALL_SOURCES
  • CONFIGURE_COMPILE_INSTALL_ALL

What do you think about ?

I have never done that. Kind of makes a chicken/egg situation. How do you run the script before you have downloaded it?

Your understanding is correct. And yes, it is historical.

In my mind, there are three steps:

  1. Get sources
  2. Configure sources
  3. Compile and install

I recently added the “CONFIGURE_SOURCES” flag so that I could do #3. The script has evolved over time and since it works for me I have not made it a priority to improve the logic.

Were you able to make a successful build and run Shotcut?

Today, I worked on the build script to add a new dependency dav1d. I consolidated actions, renamed SOURCES_CONFIGURE, and removed the unmaintained INSTALL_AS_ROOT option. Now, the options look like:

ACTION_GET=1
ACTION_CONFIGURE=1
ACTION_COMPILE_INSTALL=1

We also have the following options that could be considered steps or actions that changed:

CLEANUP => ACTION_CLEANUP
ARCHIVE => ACTION_ARCHIVE
SOURCES_CLEAN => ACTION_CLEAN_SOURCE

The order is

  1. ACTION_CLEAN_SOURCE (only acts on previously “GET” sources)
  2. ACTION_GET
  3. ACTION_CONFIGURE
  4. ACTION_COMPILE_INSTALL
  5. ACTION_ARCHIVE
  6. ACTION_CLEANUP
2 Likes

Thanks you @shotcut. I didn’t had time to jump onto this for some days now. I’m using Shotcut as an user those days to finish an animation film made with children. (you probably noticed our long discuss around Del key in this Github issue).

Not for now ! I didn’t had time to continue on this.

I’ll keep you informed !

This topic was automatically closed after 90 days. New replies are no longer allowed.