智慧合約開發dapp專案解析(原始碼)

kaifa873發表於2023-02-06

This article is compiled and released by  WeChaT: kaifa873, which is only for reference of project development requirements!  telegram @ sleu88

def install

  #ENV.deparallelize#if your formula fails when building in parallel

  #Remove unrecognized options if warned by configure

  system"./configure","--disable-debug",

  "--disable-dependency-tracking",

  "--disable-silent-rules",

  "--prefix=#{prefix}"

  #system"cmake",".",*std_cmake_args

  system"make","install"#if this fails,try separate make/make install steps

  end

  system後面是需要執行的安裝命令,這個根據實際軟體編譯過程進行修改。

  因為bytom是已經編譯好的二進位制軟體包,所以實際的檔案進行修改如下:

  class Bytom<Formula

  desc"Official Go implementation of the Bytom protocol"

  homepage"

  url"

  version"1.0.7"

  sha256"25dd62343157fe6eb7a983edb1455f457cfca07552f02e1f9142227bd961a4a5"

  def install

  system'mv bytomd-darwin_amd64 bytomd'

  system'mv bytomcli-darwin_amd64 bytomcli'

  bin.install"bytomd"

  bin.install"bytomcli"

  end

  test do

  #test dowill create,run in and delete a temporary directory.

  #

  #This test will fail and we won't accept that!For Homebrew/homebrew-core

  #this will need to be a test that verifies the functionality of the

  #software.Run the test withbrew test bytom.Options passed

  #tobrew installsuch as--HEADalso need to be provided tobrew test.

  #

  #The installed folder is not in the path,so use the entire path to any

  #executables being tested:system"#{bin}/program","do","something".

  system"false"

  end

  end


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69988445/viewspace-2934071/,如需轉載,請註明出處,否則將追究法律責任。

相關文章