martinber / noaa-apt

NOAA APT weather satellite image decoder, for Linux, Windows, RPi 2+, OSX and Android+Termux
http://noaa-apt.mbernardi.com.ar
GNU General Public License v3.0
601 stars 55 forks source link

Installer for OSX #53

Closed 90N45-d3v closed 1 year ago

90N45-d3v commented 1 year ago

I wrote a little bash script to automate the installation on MacOS and make it easy for Mac users to use this tool.

In addition I included an instruction for it at the "Compilation" section in docs/development.md

PS: If you want some binaries for MacOS on a regular base to include in your releases, let me know...

martinber commented 1 year ago

Thanks for this. The only thing I wonder is why cargo build --release is ran with sudo, I think its not needed. After that I will merge it.

Also, if you can provide binaries that would be very nice. I'm not actively developing this so the next time will be in months. I wonder about compatibility between OSX releases, between x86 and M1, etc. At least a binary for the last OSX version in the x86 architecture is already useful I think

90N45-d3v commented 1 year ago

Thanks for this. The only thing I wonder is why cargo build --release is ran with sudo, I think its not needed. After that I will merge it.

So I'm not quite familiar with the compilation process, but when I ran cargo build --release the first time, some kind of index matching was done and some dependencies should have been installed (can't quite remember). Without sudo, it was telling me some missing permission stuff...

I was about to show you my output without sudo, but now the second time I compile it, it seems to start compiling right away, not like the first time. Maybe because the dependencies etc. are now already installed on my system?

I think you know the process better than me and if my speculations are false, I (or you) can delete the sudo.

