mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-23 14:04:19 +02:00
Merge pull request #1380 from Universal-Debloater-Alliance/opt-image
build(logo): optional `image` dep
This commit is contained in:
commit
7eaff8f810
3 changed files with 12 additions and 5 deletions
2
.github/workflows/build_artifacts.yml
vendored
2
.github/workflows/build_artifacts.yml
vendored
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
restore-keys: ${{ runner.OS }}-release-
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
- name: Building
|
||||
run: cargo build --release --no-default-features --features wgpu,${{ matrix.update_feature }}
|
||||
run: cargo build --release --no-default-features --features wgpu,${{ matrix.update_feature }},img
|
||||
- name: Renaming binaries [Windows]
|
||||
if: matrix.os == 'windows-2022'
|
||||
run: mv target/release/uad-ng.exe uad-ng-${{ matrix.build_target }}.exe
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ categories = ["gui"]
|
|||
edition = "2024"
|
||||
|
||||
[features]
|
||||
default = ["wgpu", "self-update"]
|
||||
default = ["wgpu", "self-update", "img"]
|
||||
wgpu = [] # Iced/wgpu is default
|
||||
self-update = ["flate2", "tar"]
|
||||
no-self-update = []
|
||||
img = ["image", "iced/image"]
|
||||
|
||||
[dependencies]
|
||||
dark-light = "2"
|
||||
|
|
@ -31,8 +32,8 @@ toml = "^0"
|
|||
dirs = "^6"
|
||||
ureq = { version = "3", features = ["json"] }
|
||||
retry = "^2.0.0"
|
||||
iced = { version = "=0.14.0", features = ["advanced", "image"] }
|
||||
image = "0.25"
|
||||
iced = { version = "=0.14.0", features = ["advanced"] }
|
||||
image = { version = "0.25", optional = true }
|
||||
rfd = "^0.17.1"
|
||||
csv = "^1.3"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,17 @@ pub mod widgets;
|
|||
|
||||
use crate::core::adb;
|
||||
use crate::core::sync::{Phone, get_devices_list, initial_load};
|
||||
use crate::core::theme::{OS_COLOR_SCHEME, Theme};
|
||||
#[cfg(feature = "img")]
|
||||
use crate::core::theme::OS_COLOR_SCHEME;
|
||||
use crate::core::theme::Theme;
|
||||
use crate::core::uad_lists::UadListState;
|
||||
use crate::core::update::{Release, SelfUpdateState, SelfUpdateStatus, get_latest_release};
|
||||
use crate::core::utils::{FULL_NAME, NAME, string_to_theme};
|
||||
|
||||
use iced::font;
|
||||
#[cfg(feature = "img")]
|
||||
use iced::window::icon;
|
||||
#[cfg(feature = "img")]
|
||||
use image::ImageFormat;
|
||||
use views::about::{About as AboutView, Message as AboutMessage};
|
||||
use views::list::{List as AppsView, LoadingState as ListLoadingState, Message as AppsMessage};
|
||||
|
|
@ -399,6 +403,7 @@ impl UadGui {
|
|||
|
||||
impl UadGui {
|
||||
pub fn start() -> iced::Result {
|
||||
#[cfg(feature = "img")]
|
||||
let logo: &[u8] = match *OS_COLOR_SCHEME {
|
||||
// remember to keep `Unspecified` in sync with `src/core/theme`
|
||||
dark_light::Mode::Dark | dark_light::Mode::Unspecified => {
|
||||
|
|
@ -425,6 +430,7 @@ impl UadGui {
|
|||
},
|
||||
resizable: true,
|
||||
decorations: true,
|
||||
#[cfg(feature = "img")]
|
||||
icon: icon::from_file_data(logo, Some(ImageFormat::Png)).ok(),
|
||||
..iced::window::Settings::default()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue