Mkbundle (1)-Linux man page

Source: Internet
Author: User
Tags compact stub

Mkbundle (1)-Linux man PageName

Mkbundle, mkbundle2-creates a bundled executable.

Synopsis

Mkbundle [Options] assembly1 [assembly2 ...]

Description

Mkbundle generates an executable program that would contain static copies of the assemblies listed on the command Line. By default, the assemblies specified in the command line is included in the bundle. To automatically include any of the dependencies referenced, use the '--deps ' command line option.

Use MKBUNDLEFP when do want the startup runtime to load the 1.0 profile, and use Mkbundle2 if you want the STA Rtup runtime to load the 2.0 profile.

For example, to create a bundle for Hello World, use the following command:

   $ mkbundle-o Hello Hello.exe

The above would pull Hello.exe to a native program called "Hello". Notice that the produced image still contains the CIL image and no precompilation are done.

In addition, it's possible to control whether Mkbundle should compile the resulting executable or isn't with the- C option. This is useful if you want to link additional libraries or control the generated output in more detail. For example, this could is used to link some libraries statically:

   $ mkbundle-c-o host.c-oo bundles.o--deps    hello.exe $ cc host.c BUNDLES.O/USR/LIB/LIBMONO.A-LC-LRT

Also use Mkbundle to generate a bundle you can use when embedding the Mono runtime in a native Applicatio N. In the case, use both the-c and--nomain options. The resulting host.c file won't have a main () function. Call Mono_mkbundle_init () before initializing the JIT in your code so, the bundled assemblies is available to the EMB edded Runtime.

Options
-C
produce the stub file, do not compile the resulting stub.
-O filename
Places the output on ' out '. If The flag-c is specified, this is the C host program. If not, this contains the resulting executable.
-oo filename
Specifies the name to being used for the
helper object file that contains the bundle.
-L Path
Adds the ' path ' does the search list for assemblies. The rules is the same as for the COMPILER-LIB:OR-L flags.
Specifies that a Machine.config file must is bundled as well.
typically this was $prefix/etc/mono/1.0/machine.config or $prefix/etc/mono/2.0/machine.config depending on the ProFi Le that you is using (1.0 or 2.0)
--nodeps
This is the
default: mkbundle would only include the assemblies, were specified on the command line to Reduce the size of the resulting image created.
--deps
This option would bundle all of the
referenced assemblies for the assemblies listed on the command line option. This is useful to distribute a self-contained image.
--keeptemp
by
default mkbundle would delete the temporary files that it uses to produce the bundle. This option keeps the file around.
--machine-config FILE
Uses The given file as the Machine.config file for the generated application.
--nomain
with THE-C option, generate the host stub without a main () function.
--config-dir dir
When
passed, DIR'll be set for the MONO_CFG_DIR environment variable
--static
by
default Mkbundle dynamically links to mono and glib. This option causes it to statically link instead.
Important:
Since the Mono runtime is licensed under the LGPL, even if your use of static you should transfer the component pieces O f the Mkbundle to your users so they is able to upgrade the Mono runtime on their own.
If you want the use of this for commercial licenses, you must obtain a
proprietary license for Mono from [email protected]
-Z
compresses the assemblies before embedding. This results in smaller executable files, but increases startup time and requires zlib to being installed on the target Syste M.
Windows

On Windows systems, it it necessary to has unix-like toolchain to is installed for Mkbundle to work. You can use Cygwin ' s and install GCC, GCC-MINGW and as packages.

Environment Variables
As
Assembler command. The default is "as".
Cc
C compiler command. The default is "CC" Under Linux and "Gcc-mno-cygwin" under Windows.
Files

This program would load referenced assemblies from the Mono assembly cache.

Bugs

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

Mailing Lists

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

Web Site

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

See Also

MCs (1) , Mono(1),mono-config(5).

Referenced by

Mono-cil-strip (1), monolinker(1)

Mkbundle (1)-Linux man page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.