mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 12:17:36 +00:00
Ports: Add The Powder Toy port
This commit is contained in:
parent
adcd39d928
commit
0865a06ef5
5 changed files with 89 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
From e02111d802947f23b9424c4e50a76c55288b6fd6 Mon Sep 17 00:00:00 2001
|
||||
From: circl <circl.lastname@gmail.com>
|
||||
Date: Sun, 20 Mar 2022 17:13:21 +0100
|
||||
Subject: [PATCH 1/2] malloc.h doesn't exist on Serenity, but the code only
|
||||
checks for macOS and BSDs
|
||||
|
||||
---
|
||||
src/Update.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Update.cpp b/src/Update.cpp
|
||||
index 50ef666..5996846 100644
|
||||
--- a/src/Update.cpp
|
||||
+++ b/src/Update.cpp
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef WIN
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
-#if !defined(MACOSX) && !defined(BSD)
|
||||
+#if !defined(MACOSX) && !defined(BSD) && !defined(__serenity__)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <cstring>
|
||||
--
|
||||
2.32.0
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 949ac4d0795be7467f7301f2de0a950767794067 Mon Sep 17 00:00:00 2001
|
||||
From: circl <circl.lastname@gmail.com>
|
||||
Date: Sun, 20 Mar 2022 17:16:16 +0100
|
||||
Subject: [PATCH 2/2] Open links and directories using open(1)
|
||||
|
||||
---
|
||||
src/common/Platform.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/common/Platform.cpp b/src/common/Platform.cpp
|
||||
index d341561..d32615c 100644
|
||||
--- a/src/common/Platform.cpp
|
||||
+++ b/src/common/Platform.cpp
|
||||
@@ -137,7 +137,7 @@ void OpenURI(ByteString uri)
|
||||
{
|
||||
fprintf(stderr, "cannot open URI: ShellExecute(...) failed\n");
|
||||
}
|
||||
-#elif defined(MACOSX)
|
||||
+#elif defined(MACOSX) || defined(__serenity__)
|
||||
if (system(("open \"" + uri + "\"").c_str()))
|
||||
{
|
||||
fprintf(stderr, "cannot open URI: system(...) failed\n");
|
||||
--
|
||||
2.32.0
|
||||
|
12
Ports/powdertoy/patches/ReadMe.md
Normal file
12
Ports/powdertoy/patches/ReadMe.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Patches for powdertoy on SerenityOS
|
||||
|
||||
## `0001-malloc.h-doesn-t-exist-on-Serenity-but-the-code-only.patch`
|
||||
|
||||
malloc.h doesn't exist on Serenity, but the code only checks for macOS and BSDs
|
||||
|
||||
|
||||
## `0002-Open-links-and-directories-using-open-1.patch`
|
||||
|
||||
Open links and directories using open(1)
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue