Skip to content

Commit

Permalink
Fix linux UI build
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Mar 16, 2024
1 parent c405780 commit 43e319e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
else
freetypepkgname="libfreetype-dev"
fi
apt-get install -yqq ${freetypepkgname} libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev p7zip-full unzip wget xdg-user-dirs zip
apt-get install -yqq ${freetypepkgname} libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libxxf86vm-dev p7zip-full unzip wget xdg-user-dirs zip
- name: Set up cache
id: cache
uses: actions/cache@v3
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
else
freetypepkgname="libfreetype-dev"
fi
apt-get install -yqq ${freetypepkgname} libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev p7zip-full unzip wget xdg-user-dirs zip
apt-get install -yqq ${freetypepkgname} libgl1-mesa-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev libxxf86vm-dev p7zip-full unzip wget xdg-user-dirs zip
- name: Set up cache
id: cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion src/PawPaw
1 change: 1 addition & 0 deletions src/plugin/DistrhoPluginInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 1
#define DISTRHO_PLUGIN_WANT_STATE 1
#define DISTRHO_PLUGIN_WANT_FULL_STATE 1
#define DISTRHO_PLUGIN_WANT_WEBVIEW 1
#define DISTRHO_UI_FILE_BROWSER 0
#define DISTRHO_UI_DEFAULT_WIDTH 1170
#define DISTRHO_UI_DEFAULT_HEIGHT 600
Expand Down
12 changes: 6 additions & 6 deletions src/plugin/WebViewX11.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2023-2024 MOD Audio UG
// SPDX-License-Identifier: AGPL-3.0-or-later

#define QT_NO_VERSION_TAGGING
#include <QtCore/QChar>
#include <QtCore/QPoint>
#include <QtCore/QSize>
Expand Down Expand Up @@ -88,7 +89,7 @@ void* addWebView(const uintptr_t parentWinId, const double scaleFactor, const ui
ipc->childWindow = 0;
ipc->ourWindow = parentWinId;

const char* const args[] = { ldlinux, filename, nullptr };
const char* const args[] = { ldlinux, filename, "dpf-ld-linux-webview", nullptr };
ipc->p.start(args, envp);

for (uint i = 0; envp[i] != nullptr; ++i)
Expand Down Expand Up @@ -294,7 +295,7 @@ static bool qt5webengine(const Window winId, const double scaleFactor, const cha
using QApplication__init_t = void (*)(QApplication*, int&, char**, int);
using QApplication_exec_t = void (*)();
using QApplication_setAttribute_t = void (*)(Qt::ApplicationAttribute, bool);
using QString__init_t = void (*)(void*, const QChar*, qsizetype);
using QString__init_t = void (*)(void*, const QChar*, ptrdiff_t);
using QUrl__init_t = void (*)(void*, const QString&, int /* QUrl::ParsingMode */);
using QWebEngineView__init_t = void (*)(QWebEngineView*, void*);
using QWebEngineView_move_t = void (*)(QWebEngineView*, const QPoint&);
Expand Down Expand Up @@ -481,8 +482,6 @@ static bool qt6webengine(const Window winId, const double scaleFactor, const cha
return true;
}

END_NAMESPACE_DISTRHO

// -----------------------------------------------------------------------------------------------------------
// startup via ld-linux

Expand All @@ -493,8 +492,7 @@ static void signalHandler(const int sig)
reloadFn();
}

DISTRHO_PLUGIN_EXPORT
void _start()
void dpf_webview_start(void)
{
uselocale(newlocale(LC_NUMERIC_MASK, "C", nullptr));

Expand Down Expand Up @@ -535,3 +533,5 @@ void _start()
}

// -----------------------------------------------------------------------------------------------------------

END_NAMESPACE_DISTRHO

0 comments on commit 43e319e

Please sign in to comment.