Skip to content

Commit

Permalink
Move clang-format, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrotter committed Dec 21, 2023
1 parent 1a4123c commit 5a10a24
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions resources/scripts/github-actions/build-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ $maria_version = "11.2.2"
$maria_link = "https://archive.mariadb.org/mariadb-$maria_version/winx64-packages/mariadb-$maria_version-winx64.zip"
$maria_output = "maria.zip"

$cmake_version = "3.27.9"
$cmake_version = "3.28.1"
$cmake_link = "https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-windows-x86_64.zip"
$cmake_output = "cmake.zip"

$zlib_version = "1.3"
$zlib_link = "https://github.com/madler/zlib/archive/refs/tags/v$zlib_version.zip"
$zlib_output = "zlib.zip"

$libmpv_version = "20231211-git-566a96f"
$libmpv_version = "20231220-git-17be6e1"
$libmpv_link = "https://github.com/zhongfly/mpv-winbuild/releases/download/2023-12-11-566a96f/mpv-dev-x86_64-$libmpv_version.7z"
$libmpv_output = "mpv.zip"

Expand Down
3 changes: 1 addition & 2 deletions src/librssguard/gui/dialogs/formmessagefiltersmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,7 @@ void FormMessageFiltersManager::beautifyScript() {
proc_clang_format.setArguments({"--assume-filename=script.js", "--style=Chromium"});

#if defined(Q_OS_WIN)
proc_clang_format.setProgram(qApp->applicationDirPath() + QDir::separator() + QSL("clang-format") +
QDir::separator() + QSL("clang-format.exe"));
proc_clang_format.setProgram(qApp->applicationDirPath() + QDir::separator() + QSL("clang-format.exe"));
#else
proc_clang_format.setProgram(QSL("clang-format"));
#endif
Expand Down
17 changes: 8 additions & 9 deletions src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LibMpvWidget::LibMpvWidget(mpv_handle* mpv_handle, QWidget* parent)
: BASE_WIDGET(parent), m_mpvHandle(mpv_handle)
#if defined(MEDIAPLAYER_LIBMPV_OPENGL)
,
m_mpvGl(nullptr)
m_mpvGL(nullptr)
#endif
{
#if !defined(MEDIAPLAYER_LIBMPV_OPENGL)
Expand Down Expand Up @@ -60,9 +60,9 @@ void LibMpvWidget::destroyHandle() {
#if defined(MEDIAPLAYER_LIBMPV_OPENGL)
makeCurrent();

if (m_mpvGl != nullptr) {
mpv_render_context_free(m_mpvGl);
m_mpvGl = nullptr;
if (m_mpvGL != nullptr) {
mpv_render_context_free(m_mpvGL);
m_mpvGL = nullptr;
}

doneCurrent();
Expand Down Expand Up @@ -126,11 +126,11 @@ void LibMpvWidget::initializeGL() {
display,
{MPV_RENDER_PARAM_INVALID, nullptr}};

if (mpv_render_context_create(&m_mpvGl, m_mpvHandle, params) < 0) {
if (mpv_render_context_create(&m_mpvGL, m_mpvHandle, params) < 0) {
qFatal("failed to initialize mpv GL context");
}

mpv_render_context_set_update_callback(m_mpvGl, LibMpvWidget::onMpvRedraw, reinterpret_cast<void*>(this));
mpv_render_context_set_update_callback(m_mpvGL, LibMpvWidget::onMpvRedraw, reinterpret_cast<void*>(this));
}

void LibMpvWidget::paintGL() {
Expand All @@ -140,8 +140,7 @@ void LibMpvWidget::paintGL() {
mpv_render_param params[] = {{MPV_RENDER_PARAM_OPENGL_FBO, &mpfbo},
{MPV_RENDER_PARAM_FLIP_Y, &flip_y},
{MPV_RENDER_PARAM_INVALID, nullptr}};
// See render_gl.h on what OpenGL environment mpv expects, and
// other API details.
mpv_render_context_render(m_mpvGl, params);

mpv_render_context_render(m_mpvGL, params);
}
#endif
2 changes: 1 addition & 1 deletion src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LibMpvWidget : public BASE_WIDGET {
private:
static void onMpvRedraw(void* ctx);

mpv_render_context* m_mpvGl;
mpv_render_context* m_mpvGL;
#endif
};

Expand Down
3 changes: 1 addition & 2 deletions src/rssguard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ if(WIN32)
DESTINATION .
FILES_MATCHING PATTERN "*.dll"
)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/resources/scripts/clang-format
install(FILES ${CMAKE_SOURCE_DIR}/resources/scripts/clang-format/clang-format.exe
DESTINATION .
FILES_MATCHING PATTERN "*.exe"
)
elseif(OS2)
install(TARGETS app DESTINATION .)
Expand Down

0 comments on commit 5a10a24

Please sign in to comment.