Skip to content

Commit

Permalink
Moved gzip/bzip2 streaming out of tar archive to higher level.
Browse files Browse the repository at this point in the history
Now other archive types can use it.

This also has the awkward attribute of transparently supporting arbitrary
 archive types inside a .gz/.bz2 file. I'm not sure if this is a feature or
 bug, yet.
  • Loading branch information
icculus committed Feb 28, 2010
1 parent 11e166f commit 9e82e81
Show file tree
Hide file tree
Showing 4 changed files with 471 additions and 467 deletions.
35 changes: 27 additions & 8 deletions CMakeLists.txt
Expand Up @@ -479,20 +479,14 @@ ENDIF(MOJOSETUP_ARCHIVE_ZIP)
OPTION(MOJOSETUP_ARCHIVE_TAR "Enable TAR support" TRUE)
IF(MOJOSETUP_ARCHIVE_TAR)
ADD_DEFINITIONS(-DSUPPORT_TAR=1)

# BINARY SIZE += 1.5
OPTION(MOJOSETUP_ARCHIVE_TAR_GZ "Enable TAR.GZ support" TRUE)
IF(MOJOSETUP_ARCHIVE_TAR_GZ)
ADD_DEFINITIONS(-DSUPPORT_TAR_GZ=1)
SET(MOJOSETUP_NEED_ZLIB TRUE)
SET(MOJOSETUP_INPUT_GZIP TRUE)
ENDIF(MOJOSETUP_ARCHIVE_TAR_GZ)

# BINARY SIZE += 1.5
OPTION(MOJOSETUP_ARCHIVE_TAR_BZ2 "Enable TAR.BZ2 support" TRUE)
IF(MOJOSETUP_ARCHIVE_TAR_BZ2)
ADD_DEFINITIONS(-DSUPPORT_TAR_BZ2=1)
ADD_DEFINITIONS(-DBZ_NO_STDIO=1)
SET(MOJOSETUP_NEED_BZLIB TRUE)
SET(MOJOSETUP_INPUT_BZIP2 TRUE)
ENDIF(MOJOSETUP_ARCHIVE_TAR_BZ2)
ENDIF(MOJOSETUP_ARCHIVE_TAR)

Expand All @@ -503,6 +497,31 @@ IF(MOJOSETUP_ARCHIVE_UZ2)
ENDIF(MOJOSETUP_ARCHIVE_UZ2)


# Input decoders...

# BINARY SIZE += 1.5
IF(NOT MOJOSETUP_INPUT_GZIP) # optional if something didn't force it.
OPTION(MOJOSETUP_INPUT_GZIP "Enable GZIP support" FALSE)
ENDIF(NOT MOJOSETUP_INPUT_GZIP)

IF(MOJOSETUP_INPUT_GZIP)
ADD_DEFINITIONS(-DSUPPORT_GZIP=1)
SET(MOJOSETUP_NEED_ZLIB TRUE)
ENDIF(MOJOSETUP_INPUT_GZIP)

# BINARY SIZE += 1.5
IF(NOT MOJOSETUP_INPUT_BZIP2) # optional if something didn't force it.
OPTION(MOJOSETUP_INPUT_BZIP2 "Enable BZIP2 support" FALSE)
ENDIF(NOT MOJOSETUP_INPUT_BZIP2)

IF(MOJOSETUP_INPUT_BZIP2)
ADD_DEFINITIONS(-DSUPPORT_BZIP2=1)
ADD_DEFINITIONS(-DBZ_NO_STDIO=1)
SET(MOJOSETUP_NEED_BZLIB TRUE)
ENDIF(MOJOSETUP_INPUT_BZIP2)



# Image decoders for GUIs...

OPTION(MOJOSETUP_IMAGE_JPG "Enable JPG support" TRUE)
Expand Down

0 comments on commit 9e82e81

Please sign in to comment.