From: Art Cancro Date: Wed, 7 Jul 2021 21:17:10 +0000 (-0400) Subject: began making the client AppImage-aware X-Git-Tag: v939~41^2~6 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0e1c5fb91c45cb36a2d89615196a62c74f6c320c;hp=3ad568a2b76a63f74d6e697ef51abb2c9ae4d28e began making the client AppImage-aware --- diff --git a/appimage/build_appimage.sh b/appimage/build_appimage.sh index 4fddec1a5..db3f6b30b 100755 --- a/appimage/build_appimage.sh +++ b/appimage/build_appimage.sh @@ -1,10 +1,15 @@ #!/bin/bash +# Work from the directory this script is in +APPIMAGE_BUILD_DIR=$(dirname $(readlink -f $0)) +cd $APPIMAGE_BUILD_DIR || exit 28 +echo APPIMAGE_BUILD_DIR is `pwd` + +# Remove old versions rm -vf citadel-*appimage export CITADEL_BUILD_DIR=/tmp/citadel-build-$$ export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$ -rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR # libcitadel has to be built in a "real" library directory pushd ../libcitadel || exit 1 diff --git a/textclient/commands.c b/textclient/commands.c index cecbb4d1f..81fef751a 100644 --- a/textclient/commands.c +++ b/textclient/commands.c @@ -932,6 +932,10 @@ void load_command_set(void) snprintf(buf, sizeof buf, "%s/.citadelrc", getenv("HOME")); ccfile = fopen(buf, "r"); } + if (getenv("APPDIR") != NULL) { + snprintf(buf, sizeof buf, "%s/citadel.rc", getenv("APPDIR")); + ccfile = fopen(buf, "r"); + } if (ccfile == NULL) { ccfile = fopen(file_citadel_rc, "r"); }