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

How to create a homebrew formula for a Mono based application?

我正在尝试为单声道控制台应用程序创建一个自制程序

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

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

任何人都可以向我解释如何为单声道应用程序创建合适的自制程序吗?

由于您的公式依赖于 Mono,因此您需要 define the formula dependency 这样:

depends_on "mono"