class Makensis < Formula desc "System to create Windows installers" homepage "https://nsis.sourceforge.io/" url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.03/nsis-3.03-src.tar.bz2" sha256 "abae7f4488bc6de7a4dd760d5f0e7cd3aad7747d4d7cd85786697c8991695eaa" bottle do cellar :any_skip_relocation sha256 "bd5b875da911a5ff1fbdbe1b80ad21e7c2dc5841cd89ba7b9e1d3e412a029bfd" => :mojave sha256 "b656fcbbb32f982ff66c897f8af08b989425f3c375aa96572dde0e00f05cc396" => :high_sierra sha256 "bf01aff6fbcda07ab721b743ca044207face08b9e5f200b764efce8d9adb1c37" => :sierra sha256 "f4516cec938568eb2bea2b162247a10cbd68dedd85c439f5d77170dbc7c5b81b" => :el_capitan end depends_on "mingw-w64" => :build depends_on "scons" => :build resource "nsis" do url "https://downloads.sourceforge.net/project/nsis/NSIS%203/3.03/nsis-3.03.zip" sha256 "b53a79078f2c6abf21f11d9fe68807f35b228393eb17a0cd3873614190116ba7" end def install args = [ "CC=#{ENV.cc}", "CXX=#{ENV.cxx}", "PREFIX_DOC=#{share}/nsis/Docs", "SKIPUTILS=Makensisw,NSIS Menu,zip2exe", # Don't strip, see https://github.com/Homebrew/homebrew/issues/28718 "STRIP=0", "VERSION=#{version}", ] scons "makensis", *args bin.install "build/urelease/makensis/makensis" (share/"nsis").install resource("nsis") end test do system "#{bin}/makensis", "-VERSION" system "#{bin}/makensis", "#{share}/nsis/Examples/bigtest.nsi", "-XOutfile /dev/null" end end