Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 3.0.1 #20

Merged
merged 7 commits into from Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Expand Up @@ -72,8 +72,7 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==3.1.*"
py7zrversion: ">=0.20.2"
version: "6.4.3"
version: "6.5.2"
arch: ${{ matrix.arch }}
modules: qtwebengine qtpositioning qtwebchannel qtnetworkauth qtserialport
cache: "true"
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/kfr
Submodule kfr updated 211 files
2 changes: 1 addition & 1 deletion 3rdparty/tracy
Submodule tracy updated 209 files
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -28,7 +28,7 @@ Quasar does not work properly on Wayland compositors due to Wayland not supporti

#### Qt on Linux

Quasar has been built and tested on the latest pre-built binaries supplied by Qt, which at the time of writing is Qt 6.4.3 built against OpenSSL 1.1.1. The Qt version offered by Ubuntu 22.04's package repository is Qt 6.2.4 built against OpenSSL 3.0. As of Ubuntu 22.04, OpenSSL 3 is the default and version 1.1.1 is no longer offered in the package repository. Building Quasar on versions of Qt older than 6.4 may work but is not supported. Ensure that the version of the OpenSSL libraries installed (i.e `libcrypto.so` and `libssl.so`) matches the version your Qt installation is built against or SSL functionality will fail.
Quasar has been built and tested on the latest pre-built binaries supplied by Qt, which at the time of writing is Qt 6.5.1 built against OpenSSL 1.1.1. The Qt version offered by Ubuntu 22.04's package repository is Qt 6.2.4 built against OpenSSL 3.0. As of Ubuntu 22.04, OpenSSL 3 is the default and version 1.1.1 is no longer offered in the package repository. Building Quasar on versions of Qt older than 6.4 may work but is not supported. Ensure that the version of the OpenSSL libraries installed (i.e `libcrypto.so` and `libssl.so`) matches the version your Qt installation is built against or SSL functionality will fail.

## Getting Started

Expand Down Expand Up @@ -56,8 +56,8 @@ Source code is [available on GitHub](https://github.com/r52/quasar).
- Network Authorization (qtnetworkauth)
- Serial Port (qtserialport)
- The `Qt6_DIR` environment variable defined for your Qt installation
- Windows example: `C:\Qt\6.4.3\msvc2019_64`
- Linux example: `$HOME/Qt/6.4.3/gcc_64/`
- Windows example: `C:\Qt\6.5.1\msvc2019_64`
- Linux example: `$HOME/Qt/6.5.1/gcc_64/`
- On Linux, additional dependencies may be needed for Qt such as the packages `libgl1-mesa-dev libglvnd-dev`

### Windows
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Expand Up @@ -37,7 +37,7 @@ Quasar does not work properly on Wayland compositors due to Wayland not supporti
Qt on Linux
^^^^^^^^^^^^^^^^^^

Quasar has been built and tested on the latest pre-built binaries supplied by Qt, which at the time of writing is Qt 6.4.2 built against OpenSSL 1.1.1. The Qt version offered by Ubuntu 22.04's package repository is Qt 6.2.4 built against OpenSSL 3.0. As of Ubuntu 22.04, OpenSSL 3 is the default and version 1.1.1 is no longer offered in the package repository. Building Quasar on versions of Qt older than 6.4 may work but is not supported. Ensure that the version of the OpenSSL libraries installed (i.e ``libcrypto.so`` and ``libssl.so``) matches the version your Qt installation is built against or SSL functionality will fail.
Quasar has been built and tested on the latest pre-built binaries supplied by Qt, which at the time of writing is Qt 6.5.1 built against OpenSSL 1.1.1. The Qt version offered by Ubuntu 22.04's package repository is Qt 6.2.4 built against OpenSSL 3.0. As of Ubuntu 22.04, OpenSSL 3 is the default and version 1.1.1 is no longer offered in the package repository. Building Quasar on versions of Qt older than 6.4 may work but is not supported. Ensure that the version of the OpenSSL libraries installed (i.e ``libcrypto.so`` and ``libssl.so``) matches the version your Qt installation is built against or SSL functionality will fail.

Getting Started
---------------
Expand Down Expand Up @@ -72,8 +72,8 @@ All Platforms

* The ``Qt6_DIR`` environment variable defined for your Qt installation

* Windows example: ``C:\Qt\6.4.2\msvc2019_64``
* Linux example: ``$HOME/Qt/6.4.2/gcc_64/``
* Windows example: ``C:\Qt\6.5.1\msvc2019_64``
* Linux example: ``$HOME/Qt/6.5.1/gcc_64/``
* On Linux, additional dependencies may be needed for Qt such as the packages ``libgl1-mesa-dev libglvnd-dev``

Windows
Expand Down
2 changes: 1 addition & 1 deletion extensions/quasar-spotify-api
26 changes: 13 additions & 13 deletions extensions/win_audio_viz/win_audio_viz.cpp
Expand Up @@ -65,21 +65,21 @@ constexpr float normalizeAsFloat(T val)
return val * imax;
}

