[英]Running Mono Application in Mac OS X
I have developed Mono (.NET) application in Mac OS X and it runs from MonoDevelop just fine. 我已经在Mac OS X中开发了Mono(.NET)应用程序,并且可以从MonoDevelop运行。 Although, it fails with error when I run from command line like this:
虽然,当我从命令行运行时,它失败并显示错误:
mono SqlDynamiteX.exe
Instead, I have to run the application like this: 相反,我必须像这样运行应用程序:
export DYLD_FALLBACK_LIBRARY_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib:$DYLD_FALLBACK_LIBRARY_PATH:/usr/lib"
exec /Library/Frameworks/Mono.framework/Versions/Current/bin/mono ./SqlDynamiteX.exe
Then, I have made a Mac OS X app this way: 然后,我以这种方式制作了Mac OS X应用程序:
macpack -n:SqlDynamiteX -o:. -a:SqlDynamiteX.exe -i:WindowIcon.icns -m:winforms -r:SqlDynamite.Common.dll,SqlDynamite.Util.dll,Npgsql.dll,MySql.Data.dll
And I have edited Info.plist file inside package according to this post: 而且我根据这篇文章编辑了包内的Info.plist文件:
Setting environment variables in OS X? 在OS X中设置环境变量?
<key>LSEnvironment</key>
<dict>
<key>DYLD_FALLBACK_LIBRARY_PATH</key>
<string>/Library/Frameworks/Mono.framework/Versions/Current/lib:$DYLD_FALLBACK_LIBRARY_PATH:/usr/lib</string>
</dict>
But the application still fails with error when I double-click it in Finder. 但是,当我在Finder中双击应用程序时,该应用程序仍会失败并显示错误。
Could anyone help me with that issue? 有人可以帮我解决这个问题吗?
Mac OS X的Platypus应用程序可以包装脚本,因此您无需修改Info.plist文件。
Have you checked out Xamarin? 您检查过Xamarin吗? It's made by the very makers of MonoDevelop, and I believe its settings are such that (like Platypus) handles the info.plist files better.
它是由MonoDevelop的制造商制造的,我相信它的设置可以使(如鸭嘴兽)更好地处理info.plist文件。 I don't believe you'd go through the trouble you're presently going through to get your app compiled.
我不认为您会遇到麻烦,无法立即编译应用程序。
[Disclosure: I do not work for Xamarin and do not have a stake in their interests, I just think it'd help you out.] [披露:我不为Xamarin工作,也不关心他们的利益,我认为这会帮到您。]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.