mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 20:48:52 +03:00
fix(cli): icons not added to the Android project (#7902)
This commit is contained in:
parent
deea943626
commit
228e5a4c76
6
.changes/fix-icons-android.md
Normal file
6
.changes/fix-icons-android.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@tauri-apps/cli": patch:bug
|
||||
"tauri-cli": patch:bug
|
||||
---
|
||||
|
||||
Fixes `icon` command not writing files to the correct Android project folders.
|
@ -2,10 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use crate::{
|
||||
helpers::{app_paths::tauri_dir, config::get as get_tauri_config},
|
||||
Result,
|
||||
};
|
||||
use crate::{helpers::app_paths::tauri_dir, Result};
|
||||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
@ -27,7 +24,6 @@ use image::{
|
||||
open, ColorType, DynamicImage, ImageBuffer, ImageEncoder, Rgba,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use tauri_utils::platform::Target;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct IcnsEntry {
|
||||
@ -361,22 +357,10 @@ fn png(source: &DynamicImage, out_dir: &Path, ios_color: Rgba<u8>) -> Result<()>
|
||||
|
||||
let mut entries = desktop_entries(out_dir);
|
||||
|
||||
// Android
|
||||
let (config, _metadata) = {
|
||||
let tauri_config = get_tauri_config(Target::current(), None)?;
|
||||
|
||||
let tauri_config_guard = tauri_config.lock().unwrap();
|
||||
let tauri_config_ = tauri_config_guard.as_ref().unwrap();
|
||||
crate::mobile::android::get_config(
|
||||
&crate::mobile::get_app(tauri_config_),
|
||||
tauri_config_,
|
||||
&Default::default(),
|
||||
)
|
||||
};
|
||||
let android_out = out_dir.parent().unwrap().join(format!(
|
||||
"gen/android/{}/app/src/main/res/",
|
||||
config.app().name_snake()
|
||||
));
|
||||
let android_out = out_dir
|
||||
.parent()
|
||||
.unwrap()
|
||||
.join("gen/android/app/src/main/res/");
|
||||
let out = if android_out.exists() {
|
||||
android_out
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user