cargo build --release output now (Maybe you see something missing at the beginning?):

   Compiling serde v1.0.147
   Compiling futures-executor v0.3.25
   Compiling tokio v1.21.2
   Compiling chrono v0.4.22
   Compiling byteorder v1.4.3
   Compiling time-core v0.1.0
   Compiling unicode-bidi v0.3.8
   Compiling httpdate v1.0.2
   Compiling ryu v1.0.11
   Compiling idna v0.3.0
   Compiling time-macros v0.2.5
   Compiling encoding_rs v0.8.31
   Compiling num-rational v0.4.1
   Compiling field-offset v0.3.4
   Compiling flume v0.10.14
   Compiling jpeg-decoder v0.2.6
   Compiling miniz_oxide v0.6.2
   Compiling threadpool v1.8.1
   Compiling num_threads v0.1.6
   Compiling atty v0.2.14
   Compiling gtk v0.16.0
   Compiling strength_reduce v0.2.3
   Compiling toml v0.5.9
   Compiling tokio-util v0.7.4
   Compiling tokio-native-tls v0.3.0
   Compiling bit_field v0.10.1
   Compiling h2 v0.3.15
   Compiling lebe v0.5.2
   Compiling color_quant v1.1.0
   Compiling semver v1.0.14
   Compiling system-deps v6.0.3
   Compiling proc-macro-crate v1.2.1
   Compiling half v2.1.0
   Compiling serde_json v1.0.87
   Compiling exr v1.5.2
   Compiling gif v0.11.4
   Compiling serde_urlencoded v0.7.1
   Compiling glib-macros v0.16.0
   Compiling glib-sys v0.16.0
   Compiling gobject-sys v0.16.0
   Compiling gio-sys v0.16.0
   Compiling cairo-sys-rs v0.16.0
   Compiling pango-sys v0.16.0
   Compiling gdk-sys v0.16.0
   Compiling gdk-pixbuf-sys v0.16.0
   Compiling atk-sys v0.16.0
   Compiling gtk-sys v0.16.0
   Compiling hyper v0.14.20
   Compiling glib v0.16.2
   Compiling gtk3-macros v0.16.0
   Compiling transpose v0.2.1
   Compiling time v0.3.16
   Compiling hyper-tls v0.5.0
   Compiling colored v2.0.0
   Compiling tiff v0.7.3
   Compiling url v2.3.1
   Compiling dbase v0.2.3
   Compiling gio v0.16.2
   Compiling cairo-rs v0.16.1
   Compiling atk v0.16.0
   Compiling png v0.17.6
   Compiling primal-check v0.3.3
   Compiling num-complex v0.4.2
   Compiling dirs-sys v0.3.7
   Compiling noaa-apt v1.4.0 (/Users/90N45/noaa-apt)
   Compiling scoped_threadpool v0.1.9
   Compiling mime v0.3.16
   Compiling bytemuck v1.12.1
   Compiling paste v1.0.9
   Compiling ipnet v2.5.0
   Compiling base64 v0.13.1
   Compiling gcd v2.1.0
   Compiling reqwest v0.11.12
   Compiling image v0.24.4
   Compiling rustfft v6.0.1
   Compiling directories v4.0.1
   Compiling shapefile v0.3.0
   Compiling simple_logger v3.0.0
   Compiling satellite v0.1.0 (https://github.com/richinfante/satellite-rs?rev=1f95726#1f957264)
   Compiling approx v0.5.1
   Compiling line_drawing v1.0.0
   Compiling filetime v0.2.18
   Compiling hound v3.5.0
   Compiling lab v0.11.0
   Compiling argparse v0.2.2
   Compiling pango v0.16.0
   Compiling gdk-pixbuf v0.16.0
   Compiling gdk v0.16.0
    Finished release [optimized] target(s) in 2m 54s

If this output seems to be normal on the first compile on a system, we can delete the sudo...

martinber commented 1 year ago

Sorry I'm not following much the reasoning. By the output you sent, looks like it already had downloaded the libraries in ~/.cargo/registry/cache so it started compiling everything from scratch normally

This is my output after cleaning everything (I think):

» cargo build --release
  Downloaded getrandom v0.2.8
  Downloaded lazy_static v1.4.0
  Downloaded openssl-macros v0.1.0
  Downloaded percent-encoding v2.2.0
  Downloaded pin-project v1.0.12
  Downloaded proc-macro-error v1.0.4
  Downloaded smallvec v1.10.0
  Downloaded ryu v1.0.11
  Downloaded either v1.8.0
  Downloaded lock_api v0.4.9
  Downloaded socket2 v0.4.7
  Downloaded spin v0.9.4
  Downloaded toml v0.5.10
  Downloaded time-macros v0.2.6
  Downloaded memoffset v0.7.1
  Downloaded thiserror v1.0.37
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded tinyvec v1.6.0
  Downloaded atty v0.2.14
  Downloaded anyhow v1.0.66
  Downloaded pkg-config v0.3.26
  Downloaded ucd-trie v0.1.5
  Downloaded version_check v0.9.4
  Downloaded approx v0.5.1
  Downloaded miniz_oxide v0.6.2
  Downloaded base64 v0.13.1
  Downloaded unicode-bidi v0.3.8
  Downloaded bytemuck v1.12.3
  Downloaded url v2.3.1
  Downloaded autocfg v1.1.0
  Downloaded mime v0.3.16
  Downloaded byteorder v1.4.3
  Downloaded cfg-if v1.0.0
  Downloaded bytes v1.3.0
  Downloaded num-integer v0.1.45
  Downloaded crc32fast v1.3.2
  Downloaded crossbeam-epoch v0.9.13
  Downloaded crossbeam-deque v0.8.2
  Downloaded crossbeam-channel v0.5.6
  Downloaded native-tls v0.2.11
  Downloaded num_threads v0.1.6
  Downloaded chrono v0.4.23
  Downloaded filetime v0.2.19
  Downloaded dirs-sys v0.3.7
  Downloaded crossbeam-utils v0.8.14
  Downloaded flate2 v1.0.25
  Downloaded pest v2.5.1
  Downloaded once_cell v1.16.0
  Downloaded primal-check v0.3.3
  Downloaded form_urlencoded v1.1.0
  Downloaded num-traits v0.2.15
  Downloaded serde_derive v1.0.150
  Downloaded unicode-ident v1.0.5
  Downloaded system-deps v6.0.3
  Downloaded slab v0.4.7
  Downloaded futures-task v0.3.25
  Downloaded tokio-native-tls v0.3.0
  Downloaded tower-service v0.3.2
  Downloaded strength_reduce v0.2.4
  Downloaded tracing-core v0.1.30
  Downloaded num-complex v0.4.2
  Downloaded openssl-probe v0.1.5
  Downloaded syn v1.0.105
  Downloaded scoped_threadpool v0.1.9
  Downloaded unicode-normalization v0.1.22
  Downloaded transpose v0.2.2
  Downloaded weezl v0.1.7
  Downloaded bit_field v0.10.1
  Downloaded cfg-expr v0.11.0
  Downloaded httparse v1.8.0
  Downloaded fnv v1.0.7
  Downloaded version-compare v0.1.1
  Downloaded openssl-sys v0.9.79
  Downloaded png v0.17.7
  Downloaded futures-core v0.3.25
  Downloaded futures-macro v0.3.25
  Downloaded futures-sink v0.3.25
  Downloaded futures-executor v0.3.25
  Downloaded futures-io v0.3.25
  Downloaded futures-channel v0.3.25
  Downloaded pin-project-lite v0.2.9
  Downloaded pin-utils v0.1.0
  Downloaded tracing v0.1.37
  Downloaded cairo-sys-rs v0.16.3
  Downloaded colored v2.0.0
  Downloaded cairo-rs v0.16.3
  Downloaded color_quant v1.1.0
  Downloaded cc v1.0.77
  Downloaded rayon-core v1.10.1
  Downloaded proc-macro-crate v1.2.1
  Downloaded exr v1.5.2
  Downloaded directories v4.0.1
  Downloaded field-offset v0.3.4
  Downloaded foreign-types v0.3.2
  Downloaded gdk-pixbuf v0.16.4
  Downloaded pin-project-internal v1.0.12
  Downloaded futures-util v0.3.25
  Downloaded rayon v1.6.1
  Downloaded gcd v2.2.0
  Downloaded semver v0.11.0
  Downloaded glib-macros v0.16.3
  Downloaded semver-parser v0.10.2
  Downloaded glib-sys v0.16.3
  Downloaded gio-sys v0.16.3
  Downloaded foreign-types-shared v0.1.1
  Downloaded iana-time-zone v0.1.53
  Downloaded gdk-pixbuf-sys v0.16.3
  Downloaded flume v0.10.14
  Downloaded hound v3.5.0
  Downloaded tokio v1.23.0
  Downloaded reqwest v0.11.13
  Downloaded semver v1.0.14
  Downloaded thiserror-impl v1.0.37
  Downloaded serde_urlencoded v0.7.1
  Downloaded time v0.1.45
  Downloaded try-lock v0.2.3
  Downloaded bitflags v1.3.2
  Downloaded want v0.3.0
  Downloaded hyper-tls v0.5.0
  Downloaded httpdate v1.0.2
  Downloaded indexmap v1.9.2
  Downloaded ipnet v2.7.0
  Downloaded memoffset v0.6.5
  Downloaded log v0.4.17
  Downloaded itoa v1.0.4
  Downloaded http-body v0.4.5
  Downloaded memchr v2.5.0
  Downloaded proc-macro2 v1.0.47
  Downloaded tinyvec_macros v0.1.0
  Downloaded time v0.3.17
  Downloaded num_cpus v1.14.0
  Downloaded time-core v0.1.0
  Downloaded pango v0.16.5
  Downloaded heck v0.4.0
  Downloaded adler v1.0.2
  Downloaded scopeguard v1.1.0
  Downloaded quote v1.0.21
  Downloaded hashbrown v0.12.3
  Downloaded mio v0.8.5
  Downloaded gif v0.11.4
  Downloaded openssl v0.10.44
  Downloaded encoding_rs v0.8.31
  Downloaded num-rational v0.4.1
  Downloaded nanorand v0.7.0
  Downloaded rustc_version v0.3.3
  Downloaded lebe v0.5.2
  Downloaded tokio-util v0.7.4
  Downloaded http v0.2.8
  Downloaded hyper v0.14.23
  Downloaded h2 v0.3.15
  Downloaded threadpool v1.8.1
  Downloaded idna v0.3.0
  Downloaded serde_json v1.0.89
  Downloaded half v2.1.0
  Downloaded serde v1.0.150
  Downloaded image v0.24.5
  Downloaded libc v0.2.138
  Downloaded jpeg-decoder v0.3.0
  Downloaded tiff v0.8.1
  Downloaded argparse v0.2.2
  Downloaded line_drawing v1.0.0
  Downloaded lab v0.11.0
  Downloaded gtk3-macros v0.16.0
  Downloaded simple_logger v3.0.0
  Downloaded atk v0.16.0
  Downloaded shapefile v0.3.0
  Downloaded dbase v0.2.3
  Downloaded atk-sys v0.16.0
  Downloaded gobject-sys v0.16.3
  Downloaded pango-sys v0.16.3
  Downloaded gdk-sys v0.16.0
  Downloaded gdk v0.16.2
  Downloaded rustfft v6.1.0
  Downloaded glib v0.16.6
  Downloaded gtk-sys v0.16.0
  Downloaded gio v0.16.6
  Downloaded gtk v0.16.2
  Downloaded 177 crates (14.0 MB) in 2.83s (largest was `tiff` at 1.4 MB)
   Compiling proc-macro2 v1.0.47
   Compiling unicode-ident v1.0.5
   Compiling quote v1.0.21
   Compiling syn v1.0.105
   Compiling autocfg v1.1.0
   Compiling libc v0.2.138
   Compiling serde v1.0.150
   Compiling serde_derive v1.0.150
   Compiling pkg-config v0.3.26
   Compiling heck v0.4.0
   Compiling smallvec v1.10.0
   Compiling version-compare v0.1.1
   Compiling cfg-if v1.0.0
   Compiling thiserror v1.0.37
   Compiling futures-core v0.3.25
   Compiling pin-project-lite v0.2.9
   Compiling cfg-expr v0.11.0
   Compiling version_check v0.9.4
   Compiling memchr v2.5.0
   Compiling once_cell v1.16.0
   Compiling slab v0.4.7
   Compiling futures-task v0.3.25
   Compiling num-traits v0.2.15
   Compiling bitflags v1.3.2
   Compiling futures-util v0.3.25
   Compiling num_cpus v1.14.0
   Compiling futures-io v0.3.25
   Compiling pin-utils v0.1.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling futures-channel v0.3.25
   Compiling log v0.4.17
   Compiling proc-macro-error v1.0.4
   Compiling anyhow v1.0.66
   Compiling num-integer v0.1.45
   Compiling scopeguard v1.1.0
   Compiling itoa v1.0.4
   Compiling cc v1.0.77
   Compiling crossbeam-utils v0.8.14
   Compiling memoffset v0.7.1
   Compiling bytes v1.3.0
   Compiling tokio v1.23.0
   Compiling crossbeam-epoch v0.9.13
   Compiling futures-sink v0.3.25
   Compiling ucd-trie v0.1.5
   Compiling mio v0.8.5
   Compiling socket2 v0.4.7
   Compiling tracing-core v0.1.30
   Compiling lock_api v0.4.9
   Compiling openssl-sys v0.9.79
   Compiling indexmap v1.9.2
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.44
   Compiling adler v1.0.2
   Compiling fnv v1.0.7
   Compiling crc32fast v1.3.2
   Compiling gio v0.16.6
   Compiling rayon-core v1.10.1
   Compiling http v0.2.8
   Compiling miniz_oxide v0.6.2
   Compiling foreign-types v0.3.2
   Compiling tracing v0.1.37
   Compiling crossbeam-deque v0.8.2
   Compiling crossbeam-channel v0.5.6
   Compiling tinyvec_macros v0.1.0
   Compiling native-tls v0.2.11
   Compiling hashbrown v0.12.3
   Compiling httparse v1.8.0
   Compiling tinyvec v1.6.0
   Compiling getrandom v0.2.8
   Compiling time v0.1.45
   Compiling memoffset v0.6.5
   Compiling iana-time-zone v0.1.53
   Compiling openssl-probe v0.1.5
   Compiling tokio-util v0.7.4
   Compiling either v1.8.0
   Compiling percent-encoding v2.2.0
   Compiling try-lock v0.2.3
   Compiling thiserror-impl v1.0.37
   Compiling futures-macro v0.3.25
   Compiling openssl-macros v0.1.0
   Compiling pin-project-internal v1.0.12
   Compiling want v0.3.0
   Compiling form_urlencoded v1.1.0
   Compiling rayon v1.6.1
   Compiling chrono v0.4.23
   Compiling pest v2.5.1
   Compiling pin-project v1.0.12
   Compiling unicode-normalization v0.1.22
   Compiling semver-parser v0.10.2
   Compiling nanorand v0.7.0
   Compiling flate2 v1.0.25
   Compiling futures-executor v0.3.25
   Compiling semver v0.11.0
   Compiling rustc_version v0.3.3
   Compiling h2 v0.3.15
   Compiling field-offset v0.3.4
   Compiling spin v0.9.4
   Compiling http-body v0.4.5
   Compiling num-rational v0.4.1
   Compiling weezl v0.1.7
   Compiling time-core v0.1.0
   Compiling unicode-bidi v0.3.8
   Compiling ryu v1.0.11
   Compiling encoding_rs v0.8.31
   Compiling tower-service v0.3.2
   Compiling byteorder v1.4.3
   Compiling httpdate v1.0.2
   Compiling hyper v0.14.23
   Compiling idna v0.3.0
   Compiling time-macros v0.2.6
   Compiling toml v0.5.10
   Compiling flume v0.10.14
   Compiling tokio-native-tls v0.3.0
   Compiling jpeg-decoder v0.3.0
   Compiling threadpool v1.8.1
   Compiling rustfft v6.1.0
   Compiling system-deps v6.0.3
   Compiling proc-macro-crate v1.2.1
   Compiling atty v0.2.14
   Compiling gtk v0.16.2
   Compiling bit_field v0.10.1
   Compiling num_threads v0.1.6
   Compiling glib-sys v0.16.3
   Compiling gobject-sys v0.16.3
   Compiling gio-sys v0.16.3
   Compiling glib-macros v0.16.3
   Compiling pango-sys v0.16.3
   Compiling gdk-sys v0.16.0
   Compiling atk-sys v0.16.0
   Compiling cairo-sys-rs v0.16.3
   Compiling gdk-pixbuf-sys v0.16.3
   Compiling gtk-sys v0.16.0
   Compiling color_quant v1.1.0
   Compiling lazy_static v1.4.0
   Compiling half v2.1.0
   Compiling semver v1.0.14
   Compiling strength_reduce v0.2.4
   Compiling lebe v0.5.2
   Compiling serde_json v1.0.89
   Compiling exr v1.5.2
   Compiling transpose v0.2.2
   Compiling glib v0.16.6
   Compiling time v0.3.17
   Compiling colored v2.0.0
   Compiling gif v0.11.4
   Compiling gtk3-macros v0.16.0
   Compiling hyper-tls v0.5.0
   Compiling tiff v0.8.1
   Compiling serde_urlencoded v0.7.1
   Compiling url v2.3.1
   Compiling dbase v0.2.3
   Compiling png v0.17.7
   Compiling primal-check v0.3.3
   Compiling num-complex v0.4.2
   Compiling dirs-sys v0.3.7
   Compiling mime v0.3.16
   Compiling base64 v0.13.1
   Compiling bytemuck v1.12.3
   Compiling cairo-rs v0.16.3
   Compiling atk v0.16.0
   Compiling scoped_threadpool v0.1.9
   Compiling noaa-apt v1.4.0 (/media/mbernardi/datos/documents/repos/rust/noaa-apt)
   Compiling ipnet v2.7.0
   Compiling image v0.24.5
   Compiling reqwest v0.11.13
   Compiling directories v4.0.1
   Compiling shapefile v0.3.0
   Compiling simple_logger v3.0.0
   Compiling satellite v0.1.0 (https://github.com/richinfante/satellite-rs?rev=1f95726#1f957264)
   Compiling line_drawing v1.0.0
   Compiling approx v0.5.1
   Compiling filetime v0.2.19
   Compiling hound v3.5.0
   Compiling gcd v2.2.0
   Compiling lab v0.11.0
   Compiling argparse v0.2.2
   Compiling pango v0.16.5
   Compiling gdk-pixbuf v0.16.4
   Compiling gdk v0.16.2
warning: use of deprecated associated function `chrono::TimeZone::ymd_opt`: use `with_ymd_and_hms()` instead
   --> src/gui/work.rs:407:14
    |
407 |             .ymd_opt(year as i32, month + 1, day)
    |              ^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `chrono::TimeZone::ymd_opt`: use `with_ymd_and_hms()` instead
   --> src/gui/work.rs:644:14
    |
644 |             .ymd_opt(year as i32, month + 1, day)
    |              ^^^^^^^

warning: use of deprecated associated function `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead
   --> src/gui/work.rs:688:38
    |
688 |         let datetime = chrono::Local.timestamp(timestamp, 0); // 0 milliseconds
    |                                      ^^^^^^^^^

warning: use of deprecated associated function `chrono::TimeZone::ymd_opt`: use `with_ymd_and_hms()` instead
   --> src/misc.rs:343:10
    |
343 |         .ymd_opt(year, month, day)
    |          ^^^^^^^

warning: use of deprecated associated function `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead
   --> src/misc.rs:361:30
    |
361 |             RefTime::End(Utc.timestamp(read_timestamp(path)?, 0)),
    |                              ^^^^^^^^^

warning: use of deprecated associated function `chrono::FixedOffset::east`: use `east_opt()` instead
   --> src/misc.rs:366:73
    |
366 |         let timezone: FixedOffset = TimeZone::from_offset(&FixedOffset::east(offset_seconds));
    |                                                                         ^^^^

warning: use of deprecated associated function `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead
   --> src/misc.rs:378:30
    |
378 |             RefTime::End(Utc.timestamp(read_timestamp(path)?, 0)),
    |                              ^^^^^^^^^

warning: use of deprecated associated function `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead
   --> src/misc.rs:441:45
    |
441 |                 let file_date = chrono::Utc.timestamp(ts, 0); // 0 milliseconds
    |                                             ^^^^^^^^^

warning: `noaa-apt` (bin "noaa-apt") generated 8 warnings
    Finished release [optimized] target(s) in 3m 00s

Ignore the warnings, I updated the dependencies and looks like I have work to do

I will remove the sudo and merge this, I'm quite sure its not necessary. Thanks again!

90N45-d3v commented 1 year ago

Sounds good! Now that you have something to do anyway thanks to the dependencies, feel free to write me as soon as you want me to compile binaries(x86 architecture) for the next version. Mail: 90n45.d3v@gmail.com