Skip to content

Commit 79f95ea

Browse files
committed
Runs and displays alert message.
1 parent c935ffd commit 79f95ea

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

buildandrun.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ if [ $retval -ne 0 ]; then
99
echo "ninja FAILED with error code $retval"
1010
exit $retval
1111
fi
12+
open -W --stdout $(tty) --stderr $(tty) "./Debug/PHP Desktop.app"
13+
#./Debug/PHP\ Desktop.app/Contents/MacOS/PHP\ Desktop

main.mm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "include/base/cef_logging.h"
1414
#include "include/wrapper/cef_helpers.h"
15+
#import "include/wrapper/cef_library_loader.h"
1516

1617
#include <cstdlib>
1718
#include <iostream>
@@ -56,6 +57,13 @@ void create_browser()
5657
}
5758

5859
int main(int argc, char **argv) {
60+
// Load the CEF framework library at runtime instead of linking directly
61+
// as required by the macOS sandbox implementation.
62+
CefScopedLibraryLoader library_loader;
63+
if (!library_loader.LoadInMain()) {
64+
return 1;
65+
}
66+
5967
// Passing ENV variables to PHP using the --cgi-environment
6068
// command line arg passed to app.
6169
if (argv) {
@@ -72,11 +80,6 @@ int main(int argc, char **argv) {
7280
}
7381
}
7482

75-
// Create a copy of |argv| on Linux because Chromium mangles the value
76-
// internally (see CEF issue #620).
77-
CefScopedArgArray scoped_arg_array(argc, argv);
78-
char** argv_copy = scoped_arg_array.array();
79-
8083
// Provide CEF with command-line arguments.
8184
CefMainArgs main_args(argc, argv);
8285
CefRefPtr<CefCommandLine> cmdline = CefCommandLine::CreateCommandLine();

0 commit comments

Comments
 (0)