universal-android-debloater.../Cargo.toml
w1nst0n 4659eb7b0f
Add a self-update feature (#121)
- Add an update button in the About page which links to the Github Releases page
- Display if there is a new version available in the About page
- Display an error if the request to Github failed
- Download the new UAD version and update the software (the hard part)
- Display an update button instead of the `Apps` button if there is an update available
- Add a `no-self-update` cargo feature for this (we don't want auto-update if a package manager already handles this)

The request is done asynchronously, each time you launch UAD or press the About button
The message checking updates... is displayed in the meantime

Update process:
- Download the right release based on the current file name (temp_<release_name>)
- Extract the executable from the tarball for Linux and MacOS release
- Rename the current executable to a temp path and rename the new version as the original file name
- Spawn a new process to run the new (renamed) executable and kill the current one
- Remove the old executable

Acknowledgement:
@tarkah for the inspiration of the self-update code (https://github.com/ajour/ajour/pull/222)
2022-02-09 23:27:13 +00:00

42 lines
No EOL
1.1 KiB
TOML

[package]
name = "uad_gui"
description = "A cross-platform GUI debloater for android devices"
version = "0.4.1"
authors = ["w1nst0n"]
license = "GPL-3.0"
homepage = "https://github.com/0x192/universal-android-debloater"
repository = "https://github.com/0x192/universal-android-debloater"
readme = "README.md"
keywords = ["debloater", "android", "adb", "privacy", "bloatware"]
categories = ["gui"]
edition = "2021"
[features]
default = ["wgpu", "self-update"]
wgpu = [] # iced/wgpu is default
glow = ["iced/glow"] # OpenGL support
self-update = ["flate2", "tar", "retry"]
no-self-update = []
[dependencies]
iced = { git = "https://github.com/hecrj/iced.git" }
serde = { version = "^1.0", features = ["derive"] }
serde_json = "^1.0"
static_init = "^1.0"
fern = { version = "^0", features = ["colored"] }
log = "^0"
chrono = "^0"
regex = "^1.5"
toml = "^0"
dirs = "^4.0"
ureq = { version = "*", features = ["json"] }
retry = { version = "^1.0", optional = true }
[target.'cfg(not(target_os = "windows"))'.dependencies]
flate2 = { version = "^1", optional = true }
tar = { version = "^0", optional = true }
[profile.release]
opt-level = "s"
lto = true
strip = "symbols"