单mkbundle窗口 [英] mono mkbundle windows

查看:193
本文介绍了单mkbundle窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在cygwin上使用mono mkbundle,编译一个点网络应用程序,它工作正常。我使用了此处的说明 c#c​​ywgwin mono mkbundle windows 7 - can not编译文件

I've used mono mkbundle on cygwin, to compile a dot net app, and it works fine. I used the instructions from here c# cywgwin mono mkbundle windows 7 - cannot compile file

完成的应用程序将无法运行,除非以下文件(从mono / bin复制)文件夹与应用程序位于同一文件夹:mono .dll,libglib-2.0-0.dll,libgthread-2.0-0.dll,zlib.dll

The finished app will not run unless the following files (copied from the mono/bin) folder are in the same folder as the app: mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll, zlib.dll

这一切似乎确定 - 但是如果我运行命令cygwin)

This all seems ok - however if I run the command (from cygwin)

$ objdump -p mycompiledapp.exe | grepDLL名称

(其中mycompiledapp.exe是应用程序的名称)

$ objdump -p mycompiledapp.exe | grep "DLL Name"
(where "mycompiledapp.exe" is the name of the app)

mono.dll,libglib-2.0-0.dll,libgthread-2.0-0.dll已嵌入我的应用程序。

The files mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll are already embedded in my app.

为什么这些文件需要在

我在编译时做了不正确的操作吗?

Have I done something incorrect when compiling?

有任何方法:

a)不在我的应用程序中嵌入这些程序集(所以它们可以随其分发)

b)编译我的应用程序它知道这些程序集是嵌入在应用程序,并使用那些? (而不是必须用应用程序分发这些文件)

Is there any way to either:
a) Not embed these assemblies in my app (so they can be distributed with it)
b) Compile my app so it knows these assemblies are embedded in the app, and use those? (and not have to distribute these files with the app)

当我们的应用程序已经嵌入了这些文件,似乎很痛苦。 (特别是考虑到这些组件的大小 - 一个50K点的网络应用程序变成大约5megs作为一个编译的单应用程序,这需要额外的4兆的程序集的功能... e)

It just seems a pain to distribute these files with my app, when they are already embedded within it! (Especially considering the size of these assemblies - a 50k dot net app becomes around 5megs as a compiled mono-app, and this needs to be distributed with an additional 4 megs of assemblies for it to function...e)

感谢您提供任何资讯。

Smithy

推荐答案

运行 mkbundle 时,您可以添加 - static 标志。注意这将嵌入Mono库(mono.dll)是LGPL。至于lib​​glib和libgthread,你应该找到它们的静态版本,并在链接时使用。请注意,在您的程序中嵌入LGPL库拥有其他含义

You can add the --static flag when running mkbundle. Note that this will embed the Mono library (mono.dll) which is LGPL. As for libglib and libgthread, you should find a static version of them and use that when linking. Note that embedding LGPL libraries in your program will have other implications.

这篇关于单mkbundle窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