Skip to content

Platform detection#16

Closed
CodingWonders wants to merge 4 commits into
ChrisTitusTech:mainfrom
CodingWonders:macutil-plat-detect
Closed

Platform detection#16
CodingWonders wants to merge 4 commits into
ChrisTitusTech:mainfrom
CodingWonders:macutil-plat-detect

Conversation

@CodingWonders

@CodingWonders CodingWonders commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix

Description

This PR adds platform detection to avoid running scripts on non-macOS systems:

  • It uses native .NET properties to check if the OS platform is Unix
  • It then checks if osascript exists

It also fixes gitignore if changes were to be made in Visual Studio (something I'll most probably use when making changes to MacUtil).

Testing

Testing has worked correctly on both Windows and macOS. On Linux (WSLg) it would only display the window border.

devenv_iKlm2ZQwrK msrdc_Mbr1ygVcwg

Issues / other PRs related

None

Additional Information

It is recommmended that it be tested on Linux, but it should work fine.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

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

Successfully merging this pull request may close these issues.

2 participants