Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37513356
en ru br
Репозитории ALT
S:2.1.41-alt23
5.1: 2.1.41-alt9
4.1: 2.1.41-alt3.M41.1
4.0: 2.1.35-alt5
3.0: 2.1.25-alt3
+backports:2.1.29-alt4.0.M30
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: menu

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/usr/sbin/install-menu
# freedesktop desktop entry spec - applications generation
# http://www.freedesktop.org/Standards/desktop-entry-spec
# Copyright 2004 - Chris Cheney
# Licensed under the GNU General Public License, version 2.

compat="menu-1"

!include menu.h

compat="menu-2"

function AppEntry($wm, $terminal) =
"[Desktop Entry]\n"
"Encoding=UTF-8\n"
"Type=Application\n"
"Name=" title() "\n"
"GenericName=" ifnempty($genericname,$genericname) "\n"
"Comment=" ifnempty($longtitle,$longtitle) "\n"
"Icon=" ifelse($icon,$icon,"altlinux") "\n"
"Exec=" ifelse($extra_command, $extra_command, $command ifnempty($accept_url,ifeqelse(tolower($accept_url),"true",ifnempty($multiple_files,ifeqelse(tolower($multiple_files),"true"," %U", " %u")),ifnempty($multiple_files,ifeq(tolower($multiple_files),"true"," %F")))))"\n"
"Terminal=" $terminal "\n"
"Categories=" "X-ALT" replacewith($basesection,"/ .","---") ";\n"
ifnempty($mimetypes, "MimeType=" replacewith($mimetypes,",",";") "\n" )
forall(languages(), "lang", "Name[" substr($lang, "0", "2") "]= " encode_translate($lang,title(), "utf8") "\n")
ifnempty($longtitle, forall(languages(), "lang", "Comment[" substr($lang, "0", "2") "]=" encode_translate($lang,$longtitle, "utf8") "\n"))
ifnempty($genericname,forall(languages(), "lang", "GenericName[" substr($lang, "0", "2") "]=" encode_translate($lang,$genericname,"utf8") "\n"))
ifnempty($wm, "OnlyShowIn=" $wm ";\n")
ifnempty($extra_opt, $extra_opt) "\n";

#outputencoding="UTF-8";

supported;
gnome = AppEntry("GNOME", "false");
kde = AppEntry("KDE", "false");
x11 = AppEntry("", "false");
text = AppEntry("", "true");
endsupported;

startmenu = "";
endmenu = "";
submenutitle = "";

treewalk = "M";

genmenu = ifnempty($command,tolower(ifeqelse($needs,"gnome", "gnome", ifeqelse($needs,"kde", "kde", "alt")) "-" replacewith( ifelse($extra_filename, $extra_filename, $title) ,"/ ","__") ".desktop"));

rootsection = "";

prerun = "mkdir -p "prefix()"; rm -rf "prefix()"/*";
postrun = "xdg-desktop-entry-spec-apps-postrun";

preoutput = "";

rootprefix = "/var/lib/menu/tmp_xdg_menu";

userprefix = ".local/share/tmp_xdg_menu";
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin