Skip to content

Commit 01b7bc1

Browse files
author
Samuel Venable
authored
Drop support for Raspberry Pi in favor of Linux on Apple Silicon
1 parent d2fc2b1 commit 01b7bc1

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed

objects/obj_controller/Create_0.gml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ if (os_type != os_windows) {
1313
// Use light theme to match default UI theme of OpenNBS:
1414
EnvironmentSetVariable("IMGUI_DIALOG_THEME", string(1));
1515
EnvironmentSetVariable("IMGUI_DIALOG_NOBORDER", string(1));
16-
17-
function evaluate_command(prog, arg) {
18-
prog = string_replace_all(prog, @'\', @'\\');
19-
prog = string_replace_all(prog, @'"', @'\"');
20-
if (os_type == os_windows &&
21-
(string_lower(filename_name(prog)) == "cmd" ||
22-
string_lower(filename_name(prog)) == "cmd.exe"))
23-
{ prog = "cmd.exe"; arg = "/c " + arg; }
24-
prog = @'"' + prog + @'"'; var pre = "";
25-
if (os_type == os_windows) pre = "cmd /c";
26-
var pid = ProcessExecute(pre + " " + prog + " " + arg);
27-
var out = ExecutedProcessReadFromStandardOutput(pid);
28-
FreeExecutedProcessStandardInput(pid);
29-
FreeExecutedProcessStandardOutput(pid);
30-
return out;
16+
17+
function evaluate_command(prog, arg) {
18+
prog = string_replace_all(prog, @'\', @'\\');
19+
prog = string_replace_all(prog, @'"', @'\"');
20+
if (os_type == os_windows &&
21+
(string_lower(filename_name(prog)) == "cmd" ||
22+
string_lower(filename_name(prog)) == "cmd.exe"))
23+
{ prog = "cmd.exe"; arg = "/c " + arg; }
24+
prog = @'"' + prog + @'"'; var pre = "";
25+
if (os_type == os_windows) pre = "cmd /c";
26+
var pid = ProcessExecute(pre + " " + prog + " " + arg);
27+
var out = ExecutedProcessReadFromStandardOutput(pid);
28+
FreeExecutedProcessStandardInput(pid);
29+
FreeExecutedProcessStandardOutput(pid);
30+
return out;
3131
}
32-
32+
3333
// Start OpenNBS Maximized (macOS):
3434
if (os_type == os_macosx) {
3535
// Maxmize window on startup
@@ -41,16 +41,8 @@ if (os_type == os_linux) {
4141
var pid = 0;
4242
// Maxmize window on startup
4343
if (evaluate_command("uname", "-m") == "x86_64\n") external_call(external_define(current_directory + "libzoom.so", "window_zoom", dll_cdecl, ty_real, 1, ty_string), window_handle());
44-
else if (evaluate_command("uname", "-m") == "aarch64\n") external_call(external_define(current_directory + "libzoom_arm64.so", "window_zoom", dll_cdecl, ty_real, 1, ty_string), window_handle());
45-
else if (evaluate_command("uname", "-m") == "armv7l\n") external_call(external_define(current_directory + "libzoom_arm.so", "window_zoom", dll_cdecl, ty_real, 1, ty_string), window_handle());
46-
if (evaluate_command("uname", "-m") == "aarch64\n" || evaluate_command("uname", "-m") == "armv7l\n") {
47-
// The Raspberry Pi and similar ARM devices can't handle combining tons of font files like we're doing
48-
// on x86 platforms, use English-only; it's better than having no fonts displaying correctly at all...
49-
execute_program("cp", "-fR \"" + current_directory + "/fonts\" \"" + file_directory + "/\"", true);
50-
directory_create(file_directory + "/fonts/arm/");
51-
execute_program("mv", "-f \"" + file_directory + "/fonts/000-notosans-regular.ttf\" \"" + file_directory + "/fonts/arm/000-notosans-regular.ttf\"", true);
52-
EnvironmentSetVariable("IMGUI_FONT_PATH", file_directory + "/fonts/arm/");
53-
}
44+
else if (evaluate_command("uname", "-m") == "aarch64\n") external_call(external_define(current_directory + "libzoom_arm64.so", "window_zoom", dll_cdecl, ty_real, 1, ty_string), window_handle());
45+
else if (evaluate_command("uname", "-m") == "armv7l\n") external_call(external_define(current_directory + "libzoom_arm.so", "window_zoom", dll_cdecl, ty_real, 1, ty_string), window_handle());
5446
// Ignore this pls:
5547
_DialogInitialize();
5648
// Compensate for weird bug I don't know how to fix, with lowercase being forced calling file_copy(); it makes no sense:

0 commit comments

Comments
 (0)