@@ -7,7 +7,7 @@ const verbose = "--verbose" in ARGS
7
7
const prefix = Prefix (get ([a for a in ARGS if a != " --verbose" ], 1 , joinpath (@__DIR__ , " usr" )))
8
8
9
9
# Instantiate products:
10
- go_pprof = ExecutableProduct (prefix, " pprof" , :go_pprof )
10
+ go_pprof = ExecutableProduct (prefix, Sys . iswindows () ? " pprof.exe " : " pprof" , :go_pprof )
11
11
products = [go_pprof]
12
12
13
13
# Download binaries from hosted location
@@ -27,8 +27,8 @@ download_info = Dict(
27
27
28
28
BinaryProvider. MacOS (:x86_64 ) => (" $bin_prefix /pprof_darwin_amd64.tar.gz" , " 93f5c227af23ade110fedbd07eff0bd57644fec0cde77ad359515bb254c43802" ),
29
29
30
- BinaryProvider. Windows (:i686 ) => (" $bin_prefix /pprof_windows_386.exe. tar.gz" , " 90a343e9ae8888c0f52322761dc028d9c7edf4a202e81aea2989ac182e77010c" ),
31
- BinaryProvider. Windows (:x86_64 ) => (" $bin_prefix /pprof_windows_amd64.exe. tar.gz" , " 21702d1f7317d969a283d094898e92ba3da4961c419c5351d359f3abf0894d43" ),
30
+ BinaryProvider. Windows (:i686 ) => (" $bin_prefix /pprof_windows_386.tar.gz" , " 90a343e9ae8888c0f52322761dc028d9c7edf4a202e81aea2989ac182e77010c" ),
31
+ BinaryProvider. Windows (:x86_64 ) => (" $bin_prefix /pprof_windows_amd64.tar.gz" , " 21702d1f7317d969a283d094898e92ba3da4961c419c5351d359f3abf0894d43" ),
32
32
)
33
33
34
34
# First, check to see if we're all satisfied
@@ -37,11 +37,13 @@ if any(!satisfied(p; verbose=verbose) for p in products)
37
37
# Download and install binaries
38
38
url, tarball_hash = choose_download (download_info)
39
39
install (url, tarball_hash; prefix= prefix, force= true , verbose= true )
40
- # NHDALY MANUALLY ADDED THESE LINES TO HOOK UP THE BINARY
41
- bin = mkpath (joinpath (prefix, " bin" ))
42
- dir = splitext (splitext (basename (url))[1 ])[1 ]
43
- @show dir
44
- cp (joinpath (prefix, dir, " pprof" ), joinpath (bin, " pprof" ))
40
+ # we need to move the unpacked binary from `prefix` to `prefix/bin`
41
+ dir = splitext (splitext (basename (url))[1 ])[1 ]
42
+ destpath = dirname (go_pprof. path)
43
+ binaryname = basename (go_pprof. path)
44
+
45
+ mkpath (destpath)
46
+ cp (joinpath (prefix, dir, binaryname), go_pprof. path)
45
47
catch e
46
48
if typeof (e) <: ArgumentError
47
49
error (" Your platform $(Sys. MACHINE) is not supported by this package!" )
0 commit comments