#define qlog(l, ...) \
{ \
auto msg = fmt::format("{}: {}", EXT_NAME, fmt::format(__VA_ARGS__)); \
quasar_log(l, msg.c_str()); \
}
#define qlog(l, ...) \
{ \
auto msg = fmt::format("{}: {}", EXT_NAME, fmt::format(__VA_ARGS__)); \
quasar_log(l, msg.c_str()); \
}

#define debug(...) qlog(QUASAR_LOG_DEBUG, __VA_ARGS__)
#define info(...) qlog(QUASAR_LOG_INFO, __VA_ARGS__)
#define warn(...) qlog(QUASAR_LOG_WARNING, __VA_ARGS__)

#define EXIT_ON_ERROR(hres) \
if (FAILED(hres)) \
{ \
goto Exit; \
}
if (FAILED(hres)) \
{ \
goto Exit; \
}

template<typename T>
struct IFaceDeleter
Expand Down Expand Up @@ -129,7 +129,7 @@ struct WInterface

constexpr T* operator->() const { return _data; }

constexpr operator bool () const { return (_data != nullptr); }
constexpr operator bool () const { return (_data != nullptr); }

private:
T* _data = nullptr;
Expand Down Expand Up @@ -636,7 +636,7 @@ bool win_audio_viz_get_data(size_t srcUid, quasar_data_handle hData, char* args)
{
for (auto&& i : std::views::iota((size_t) 0, (m->m_fftSize / 2) + 1))
{
output[Measure::TYPE_FFTFREQ][i] = (double) (i * m->m_wfx->nSamplesPerSec / m->m_fftSize);
output[Measure::TYPE_FFTFREQ][i] = (double) i * m->m_wfx->nSamplesPerSec / m->m_fftSize;
}

quasar_set_data_double_vector(hData, output[Measure::TYPE_FFTFREQ]);
Expand Down Expand Up @@ -739,7 +739,7 @@ bool win_audio_viz_get_data(size_t srcUid, quasar_data_handle hData, char* args)

if (device->GetId(&id) == S_OK and props->GetValue(PKEY_Device_FriendlyName, &varName) == S_OK)
{
auto device = fmt::format(L"{}: {}", id, varName.pwszVal);
auto device = fmt::format(L"{}: {}", id.get(), varName.pwszVal);
list.push_back(string_conv(device).c_str());
}

Expand Down Expand Up @@ -1238,7 +1238,7 @@ void win_audio_viz_update_settings(quasar_settings_t* settings)
}
}

quasar_ext_info_fields_t fields = {.version = "3.0",
quasar_ext_info_fields_t fields = {.version = "3.0.1",
.author = "r52",
.description = "Supplies desktop audio frequency data. Adapted from Rainmeter's AudioLevel plugin.",
.url = "https://github.com/r52/quasar"};
Expand Down
6 changes: 3 additions & 3 deletions quasar/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.23)

