added icon and desktop file

master
Marc Wäckerlin 9 years ago
parent aea603fa78
commit ba7e547082
  1. 20
      scripts/ax_init_standard_project.m4
  2. 24
      scripts/bootstrap.sh

@ -167,14 +167,18 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(BUILD_NUMBER)
BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
AX_SUBST(BUILD_DATE)
if test -f "${PROJECT_NAME}-logo.png"; then
PROJECT_LOGO="${PROJECT_NAME}-logo.png"
if test -f "${PACKAGE_NAME}.dektop.in"; then
PACKAGE_DESKTOP="${PACKAGE_NAME}.dektop"
fi
AX_SUBST(PROJECT_LOGO)
if test -f "${PROJECT_NAME}-icon.png"; then
PROJECT_ICON="${PROJECT_NAME}-icon.png"
AX_SUBST(PACKAGE_DESKTOP)
if test -f "${PACKAGE_NAME}-logo.png"; then
PACKAGE_LOGO="${PACKAGE_NAME}-logo.png"
fi
AX_SUBST(PROJECT_ICON)
AX_SUBST(PACKAGE_LOGO)
if test -f "${PACKAGE_NAME}-icon.png"; then
PACKAGE_ICON="${PACKAGE_NAME}-icon.png"
fi
AX_SUBST(PACKAGE_ICON)
AC_ARG_ENABLE(pedantic,
[AS_HELP_STRING([--enable-pedantic],
@ -204,6 +208,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG"
fi
if test -f ${PACKAGE_NAME}.desktop.in; then
AC_CONFIG_FILES([${PACKAGE_NAME}.desktop])
fi
AC_CONFIG_FILES([makefile])
AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in])

@ -118,6 +118,7 @@ GENERATED FILES
* README - add project description (first line is header, followed by an empty line)
* configure.ac - global configuration file template
* makefile.am - global makefile template
* ${DEFAULT_PROJECT_NAME}.desktop.in - linux desktop file
* src/makefile.am - if you enabled AX_USE_CXX
* src/version.hxx - if you enabled AX_USE_CXX
* src/version.cxx - if you enabled AX_USE_CXX
@ -706,10 +707,10 @@ namespace NAMESPACE {
return README;
}
std::string logo() {
return PROJECT_LOGO;
return PACKAGE_LOGO;
}
std::string icon() {
return PROJECT_ICON;
return PACKAGE_ICON;
}
const std::string WHAT("#(@) " PACKAGE_STRING);
const std::string IDENT("\$Id: " PACKAGE_STRING);
@ -721,7 +722,7 @@ ${HEADER}dist_bin_SCRIPTS =
MAINTAINERCLEANFILES = makefile.in
EOF
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am
to --condition AX_BUILD_TEST test/runtests.sh < test/runtests.sh
to --condition AX_BUILD_TEST test/runtests.sh < ${0%/*}/test/runtests.sh
to --condition 'AX_BUILD_TEST|AX_USE_CPPUNIT' test/makefile.am <<EOF
${HEADER}$(if testtag AX_USE_CXX; then
cat <<EOF2
@ -765,7 +766,7 @@ if testtag AX_USE_DOXYGEN; then
doxyreplace PROJECT_NAME "@PACKAGE_NAME@"
doxyreplace PROJECT_NUMBER "@PACKAGE_VERSION@"
doxyreplace PROJECT_BRIEF "@DESCRIPTION@"
doxyreplace PROJECT_LOGO "@PROJECT_LOGO@"
doxyreplace PROJECT_LOGO "@top_srcdir@/@PACKACE_LOGO@"
doxyreplace INLINE_INHERITED_MEMB YES
doxyreplace MULTILINE_CPP_IS_BRIEF YES
doxyreplace TAB_SIZE 2
@ -887,6 +888,17 @@ ${HEADER}%:
EOF
echo 7 | to debian/compat
fi
to ${PACKAGE_NAME}.desktop.in <<EOF
[Desktop Entry]
Type=Application
Name=${PACKAGE_NAME}
GenericName=${PACKAGE_NAME}
Comment=@DESCRIPTION@
Icon=@prefix@/share/@PACKAGE_NAME@/@PACKAGE_ICON@
Exec=${PACKAGE_NAME} %u
Terminal=false
Categories=Qt;Utility;
EOF
to --condition AX_USE_RPM_PACKAGING ${PACKAGE_NAME}.spec.in <<EOF
Summary: @DESCRIPTION@
Name: @PACKAGE_NAME@
@ -960,6 +972,7 @@ $(if testtag AX_USE_LIBTOOL; then
echo '/usr/%_lib/@PACKAGE_NAME@.so.*'
else
echo '/usr/bin/*'
echo '/usr/share/applications/*'
fi)
%doc
$(if testtag AX_USE_LIBTOOL; then
@ -1030,6 +1043,9 @@ done
to makefile.am<<EOF
${HEADER}SUBDIRS =${SUBDIRS}
desktopdir = ${datadir}/applications
desktop_DATA = @PACKAGE_DESKTOP@
pkgdata_DATA = @PACKAGE_ICON@
doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
MAINTAINERCLEANFILES = makefile.in

Loading…
Cancel
Save