From ff7a4f3df98004e03fbe88bf33d8391d6fff9168 Mon Sep 17 00:00:00 2001 From: Aditya Alok Date: Sat, 23 Apr 2022 01:50:17 +0530 Subject: [PATCH] Fix building for Android, enable `tlmgr` updates (#896) * fix(os/unix): cannot find `SkipStep` while building for android ERROR: cannot find function, tuple struct or tuple variant `SkipStep` Disable updating gnome extensions for Android. Signed-off-by: Aditya Alok * feat: enable `tlmgr` updates for android Signed-off-by: Aditya Alok --- src/main.rs | 2 +- src/steps/generic.rs | 4 ++-- src/steps/os/unix.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 455268af..65d9584f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -280,7 +280,7 @@ fn run() -> Result<()> { runner.execute(Step::Tmux, "tmux", || tmux::run_tpm(&base_dirs, run_type))?; runner.execute(Step::Tldr, "TLDR", || unix::run_tldr(run_type))?; runner.execute(Step::Pearl, "pearl", || unix::run_pearl(run_type))?; - #[cfg(not(target_os = "macos"))] + #[cfg(not(any(target_os = "macos", target_os = "android")))] runner.execute(Step::GnomeShellExtensions, "Gnome Shell Extensions", || { unix::upgrade_gnome_extensions(&ctx) })?; diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 0caeff1d..5beafccb 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -285,9 +285,9 @@ pub fn run_stack_update(run_type: RunType) -> Result<()> { pub fn run_tlmgr_update(ctx: &ExecutionContext) -> Result<()> { cfg_if::cfg_if! { - if #[cfg(target_os = "linux")] { + if #[cfg(any(target_os = "linux", target_os = "android"))] { if !ctx.config().enable_tlmgr_linux() { - return Err(SkipStep(String::from("tlmgr must be explicity enabled in the configuration to run in Linux")).into()); + return Err(SkipStep(String::from("tlmgr must be explicity enabled in the configuration to run in Android/Linux")).into()); } } } diff --git a/src/steps/os/unix.rs b/src/steps/os/unix.rs index 52df0935..61cefc7b 100644 --- a/src/steps/os/unix.rs +++ b/src/steps/os/unix.rs @@ -135,7 +135,7 @@ pub fn run_fish_plug(ctx: &ExecutionContext) -> Result<()> { ctx.run_type().execute(&fish).args(&["-c", "plug update"]).check_run() } -#[cfg(not(target_os = "macos"))] +#[cfg(not(any(target_os = "android", target_os = "macos")))] pub fn upgrade_gnome_extensions(ctx: &ExecutionContext) -> Result<()> { let gdbus = require("gdbus")?; require_option(