【问题标题】:Ubuntu/Debian dependencies for packaging mono gtk# application用于打包 mono gtk# 应用程序的 Ubuntu/Debian 依赖项
【发布时间】:2011-10-19 15:23:07
【问题描述】:

我正在为 Ubuntu/Debian (.deb) 打包我的 Mono GTK# 应用程序。

  • 如何找出要在控制文件中列出的依赖项?
  • 对于 mono 和 gtk# 本身,哪些是标准的?是以-dev结尾的吗?

我查看了 Debian 打包文档,但这些示例似乎过于复杂,带有安装后挂钩等。

mono 文档中的示例主要涉及使用 automake 等的源代码分发。我只想将二进制文件放在那里。

【问题讨论】:

    标签: c# deployment ubuntu mono gtk#


    【解决方案1】:

    我刚刚完成了为 debian 打包我的 GTK# 单声道应用程序(宽边距)的过程。

    这是我的控制文件:

    Source: widemargin
    Section: gnome
    Priority: extra
    Maintainer: Debian CLI Applications Team <pkg-cli-apps-team@lists.alioth.debian.org>
    Uploaders: Daniel Hughes <trampster@gmail.com>
    Build-Depends: debhelper (>= 7.0.50~), cli-common-dev (>= 0.7.1), mono-xbuild (>= 2.6.7), libgtk2.0-cil-dev (>= 2.12.10), mono-devel (>= 2.6.7), libglade2.0-cil-dev (>= 2.12.10)
    Standards-Version: 3.9.2
    Homepage: https://bitbucket.org/trampster/widemargin
    Vcs-Git: git://git.debian.org/git/pkg-cli-apps/packages/widemargin.git
    Vcs-Browser: http://git.debian.org/?p=pkg-cli-apps/packages/widemargin.git
    
    Package: widemargin
    Architecture: all
    Depends: ${cli:Depends}, ${misc:Depends}
    Description: bible reading and study application
     Wide Margin is a bible reading and study application. It has a focus on
     speed and simplicity. Features include, as you type searching and passage
     navigation, familiar browser based interface, full navigation history and 
     a built in reading planner which will have you read the old testament 
     once and the new testament twice every year.
    

    这里要注意的重要一点是,如果您在 Depends 部分中使用 ${cli:Depends}, ${misc:Depends},则依赖项将自动为您整理好。 但是,您必须手动设置 Build-Depends。

    第二个技巧是进入 #debian-cli irc 频道,它包含所有用于 debain 的单声道打包程序。他们非常乐于助人,并会在准备好后为您赞助。

    【讨论】:

    • 感谢您的信息。为什么将 xbuild 包含在 Build-Depends 中?这个包是否包含源代码? ${cli:Depends}, ${misc:Depends} 技巧是否也适用于预编译的二进制文件?
    • Xbuild 是 mono 的 msbuild 版本。这是我用来构建我的二进制文件的东西。是的,我的包是从源代码构建的(如果你想在 debain 中使用它,它必须是这样的)。我不知道你最后一个问题的答案,我会跳到@debian-cli irc 频道并在那里提问。
    • 好的,正如我提到的,我想打包二进制文件。它不打算成为 Debian 存储库的软件包,我将自己分发。但是感谢您的提示,我会在那里询问,也许我可以回报一个人情。
    【解决方案2】:

    看看这个教程:

    https://wiki.ubuntu.com/PackagingGuide/Mono

    我自己还没有尝试过,但到目前为止看起来很简洁。

    【讨论】:

    • 感谢您的回答,但正如我所说,我查看了这些文档。在依赖项上,你链接的那个说:“本指南假设你知道构建包需要哪些单声道库。在这个例子中,你需要 libgtk2.0-cil-dev、libvte0.16-cil-dev、libwebkit- cil-dev 。因此,您将它们添加到控制文件中的 build-depends 行中。”那么我如何知道这些是否也适用于我的应用程序?
    • 如果您的应用程序可以编译,您已经拥有了所需的所有信息。例如。如果您的命令行编译或 monodevelop 解决方案包含gkeyfile-sharp,您可以发出dpkg -S gkeyfile-sharp.dll 来获取运行时包的名称,并发出dpkg -S gkeyfile-sharp.pc 来获取开发包。
    • 我会分发开发包还是运行时包?
    猜你喜欢
    • 1970-01-01
    • 2017-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-11
    相关资源
    最近更新 更多