diff --git a/configure.ac b/configure.ac index 7b77c9e..e499770 100644 --- a/configure.ac +++ b/configure.ac @@ -497,10 +497,16 @@ AC_SUBST(LIBSSL_CFLAGS) AC_SEARCH_LIBS([dlopen], [dl], AC_DEFINE(HAVE_LIBDL), AC_MSG_NOTICE([libdl not present.])) dnl --------------------------------------------------------------------------- +dnl Directory config +dnl --------------------------------------------------------------------------- + +AC_ARG_WITH([build-dir], [AS_HELP_STRING([--with-build-dir], [Setup build path])], [ app_cv_buildir="$withval" ],[ app_cv_buildir="$ac_pwd" ]) +AC_SUBST(BASEDIR,$app_cv_buildir) + +dnl --------------------------------------------------------------------------- dnl Output config dnl --------------------------------------------------------------------------- -AC_SUBST(BASEDIR,$ac_pwd) AC_SUBST(PLUGINS) dnl --------------------------------------------------------------------------- diff --git a/win/makeruntime.sh.in b/win/makeruntime.sh.in index 848e45c..4cc4b7d 100755 --- a/win/makeruntime.sh.in +++ b/win/makeruntime.sh.in @@ -25,8 +25,6 @@ # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) # -myDIR=$(dirname $(readlink -f $0)) - prefix="@prefix@" PKG_CONFIG="@PKG_CONFIG@" GTK_VERSION="gtk+-@GTK_VERSION@" @@ -34,7 +32,7 @@ GTK_VERSION="gtk+-@GTK_VERSION@" GTK_PREFIX=$($PKG_CONFIG --variable=prefix ${GTK_VERSION}) GDK_LOADERS=$(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0 | sed -e "s@${prefix}@@g") -TARGET="$(dirname ${myDIR})/.bin/runtime" +TARGET="@BASEDIR@/.bin/runtime" # Change to bin path mkdir -p ${TARGET} @@ -48,8 +46,8 @@ copy_dll() { SOURCES=$(mktemp) REQUIRES=$(mktemp) - find "$(dirname ${myDIR})/.bin/Release/" -iname "*.dll" > ${SOURCES} - find "$(dirname ${myDIR})/.bin/Release/" -iname "*.exe" >> ${SOURCES} + find "@BASEDIR@/.bin/Release/" -iname "*.dll" > ${SOURCES} + find "@BASEDIR@/.bin/Release/" -iname "*.exe" >> ${SOURCES} find "${TARGET}" -iname *.dll >> ${SOURCES} while read FILENAME @@ -120,7 +118,7 @@ copy_dll() { do if [ ! -e "${TARGET}/${FILENAME}" ]; then - COUNT=$(find "$(dirname ${myDIR})/.bin/Release/" -iname ${FILENAME} | wc --lines) + COUNT=$(find "@BASEDIR@/.bin/Release/" -iname ${FILENAME} | wc --lines) if [ "${COUNT}" == "0" ]; then echo ${FILENAME} -- libgit2 0.21.2