问题描述
我正在尝试为我的 mono 程序创建一个 .app 包以在 Mac OS X 上运行,但是尽管阅读了几乎所有关于 macpack 和捆绑 mono 的文章和文档,但这些方法都不起作用.
使用 macpack 将二进制文件成功捆绑在 .app 包中:
macpack -m:x11 -o:.-r:sqlite3.dll -r:Nini.dll -r:extraIcons.ini -r:APP_DATABASE.db3 -r:APP_Values.db3 -r:./Documents/manual.pdf -r:GemBox.Spreadsheet.dll -r:Mono.Data.SqliteClient.dll -a:APP.exe -n:APP
.当我尝试从包中启动程序时,会发生这种情况:
FFMACM-2:MacOS dev$ open -a APP应用程序/Users/dev/Workspace/Software/APP.app 的 LSOpenURLsWithRole() 失败,错误为 -10810.
我尝试使用 此方法,但脚本失败并出现以下错误:
未处理的异常:System.IO.FileNotFoundException:无法加载文件或程序集Nini,版本=1.1.0.0,Culture=neutral,PublicKeyToken=691faec150a7fa7b"或其依赖项之一.文件名:'Nini,版本=1.1.0.0,文化=中性,PublicKeyToken=691faec150a7fa7b'在 APP.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0登出
我的想法很新鲜.Nini.dll 是它应该在的地方.我使用 GTK# 作为 GUI.
现在使用 MonoMacPackager 为 MacOS X 创建一个包.你可以在这里找到详细信息 http://www.mono-project.com/MonoMacPackager.p>
但是,您在此处看到的问题是您的软件包中缺少您的 dll(The Nini 程序集).它需要在您的应用程序路径中(在它被捆绑之后)才能正确加载.
I am trying to create a .app bundle of my mono program to run on Mac OS X, but despite having read virtually all articles and documentation on macpack and bundling mono, none of the methods work.
Using macpack the binaries are bundled successfully in a .app package:
macpack -m:x11 -o:. -r:sqlite3.dll -r:Nini.dll -r:extraIcons.ini -r:APP_DATABASE.db3 -r:APP_Values.db3 -r:./Documents/manual.pdf -r:GemBox.Spreadsheet.dll -r:Mono.Data.SqliteClient.dll -a:APP.exe -n:APP
. When I try to start the program from the package this happens:
FFMACM-2:MacOS dev$ open -a APP
LSOpenURLsWithRole() failed for the application /Users/dev/Workspace/Software/APP.app with error -10810.
I tried using this method but the script fails with the following error:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b' or one of its dependencies.
File name: 'Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b'
at APP.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
logout
I am fresh out of ideas. The Nini.dll is where it should be. I am using GTK# for the GUI.
Creating a package for MacOS X is now done using MonoMacPackager. You can find details here http://www.mono-project.com/MonoMacPackager.
However, the issue that you're seeing here is that you're missing your dll (The Nini assembly) from your package. It needs to be in your application path (after it has been bundled) to load properly.
这篇关于如何为 Mac OS 创建 .app 单声道包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!