Skip to content
Open
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
11 changes: 11 additions & 0 deletions data/unison-gui.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: MIT-0
[Desktop Entry]
Type=Application
Exec=unison-gui
Name=Unison
GenericName=File Synchronizer
Comment=GUI for Unison file synchronizer
Terminal=false
Icon=unison-gui
StartupNotify=true
Categories=Utility;
12 changes: 12 additions & 0 deletions src/make_tools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ let install () =
let mandir = "MANDIR" <--? datarootdir ^ "/man" in
let man1dir = "MAN1DIR" <--? mandir ^ "/man1" in
let manext = "MANEXT" <--? ".1" in
let desktopdir = "DESKTOPDIR" <--? datarootdir ^ "/applications" in
let iconthemedir = "ICONTHEMEDIR" <--? datarootdir ^ "/icons/hicolor" in

let install_if_exists dir name dest =
if exists dir name then exec
Expand All @@ -660,6 +662,16 @@ let install () =
exec [install; "-d"; destdir ^ man1dir];
exec [install_data; "man/unison.1"; destdir ^ man1dir ^ "/unison" ^ manext]
end;
if exists "src" "unison-gui" then begin
exec [install; "-d"; destdir ^ desktopdir];
exec [install_data; "data/unison-gui.desktop"; destdir ^ desktopdir ^ "/unison-gui.desktop"];
let installpng size =
exec [install; "-d"; destdir ^ iconthemedir ^ "/" ^ size ^ "x" ^ size ^ "/apps"];
exec [install_data; "icons/U." ^ size ^ "x" ^ size ^ "x16m.png"; destdir ^ iconthemedir ^ "/" ^ size ^ "x" ^ size ^ "/apps/unison-gui.png"]
in List.iter installpng ["16"; "24"; "32"; "48"; "256"];
exec [install; "-d"; destdir ^ iconthemedir ^ "/scalable/apps"];
exec [install_data; "icons/U.svg"; destdir ^ iconthemedir ^ "/scalable/apps/unison-gui.svg"]
end;
if exists "src/uimac/build/Default" "Unison.app" then begin
print_endline ("!!! The GUI for macOS has been built but will NOT be \
installed automatically. You can find the built GUI package at " ^
Expand Down