Dolphin: fix build, add application icon

This commit is contained in:
Gerasim Troeglazov
2020-12-23 16:59:05 +10:00
parent e4102dca13
commit e2d57f2a19
3 changed files with 268 additions and 43 deletions

View File

@@ -0,0 +1,39 @@
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "Dolphin",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource vector_icon {
$"6E63696606020006023D50E43C5649BD11993E2D554A6A4B478000004979B5FF"
$"27456903263F6002010203392B7539E2B1BBFBAF3B3FD947F72B474CE001FFFF"
$"FFBD6AC1D5E17EFFA2C4D631020006023C20000000000000003B000049E00044"
$"80000080B9F9FF02356D050104016008060CEEEEDE4955533F5050C7E4BC1D4E"
$"2F4027C478B6A535252E2A253A252E25442D48304F2E4E3250354B4641413E4B"
$"44544757465748570604EE3F554A52C0CCC53E51564B5D4757C37CC9C4C17FC7"
$"FA0606CE0E362A3D23BC9EB5064420484525C245B476C147B57444283D28BFD7"
$"B5D8BCE6B6A002043A3F3B3F393F3940394039413A4239423B423B403B413B40"
$"0605EE032A4526342140B879B39144273434BD3DB7F0B95EBD1A2E432F3FB845"
$"C22A060AEEEE0E3B44403FBF07C046C06CBE7C423B493EC1F8BE9CC449BF304C"
$"404D4A4E46C45BC607495547574857455746544742C3B6C225C188BF2C0605EE"
$"032D493049B8D0C326BA01C38B334B2F4EB942C59CB8C6C5202E4BB8BAC495B8"
$"6EC3B002044030C34530BC3A30304030BC3A30C3454050BC3A50C34550504050"
$"C34550BC3A090A050107024090000000000000003ECB2C41000049CF9F0A0403"
$"000102124000000000000000003FE0434300003FFB5901178300040A01010102"
$"4000000000000000003FE0434300003FFB590A00010002400000000000000000"
$"3FE0434300003FFB590A020105024000000000000000003FE0434300003FFB59"
$"0A020104024000000000000000003FE0434300003FFB590A0301020240000000"
$"00000000003FE0434300003FFB590A040103024000000000000000003FE04343"
$"00003FFB590A020106024000000000000000003FE0434300003FFB59"
};

View File

@@ -6,45 +6,63 @@ turbo speed, networked multiplayer, and even more!"
HOMEPAGE="https://dolphin-emu.org/"
COPYRIGHT="2020 Dolphin Emulator Project"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
gitRevision="a34823df61df65168aa40ef5e82e44defd4a0138"
SOURCE_URI="https://github.com/dolphin-emu/dolphin/archive/$gitRevision.tar.gz"
CHECKSUM_SHA256="f2fcdcd26e8156b15adc0bc031fdaae3ff29bee59f46376ad57d7165b3c1f0c9"
SOURCE_DIR="dolphin-$gitRevision"
PATCHES="dolphin-$portVersion.patch"
PATCHES="dolphin-$portVersion.patchset"
ADDITIONAL_FILES="dolphin.rdef.in"
ARCHITECTURES="!x86_gcc2 !x86 ?x86_64"
PROVIDES="
dolphin = $portVersion
dolphin$secondaryArchSuffix = $portVersion
app:Dolphin = $portVersion
"
REQUIRES="
haiku
lib:libQt5Core
lib:libQt5Widgets
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libsdl_1.2$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libQt5Core
devel:libQt5Widgets
devel:libbz2$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:liblzma$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libsdl_1.2$secondaryArchSuffix
devel:libusb_1.0$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc
cmd:ld
cmd:lrelease >= 5
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:ninja
cmd:pkg_config
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake . \
-GNinja \
-DCMAKE_INSTALL_PREFIX=$appsDir/Dolphin/
-DDOLPHIN_WC_DESCRIBE="$portVersion"
-DCMAKE_INSTALL_PREFIX=$appsDir/Dolphin/ \
-DCMAKE_INSTALL_BINDIR=$appsDir/Dolphin/ \
-DDOLPHIN_WC_DESCRIBE="$portVersion" \
-DENABLE_VULKAN=OFF \
-DENABLE_NOGUI=OFF
@@ -54,6 +72,23 @@ BUILD()
INSTALL()
{
ninja install
mv $appsDir/Dolphin/bin/dolphin-emu $appsDir/Dolphin/Dolphin
rm -rf $appsDir/Dolphin/bin
local APP_SIGNATURE="application/x-vnd.dolphin"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/dolphin.rdef.in > dolphin.rdef
addResourcesToBinaries dolphin.rdef $appsDir/Dolphin/Dolphin
addAppDeskbarSymlink $appsDir/Dolphin/Dolphin Dolphin
}

View File

