mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Improve support for distributing desktop files and icons
* add proper INSTALL_POSIX conditional for makefiles * move all the code to Makefile.am * rename lyx.desktop to lyx.desptop.in and add proper tags to allow handling of program_suffix. * add code to install desktop entry and icons under the proper name. I did not touch scons and cmake, I hope it was not necessary. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c3f3ead287
commit
2bf021ee73
@ -22,17 +22,10 @@ SUBDIRS = config development intl po $(BOOST) src sourcedoc lib \
|
|||||||
EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \
|
EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \
|
||||||
INSTALL.Win32 INSTALL.MacOSX INSTALL.scons INSTALL.cmake \
|
INSTALL.Win32 INSTALL.MacOSX INSTALL.scons INSTALL.cmake \
|
||||||
README.Win32 README.Cygwin README.localization lyx.1in \
|
README.Win32 README.Cygwin README.localization lyx.1in \
|
||||||
autogen.sh lib/lyx.desktop lib/images/lyx.svg
|
autogen.sh
|
||||||
|
|
||||||
man_MANS = lyx.1
|
man_MANS = lyx.1
|
||||||
|
|
||||||
if !INSTALL_WINDOWS
|
|
||||||
if !INSTALL_MACOSX
|
|
||||||
desktopdir = $(datadir)/applications
|
|
||||||
desktop_DATA = lib/lyx.desktop
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Wait some time for bumping automake 1.11, which can use dist-xz
|
#Wait some time for bumping automake 1.11, which can use dist-xz
|
||||||
#directly without this code, which is to be removed.
|
#directly without this code, which is to be removed.
|
||||||
#xz has low compression by default, but can be affected via
|
#xz has low compression by default, but can be affected via
|
||||||
|
@ -521,12 +521,14 @@ case $lyx_use_packaging in
|
|||||||
default_prefix=$ac_default_prefix
|
default_prefix=$ac_default_prefix
|
||||||
case ${host} in
|
case ${host} in
|
||||||
*cygwin*) lyx_install_cygwin=true ;;
|
*cygwin*) lyx_install_cygwin=true ;;
|
||||||
esac ;;
|
esac
|
||||||
|
lyx_install_posix=true ;;
|
||||||
*) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
|
*) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
|
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
|
||||||
AM_CONDITIONAL(INSTALL_CYGWIN, $lyx_install_cygwin)
|
|
||||||
AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
|
AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
|
||||||
|
AM_CONDITIONAL(INSTALL_CYGWIN, $lyx_install_cygwin)
|
||||||
|
AM_CONDITIONAL(INSTALL_POSIX, $lyx_install_posix)
|
||||||
dnl Next two lines are only for autoconf <= 2.59
|
dnl Next two lines are only for autoconf <= 2.59
|
||||||
datadir='${datarootdir}'
|
datadir='${datarootdir}'
|
||||||
AC_SUBST(datarootdir)
|
AC_SUBST(datarootdir)
|
||||||
|
@ -361,6 +361,7 @@ AC_CONFIG_FILES([Makefile \
|
|||||||
development/cygwin/lyxrc.dist \
|
development/cygwin/lyxrc.dist \
|
||||||
development/lyx.spec \
|
development/lyx.spec \
|
||||||
intl/Makefile \
|
intl/Makefile \
|
||||||
|
lib/lyx.desktop-temp:lib/lyx.desktop.in
|
||||||
lib/Makefile \
|
lib/Makefile \
|
||||||
lib/doc/Makefile \
|
lib/doc/Makefile \
|
||||||
lib/lyx2lyx/lyx2lyx_version.py \
|
lib/lyx2lyx/lyx2lyx_version.py \
|
||||||
|
@ -399,7 +399,6 @@ dist_images_DATA = \
|
|||||||
images/layout_Scrap.png \
|
images/layout_Scrap.png \
|
||||||
images/layout_Section.png \
|
images/layout_Section.png \
|
||||||
images/lyx-quit.png \
|
images/lyx-quit.png \
|
||||||
images/lyx.png \
|
|
||||||
images/marginalnote-insert.png \
|
images/marginalnote-insert.png \
|
||||||
images/master-buffer-update.png \
|
images/master-buffer-update.png \
|
||||||
images/master-buffer-view.png \
|
images/master-buffer-view.png \
|
||||||
@ -1591,7 +1590,7 @@ dist_springertemplates_DATA = \
|
|||||||
templates/springer/svmult_part.lyx \
|
templates/springer/svmult_part.lyx \
|
||||||
templates/springer/svmult_preface.lyx \
|
templates/springer/svmult_preface.lyx \
|
||||||
templates/springer/svmult_referenc.lyx
|
templates/springer/svmult_referenc.lyx
|
||||||
|
|
||||||
thesistemplatesdir = $(pkgdatadir)/templates/thesis
|
thesistemplatesdir = $(pkgdatadir)/templates/thesis
|
||||||
dist_thesistemplates_DATA = \
|
dist_thesistemplates_DATA = \
|
||||||
templates/thesis/Acknowledgments.lyx \
|
templates/thesis/Acknowledgments.lyx \
|
||||||
@ -1611,19 +1610,6 @@ dist_tex_DATA = \
|
|||||||
tex/lyxskak.sty \
|
tex/lyxskak.sty \
|
||||||
tex/revtex.cls
|
tex/revtex.cls
|
||||||
|
|
||||||
if !INSTALL_WINDOWS
|
|
||||||
if !INSTALL_MACOSX
|
|
||||||
# install application icons. The 'hicolor' theme is the default theme
|
|
||||||
# where applications themselves should install their icons.
|
|
||||||
scalableappiconsdir = $(datadir)/icons/hicolor/scalable/apps
|
|
||||||
scalableappicons_DATA = images/lyx.svg
|
|
||||||
|
|
||||||
fixedappiconsdir = $(datadir)/icons/hicolor/48x48/apps
|
|
||||||
fixedappicons_DATA = images/lyx.png
|
|
||||||
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# subscript.sty is not in dist_tex_DATA since we don't want to install it
|
# subscript.sty is not in dist_tex_DATA since we don't want to install it
|
||||||
# (it is part of TeXLive). We include it in our source package only so that
|
# (it is part of TeXLive). We include it in our source package only so that
|
||||||
# packagers may decide to install it (e.g. for MikTeX).
|
# packagers may decide to install it (e.g. for MikTeX).
|
||||||
@ -1636,6 +1622,32 @@ dist_ui_DATA = \
|
|||||||
ui/stdmenus.inc \
|
ui/stdmenus.inc \
|
||||||
ui/stdtoolbars.inc
|
ui/stdtoolbars.inc
|
||||||
|
|
||||||
|
if INSTALL_POSIX
|
||||||
|
# install application icons. The 'hicolor' theme is the default theme
|
||||||
|
# where applications themselves should install their icons.
|
||||||
|
lyx@program_suffix@.svg: images/lyx.svg
|
||||||
|
$(AM_V_GEN)$(INSTALL_DATA) $< $@
|
||||||
|
scalableappiconsdir = $(datadir)/icons/hicolor/scalable/apps
|
||||||
|
scalableappicons_DATA = lyx@program_suffix@.svg
|
||||||
|
|
||||||
|
lyx@program_suffix@.png: images/lyx.png
|
||||||
|
$(AM_V_GEN)$(INSTALL_DATA) $< $@
|
||||||
|
fixedappiconsdir = $(datadir)/icons/hicolor/48x48/apps
|
||||||
|
fixedappicons_DATA = lyx@program_suffix@.png
|
||||||
|
|
||||||
|
# if configure is asked to generate the name with suffix directly, then
|
||||||
|
# config.status refuses to rebuild this file (with a variable name), and
|
||||||
|
# a build error ensues when lyx.desktop.in is changed.
|
||||||
|
lyx@program_suffix@.desktop: lyx.desktop-temp
|
||||||
|
$(AM_V_GEN)$(INSTALL_DATA) $< $@
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = lyx@program_suffix@.desktop
|
||||||
|
|
||||||
|
CLEANFILES += lyx@program_suffix@.desktop lyx.desktop-temp \
|
||||||
|
lyx@program_suffix@.svg lyx@program_suffix@.png
|
||||||
|
endif
|
||||||
|
dist_noinst_DATA += lyx.desktop.in images/lyx.svg images/lyx.png
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
$(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/configure.py
|
$(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/configure.py
|
||||||
for i in $(dist_scripts_PYTHON); do \
|
for i in $(dist_scripts_PYTHON); do \
|
||||||
|
@ -4,9 +4,9 @@ Type=Application
|
|||||||
Name=LyX
|
Name=LyX
|
||||||
GenericName=Document Processor
|
GenericName=Document Processor
|
||||||
Comment=High level LaTeX frontend
|
Comment=High level LaTeX frontend
|
||||||
Exec=lyx %F
|
Exec=lyx@program_suffix@ %F
|
||||||
TryExec=lyx
|
TryExec=lyx@program_suffix@
|
||||||
Icon=lyx
|
Icon=lyx@program_suffix@
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
StartupWMClass=Lyx
|
StartupWMClass=Lyx
|
||||||
Terminal=false
|
Terminal=false
|
Loading…
Reference in New Issue
Block a user