New test.
[mono.git] / man / mkbundle.1
1 .\" 
2 .\" mkbundle manual page.
3 .\" (C) 2004 Ximian, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"
7 .de Sp \" Vertical space (when we can't use .PP)
8 .if t .sp .5v
9 .if n .sp
10 ..
11 .TH mkbundle "mkbundle 1.0"
12 .SH NAME
13 mkbundle \- Creates a bundled executable.
14 .SH SYNOPSIS
15 .PP
16 .B mkbundle [options] assembly1 [assembly2 ...]
17 .SH DESCRIPTION
18 \fImkbundle\fP generates an executable program that will contain
19 static copies of the assemblies listed on the command line.  By
20 default only the assemblies specified in the command line will be
21 included in the bundle.  To automatically include all of the
22 dependencies referenced, use the "--deps" command line option.
23 .PP
24 For example, to create a bundle for hello world, use the following
25 command:
26 .nf
27         $ mkbundle -o hello hello.exe
28 .fi
29 .PP
30 The above will pull hello.exe native program called "hello".  Notice
31 that the produced image still contains the CIL image and no
32 precompilation is done.
33 .PP
34 In addition, it is possible to control whether mkbundle should compile
35 the resulting executable or not.  This is useful if you want to link
36 additional libraries or control the generated output in more detail.
37 For example, this could be used to link some libraries statically:
38 .nf
39         $ mkbundle -o host.c -oo bundles.o --deps hello.exe
40
41         $ cc host.c bundles.o /usr/lib/libmono.a -lc -lrt
42 .fi
43 .SH OPTIONS
44 .TP
45 .I "-c"
46 Produce the stub file, do not compile the resulting stub.
47 .TP
48 .I "-o filename"
49 Places the output on `out'.  If the flag -c is specified, this is the
50 C host program.  If not, this contains the resulting executable.
51 .TP
52 .I "-oo filename"
53 Specifies the name to be used for the helper object file that contains
54 the bundle.
55 .TP
56 .I "-L path"
57 Adds the `path' do the search list for assemblies.  The rules are the
58 same as for the compiler -lib: or -L flags.
59 .TP "--config FILE"
60 Specifies that a machine.config file must be bundled as well.
61 Typically this is $prefix/etc/mono/1.0/machine.config or
62 $prefix/etc/mono/2.0/machine.config depending on the profile that you
63 are using (1.0 or 2.0)
64 .TP
65 .I  "--nodeps"
66 This is the default: mkbundle will only include the assemblies that
67 were specified on the command line to reduce the size of the resulting
68 image created.
69 .TP
70 .I "--deps"
71 This option will bundle all of the referenced assemblies for the
72 assemblies listed on the command line option.  This is useful to
73 distribute a self-contained image.
74 .TP
75 .I "--keeptemp"
76 By default mkbundle will delete the temporary files that it uses to
77 produce the bundle.  This option keeps the file around.
78 .TP
79 .I "--static"
80 By default mkbundle dynamically links to mono and glib.  This option
81 causes it to statically link instead.
82 .TP
83 .I "--config-dir DIR"
84 When passed, DIR will be set for the MONO_CFG_DIR environment variable
85 .TP
86 .I "-z"
87 Compresses the assemblies before embedding. This results in smaller
88 executable files, but increases startup time and requires zlib to be
89 installed on the target system.
90 .SH WINDOWS
91 On Windows systems, it it necessary to have  Unix-like toolchain to be
92 installed for mkbundle to work.  You can use cygwin's and install gcc,
93 gcc-mingw and as packages. 
94 .SH ENVIRONMENT VARIABLES
95 .TP
96 .I "AS"
97 Assembler command. The default is "as".
98 .TP
99 .I "CC"
100 C compiler command. The default is "cc" under Linux and "gcc -mno-cygwin"
101 under Windows.
102 .SH FILES
103 This program will load referenced assemblies from the Mono assembly
104 cache. 
105 .SH BUGS
106 The option "--static" is not supported under Windows.
107 Moreover, a full cygwin environment containing at least "gcc" and "as"
108 is required for the build process. The generated executable does not
109 depend on cygwin.
110 .SH MAILING LISTS
111 Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
112 .SH WEB SITE
113 Visit: http://www.mono-project.com for details
114 .SH SEE ALSO
115 .BR mcs(1), mono(1), mono-config(5).
116
117