build: split the engine into liboakengine.so; worker drops the UI entirely

Physical split: app/{audio,cli,codec,common,config,node,pluginSupport,
render,task,timeline,undo,tool,shaders} plus coreengine, version and
ui/icons+colorcoding move to a new top-level engine/ tree, built as
liboakengine.so (shared). The render backends (oakgl/oakvulkan) move
with it and link the engine library instead of embedding a static
render-core subset (libolive-rendercore is gone).

- oak-render-worker now links liboakengine instead of the whole
  libolive-editor object set: 336MB -> 2.9MB, no Qt Widgets UI
- the editor links liboakengine for the engine and keeps only UI
  objects in libolive-editor
- install/packaging: GNUInstallDirs libdir on Linux, bundle copy on
  macOS, oakengine.dll staged for NSIS, AppImage validation entry
- fix backend lookup for the new layout: DynamicRenderer searched
  ../app but backends now live in engine/; a stale pre-split liboakgl
  in the build tree got dlopened instead, re-initialized and later
  destroyed the interposed engine statics (full-suite segfault at
  DialogSequenceParameterTab, found via gdb watchpoint)
This commit is contained in:
2026-07-20 03:23:28 +08:00
parent 026ff94b5e
commit 28c4426236
604 changed files with 243 additions and 172 deletions
-3
View File
@@ -16,7 +16,6 @@
add_subdirectory(cursors)
add_subdirectory(graphics)
add_subdirectory(icons)
add_subdirectory(style)
set(OLIVE_RESOURCES
@@ -26,8 +25,6 @@ set(OLIVE_RESOURCES
set(OLIVE_SOURCES
${OLIVE_SOURCES}
ui/colorcoding.cpp
ui/colorcoding.h
ui/humanstrings.cpp
ui/humanstrings.h
PARENT_SCOPE
-93
View File
@@ -1,93 +0,0 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive Team
Modifications Copyright (C) 2025 mikesolar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colorcoding.h"
namespace olive
{
QVector<Color> ColorCoding::colors = {
Color(0.545f, 0.255f, 0.255f), Color(0.412f, 0.188f, 0.259f),
Color(0.561f, 0.427f, 0.239f), Color(0.486f, 0.306f, 0.235f),
Color(0.631f, 0.612f, 0.212f), Color(0.404f, 0.478f, 0.243f),
Color(0.349f, 0.576f, 0.275f), Color(0.224f, 0.459f, 0.251f),
Color(0.259f, 0.471f, 0.541f), Color(0.184f, 0.376f, 0.329f),
Color(0.259f, 0.365f, 0.541f), Color(0.196f, 0.216f, 0.412f),
Color(0.612f, 0.294f, 0.502f), Color(0.404f, 0.220f, 0.459f),
Color(0.800f, 0.800f, 0.800f), Color(0.502f, 0.502f, 0.502f)
};
QString ColorCoding::get_color_name(int c)
{
// FIXME: I'm sure we could come up with more creative names for these colors
switch (c) {
case k_red:
return tr("Red");
case k_maroon:
return tr("Maroon");
case k_orange:
return tr("Orange");
case k_brown:
return tr("Brown");
case k_yellow:
return tr("Yellow");
case k_olive:
return tr("Oak");
case k_lime:
return tr("Lime");
case k_green:
return tr("Green");
case k_cyan:
return tr("Cyan");
case k_teal:
return tr("Teal");
case k_blue:
return tr("Blue");
case k_navy:
return tr("Navy");
case k_pink:
return tr("Pink");
case k_purple:
return tr("Purple");
case k_silver:
return tr("Silver");
case k_gray:
return tr("Gray");
}
return QString();
}
Color ColorCoding::get_color(int c)
{
return colors.at(c);
}
Qt::GlobalColor ColorCoding::get_ui_selector_color(const Color &c)
{
if (c.get_rough_luminance() > 0.40f) {
return Qt::black;
} else {
return Qt::white;
}
}
}
-72
View File
@@ -1,72 +0,0 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive Team
Modifications Copyright (C) 2025 mikesolar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef OAK_COLORCODING_H
#define OAK_COLORCODING_H
#include <olive/core/core.h>
#include <QObject>
namespace olive
{
using namespace core;
class ColorCoding : public QObject {
Q_OBJECT
public:
enum Code {
k_red,
k_maroon,
k_orange,
k_brown,
k_yellow,
k_olive,
k_lime,
k_green,
k_cyan,
k_teal,
k_blue,
k_navy,
k_pink,
k_purple,
k_silver,
k_gray
};
static QString get_color_name(int c);
static Color get_color(int c);
static Qt::GlobalColor get_ui_selector_color(const Color &c);
static const QVector<Color> &standard_colors()
{
return colors;
}
private:
static QVector<Color> colors;
};
}
#endif // OAK_COLORCODING_H
-22
View File
@@ -1,22 +0,0 @@
# Olive - Non-Linear Video Editor
# Copyright (C) 2022 Olive Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(OLIVE_SOURCES
${OLIVE_SOURCES}
ui/icons/icons.h
ui/icons/icons.cpp
PARENT_SCOPE
)
-192
View File
@@ -1,192 +0,0 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive Team
Modifications Copyright (C) 2025 mikesolar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "icons.h"
namespace olive
{
/// Works in conjunction with `genicons.sh` to generate and utilize icons of specific sizes
const int icon_size_count = 4;
const int icon_sizes[] = { 16, 32, 64, 128 };
/// Internal icon library for use throughout Olive without having to regenerate constantly
QIcon icon::go_to_start;
QIcon icon::prev_frame;
QIcon icon::play;
QIcon icon::pause;
QIcon icon::next_frame;
QIcon icon::go_to_end;
QIcon icon::New;
QIcon icon::open;
QIcon icon::save;
QIcon icon::undo;
QIcon icon::redo;
QIcon icon::tree_view;
QIcon icon::list_view;
QIcon icon::icon_view;
QIcon icon::tool_pointer;
QIcon icon::tool_edit;
QIcon icon::tool_ripple;
QIcon icon::tool_rolling;
QIcon icon::tool_razor;
QIcon icon::tool_slip;
QIcon icon::tool_slide;
QIcon icon::tool_hand;
QIcon icon::tool_transition;
QIcon icon::tool_track_select;
QIcon icon::folder;
QIcon icon::sequence;
QIcon icon::video;
QIcon icon::audio;
QIcon icon::image;
QIcon icon::mini_map;
QIcon icon::tri_up;
QIcon icon::tri_left;
QIcon icon::tri_down;
QIcon icon::tri_right;
QIcon icon::text_bold;
QIcon icon::text_italic;
QIcon icon::text_underline;
QIcon icon::text_strikethrough;
QIcon icon::text_small_caps;
QIcon icon::text_align_left;
QIcon icon::text_align_right;
QIcon icon::text_align_center;
QIcon icon::text_align_justify;
QIcon icon::text_align_top;
QIcon icon::text_align_bottom;
QIcon icon::text_align_middle;
QIcon icon::snapping;
QIcon icon::zoom_in;
QIcon icon::zoom_out;
QIcon icon::record;
QIcon icon::add;
QIcon icon::error;
QIcon icon::dir_up;
QIcon icon::clock;
QIcon icon::diamond;
QIcon icon::plus;
QIcon icon::minus;
QIcon icon::add_effect;
QIcon icon::eye_opened;
QIcon icon::eye_closed;
QIcon icon::lock_opened;
QIcon icon::lock_closed;
QIcon icon::pencil;
QIcon icon::subtitles;
QIcon icon::color_picker;
void icon::load_all(const QString &theme)
{
go_to_start = create(theme, "prev");
prev_frame = create(theme, "rew");
play = create(theme, "play");
pause = create(theme, "pause");
next_frame = create(theme, "ff");
go_to_end = create(theme, "next");
New = create(theme, "new");
open = create(theme, "open");
save = create(theme, "save");
undo = create(theme, "undo");
redo = create(theme, "redo");
tree_view = create(theme, "treeview");
list_view = create(theme, "listview");
icon_view = create(theme, "iconview");
tool_pointer = create(theme, "arrow");
tool_edit = create(theme, "beam");
tool_ripple = create(theme, "ripple");
tool_rolling = create(theme, "rolling");
tool_razor = create(theme, "razor");
tool_slip = create(theme, "slip");
tool_slide = create(theme, "slide");
tool_hand = create(theme, "hand");
tool_transition = create(theme, "transition-tool");
tool_track_select = create(theme, "track-tool");
folder = create(theme, "folder");
sequence = create(theme, "sequence");
video = create(theme, "videosource");
audio = create(theme, "audiosource");
image = create(theme, "imagesource");
mini_map = create(theme, "map");
tri_up = create(theme, "tri-up");
tri_left = create(theme, "tri-left");
tri_down = create(theme, "tri-down");
tri_right = create(theme, "tri-right");
text_bold = create(theme, "text-bold");
text_italic = create(theme, "text-italic");
text_underline = create(theme, "text-underline");
text_strikethrough = create(theme, "text-strikethrough");
text_small_caps = create(theme, "text-small-caps");
text_align_left = create(theme, "align-left");
text_align_right = create(theme, "align-right");
text_align_center = create(theme, "align-center");
text_align_justify = create(theme, "align-justify-all");
text_align_top = create(theme, "align-v-top");
text_align_bottom = create(theme, "align-v-bottom");
text_align_middle = create(theme, "align-v-middle");
snapping = create(theme, "magnet");
zoom_in = create(theme, "zoomin");
zoom_out = create(theme, "zoomout");
record = create(theme, "record");
add = create(theme, "add-button");
error = create(theme, "error");
dir_up = create(theme, "dirup");
clock = create(theme, "clock");
diamond = create(theme, "diamond");
plus = create(theme, "plus");
minus = create(theme, "minus");
add_effect = create(theme, "add-effect");
color_picker = create(theme, "color-picker");
eye_opened = create(theme, "eye-opened");
eye_closed = create(theme, "eye-closed");
lock_opened = create(theme, "lock-opened");
lock_closed = create(theme, "lock-closed");
pencil = create(theme, "text-edit");
subtitles = create(theme, "subtitles");
}
QIcon icon::create(const QString &theme, const QString &name)
{
QIcon icon;
for (int i = 0; i < icon_size_count; i++) {
icon.addFile(QStringLiteral("%1/png/%2.%3.png")
.arg(theme, name, QString::number(icon_sizes[i])),
QSize(icon_sizes[i], icon_sizes[i]), QIcon::Normal);
icon.addFile(QStringLiteral("%1/png/%2.%3.disabled.png")
.arg(theme, name, QString::number(icon_sizes[i])),
QSize(icon_sizes[i], icon_sizes[i]), QIcon::Disabled);
}
return icon;
}
}
-159
View File
@@ -1,159 +0,0 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive Team
Modifications Copyright (C) 2025 mikesolar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef OAK_ICONS_H
#define OAK_ICONS_H
#include <QIcon>
#include "common/define.h"
namespace olive
{
namespace icon
{
// Playback Icons
extern QIcon go_to_start;
extern QIcon prev_frame;
extern QIcon play;
extern QIcon pause;
extern QIcon next_frame;
extern QIcon go_to_end;
// Project Management Toolbar Icons
extern QIcon New;
extern QIcon open;
extern QIcon save;
extern QIcon undo;
extern QIcon redo;
extern QIcon tree_view;
extern QIcon list_view;
extern QIcon icon_view;
// Tool Icons
extern QIcon tool_pointer;
extern QIcon tool_edit;
extern QIcon tool_ripple;
extern QIcon tool_rolling;
extern QIcon tool_razor;
extern QIcon tool_slip;
extern QIcon tool_slide;
extern QIcon tool_hand;
extern QIcon tool_transition;
extern QIcon tool_track_select;
// Project Icons
extern QIcon folder;
extern QIcon sequence;
extern QIcon video;
extern QIcon audio;
extern QIcon image;
// Node Icons
extern QIcon mini_map;
// Triangle Arrows
extern QIcon tri_up;
extern QIcon tri_left;
extern QIcon tri_down;
extern QIcon tri_right;
// Text
extern QIcon text_bold;
extern QIcon text_italic;
extern QIcon text_underline;
extern QIcon text_strikethrough;
extern QIcon text_small_caps;
extern QIcon text_align_left;
extern QIcon text_align_right;
extern QIcon text_align_center;
extern QIcon text_align_justify;
extern QIcon text_align_top;
extern QIcon text_align_bottom;
extern QIcon text_align_middle;
// Miscellaneous Icons
extern QIcon snapping;
extern QIcon zoom_in;
extern QIcon zoom_out;
extern QIcon record;
extern QIcon add;
extern QIcon error;
extern QIcon dir_up;
extern QIcon clock;
extern QIcon diamond;
extern QIcon plus;
extern QIcon minus;
extern QIcon add_effect;
extern QIcon eye_opened;
extern QIcon eye_closed;
extern QIcon lock_opened;
extern QIcon lock_closed;
extern QIcon pencil;
extern QIcon subtitles;
extern QIcon color_picker;
/**
* @brief Create an icon object loaded from file
*
* Using `name`, this function will load icon files to create an icon object that can be used throughout the
* application.
*
* Olive's icons are stored in a very specific format. They are all sourced from SVGs, but stored as PNGs of various
* sizes. See `app/ui/icons/genicons.sh`, as this script not only generates the multiple sizes but also the QRC file
* used to compile the icons into the executable.
*
* This function is heavily tied into `genicons.sh` and will load all the different sized images (using the same
* filename formatting and QRC resource directory) that `genicons.sh` generates into one QIcon file. If you change
* either this function or `genicons.sh`, you will very likely have to change the other too.
*
* There is not much reason to call this outside of LoadAll() (which stores icons globally in memory so they don't
* have to be reloaded each time a new object needs an icon).
*
* @param theme
*
* Name of the theme (used in the URL as the folder to load PNGs from)
*
* @param name
*
* Name of the icon (will correspond to the original SVG's filename with no path or extension)
*
* @return
*
* A QIcon object containing the various icon sizes loaded from resource
*/
QIcon create(const QString &theme, const QString &name);
/**
* @brief Methodically load all Olive icons into global variables that can be accessed throughout the application
*
* It's recommended to load any UI icons here so they're ready at startup and don't need to be re-loaded upon each
* use.
*/
void load_all(const QString &theme);
}
}
#endif // OAK_ICONS_H