Skip to content

Commit

Permalink
Added RAR archive plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 17, 2005
1 parent ba77394 commit 6aae06f
Show file tree
Hide file tree
Showing 131 changed files with 23,497 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Current:
Ryan C. Gordon (icculus.org) - Tue May 17 12:21:23 EDT 2005
* Added .rar archive plugin.
Ryan C. Gordon (icculus.org) - Sat Nov 20 08:42:16 EST 2004
* Minor carbon_ui tweaks and corrections to update function.
Ludwig Nussel - Wed Nov 10 14:21:21 PST 2004
Expand Down
30 changes: 17 additions & 13 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ BRANDELF = @BRANDELF@
UNINSTALL_VERSION = 1.0.4

CC = @CC@
CXX = @CXX@

# This indicates where the 'setupdb' CVS module is checked out
SETUPDB = @SETUPDB@
Expand All @@ -26,6 +27,7 @@ CONVERT_IMAGE = /loki/patch-tools/convert-image
# The supported locales so far
LOCALES = fr de es sv it nl ru en_GB

LD = @LD@
OPTIMIZE = @CFLAGS@
LDFLAGS = @LDFLAGS@
BDYNAMIC = @BDYNAMIC@
Expand All @@ -38,6 +40,7 @@ OPTIONS = -DSTUB_UI -DSETUP_VERSION_MAJOR=@SETUP_VERSION_MAJOR@ \
-DDATADIR=\"$(DATADIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" -DLOKI_PREFIX=\"$(BRAND)\"

CFLAGS += $(OPTIMIZE) $(HEADERS) $(OPTIONS)
CXXFLAGS = $(CFLAGS)

COMMON_OBJS = log.o install_log.o
CORE_OBJS = detect.o plugins.o network.o install.o copy.o file.o loki_launchurl.o
Expand Down Expand Up @@ -68,56 +71,56 @@ CONSOLE_LIBS = $(LIBS) @CONSOLE_LIBS@
all: do-plugins @DO_DIALOG@ setup setup.gtk uninstall xsu

testxml: testxml.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)

loki_uninstall.o: uninstall.c
$(CC) $(LDFLAGS) -c -o $@ $^ $(CFLAGS) -DUNINSTALL_UI -DVERSION=\"$(UNINSTALL_VERSION)\"
$(LD) $(LDFLAGS) -c -o $@ $^ $(CFLAGS) -DUNINSTALL_UI -DVERSION=\"$(UNINSTALL_VERSION)\"

