Font bits: create symlink in jail at OS instdir path, to point at /lo

This ensures that bundled fonts in instdir/share end up resolved to
the same path that they were in when the forkit font config was setup.

It may also help locate other pre-inited resources.

Also copy in ~/.fonts in debug mode - can't hurt.
private/mmeeks/unitbits
Michael Meeks 2016-04-15 14:34:23 +01:00
parent ab6cc4135b
commit 7376b7475e
3 changed files with 9 additions and 9 deletions

View File

@ -117,6 +117,7 @@ namespace
switch (typeflag)
{
case FTW_F:
case FTW_SLN:
File(newPath.parent()).createDirectories();
if (link(fpath, newPath.toString().c_str()) == -1)
{
@ -155,9 +156,6 @@ namespace
case FTW_NS:
Log::error("nftw: stat failed for '" + std::string(fpath) + "'");
return 1;
case FTW_SLN:
Log::error("nftw: symlink to nonexistent file: '" + std::string(fpath) + "', ignored.");
break;
default:
Log::error("nftw: unexpected type: '" + std::to_string(typeflag));
assert(false);

View File

@ -131,7 +131,7 @@ clean-local:
if test "z@JAILS_PATH@" != "z"; then rm -rf "@JAILS_PATH@"; fi
if test "z@SYSTEMPLATE_PATH@" != "z"; then rm -rf "@SYSTEMPLATE_PATH@"; fi
run: @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
run: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
@echo "Launching loolwsd - launch this in your browser:"
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
@PROTOCOL="http" ; if test "z@ENABLE_SSL@" != "z"; then PROTOCOL="https" ; fi ; \

View File

@ -88,12 +88,14 @@ if [ -h usr/share/fonts/ghostscript ]; then
fi
# Our Libreoffice install often comes with pre-bundled fonts.
mkdir -p $CHROOT/$INSTDIR/share
cp -r -p -L $INSTDIR/share/fonts $CHROOT/$INSTDIR/share/
# we need to ensure that there is a link to these with the same
# path that fontconfig found.
mkdir -p ./lo
mkdir -p ./$INSTDIR
rmdir ./$INSTDIR
ln -s /lo $CHROOT/$INSTDIR
#
# A debugging hackery to avoid confusion.
#
# Debugging only hackery to avoid confusion.
if test "z$ENABLE_DEBUG" != "z" -a "z$HOME" != "z"; then
echo "Copying development users's fonts into systemplate"
mkdir -p $CHROOT/$HOME