如何为基于Mono的应用程序创建自制程序公式?

时间:2015-12-05 03:49:07

标签: c# ruby mono homebrew

我正在尝试为mono console applicatoin

创建自制公式

这是我到目前为止的公式:

class Fchan < Formula
  desc "4chan image downloader"
  homepage "https://github.com/gabrielgio/FChan.Downloader"
  url "https://github.com/gabrielgio/FChan.Downloader/releases/download/v0.1.2/fchan0.1.2.tar.gz"
  version "0.1.2"
  sha256 "00f46139b6ba50dbbf178b123ab8f54e225e645eb9aebbb5d22031f8ef3cba3e"

  def install
    system "xbuild", "/p:Configuration=Release", "./FChan.sln"
    system "cd", "./FChan.Downloader/bin/Release/"
    system "mkbundle", "-o", "fchand", "FChan.Downloader.exe", "Newtonsoft.Json.dll", "FChan.Library.dll", "--deps"
  end

  test do
    system "false"
  end
end

但每次我brew install fchan我都会收到错误:

==> Downloading https://github.com/gabrielgio/FChan.Downloader/releases/download/v0.1.2/fchan0.1.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/fchan-0.1.2.tar.gz
==> Verifying fchan-0.1.2.tar.gz checksum
tar xf /Library/Caches/Homebrew/fchan-0.1.2.tar.gz
==> xbuild /p:Configuration=Release ./FChan.sln
Failed to execute: xbuild

有人可以向我解释如何为单声道应用程序创建一个合适的自制软件公式吗?

1 个答案:

答案 0 :(得分:1)

由于您的公式取决于Mono,因此您需要define the formula dependency

depends_on "mono"