-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
/
mplab-xc32.rb
62 lines (55 loc) 路 2.11 KB
/
mplab-xc32.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cask "mplab-xc32" do
# NOTE: "32" is not a version number, but an intrinsic part of the product name
version "4.40"
sha256 "4463c2c7e191121dfbb103f40dc9ddbe1ef930fecd1d1bc12a574600e8ee4264"
url "https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/xc32-v#{version}-full-install-osx-installer.dmg"
name "MPLab XC32 Compiler"
desc "Compiler for 32-bit PIC and SAM MCUs and MPUs"
homepage "https://www.microchip.com/mplab/compilers"
livecheck do
url "https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers/xc32"
regex(%r{href=.*?SoftwareTools/xc32[._-]v?(\d+(?:\.\d+)+)[._-]full[._-]install[._-]osx[._-]installer\.dmg}i)
end
depends_on arch: :x86_64
installer script: {
executable: "xc32-v#{version}-osx-installer.app/Contents/MacOS/installbuilder.sh",
args: [
"--mode", "unattended",
"--unattendedmodeui", "none",
"--ModifyAll", "0",
"--netservername", '""',
"--LicenseType", "FreeMode",
"--prefix", staged_path.to_s
],
input: ["y"],
sudo: true,
}
binary "#{staged_path}/bin/xc32-addr2line"
binary "#{staged_path}/bin/xc32-ar"
binary "#{staged_path}/bin/xc32-as"
binary "#{staged_path}/bin/xc32-bin2hex"
binary "#{staged_path}/bin/xc32-c++"
binary "#{staged_path}/bin/xc32-c++filt"
binary "#{staged_path}/bin/xc32-cpp"
binary "#{staged_path}/bin/xc32-elfedit"
binary "#{staged_path}/bin/xc32-g++"
binary "#{staged_path}/bin/xc32-gcc"
binary "#{staged_path}/bin/xc32-ld"
binary "#{staged_path}/bin/xc32-nm"
binary "#{staged_path}/bin/xc32-objcopy"
binary "#{staged_path}/bin/xc32-objdump"
binary "#{staged_path}/bin/xc32-ranlib"
binary "#{staged_path}/bin/xc32-readelf"
binary "#{staged_path}/bin/xc32-size"
binary "#{staged_path}/bin/xc32-strings"
binary "#{staged_path}/bin/xc32-strip"
postflight do
set_ownership staged_path.to_s
end
uninstall script: {
executable: "Uninstall-xc32-v#{version}.app/Contents/MacOS/installbuilder.sh",
args: ["--mode", "unattended"],
sudo: true,
}
# No zap stanza required
end