project(quasar VERSION 3.0.0)
project(quasar VERSION 3.0.1)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
Expand All @@ -16,7 +16,7 @@ find_library(USOCKETS_LIB_RELEASE NAMES uSockets PATHS "${_VCPKG_INSTALLED_DIR}/
find_library(USOCKETS_LIB_DEBUG NAMES uSockets PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH)
find_path(UWEBSOCKETS_INCLUDE_DIRS "uwebsockets/App.h")
find_path(BSHOSHANY_THREAD_POOL_INCLUDE_DIRS "BS_thread_pool.hpp")
find_package(Qt6 6.4 CONFIG COMPONENTS Core Gui Widgets Network NetworkAuth Svg WebEngineCore WebEngineWidgets REQUIRED)
find_package(Qt6 CONFIG COMPONENTS Core Gui Widgets Network NetworkAuth Svg WebEngineCore WebEngineWidgets REQUIRED)

#CPMFindPackage(
# NAME glaze
Expand Down Expand Up @@ -97,7 +97,7 @@ endif()
target_link_libraries(quasar PRIVATE extension-api)
target_link_libraries(quasar PRIVATE fmt::fmt spdlog::spdlog)
target_link_libraries(quasar PRIVATE jsoncons)
target_link_libraries(quasar PRIVATE ZLIB::ZLIB $<IF:$<TARGET_EXISTS:uv_a>,uv_a,uv> debug ${USOCKETS_LIB_DEBUG} optimized ${USOCKETS_LIB_RELEASE})
target_link_libraries(quasar PRIVATE ZLIB::ZLIB $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> debug ${USOCKETS_LIB_DEBUG} optimized ${USOCKETS_LIB_RELEASE})
target_link_libraries(quasar PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network Qt6::NetworkAuth Qt6::Svg Qt6::WebEngineCore Qt6::WebEngineWidgets)

if (TRACY_ENABLE)
Expand Down
4 changes: 2 additions & 2 deletions quasar/internal/ajax.cpp
Expand Up @@ -78,7 +78,7 @@ namespace
if (reply->error() != QNetworkReply::NoError)
{
auto errstr = reply->errorString().toStdString();
SPDLOG_WARN("AJAX: {} - {}", reply->error(), errstr);
SPDLOG_WARN("AJAX: {} - {}", (int) reply->error(), errstr);
quasar_append_error(hData, errstr.c_str());
return false;
}
Expand Down Expand Up @@ -108,7 +108,7 @@ namespace
if (reply->error() != QNetworkReply::NoError)
{
auto errstr = reply->errorString().toStdString();
SPDLOG_WARN("AJAX: {} - {}", reply->error(), errstr);
SPDLOG_WARN("AJAX: {} - {}", (int) reply->error(), errstr);
quasar_append_error(hData, errstr.c_str());
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions quasar/quasar.cpp
Expand Up @@ -348,7 +348,7 @@ void Quasar::handleUpdateRequest(QNetworkReply* reply)
if (reply->error())
{
auto errstr = reply->errorString().toStdString();
SPDLOG_WARN("Update check failed: {} - {}", reply->error(), errstr);
SPDLOG_WARN("Update check failed: {} - {}", (int) reply->error(), errstr);
return;
}

Expand Down Expand Up @@ -445,7 +445,7 @@ void Quasar::handleUpdateRequest(QNetworkReply* reply)
dlfile->deleteLater();

auto errstr = dlreply->errorString().toStdString();
SPDLOG_WARN("File download failed: {} - {}", reply->error(), errstr);
SPDLOG_WARN("File download failed: {} - {}", (int) reply->error(), errstr);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion quasar/scripts/quasar.js
Expand Up @@ -10,5 +10,5 @@ function quasar_authenticate(socket) {
}

function quasar_create_websocket() {
return new WebSocket("ws://127.0.0.1:%1");
return new WebSocket("ws://localhost:%1");
}
8 changes: 4 additions & 4 deletions quasar/server/server.cpp
Expand Up @@ -22,9 +22,9 @@
#include <fmt/core.h>
#include <jsoncons/json.hpp>

#define SEND_CLIENT_ERROR(d, ...) \
sendErrorToClient(d, fmt::format(__VA_ARGS__)); \
SPDLOG_WARN(__VA_ARGS__);
#define SEND_CLIENT_ERROR(d, ...) \
sendErrorToClient(d, fmt::format(__VA_ARGS__)); \
SPDLOG_WARN(__VA_ARGS__);

JSONCONS_N_MEMBER_TRAITS(ClientMsgParams, 0, topics, params, code, args);
JSONCONS_ALL_MEMBER_TRAITS(ClientMessage, method, params);
Expand Down Expand Up @@ -114,7 +114,7 @@ Server::Server(std::shared_ptr<Config> cfg) :

SPDLOG_INFO("Client disconnected.");
}})
.listen("127.0.0.1",
.listen("localhost",
Settings::internal.port.GetValue(),
[](auto* socket) {
if (socket)
Expand Down
3 changes: 1 addition & 2 deletions updater/main.cpp
Expand Up @@ -106,11 +106,10 @@ int main(int argc, char* argv[])
// Unpack
std::cout << "Unpacking " << file.string() << "..." << std::endl;

void* reader = NULL;
int32_t err = MZ_OK;
int32_t err_close = MZ_OK;

mz_zip_reader_create(&reader);
void* reader = mz_zip_reader_create();
mz_zip_reader_set_entry_cb(reader, NULL, minizip_extract_entry_cb);

err = mz_zip_reader_open_file(reader, file.string().c_str());
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 4049 files
2 changes: 1 addition & 1 deletion vcpkg.json
@@ -1,6 +1,6 @@
{
"name": "quasar",
"version": "3.0.0",
"version": "3.0.1",
"dependencies": [
"fmt",
"spdlog",
Expand Down