godot-demo-projects icon indicating copy to clipboard operation
godot-demo-projects copied to clipboard

fix: mic_record script a bit for mac

Open swarnimarun opened this issue 2 years ago • 8 comments

Realised this demo was a bit broken while testing something irrelevant to the changes.

Also using all 3 names as iirc, OSX was what we used in 3.x. Though TBH not sure been a while since I used Godot 3. And I am not sure about the capitalisation part.

swarnimarun avatar Sep 17 '23 11:09 swarnimarun

What is the error you're seeing? Please provide some issue report for the reason behind this change

AThousandShips avatar Sep 17 '23 12:09 AThousandShips

Aah, sorry, somehow thought it was obvious. So if you don't use file:// with shell open on mac you will get -50 perm error, attached an image example below. image

swarnimarun avatar Sep 17 '23 12:09 swarnimarun

That sounds like a bug to me, please open a report here

Also is this restricted only to macOS?

AThousandShips avatar Sep 17 '23 12:09 AThousandShips

@AThousandShips yep this is only specific to MacOS where the resource URI is required for correct call.

And there is already an issue for it, https://github.com/godotengine/godot/issues/52828, there was one even older than this(can't find that atm), I haven't been involved in Godot engine dev for a couple years so not sure why it hasn't been fixed but it should not be a big change, I could document a fix for engine there but I think the existing comments already make the issue quite clear.

swarnimarun avatar Sep 17 '23 12:09 swarnimarun

Okay! I asked for an issue before and got no answer so that's why I was confused 🙃

However this should probably not be solved here but as suggested in the issue by fixing it locally

I'd say the behaviour of OS should be unform, you shouldn't have to make specific changes like these

AThousandShips avatar Sep 17 '23 12:09 AThousandShips

@bruvzg Can we make it so we don't need to manually prefix file:// on macOS by modifying the engine's OS::shell_open() implementation?

This would prevent the need for this check in the project so the method can work in a cross-platform manner.

Calinou avatar Feb 07 '24 22:02 Calinou

Can we make it so we don't need to manually prefix file:// on macOS by modifying the engine's OS::shell_open() implementation?

This would prevent the need for this check in the project so the method can work in a cross-platform manner.

What's the behavior on other platforms? It file:// is not required on Linux/Windows, I guess we can assume it's a file and auto add it if there's no URI schema in the shell_open argument.

bruvzg avatar Feb 08 '24 18:02 bruvzg

Can we make it so we don't need to manually prefix file:// on macOS by modifying the engine's OS::shell_open() implementation?

https://github.com/godotengine/godot/pull/88126

bruvzg avatar Feb 09 '24 06:02 bruvzg