Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malimite 1.1 (new cask) #199628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Casks/m/malimite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cask "malimite" do
version "1.1"
sha256 "a74fd75844aedec13b523da6f8faaf9ec0c2a37027c4e372f74294ea07069528"

url "https://github.com/LaurieWired/Malimite/releases/download/#{version}/Malimite-1-1.zip"
name "Malimite"
desc "Decompiler for Apple applications"
homepage "https://github.com/LaurieWired/Malimite"

depends_on formula: "java"

postflight do
libexec = "#{HOMEBREW_PREFIX}/libexec/malimite"
bin = "#{HOMEBREW_PREFIX}/bin/malimite"

FileUtils.mkdir_p libexec
FileUtils.mv Dir["#{staged_path}/*"], libexec

File.write(bin, <<~EOS)
#!/bin/bash
exec java -jar "#{libexec}/Malimite-1-1.jar" "$@"
EOS
FileUtils.chmod("+x", bin)
end

uninstall delete: [
"#{HOMEBREW_PREFIX}/bin/malimite",
"#{HOMEBREW_PREFIX}/libexec/malimite",
]

zap trash: [
"~/Library/Application Support/Malimite",
"~/Library/Caches/Malimite",
"~/Library/Logs/Malimite",
"~/Library/Preferences/com.lauriewired.malimite.plist",
"~/Library/Saved Application State/com.lauriewired.malimite.savedState",
]

caveats <<~EOS
Ghidra is a recommended dependency for Malimite. You can install it via:
brew install --cask ghidra
EOS
end
Loading