loki_uninstall: $(LOKI_UNINSTALL_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a
$(CC) $(LDFLAGS) -o $@ $(LOKI_UNINSTALL_OBJS) $(GUI_LIBS)
$(LD) $(LDFLAGS) -o $@ $(LOKI_UNINSTALL_OBJS) $(GUI_LIBS)

carbon_uninstall.o: uninstall.c
$(CC) $(LDFLAGS) -c -o $@ $^ $(CFLAGS) -DUNINSTALL_CARBONUI -DUNINSTALL_UI -DVERSION=\"$(UNINSTALL_VERSION)\"
$(LD) $(LDFLAGS) -c -o $@ $^ $(CFLAGS) -DUNINSTALL_CARBONUI -DUNINSTALL_UI -DVERSION=\"$(UNINSTALL_VERSION)\"

carbon_uninstall: $(CARBON_UNINSTALL_OBJS) $(SETUPDB)/$(arch)/libsetupdb.a
$(CC) $(LDFLAGS) -o $@ $(CARBON_UNINSTALL_OBJS) $(CARBON_LIBS)
$(LD) $(LDFLAGS) -o $@ $(CARBON_UNINSTALL_OBJS) $(CARBON_LIBS)
rm -f -R ./uninstall.APP
cp -R ./setup.APP ./uninstall.APP
cp ./carbon/Info.plist.uninstall ./uninstall.APP/Contents/Info.plist
rm -f ./uninstall.APP/Contents/MacOS/setup.carbon
cp ./carbon_uninstall ./uninstall.APP/Contents/MacOS
uninstall: $(UNINSTALL_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(UNINSTALL_OBJS) $(CONSOLE_LIBS) @STATIC@
$(LD) $(LDFLAGS) -o $@ $(UNINSTALL_OBJS) $(CONSOLE_LIBS) @STATIC@

check: $(CHECK_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(CHECK_OBJS) $(GUI_LIBS)
$(LD) $(LDFLAGS) -o $@ $(CHECK_OBJS) $(GUI_LIBS)

check.carbon: $(CHECK_CARBON_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(CHECK_CARBON_OBJS) $(CARBON_LIBS)
$(LD) $(LDFLAGS) -o $@ $(CHECK_CARBON_OBJS) $(CARBON_LIBS)
rm -f -R ./check.APP
cp -R ./setup.APP ./check.APP
cp ./carbon/Info.plist.check ./check.APP/Contents/Info.plist
rm -f ./check.APP/Contents/MacOS/setup.carbon
cp ./check.carbon ./check.APP/Contents/MacOS

testcd: testcd.o $(CORE_OBJS) $(COMMON_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $^ @LIBS@ @CONSOLE_LIBS@ @STATIC@
$(LD) $(LDFLAGS) -o $@ $^ @LIBS@ @CONSOLE_LIBS@ @STATIC@

setup: do-plugins @DO_DIALOG@ $(CONSOLE_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(CONSOLE_OBJS) $(CONSOLE_LIBS) @STATIC@
$(LD) $(LDFLAGS) -o $@ $(CONSOLE_OBJS) $(CONSOLE_LIBS) @STATIC@

setup.gtk: $(GUI_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(GUI_OBJS) $(GUI_LIBS)
$(LD) $(LDFLAGS) -o $@ $(GUI_OBJS) $(GUI_LIBS)

#!!!TODO - Take dependency of dialog libs out of carbon
#!!!TODO - Should we include setup.carbon as part of "all", "install", etc...?
# Carbon needs to be a target all its own
setup.carbon: do-plugins @DO_DIALOG@ $(CARBON_OBJS) $(COMMON_LIBS)
$(CC) $(LDFLAGS) -o $@ $(CARBON_OBJS) $(CARBON_LIBS)
$(LD) $(LDFLAGS) -o $@ $(CARBON_OBJS) $(CARBON_LIBS)
cp setup.carbon setup.APP/Contents/MacOS

xsu: $(XSU_OBJS)
$(CC) $(LDFLAGS) -o $@ $^ @GTK_LIBS@ @LIBUTIL@ @X11_LIBS@ @LIBINTL@ @EXTRA_LIBS@
$(LD) $(LDFLAGS) -o $@ $^ @GTK_LIBS@ @LIBUTIL@ @X11_LIBS@ @LIBINTL@ @EXTRA_LIBS@

do-plugins:
$(MAKE) -C plugins all
Expand Down Expand Up @@ -250,6 +253,7 @@ clean:
$(MAKE) -C dialog clean
rm -f foo.xml core tags *.o
rm -f carbon/*.o
rm -f unrar/*.o

distclean: clean
rm -f Makefile config.cache config.status config.log
Expand Down
17 changes: 17 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_INSTALL
Expand Down Expand Up @@ -64,6 +65,7 @@ AC_PATH_PROG(MOUNT_PATH, mount, /sbin/mount, $PATH:/usr/sbin:/sbin)
AC_PATH_PROG(UMOUNT_PATH, umount, /sbin/umount, $PATH:/usr/sbin:/sbin)
AC_PATH_PROG(BRANDELF, brandelf, true)

LD="$CC"
CFLAGS="-fsigned-char -funroll-loops -Wall -g -O2 -I. $X_CFLAGS"
CONSOLE_LIBS=""
if test -d /usr/codehost/lib; then
Expand Down Expand Up @@ -465,6 +467,18 @@ if test x$enable_uz2 = xyes; then
AC_DEFINE(ENABLE_UZ2, 1, UZ2 support.)
fi

dnl enable RAR support
AC_ARG_ENABLE(rar,
[ --enable-rar enable RAR archives support [default=no]],
, enable_rar=no)
if test x$enable_rar = xyes; then
PLUGINS="$PLUGINS rar.c"
LD="$CXX"
CFLAGS="$CFLAGS -DRAR_SUPPORT -DRARDLL -DSILENT"
COMMON_LIBS="$COMMON_LIBS unrar/filestr.o unrar/scantree.o unrar/dll.o unrar/rar.o unrar/strlist.o unrar/strfn.o unrar/pathfn.o unrar/int64.o unrar/savepos.o unrar/global.o unrar/file.o unrar/filefn.o unrar/filcreat.o unrar/archive.o unrar/arcread.o unrar/unicode.o unrar/system.o unrar/isnt.o unrar/crypt.o unrar/crc.o unrar/rawread.o unrar/encname.o unrar/resource.o unrar/match.o unrar/timefn.o unrar/rdwrfn.o unrar/consio.o unrar/options.o unrar/ulinks.o unrar/errhnd.o unrar/rarvm.o unrar/rijndael.o unrar/getbits.o unrar/sha1.o unrar/extinfo.o unrar/extract.o unrar/volume.o unrar/list.o unrar/find.o unrar/unpack.o unrar/cmddata.o"
AC_DEFINE(ENABLE_RAR, 1, RAR support.)
fi

dnl enable RPM support
AC_ARG_ENABLE(rpm,
[ --enable-rpm enable RPM archives support [default=no]],
Expand Down Expand Up @@ -585,6 +599,8 @@ BRAND="$with_vendor"

OS=`uname -s`

CXXFLAGS="$CFLAGS"

AC_SUBST(SETUPDB)
AC_SUBST(PLUGINS)
AC_SUBST(DYN_PLUGINS)
Expand Down Expand Up @@ -614,6 +630,7 @@ AC_SUBST(DO_DIALOG)
AC_SUBST(IMAGE)
AC_SUBST(BRAND)
AC_SUBST(BDYNAMIC)
AC_SUBST(LD)

AC_OUTPUT(Makefile plugins/Makefile dialog/Makefile)

Expand Down
6 changes: 6 additions & 0 deletions plugins/plugindefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ extern SetupPlugin zip_plugin;
#ifdef UZ2_SUPPORT
extern SetupPlugin uz2_plugin;
#endif
#ifdef RAR_SUPPORT
extern SetupPlugin rar_plugin;
#endif
#endif /* !DYNAMIC_PLUGINS */

extern SetupPlugin cpio_plugin;
Expand All @@ -36,6 +39,9 @@ SetupPlugin *static_plugins[] = {
#ifdef UZ2_SUPPORT
&uz2_plugin,
#endif
#ifdef RAR_SUPPORT
&rar_plugin,
#endif
#ifdef OUTRAGE_SUPPORT
&opkg_plugin,
#endif
Expand Down
Loading

0 comments on commit 6aae06f

Please sign in to comment.