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

Linux/Ubuntu support #39

Closed
elton-okawa opened this issue Oct 20, 2024 · 1 comment
Closed

Linux/Ubuntu support #39

elton-okawa opened this issue Oct 20, 2024 · 1 comment
Assignees

Comments

@elton-okawa
Copy link

elton-okawa commented Oct 20, 2024

First of all, thank you for your amazing work! 🎉

Could you add Linux/Ubuntu support to this library?
I'm having the following errors while building https://github.com/CapSoftware/Cap that depends on this package, it seems that it's trying to load especific macos packages on linux:

@cap/desktop:dev:     Building [=======================> ] 784/805: tauri-nspane@cap/desktop:dev: error[E0463]: can't find crate for `cocoa`
@cap/desktop:dev:   --> /home/me/.cargo/git/checkouts/tauri-nspanel-47b5b83dc190123c/07b1a04/src/lib.rs:15:1
@cap/desktop:dev:    |
@cap/desktop:dev: 15 | pub extern crate cocoa;
@cap/desktop:dev:    | ^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
@cap/desktop:dev: 
@cap/desktop:dev: error[E0463]: can't find crate for `objc`
@cap/desktop:dev:   --> /home/me/.cargo/git/checkouts/tauri-nspanel-47b5b83dc190123c/07b1a04/src/lib.rs:16:1
@cap/desktop:dev:    |
@cap/desktop:dev: 16 | pub extern crate objc;
@cap/desktop:dev:    | ^^^^^^^^^^^^^^^^^^^^^^ can't find crate
@cap/desktop:dev: 
@cap/desktop:dev: error[E0463]: can't find crate for `objc_foundation`
@cap/desktop:dev:   --> /home/me/.cargo/git/checkouts/tauri-nspanel-47b5b83dc190123c/07b1a04/src/lib.rs:17:1
@cap/desktop:dev:    |
@cap/desktop:dev: 17 | pub extern crate objc_foundation;
@cap/desktop:dev:    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
@cap/desktop:dev: 
@cap/desktop:dev: error[E0463]: can't find crate for `objc_id`
@cap/desktop:dev:   --> /home/me/.cargo/git/checkouts/tauri-nspanel-47b5b83dc190123c/07b1a04/src/lib.rs:18:1
@cap/desktop:dev:    |
@cap/desktop:dev: 18 | pub extern crate objc_id;
@cap/desktop:dev:    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
@cap/desktop:dev: 
@cap/desktop:dev:     Building [=======================> ] 784/805: tauri-nspane@cap/desktop:dev: For more information about this error, try `rustc --explain E0463`.
@cap/desktop:dev:     Building [=======================> ] 784/805: tauri-nspane@cap/desktop:dev: error: could not compile `tauri-nspanel` (lib) due to 4 previous errors

Thanks in advance!

@ahkohd
Copy link
Owner

ahkohd commented Oct 23, 2024

Hey @elton-okawa, thanks for reaching out. It's not possible to create a version of this plugin for Linux because it subclasses NSWindow to NSPanel, which are macOS-exclusive APIs.

However, I made an adjustment to Cargo.toml. The block crate was causing build failures on platforms other than macOS, so I moved it into the macOS dependencies list. That was an error on my part. When you update your project's crates (i.e cargo update), the build issue on Linux should be resolved.

See commit: 8763909

@ahkohd ahkohd self-assigned this Oct 23, 2024
@ahkohd ahkohd closed this as completed Oct 29, 2024
@ahkohd ahkohd pinned this issue Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants