Compare commits

..

2 Commits

Author SHA1 Message Date
a9d8c070bc
enable arm32 in the ci/cd
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2024-10-19 11:24:09 +02:00
f93602e524
update sdl to latest
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
2024-10-18 17:46:52 +02:00
10 changed files with 12 additions and 80 deletions

View File

@ -64,6 +64,8 @@ jobs:
strategy:
matrix:
platform:
- vcpkg_toolkit: arm-neon-android
ndk_abi: armeabi-v7a
- vcpkg_toolkit: arm64-android
ndk_abi: arm64-v8a
- vcpkg_toolkit: x64-android

View File

@ -38,6 +38,8 @@ jobs:
strategy:
matrix:
platform:
- vcpkg_toolkit: arm-neon-android
ndk_abi: armeabi-v7a
- vcpkg_toolkit: arm64-android
ndk_abi: arm64-v8a
- vcpkg_toolkit: x64-android

View File

@ -9,8 +9,7 @@ if (NOT TARGET SDL3::SDL3)
set(SDL_DISABLE_ANDROID_JAR OFF CACHE INTERNAL "")
FetchContent_Declare(SDL3
#GIT_REPOSITORY https://github.com/libsdl-org/SDL
GIT_REPOSITORY https://github.com/Semphriss/SDL
GIT_REPOSITORY https://github.com/libsdl-org/SDL
#GIT_TAG 0429f5d6a36fc35b551bcc2acd4a40c2db6dab82 # tip when looking
#GIT_TAG 14f584a94bfd49cf1524db75bf3c419fdf9436cd # tip 26-04-2024
#GIT_TAG 06d6f2cb2518622593570985589700910cf4399f # 13-05-2024 - before
@ -27,7 +26,7 @@ if (NOT TARGET SDL3::SDL3)
#GIT_TAG 9dd8859240703d886941733ad32c1dc6f50d64f0 # tip 19-09-2024
#GIT_TAG afdf325fb4090e93a124519d1a3bc1fbe0ba9025 # bad
#GIT_TAG e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e # tip 05-10-2024 (3.1.3)
GIT_TAG c523f0bcfeb5700ee233b7fae3c2b036822b8627
GIT_TAG 2654d5d48b8f764148a7c246fea85b32b1133578 # tip 18-10-2024
FIND_PACKAGE_ARGS # for the future
)

@ -1 +1 @@
Subproject commit 17d2baf7365c3499172dc5afd71171cb3a138d99
Subproject commit 9a4df12d68373cd19adddde2364843eeac51c28d

View File

@ -63,17 +63,17 @@
"sdl3": {
"flake": false,
"locked": {
"lastModified": 1728073678,
"narHash": "sha256-S7yRcLHMPgq6+gec8l+ESxp2dJ+6Po/UNsBUXptQzMQ=",
"lastModified": 1729218869,
"narHash": "sha256-0KrwC3Yrs1LHwT9SPvknDwPymNmksq6dixM4/KiFqFA=",
"owner": "libsdl-org",
"repo": "SDL",
"rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e",
"rev": "2654d5d48b8f764148a7c246fea85b32b1133578",
"type": "github"
},
"original": {
"owner": "libsdl-org",
"repo": "SDL",
"rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e",
"rev": "2654d5d48b8f764148a7c246fea85b32b1133578",
"type": "github"
}
},

View File

@ -11,7 +11,7 @@
flake = false;
};
sdl3 = {
url = "github:libsdl-org/SDL/e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e"; # keep in sync this cmake
url = "github:libsdl-org/SDL/2654d5d48b8f764148a7c246fea85b32b1133578"; # keep in sync this cmake
flake = false;
};
sdl3_image = {

View File

@ -66,9 +66,6 @@ target_sources(tomato PUBLIC
./sdl_clipboard_utils.hpp
./sdl_clipboard_utils.cpp
./sys_tray.hpp
./sys_tray.cpp
./chat_gui/theme.hpp
./chat_gui/theme.cpp
./chat_gui/icons/direct.hpp

View File

@ -29,8 +29,6 @@
#include "./tox_avatar_loader.hpp"
#include "./message_image_loader.hpp"
#include "./sys_tray.hpp"
#include "./chat_gui4.hpp"
#include "./chat_gui/settings_window.hpp"
#include "./object_store_ui.hpp"
@ -93,8 +91,6 @@ struct MainScreen final : public Screen {
MessageImageLoader mil;
TextureCache<void*, Message3Handle, MessageImageLoader> msg_tc;
SystemTray st;
ChatGui4 cg;
SettingsWindow sw;
ObjectStoreUI osui;

View File

@ -1,52 +0,0 @@
#include "./sys_tray.hpp"
#include "./image_loader_sdl_image.hpp"
#include <cstdint>
#include <fstream>
#include <ios>
#include <memory>
#include <iostream>
SystemTray::SystemTray(void) {
std::cout << "adding sys tray\n";
std::ifstream file("../res/icon/tomato_v1_256.png");
file.seekg(0, std::ios::end);
size_t file_size = file.tellg();
file.seekg(0, std::ios::beg);
std::vector<uint8_t> data(file_size);
file.read(reinterpret_cast<char*>(data.data()), file_size);
file.close();
std::cout << "tray icon file size: " << file_size << "\n";
ImageLoaderSDLImage il;
auto image = il.loadFromMemoryRGBA(data.data(), data.size());
std::unique_ptr<SDL_Surface, decltype(&SDL_DestroySurface)> surf = {
SDL_CreateSurfaceFrom(
image.width, image.height,
SDL_PIXELFORMAT_RGBA32,
(void*)image.frames.at(0).data.data(),
4*image.width
),
&SDL_DestroySurface
};
std::cout << "tray dims " << image.width << "x" << image.height << "\n";
// different icons?
_tray = SDL_CreateTray(surf.get(), "tomato");
if (_tray == nullptr) {
std::cerr << "failed to create SystemTray!!\n";
}
}
SystemTray::~SystemTray(void) {
if (_tray != nullptr) {
SDL_DestroyTray(_tray);
_tray = nullptr;
}
}

View File

@ -1,12 +0,0 @@
#pragma once
#include <SDL3/SDL.h>
class SystemTray {
SDL_Tray* _tray {nullptr};
public:
SystemTray(void);
~SystemTray(void);
};