Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gui = ["iced", "iced_font_awesome", "tiny4linux_assets"]
cli = ["clap", "clap_complete", "dialoguer"]

[dependencies]
tiny4linux_assets = { git = "https://github.com/OpenFoxes/Tiny4Linux-Icons", rev = "ba11e78", optional = true }
tiny4linux_assets = { git = "https://github.com/OpenFoxes/Tiny4Linux-Icons", rev = "fe298f3c30d21326a918f3510a85669219001a01", optional = true }
iced = { version = "0.13.0", features = ["image", "tokio"], optional = true }
iced_font_awesome = { version = "0.2.1", optional = true }
nix = { version = "0.30.0", features = ["ioctl"] }
Expand All @@ -33,7 +33,7 @@ clap_complete = { version = "4.5.59", optional = true }
dialoguer = { version = "0.12.0", features = ["fuzzy-select"], optional = true }

[build-dependencies]
tiny4linux_assets = { git = "https://github.com/OpenFoxes/Tiny4Linux-Icons", rev = "ba11e78", optional = true }
tiny4linux_assets = { git = "https://github.com/OpenFoxes/Tiny4Linux-Icons", rev = "fe298f3c30d21326a918f3510a85669219001a01", optional = true }

[[bin]]
name = "tiny4linux-gui"
Expand Down
30 changes: 19 additions & 11 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,34 @@ fn main() {

#[cfg(feature = "gui")]
fn build_gui_assets() {
copy_asset(
"generated/png/title-icon/v2.0-soft-shadow.png",
"assets/icon.png",
);
copy_asset(
"generated/png/title-icon/v2.0-widget.png",
"assets/icon-widget.png",
);
}

#[cfg(not(feature = "gui"))]
fn build_gui_assets() {
// Noop
}

#[cfg(feature = "gui")]
fn copy_asset(src: &str, dst: &str) {
use std::fs;
use std::path::Path;
use tiny4linux_assets::absolute_path_for_t4l_asset;

let asset_src = absolute_path_for_t4l_asset("generated/png/title-icon/v2.0-soft-shadow.png");
let asset_src = absolute_path_for_t4l_asset(src);

let out_dir = std::env::var("OUT_DIR").unwrap();
let target_dir = Path::new(&out_dir)
.ancestors()
.nth(3)
.unwrap()
.join("assets/icon.png");
let target_dir = Path::new(&out_dir).ancestors().nth(3).unwrap().join(dst);

fs::create_dir_all(target_dir.parent().unwrap()).unwrap();
fs::copy(&asset_src, &target_dir).unwrap();

println!("cargo:rerun-if-changed={}", asset_src.display());
}

#[cfg(not(feature = "gui"))]
fn build_gui_assets() {
// Noop
}
1 change: 1 addition & 0 deletions deployment/gui/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package() {
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"

install -Dm755 "target/release/assets/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tiny4linux.png"
install -Dm755 "target/release/assets/icon-widget.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tiny4linux-widget.png"
install -Dm755 "src/gui/tiny4linux-dashboard.desktop" "$pkgdir/usr/share/applications/tiny4linux-dashboard.desktop"
install -Dm755 "src/gui/tiny4linux-widget.desktop" "$pkgdir/usr/share/applications/tiny4linux-widget.desktop"
}
Binary file removed src/assets/icon.png
Binary file not shown.
Binary file removed src/assets/obsbot-tiny-2-side.png
Binary file not shown.
Binary file removed src/assets/obsbot-tiny-2.png
Binary file not shown.
2 changes: 0 additions & 2 deletions src/assets/sources.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
| Element | Source | Files |
|--------------|---------------------------------------------------|-------------------------------------------|
| OBSBOT-Logos | https://www.obsbot.com/de/media-kit/obsbot-tiny-2 | obsbot-tiny-2.png, obsbot-tiny-2-side.png |
| Icon | https://www.flaticon.com/free-icons/lens | icon.png |
2 changes: 1 addition & 1 deletion src/gui/tiny4linux-widget.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Type=Application
Name=Tiny4Linux (Widget)
Comment=A graphical user interface for OBSBOT Tiny devices opened in widget mode
Exec=tiny4linux-gui --start-as widget
Icon=tiny4linux
Icon=tiny4linux-widget
Terminal=false
Categories=Utility;System;
Keywords=linux;obsbot;tiny;utility;