mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
parent
e02f0a0bab
commit
dcfb918f15
@ -562,12 +562,13 @@ AC_DEFUN([LYX_USE_PACKAGING],
|
||||
[AC_MSG_CHECKING([what packaging should be used])
|
||||
AC_ARG_WITH(packaging,
|
||||
[AC_HELP_STRING([--with-packaging=THIS], [use THIS packaging for installation:
|
||||
Possible values: posix, windows, macosx])],
|
||||
Possible values: posix, windows, macosx, haiku])],
|
||||
[lyx_use_packaging="$withval"], [
|
||||
case $host in
|
||||
*-apple-darwin*) lyx_use_packaging=macosx ;;
|
||||
*-pc-mingw32*) lyx_use_packaging=windows;;
|
||||
*) lyx_use_packaging=posix;;
|
||||
*-pc-mingw32*) lyx_use_packaging=windows ;;
|
||||
*haiku*) lyx_use_packaging=haiku ;;
|
||||
*) lyx_use_packaging=posix ;;
|
||||
esac])
|
||||
AC_MSG_RESULT($lyx_use_packaging)
|
||||
lyx_install_posix=false
|
||||
@ -600,10 +601,16 @@ case $lyx_use_packaging in
|
||||
pkgdatadir='${datadir}/${PACKAGE}'
|
||||
default_prefix=$ac_default_prefix
|
||||
case ${host} in
|
||||
*cygwin*) lyx_install_cygwin=true ;;
|
||||
*apple-darwin*) lyx_install_macosx=true ;;
|
||||
*cygwin*) lyx_install_cygwin=true ;;
|
||||
*apple-darwin*) lyx_install_macosx=true ;;
|
||||
esac
|
||||
lyx_install_posix=true ;;
|
||||
haiku) AC_DEFINE(USE_HAIKU_PACKAGING, 1, [Define to 1 if LyX should use a Haiku-style file layout])
|
||||
PACKAGE=lyx${version_suffix}
|
||||
program_suffix=$version_suffix
|
||||
pkgdatadir='${datadir}/${PACKAGE}'
|
||||
default_prefix=$ac_default_prefix
|
||||
lyx_install_posix=true ;;
|
||||
*) AC_MSG_ERROR([unknown packaging type $lyx_use_packaging.]) ;;
|
||||
esac
|
||||
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
|
||||
|
@ -833,7 +833,7 @@ bool LyX::init()
|
||||
return false;
|
||||
|
||||
// Set the PATH correctly.
|
||||
#if !defined (USE_POSIX_PACKAGING)
|
||||
#if !defined (USE_POSIX_PACKAGING) && !defined (USE_HAIKU_PACKAGING)
|
||||
// Add the directory containing the LyX executable to the path
|
||||
// so that LyX can find things like tex2lyx.
|
||||
if (package().build_support().empty())
|
||||
|
@ -34,8 +34,9 @@
|
||||
|
||||
#if !defined (USE_WINDOWS_PACKAGING) && \
|
||||
!defined (USE_MACOSX_PACKAGING) && \
|
||||
!defined (USE_HAIKU_PACKAGING) && \
|
||||
!defined (USE_POSIX_PACKAGING)
|
||||
#error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX or POSIX.
|
||||
#error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX, HAIKU or POSIX.
|
||||
#endif
|
||||
|
||||
#if defined (USE_MACOSX_PACKAGING)
|
||||
@ -696,6 +697,9 @@ FileName const get_default_user_support_dir(FileName const & home_dir)
|
||||
(void)home_dir; // Silence warning about unused variable.
|
||||
return FileName(addPath(fromqstr(QDesktopServices::storageLocation(QDesktopServices::DataLocation)), PACKAGE));
|
||||
|
||||
#elif defined (USE_HAIKU_PACKAGING)
|
||||
return FileName(addPath(home_dir.absFileName(), string("/config/settings/") + PACKAGE));
|
||||
|
||||
#else // USE_POSIX_PACKAGING
|
||||
return FileName(addPath(home_dir.absFileName(), string(".") + PACKAGE));
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user