Start of enabling use of a more proper "Mac-like" install tree structure

First cut was at https://gerrit.libreoffice.org/#/c/2310/ but was
abandoned by myself. Now getting back to the idea, but this time I
will make it optional on OS X, and introduce it in smaller steps.

Change-Id: Id88517fee8d49056b8bbecb0921206dc6b29580b
This commit is contained in:
Tor Lillqvist 2013-08-10 14:01:21 +03:00
parent 70be692727
commit 6a84a6ed0b
3 changed files with 115 additions and 0 deletions

View file

@ -302,6 +302,9 @@ export LIBLANGTAG_CFLAGS=$(gb_SPACE)@LIBLANGTAG_CFLAGS@
export LIBLANGTAG_LIBS=$(gb_SPACE)@LIBLANGTAG_LIBS@
export LIBLAYOUT_JAR=@LIBLAYOUT_JAR@
export LIBLOADER_JAR=@LIBLOADER_JAR@
export LIBO_BIN_FOLDER=@LIBO_BIN_FOLDER@
export LIBO_SHARE_FOLDER=@LIBO_SHARE_FOLDER@
export LIBO_SHARE_RESOURCE_FOLDER=@LIBO_SHARE_RESOURCE_FOLDER@
export LIBO_VERSION_MAJOR=@LIBO_VERSION_MAJOR@
export LIBO_VERSION_MICRO=@LIBO_VERSION_MICRO@
export LIBO_VERSION_MINOR=@LIBO_VERSION_MINOR@

View file

@ -0,0 +1,42 @@
/* Configuration of subfolder names in the installation tree. The
* values of these macros when configured will be strings. The names
* of these macros reflect what the value would be in an "ideal" world
* on Linux, not current reality. (For example LIBO_BIN_FOLDER is
* actually "program" on Linux and most other Unixes.)
*/
#ifndef CONFIG_FOLDERS_H
#define CONFIG_FOLDERS_H
/* where the soffice executable and other end-user-invoked executables are */
#undef LIBO_BIN_FOLDER
/* where the *rc / *.ini file are */
#undef LIBO_ETC_FOLDER
/* where helper executables run by soffice are */
#undef LIBO_LIBEXEC_FOLDER
/* where dynamic libraries loaded directly or programmatically are */
#undef LIBO_LIB_FOLDER
/* where read-only resources are in general */
#undef LIBO_SHARE_FOLDER
/* where java jars are */
#undef LIBO_SHARE_JAVA_FOLDER
/* LO's own "resources" */
#undef LIBO_SHARE_RESOURCE_FOLDER
/* LO's "shell" artwork */
#undef LIBO_SHARE_SHELL_FOLDER
/* URE folders */
#undef LIBO_URE_BIN_FOLDER
#undef LIBO_URE_ETC_FOLDER
#undef LIBO_URE_LIB_FOLDER
#undef LIBO_URE_SHARE_FOLDER
#undef LIBO_URE_SHARE_JAVA_FOLDER
#endif

View file

@ -2849,6 +2849,75 @@ else
AC_MSG_RESULT([no])
fi
dnl ===================================================================
dnl Structure of install set
dnl ===================================================================
if test $_os = Darwin -a "$ENABLE_MACOSX_SANDBOX" = YES; then
// For now, couple whether to use a more "Mac-like" installation tree structure
// with the choice whether to use sandboxing. Could be a separate choice, or could
// be always on for OS X.
LIBO_BIN_FOLDER=MacOS
LIBO_ETC_FOLDER=Resources
LIBO_LIBEXEC_FOLDER=MacOS
LIBO_LIB_FOLDER=Frameworks
LIBO_SHARE_FOLDER=Resources
LIBO_SHARE_JAVA_FOLDER=Resources/java
LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
LIBO_SHARE_SHELL_FOLDER=Resources/shell
LIBO_URE_BIN_FOLDER=MacOS
LIBO_URE_ETC_FOLDER=Resources
LIBO_URE_LIB_FOLDER=Frameworks
LIBO_URE_SHARE_FOLDER=Resources/ure
LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
elif $_os = WINNT; then
LIBO_BIN_FOLDER=program
LIBO_ETC_FOLDER=program
LIBO_LIBEXEC_FOLDER=program
LIBO_LIB_FOLDER=program
LIBO_SHARE_FOLDER=share
LIBO_SHARE_JAVA_FOLDER=program/classes
LIBO_SHARE_RESOURCE_FOLDER=program/resource
LIBO_SHARE_SHELL_FOLDER=program/shell
LIBO_URE_BIN_FOLDER=ure-link/bin
LIBO_URE_ETC_FOLDER=ure-link/bin
LIBO_URE_LIB_FOLDER=ure-link/bin
LIBO_URE_SHARE_FOLDER=ure-link/share
LIBO_URE_SHARE_JAVA_FOLDER=ure-link/java
else
LIBO_BIN_FOLDER=program
LIBO_ETC_FOLDER=program
LIBO_LIBEXEC_FOLDER=program
LIBO_LIB_FOLDER=program
LIBO_SHARE_FOLDER=share
LIBO_SHARE_JAVA_FOLDER=program/classes
LIBO_SHARE_RESOURCE_FOLDER=program/resource
LIBO_SHARE_SHELL_FOLDER=program/shell
LIBO_URE_BIN_FOLDER=ure/bin
LIBO_URE_ETC_FOLDER=ure/bin
LIBO_URE_LIB_FOLDER=ure/lib
LIBO_URE_SHARE_FOLDER=ure/share
LIBO_URE_SHARE_JAVA_FOLDER=ure/share/java
fi
AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_FOLDER,"$LIBO_URE_SHARE_FOLDER")
AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
# Not all of them needed in config_host.mk, add more if need arises
AC_SUBST(LIBO_BIN_FOLDER)
AC_SUBST(LIBO_SHARE_FOLDER)
AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
dnl ===================================================================
dnl Windows specific tests and stuff
dnl ===================================================================
@ -12421,6 +12490,7 @@ fi
AC_CONFIG_FILES([config_host.mk Makefile lo.xcent instsetoo_native/util/openoffice.lst])
AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_folders.h])
AC_CONFIG_HEADERS([config_host/config_gcc.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_graphite.h])