feat: re-introduced MacOS support (#71)
* preparatory changes to make dvdisaster compilable under MacOS * Implemented workaround to macOS Test Unit Ready bug * fixed manual.pdf not opening on macOS * Added case for binary being in app bundle * updated locale files due to change in closure.c * added back mac app bundle specific files * reverted make-dist.sh to windows/linux only version and created separate mac script which uses dylibbundler * altered release.yml accordingly * chore: fix build under MacOS --------- Co-authored-by: Stéphane Lesimple <speed47_github@speed47.net> Co-authored-by: jlnbxn <julianboxan@gmail.com> Co-authored-by: wojas <github@m.wojas.nl>
This commit is contained in:
committed by
GitHub
parent
f38969c7c8
commit
eeb9f0705d
@@ -30,7 +30,7 @@
|
||||
#include "shellapi.h"
|
||||
#endif
|
||||
|
||||
#ifndef SYS_MINGW
|
||||
#if !defined(SYS_MINGW) && !defined(SYS_DARWIN)
|
||||
static void send_errormsg(int fd, char *format, ...)
|
||||
{ va_list argp;
|
||||
char *msg;
|
||||
@@ -63,7 +63,7 @@ void GuiShowURL(char *target)
|
||||
int hyperlink = 0;
|
||||
char *path;
|
||||
|
||||
#ifndef SYS_MINGW
|
||||
#if !defined(SYS_MINGW) && !defined(SYS_DARWIN)
|
||||
pid_t pid;
|
||||
char *msg;
|
||||
int err_pipe[2]; /* child may send down err msgs to us here */
|
||||
@@ -105,15 +105,29 @@ void GuiShowURL(char *target)
|
||||
/* Okay, Billy wins big time here ;-) */
|
||||
|
||||
ShellExecute(NULL, "open", path, NULL, NULL, SW_SHOWNORMAL);
|
||||
#elif defined(SYS_DARWIN)
|
||||
char command[256];
|
||||
snprintf(command, sizeof(command), "open \"%s\"", path);
|
||||
system(command);
|
||||
#else
|
||||
|
||||
/* fork xdg-open */
|
||||
|
||||
result = pipe2(err_pipe, O_CLOEXEC);
|
||||
result = pipe(err_pipe);
|
||||
if(result == -1)
|
||||
{ GuiCreateMessage(_("Could not create pipe before fork"), GTK_MESSAGE_ERROR);
|
||||
return;
|
||||
}
|
||||
result = fcntl(err_pipe[0], F_SETFL, O_CLOEXEC);
|
||||
if(result == -1)
|
||||
{ GuiCreateMessage(_("Could not set pipe flags before fork"), GTK_MESSAGE_ERROR);
|
||||
return;
|
||||
}
|
||||
result = fcntl(err_pipe[1], F_SETFL, O_CLOEXEC);
|
||||
if(result == -1)
|
||||
{ GuiCreateMessage(_("Could not set pipe flags before fork"), GTK_MESSAGE_ERROR);
|
||||
return;
|
||||
}
|
||||
pid = fork();
|
||||
|
||||
if(pid == -1)
|
||||
|
||||
Reference in New Issue
Block a user