mkbundle(1) - Linux man page

mkbundle(1) - Linux man page

Name

mkbundle, mkbundle2 - Creates a bundled executable.

Synopsis

mkbundle [options] assembly1 [assembly2 ...]

Description

mkbundle generates an executable program that will contain static copies of the assemblies listed on the command line. By default only the assemblies specified in the command line will be included in the bundle. To automatically include all of the dependencies referenced, use the "--deps" command line option.

Use mkbundleFP when you want the startup runtime to load the 1.0 profile, and use mkbundle2 when you want the startup 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 will pull hello.exe into a native program called "hello". Notice that the produced image still contains the CIL image and no precompilation is done.

In addition, it is possible to control whether mkbundle should compile the resulting executable or not 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 be 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

You may also use mkbundle to generate a bundle you can use when embedding the Mono runtime in a native application. In that case, use both the -c and --nomain options. The resulting host.c file will not have a main() function. Call mono_mkbundle_init() before initializing the JIT in your code so that the bundled assemblies are available to the embedded 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 be used for the helper object file that contains the bundle.
-L path
Adds the ‘path‘ do the search list for assemblies. The rules are the same as for the compiler -lib: or -L flags.
Specifies that a machine.config file must be bundled as well.
Typically this is $prefix/etc/mono/1.0/machine.config or $prefix/etc/mono/2.0/machine.config depending on the profile that you are using (1.0 or 2.0)
--nodeps
This is the default: mkbundle will only include the assemblies that were specified on the command line to reduce the size of the resulting image created.
--deps
This option will 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 will 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 will 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 you use static you should transfer the component pieces of the mkbundle to your users so they are able to upgrade the Mono runtime on their own.
If you want to use 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 be installed on the target system.

Windows

On Windows systems, it it necessary to have Unix-like toolchain to be 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 will 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" is 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)

时间: 2024-11-14 12:47:57

mkbundle(1) - Linux man page的相关文章

Linux - man page

使用man date来查看date命令的详细信息. [email protected]:~$ man date DATE(1) User Commands DATE(1) # 请注意上面这个括号内的数字 NAME <==这个命令的完整全名,如下所示为date且说明简单用途为配置与显示日期/时间 date - print or set the system date and time SYNOPSIS <==这个命令的基本语法如下所示 date [OPTION]... [+FORMAT] dat

linux 各层调优必备工具

Brendan D. Gregg 维护了一份Linux性能调优工具的蓝图Linux Performance Tools,针对Linux系统的各个组件都有相应的分析工具,一目了然. Linux Performance Observability:sar, benchmarking, tuning:  Images license: creative commons Attribution-ShareAlike 4.0. This page links to various Linux perfor

《linux 内核完全剖析》chapter 13 内存管理 (不含swap.c)

内存管理(memory.c 和swap.s 部分) "倒着看" 先看memory management,很明显,前面各种阻力,都是因为涉及内存管理.不先看这个,我估计前面看了也是白看 我估算着理论打基础砸了差不多一个星期的时间在memory management上面了...感觉很有收获,是时候用实践(code)印证理论了! <modern operating system>讲内存管理那一章 http://blog.csdn.net/cinmyheart/article/de

Linux select 机制深入分析

作为IO复用的实现方式.select是提高了抽象和batch处理的级别,不是传统方式那样堵塞在真正IO读写的系统调用上.而是堵塞在select系统调用上,等待我们关注的描写叙述符就绪.当然如今更好的方式是epoll,比方Java中的NIO底层就是用的epoll.这篇文章仅仅是为了搞懂select机制的原理.不看源代码就不能说懂这些IO复用手法.也在面试过程中体会到了,不去实践就会发现知道的永远是皮毛.面试问题:select的最大描写叙述符限制能够改动吗?(有待深入) 用户层API语法: /* A

Linux下5种IO模型的小结

概述 接触网络编程,我们时常会与各种与IO相关的概念打交道:同步(Synchronous).异步(ASynchronous).阻塞(blocking)和非阻塞(non-blocking).关于概念的区别在知乎上看到一位朋友(链接)打了一个比较形象的比喻: 你打电话问书店老板有没有<分布式系统>这本书,如果是同步通信机制,书店老板会说,你稍等,”我查一下",然后开始查啊查,等查好了(可能是5秒,也可能是一天)告诉你结果(返回结果).而异步通信机制,书店老板直接告诉你我查一下啊,查好了打

MySQL如何避免使用Linux的swap分区而提升读写性能

MySQL如何避免使用Linux的swap分区而提升读写性能 Linux有很多很好的内存.IO调度机制,但是并不会适用于所有场景.对于DBA来说Linux比较让人头疼的一个地方是,它不会因为MySQL很重要就避免将分配给MySQL的地址空间映射到swap上.对于频繁进行读写操作的系统而言,数据看似在内存而实际上在磁盘是非常糟糕的,响应时间的增长很可能直接拖垮整个系统.这篇blog主要讲讲我们作为DBA,怎样尽量避免MySQL惨遭swap的毒手. 首先我们要了解点基础的东西,比如说为什么会产生sw

Linux pipe 源码分析

管道pipe作为Unix中历史最悠久的IPC机制,存在各个版本的Unix中,主要用于父子进程之间的通信(使用fork,从而子进程会获得父进程的打开文件表),pipe()系统调用底层的实现就相当于一个特殊的文件系统,每次调用的时候创建一个inode关联着两个file,一个用于读,一个用于写,从而实现数据的单向流动. 用户层API: #include <unistd.h> int pipe(int pipefd[2]); #define _GNU_SOURCE /* See feature_tes

(转)《linux性能及调优指南》 3.3 内存瓶颈

翻译:Hank (http://blog.csdn.net/fireroll)版权所有,尊重他人劳动成果,转载时请注明作者和原始出处及本声明.原文名称:<Linux Performance and Tuning Guidelines>原文地址:http://www.redbooks.ibm.com/abstracts/redp4285.html 3.3 内存瓶颈On a Linux system, many programs run at the same time. These progra

linux 异步信号的同步处理方式

关于代码的可重入性,设计开发人员一般只考虑到线程安全,异步信号处理函数的安全却往往被忽略.本文首先介绍如何编写安全的异步信号处理函数:然后举例说明在多线程应用中如何构建模型让异步信号在指定的线程中以同步的方式处理. 应用中编写安全的信号处理函数 在开发多线程应用时,开发人员一般都会考虑线程安全,会使用 pthread_mutex 去保护全局变量.如果应用中使用了信号,而且信号的产生不是因为程序运行出错,而是程序逻辑需要,譬如 SIGUSR1.SIGRTMIN 等,信号在被处理后应用程序还将正常运