1mkbundle(mkbundle 1.0)                                  mkbundle(mkbundle 1.0)
2
3
4

NAME

6       mkbundle - Creates a bundled executable.
7

SYNOPSIS

9       mkbundle [options] assembly1 [assembly2 ...]
10

DESCRIPTION

12       mkbundle  generates  an  executable  program  that  will contain static
13       copies of the assemblies listed on the command line.  By  default  only
14       the  assemblies  specified  in the command line will be included in the
15       bundle.  To automatically include all of the  dependencies  referenced,
16       use the "--deps" command line option.
17
18       For example, to create a bundle for hello world, use the following com‐
19       mand:
20            $ mkbundle -o hello hello.exe
21
22       The above will pull hello.exe into a  native  program  called  "hello".
23       Notice that the produced image still contains the CIL image and no pre‐
24       compilation is done.
25
26       In addition, it is possible to control whether mkbundle should  compile
27       the  resulting executable or not with the -c option.  This is useful if
28       you want to link additional libraries or control the  generated  output
29       in  more detail. For example, this could be used to link some libraries
30       statically:
31            $ mkbundle -c -o host.c -oo bundles.o --deps hello.exe
32
33            $ cc host.c bundles.o /usr/lib/libmono.a -lc -lrt
34
35       You may also use mkbundle to generate a bundle you can use when  embed‐
36       ding  the Mono runtime in a native application.  In that case, use both
37       the -c and --nomain options.  The resulting host.c file will not have a
38       main() function.  Call mono_mkbundle_init() before initializing the JIT
39       in your code so that the bundled assemblies are available to the embed‐
40       ded runtime.
41

OPTIONS

43       -c     Produce the stub file, do not compile the resulting stub.
44
45       -o filename
46              Places  the  output on `out'.  If the flag -c is specified, this
47              is the C host program.  If not, this contains the resulting exe‐
48              cutable.
49
50       -oo filename
51              Specifies  the  name  to be used for the helper object file that
52              contains the bundle.
53
54       -L path
55              Adds the `path' do the search list for  assemblies.   The  rules
56              are the same as for the compiler -lib: or -L flags.
57
58       Specifies that a machine.config file must be bundled as well.
59              Typically  this  is $prefix/etc/mono/1.0/machine.config or $pre‐
60              fix/etc/mono/2.0/machine.config depending on  the  profile  that
61              you are using (1.0 or 2.0)
62
63       --nodeps
64              This  is  the default: mkbundle will only include the assemblies
65              that were specified on the command line to reduce  the  size  of
66              the resulting image created.
67
68       --deps This option will bundle all of the referenced assemblies for the
69              assemblies listed on the command line option.  This is useful to
70              distribute a self-contained image.
71
72       --keeptemp
73              By default mkbundle will delete the temporary files that it uses
74              to produce the bundle.  This option keeps the file around.
75
76       --machine-config FILE
77              Uses the given FILE as the machine.config file for the generated
78              application.
79
80       --nomain
81              With  the  -c  option,  generate  the host stub without a main()
82              function.
83
84       --config-dir DIR
85              When passed, DIR will be set for  the  MONO_CFG_DIR  environment
86              variable
87
88       --static
89              By  default  mkbundle  dynamically links to mono and glib.  This
90              option causes it to statically link instead.
91
92       -z     Compresses the assemblies  before  embedding.  This  results  in
93              smaller   executable  files,  but  increases  startup  time  and
94              requires zlib to be installed on the target system.
95

WINDOWS

97       On Windows systems, it it necessary to have  Unix-like toolchain to  be
98       installed  for mkbundle to work.  You can use cygwin's and install gcc,
99       gcc-mingw and as packages.
100

ENVIRONMENT VARIABLES

102       AS     Assembler command. The default is "as".
103
104       CC     C compiler command. The default is "cc"  under  Linux  and  "gcc
105              -mno-cygwin" under Windows.
106

FILES

108       This  program  will  load  referenced assemblies from the Mono assembly
109       cache.
110

BUGS

112       The option "--static" is not supported under Windows.  Moreover, a full
113       cygwin  environment  containing at least "gcc" and "as" is required for
114       the build process. The generated executable does not depend on cygwin.
115

MAILING LISTS

117       Visit   http://lists.ximian.com/mailman/listinfo/mono-devel-list    for
118       details.
119

WEB SITE

121       Visit: http://www.mono-project.com for details
122

SEE ALSO

124       mcs(1),mono(1),mono-config(5).
125
126
127
128
129
130                                                        mkbundle(mkbundle 1.0)
Impressum