burtonageo/cargo-bundle

Unable to open .app on another mac

hacknus opened this issue · 1 comments

I use cargo bundle on my iMac running macOS 10.14.6 with the following configuration:

[package.metadata.bundle]
name = "Serial Monitor"
identifier = "com.hacknus.serial_monitor"
icon = ["./icons/icon-128.png", "./icons/icon-128@2x.png"]
version = "0.1.1"
copyright = "Copyright (c) hacknus 2023. All rights reserved."
category = "Developer Tool"
short_description = "Serial Monitor and Plotter written in rust."
license = "GPL-3.0"
osx_minimum_system_version = "10.8"
osx_url_schemes = ["com.hacknus.serial_monitor"]

and with build.rs:

fn main() {
    println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.8");
}

This works and I can open it with no problem.
I am however unable to open it on a mac mini running macOS 12.6.2.

Any idea what I'm missing?
image

When using otool -l on the binary I get:

Load command 9
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.8
      sdk 10.14

The issue was that I did not zip the application when moving it from one computer to the other, which broke all the permissions. I had to use chmod +x on the executable to make it work. zip-ing is the way to go.