Updated archivers setup

This commit is contained in:
Michiel Broek 2002-10-27 21:12:52 +00:00
parent 442f6e5d19
commit 7df384eec8
5 changed files with 73 additions and 15 deletions

View File

@ -14,9 +14,14 @@ v0.35.05 19-Oct-2002
mbcico:
Fixed crash with incoming YooHoo session with bad password.
mbmsg:
The total counters in the logfile are increased to 6 digits.
The summary counters in the logfile are increased to 6 digits.
mbsetup:
When installing the default unarchivers (new installations)
the rar is used to unarchive instead of unrar when available,
rar is compiled static and prefered.
Added support for the nomarch unarchiver.

40
configure vendored
View File

@ -7019,6 +7019,45 @@ else
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "nomarch", so it can be a program name with args.
set dummy nomarch; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_NOMARCH+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $NOMARCH in
[\\/]* | ?:[\\/]*)
ac_cv_path_NOMARCH="$NOMARCH" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_NOMARCH="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
;;
esac
fi
NOMARCH=$ac_cv_path_NOMARCH
if test -n "$NOMARCH"; then
echo "$as_me:$LINENO: result: $NOMARCH" >&5
echo "${ECHO_T}$NOMARCH" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# Extract the first word of "arj", so it can be a program name with args.
set dummy arj; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@ -8538,6 +8577,7 @@ s,@LIBOBJS@,$LIBOBJS,;t t
s,@COMPRESS@,$COMPRESS,;t t
s,@GZIP@,$GZIP,;t t
s,@ARC@,$ARC,;t t
s,@NOMARCH@,$NOMARCH,;t t
s,@ARJ@,$ARJ,;t t
s,@UNARJ@,$UNARJ,;t t
s,@LHA@,$LHA,;t t

View File

@ -158,6 +158,7 @@ dnl Check for external programs
AC_PATH_PROG(COMPRESS,compress,no-compress-found-during-configure)
AC_PATH_PROG(GZIP,gzip,no-gzip-found-during-configure)
AC_PATH_PROG(ARC,arc)
AC_PATH_PROG(NOMARCH,nomarch)
AC_PATH_PROG(ARJ,arj)
AC_PATH_PROG(UNARJ,unarj)
AC_PATH_PROG(LHA,lha)

View File

@ -72,8 +72,12 @@ int CountArchive(void)
* right paths. Others are meant as examples.
*/
memset(&archiver, 0, sizeof(archiver));
sprintf(archiver.comment, "ARC Version 5.21");
if (strlen(_PATH_ARC) && strlen(_PATH_NOMARCH))
sprintf(archiver.comment, "ARC and NOMARCH");
else
sprintf(archiver.comment, "ARC Version 5.21");
sprintf(archiver.name, "ARC");
archiver.available = FALSE;
if (strlen(_PATH_ARC)) {
archiver.available = TRUE;
sprintf(archiver.marc, "%s anw", _PATH_ARC);
@ -82,13 +86,20 @@ int CountArchive(void)
sprintf(archiver.munarc, "%s enw", _PATH_ARC);
sprintf(archiver.iunarc, "%s enw", _PATH_ARC);
} else {
archiver.available = FALSE;
sprintf(archiver.marc, "/usr/bin/arc anw");
sprintf(archiver.tarc, "/usr/bin/arc tnw");
sprintf(archiver.funarc, "/usr/bin/arc xnw");
sprintf(archiver.munarc, "/usr/bin/arc enw");
sprintf(archiver.iunarc, "/usr/bin/arc enw");
}
/*
* Override arc when nomarch is available
*/
if (strlen(_PATH_NOMARCH)) {
sprintf(archiver.funarc, "%s", _PATH_NOMARCH);
sprintf(archiver.munarc, "%s", _PATH_NOMARCH);
sprintf(archiver.iunarc, "%s", _PATH_NOMARCH);
}
fwrite(&archiver, sizeof(archiver), 1, fil);
memset(&archiver, 0, sizeof(archiver));
@ -114,26 +125,26 @@ int CountArchive(void)
memset(&archiver, 0, sizeof(archiver));
sprintf(archiver.comment, "RAR by Eugene Roshal");
sprintf(archiver.name, "RAR");
if (strlen(_PATH_RAR) && strlen(_PATH_UNRAR))
archiver.available = TRUE;
else
archiver.available = FALSE;
if (strlen(_PATH_RAR)) {
archiver.available = TRUE;
sprintf(archiver.farc, "%s a -y -r", _PATH_RAR);
sprintf(archiver.marc, "%s a -y", _PATH_RAR);
sprintf(archiver.barc, "%s c -y", _PATH_RAR);
sprintf(archiver.tarc, "%s t -y", _PATH_RAR);
} else {
sprintf(archiver.farc, "/usr/bin/rar a -y -r");
sprintf(archiver.marc, "/usr/bin/rar a -y");
sprintf(archiver.barc, "/usr/bin/rar c -y");
sprintf(archiver.tarc, "/usr/bin/rar t -y");
}
if (strlen(_PATH_UNRAR)) {
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_RAR);
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_RAR);
sprintf(archiver.iunarc, "%s e", _PATH_RAR);
} else if (strlen(_PATH_UNRAR)) {
archiver.available = TRUE;
sprintf(archiver.funarc, "%s x -o+ -y -r", _PATH_UNRAR);
sprintf(archiver.munarc, "%s e -o+ -y", _PATH_UNRAR);
sprintf(archiver.iunarc, "%s e", _PATH_UNRAR);
} else {
archiver.available = FALSE;
sprintf(archiver.farc, "/usr/bin/rar a -y -r");
sprintf(archiver.marc, "/usr/bin/rar a -y");
sprintf(archiver.barc, "/usr/bin/rar c -y");
sprintf(archiver.tarc, "/usr/bin/rar t -y");
sprintf(archiver.funarc, "/usr/bin/unrar x -o+ -y -r");
sprintf(archiver.munarc, "/usr/bin/unrar e -o+ -y");
sprintf(archiver.iunarc, "/usr/bin/unrar e");

View File

@ -10,6 +10,7 @@
#define _PATH_COMPRESS "@COMPRESS@"
#define _PATH_GZIP "@GZIP@"
#define _PATH_ARC "@ARC@"
#define _PATH_NOMARCH "@NOMARCH@"
#define _PATH_ARJ "@ARJ@"
#define _PATH_UNARJ "@UNARJ@"
#define _PATH_LHA "@LHA@"