@@ -1,25 +1,11 @@
From 8a4481489dee5a41b35a150938306d05414e6989 Mon Sep 17 00:00:00 2001
From: waddlesplash <waddlesplash@gmail.com>
Date: Sat, 12 Dec 2020 15:25:51 -0500
Subject: [PATCH] Rehabilitate Haiku support.
From 3331af14c50a10c176263607f45b42675d077d58 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 23 Dec 2020 14:30:54 +1000
Subject: applying patch dolphin-5.0.13178.patch
---
CMakeLists.txt | 2 +-
Source/Core/Common/CMakeLists.txt | 7 ++
Source/Core/Common/GL/GLContext.cpp | 7 ++
Source/Core/Common/GL/GLInterface/BGL.cpp | 93 ++++++++++++++++++++
Source/Core/Common/GL/GLInterface/BGL.h | 36 ++++++++
Source/Core/Common/WindowSystemInfo.h | 1 +
Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h | 2 +-
Source/Core/DolphinQt/MainWindow.cpp | 4 +-
Source/Core/VideoCommon/DriverDetails.cpp | 2 +
Source/Core/VideoCommon/DriverDetails.h | 1 +
10 files changed, 152 insertions(+), 3 deletions(-)
create mode 100644 Source/Core/Common/GL/GLInterface/BGL.cpp
create mode 100644 Source/Core/Common/GL/GLInterface/BGL.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b01b90fc548..06851076ce7 100644
index b01b90f..0685107 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ set(DISTRIBUTOR "None" CACHE STRING "Name of the distributor.")
@@ -32,7 +18,7 @@ index b01b90fc548..06851076ce7 100644
endif()
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
index 543c4cf9bb9..7656fd1f589 100644
index 543c4cf..7656fd1 100644
--- a/Source/Core/Common/CMakeLists.txt
+++ b/Source/Core/Common/CMakeLists.txt
@@ -168,6 +168,8 @@ elseif (ANDROID)
@@ -57,7 +43,7 @@ index 543c4cf9bb9..7656fd1f589 100644
target_sources(common PRIVATE
GL/GLX11Window.cpp
diff --git a/Source/Core/Common/GL/GLContext.cpp b/Source/Core/Common/GL/GLContext.cpp
index 2f72204af85..945008538f1 100644
index 2f72204..9450085 100644
--- a/Source/Core/Common/GL/GLContext.cpp
+++ b/Source/Core/Common/GL/GLContext.cpp
@@ -12,6 +12,9 @@
@@ -83,7 +69,7 @@ index 2f72204af85..945008538f1 100644
{
diff --git a/Source/Core/Common/GL/GLInterface/BGL.cpp b/Source/Core/Common/GL/GLInterface/BGL.cpp
new file mode 100644
index 00000000000..118639c2bbe
index 0000000..118639c
--- /dev/null
+++ b/Source/Core/Common/GL/GLInterface/BGL.cpp
@@ -0,0 +1,93 @@
@@ -182,7 +168,7 @@ index 00000000000..118639c2bbe
+}
diff --git a/Source/Core/Common/GL/GLInterface/BGL.h b/Source/Core/Common/GL/GLInterface/BGL.h
new file mode 100644
index 00000000000..54089a324e6
index 0000000..54089a3
--- /dev/null
+++ b/Source/Core/Common/GL/GLInterface/BGL.h
@@ -0,0 +1,36 @@
@@ -223,7 +209,7 @@ index 00000000000..54089a324e6
+ static BGLView* m_current;
+};
diff --git a/Source/Core/Common/WindowSystemInfo.h b/Source/Core/Common/WindowSystemInfo.h
index 244a985cdfe..ff2bebabedd 100644
index 244a985..ff2beba 100644
--- a/Source/Core/Common/WindowSystemInfo.h
+++ b/Source/Core/Common/WindowSystemInfo.h
@@ -13,6 +13,7 @@ enum class WindowSystemType
@@ -235,10 +221,10 @@ index 244a985cdfe..ff2bebabedd 100644
struct WindowSystemInfo
diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h b/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h
index ed79b9a9b17..0075e40aaa9 100644
index ed79b9a..0075e40 100644
--- a/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h
+++ b/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h
@@ -383,7 +383,7 @@ class CEXIETHERNET : public IEXIDevice
@@ -383,7 +383,7 @@ private:
bool m_bba_link_up = false;
bool m_bba_failure_notified = false;
#if defined(WIN32) || defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
@@ -248,7 +234,7 @@ index ed79b9a9b17..0075e40aaa9 100644
sf::IpAddress m_sf_recipient_ip;
char m_in_frame[9004];
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 54deeb47c6c..f4a062a8f55 100644
index 54deeb4..f4a062a 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -152,6 +152,8 @@ static WindowSystemType GetWindowSystemType()
@@ -270,7 +256,7 @@ index 54deeb47c6c..f4a062a8f55 100644
wsi.render_surface = wsi.render_window;
#else
diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp
index 88a482ecf83..990894f8714 100644
index 88a482e..990894f 100644
--- a/Source/Core/VideoCommon/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/DriverDetails.cpp
@@ -35,6 +35,8 @@ constexpr u32 m_os = OS_ALL | OS_LINUX;
@@ -283,7 +269,7 @@ index 88a482ecf83..990894f8714 100644
static API m_api = API_OPENGL;
diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h
index 3e58a5fb586..9707b1b0da0 100644
index 3e58a5f..9707b1b 100644
--- a/Source/Core/VideoCommon/DriverDetails.h
+++ b/Source/Core/VideoCommon/DriverDetails.h
@@ -27,6 +27,7 @@ enum OS
@@ -294,3 +280,168 @@ index 3e58a5fb586..9707b1b0da0 100644
};
// Enum of known vendors
// Tegra and Nvidia are separated out due to such substantial differences
--
2.28.0
From 53a530d2a682954a8a1f7acb3559543664e5a771 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 23 Dec 2020 14:43:33 +1000
Subject: Add haiku platform for SFML
diff --git a/Externals/SFML/include/SFML/Config.hpp b/Externals/SFML/include/SFML/Config.hpp
index aae5f54..4ea7e52 100644
--- a/Externals/SFML/include/SFML/Config.hpp
+++ b/Externals/SFML/include/SFML/Config.hpp
@@ -75,11 +75,11 @@
// Android
#define SFML_SYSTEM_ANDROID
-
+
#elif defined(__linux__)
// Linux
- #define SFML_SYSTEM_LINUX
+ #define SFML_SYSTEM_LINUXs
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -98,6 +98,10 @@
#endif
+#elif defined(__HAIKU__)
+
+ // Haiku
+ #define SFML_SYSTEM_HAIKU
#else
// Unsupported system
--
2.28.0
From 0b15b8d376c77ac793a1547a882b7772b9a7c9b1 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 23 Dec 2020 14:43:58 +1000
Subject: Fix build miniupnpc
diff --git a/Externals/miniupnpc/src/minissdpc.c b/Externals/miniupnpc/src/minissdpc.c
index 235175c..10942cd 100644
--- a/Externals/miniupnpc/src/minissdpc.c
+++ b/Externals/miniupnpc/src/minissdpc.c
@@ -63,7 +63,7 @@ struct sockaddr_un {
#define PRINT_SOCKET_ERROR(x) perror(x)
#endif
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
+#if !defined(__HAIKU__) && !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
#define HAS_IP_MREQN
#endif
diff --git a/Externals/miniupnpc/src/portlistingparse.c b/Externals/miniupnpc/src/portlistingparse.c
index 0e09278..ed6165d 100644
--- a/Externals/miniupnpc/src/portlistingparse.c
+++ b/Externals/miniupnpc/src/portlistingparse.c
@@ -31,7 +31,7 @@ static const struct {
/* Helper function */
static UNSIGNED_INTEGER
-atoui(const char * p, int l)
+atoui2(const char * p, int l)
{
UNSIGNED_INTEGER r = 0;
while(l > 0 && *p)
@@ -107,7 +107,7 @@ data(void * d, const char * data, int l)
pm->remoteHost[l] = '\0';
break;
case NewExternalPort:
- pm->externalPort = (unsigned short)atoui(data, l);
+ pm->externalPort = (unsigned short)atoui2(data, l);
break;
case NewProtocol:
if(l > 3)
@@ -116,21 +116,21 @@ data(void * d, const char * data, int l)
pm->protocol[l] = '\0';
break;
case NewInternalPort:
- pm->internalPort = (unsigned short)atoui(data, l);
+ pm->internalPort = (unsigned short)atoui2(data, l);
break;
case NewInternalClient:
memcpy(pm->internalClient, data, l);
pm->internalClient[l] = '\0';
break;
case NewEnabled:
- pm->enabled = (unsigned char)atoui(data, l);
+ pm->enabled = (unsigned char)atoui2(data, l);
break;
case NewDescription:
memcpy(pm->description, data, l);
pm->description[l] = '\0';
break;
case NewLeaseTime:
- pm->leaseTime = atoui(data, l);
+ pm->leaseTime = atoui2(data, l);
break;
default:
break;
--
2.28.0
From 5b6f2233a91cecbb29b1bfdc560420eec08f1d0c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 23 Dec 2020 15:21:28 +1000
Subject: Fix minizip build
diff --git a/Externals/minizip/ioapi.h b/Externals/minizip/ioapi.h
index efb94a4..4644eaf 100644
--- a/Externals/minizip/ioapi.h
+++ b/Externals/minizip/ioapi.h
@@ -25,7 +25,7 @@
# define ftello64 ftell
# define fseeko64 fseek
#else
-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__APPLE__)
+# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__HAIKU__)
# define fopen64 fopen
# define ftello64 ftello
# define fseeko64 fseeko
--
2.28.0
From 32b68165f536b128979a118dd52ad0e9c9db08e3 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 23 Dec 2020 15:22:09 +1000
Subject: Disable SetLocale for Haiku
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index ec612df..dcd00ec 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -116,6 +116,7 @@ void Shutdown()
void SetLocale(std::string locale_name)
{
+#ifndef __HAIKU__
auto set_locale = [](const std::string& locale) {
#ifdef __linux__
std::string adjusted_locale = locale;
@@ -169,6 +170,7 @@ void SetLocale(std::string locale_name)
// If none of the locales tried above are supported, we just keep using whatever locale is set
// (which is the classic locale by default).
+#endif
}
void CreateDirectories()
--
2.28.0