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

"Edit with default SGV editor" is broken on macOS #23

Open
Dashcom opened this issue Mar 16, 2023 · 1 comment
Open

"Edit with default SGV editor" is broken on macOS #23

Dashcom opened this issue Mar 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working macOS

Comments

@Dashcom
Copy link

Dashcom commented Mar 16, 2023

When attempting to launch a third party program to edit svg files on macOS, the argument containing the path of the file is malformed.

It does not contain a leading "/" and contains quotes, so instead of being "/path.svg" it is ""path.svg"" which leads nowhere.

I did a (very) ugly fix to get it to open affinity on my machine, maybe it can help you pinpoint the problem.
The "SVG editor executables" field points to a shell script containing this :

#!/bin/bash
open "/"`echo $1 | sed s/\"//g`

I hope that I was clear enough it's been a while since my last bug report 😅

BTW your soft is absolutely awesome <3

@Nebukam Nebukam self-assigned this Mar 26, 2023
@Nebukam
Copy link
Owner

Nebukam commented Mar 26, 2023

Hey @Dashcom !
First of all, thank you so much for taking the time to log this issue, I wasn't aware of it (obviously) and never got to do thorough testing on MacOS as I only had access to Apple hardware for a short while -- I'm glad you have a workaround because...

...since I don't own MacOS hardware, I won't be able to fix this anytime soon on my own ^^'

The issue is not with MKFont itself, but with the underlying app framework (which I also happen to maintain so that's good).
Looking at this file the last line reads:
spawn(p_editorPath, ['"${p_targetPath}"'], opts);
which clearly add literal quotes to the argument.

Additionally, the path is joined using a windows separator on all platforms, instead of using per-platform sep (Electron, the wrapper on which MKFont is built, does provide it).
I also simply didn't knew paths were supposed to have a leading / on macOS

Bottom line, I'll need to update the framework first, then make sure it solve the issue the app, and then find a way to compile on macOS so I can push a fixed release -- it's not a big task, but the logistic is the issue for me in the short term (can't build electron for macOS on Windows).

@Nebukam Nebukam added bug Something isn't working macOS labels Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS
Projects
None yet
Development

No branches or pull requests

2 participants