{"size": 1664, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/scribblings/raco/bundle-api.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "pkgs/racket-doc/scribblings/raco/bundle-api.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "pkgs/racket-doc/scribblings/raco/bundle-api.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 3, "avg_line_length": 36.1739130435, "max_line_length": 68, "alphanum_fraction": 0.6881009615}
#lang scribble/doc

@(require scribble/manual
          scribble/bnf
          (for-label racket/gui
                     compiler/bundle-dist))

@title{API for Bundling Distributions}

@defmodule[compiler/bundle-dist]{

The @racketmodname[compiler/bundle-dist] library provides a function
to pack a directory (usually assembled by
@racket[assemble-distribution]) into a distribution file.  On
Windows, the result is a @filepath{.zip} archive; on Mac OS, it's
a @filepath{.dmg} disk image; on Unix, it's a @filepath{.tgz}
archive.}


@defproc[(bundle-directory [dist-file file-path?] 
                           [dir file-path?]
                           [for-exe? any/c #f])
         void?]{

Packages @racket[dir] into @racket[dist-file]. If @racket[dist-file]
has no extension, a file extension is added automatically (using the
first result of @racket[bundle-put-file-extension+style+filters]).

The created archive contains a directory with the same name as
@racket[dir]---except on Mac OS when @racket[for-exe?] is true
and @racket[dir] contains a single a single file or directory, in
which case the created disk image contains just the file or
directory. The default for @racket[for-exe?] is @racket[#f].

Archive creation fails if @racket[dist-file] exists.}


@defproc[(bundle-put-file-extension+style+filters)
         (values (or/c string? false/c)
                 (listof (one-of/c 'packages 'enter-packages))
                 (listof (list/c string? string?)))]{

Returns three values suitable for use as the @racket[extension],
@racket[style], and @racket[filters] arguments to @racket[put-file],
respectively to select a distribution-file name.}
