Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
liias committed Sep 21, 2024
1 parent a15142f commit 846e19b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
# Build Linux binary

## Setup (e.g Ubuntu)

sudo apt install build-essential
sudo apt install libpango-1.0-0 libpango1.0-dev libgtk-3-dev

## Setup (e.g Fedora)

sudo dnf groupinstall "Development Tools"
sudo dnf install glib2-devel pango-devel cairo-gobject-devel atk-devel gtk3-devel

Expand All @@ -21,6 +23,8 @@

## Or build via docker image

cargo install cross --git https://github.com/cross-rs/cross

cd cross
./build-cross-images.sh
cd ..
Expand Down
4 changes: 3 additions & 1 deletion build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -e
target_dir='target/universal-unknown-linux-gnu/release'

build_binary() {
export CROSS_NO_WARNINGS=0

cross build --target x86_64-unknown-linux-gnu --release
cross build --target aarch64-unknown-linux-gnu --release
cross build --target armv7-unknown-linux-gnueabihf --release
Expand Down Expand Up @@ -98,7 +100,7 @@ create_signatures() {
local file_name="$2"

# creates $filename.sha256
shasum --algorithm 256 "./$target_dir/$file_name" | cut -f1 -d' ' > "./$target_dir/$file_name.sha256"
shasum --algorithm 256 "./$target_dir/$file_name" | cut -f1 -d' ' >"./$target_dir/$file_name.sha256"

# creates $filename.sig
signify -S -s "$APPCAST_SECRET_KEY_FILE" -m "./$target_dir/$file_name"
Expand Down
8 changes: 4 additions & 4 deletions src/linux/linux_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ impl OsHelper {
}

fn freedesktop_find_all_desktop_entries(content_type: &str) -> Vec<DesktopEntryHolder> {
let mut all_search_paths = default_paths();
let all_search_paths = default_paths();

// remove duplicate entries (e.g XDG_DATA_DIRS sometimes has every path twice)
let set: HashSet<_> = all_search_paths.drain().collect();
all_search_paths.extend(set.into_iter());
let set: HashSet<PathBuf> = all_search_paths.into_iter().collect();

// collect all .desktop file paths and map them by file name to remove duplicate files,
// even if they exist in different directories
let mut desktop_file_paths_by_filename: BTreeMap<_, PathBuf> = Iter::new(all_search_paths)
let mut desktop_file_paths_by_filename: BTreeMap<_, PathBuf> = set
.into_iter()
.filter_map(|file_path| {
file_path
.file_name()
Expand Down

0 comments on commit 846e19b

Please sign in to comment.