Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit e9503c9

Browse files
committed
Catchup on FreeBSD Support
1 parent 68ddf01 commit e9503c9

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void ShowLicenseInfo()
8383
QStringList g_qtFlags = {
8484
"--disable-web-security",
8585
"--enable-gpu-rasterization",
86-
#ifdef Q_OS_LINUX
86+
#if defined(Q_OS_LINUX) || defined(Q_OS_FreeBSD)
8787
"--disable-gpu"
8888
#endif
8989
};

src/player/CodecsComponent.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ static QString getEAEBuildType()
116116
return "linux-raspi2-arm7";
117117
#elif defined(Q_OS_LINUX)
118118
return sizeof(void *) > 4 ? "linux-ubuntu-x86_64" : "linux-ubuntu-i686";
119+
#elif defined(Q_OS_FREEBSD)
120+
return sizeof(void *) > 4 ? "FreeBSD-amd64" : "FreeBSD-i386";
119121
#else
120122
return "unknown";
121123
#endif

src/system/SystemComponent.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ QMap<SystemComponent::PlatformType, QString> g_platformTypeNames = { \
3333
{ SystemComponent::platformTypeWindows, "windows" },
3434
{ SystemComponent::platformTypeLinux, "linux" },
3535
{ SystemComponent::platformTypeOpenELEC, "openelec" },
36+
{ SystemComponent::platformTypeFreeBSD, "freebsd" },
3637
{ SystemComponent::platformTypeUnknown, "unknown" },
3738
};
3839

@@ -61,6 +62,8 @@ SystemComponent::SystemComponent(QObject* parent) : ComponentBase(parent), m_pla
6162
m_platformType = platformTypeOpenELEC;
6263
#elif defined(Q_OS_LINUX)
6364
m_platformType = platformTypeLinux;
65+
#elif defined(Q_OS_FREEBSD)
66+
m_platformType = platformTypeFreeBSD;
6467
#endif
6568

6669
// define target type

src/system/SystemComponent.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class SystemComponent : public ComponentBase
2020
Q_PROPERTY(bool isMacos READ platformIsMac CONSTANT)
2121
Q_PROPERTY(bool isWindows READ platformIsWindows CONSTANT)
2222
Q_PROPERTY(bool isLinux READ platformIsLinux CONSTANT)
23+
Q_PROPERTY(bool isFreeBSD READ platformIsFreeBSD CONSTANT)
2324
Q_PROPERTY(qreal scale MEMBER m_scale CONSTANT)
2425

2526
bool componentExport() override { return true; }
@@ -65,7 +66,8 @@ class SystemComponent : public ComponentBase
6566
platformTypeOsx,
6667
platformTypeWindows,
6768
platformTypeLinux,
68-
platformTypeOpenELEC
69+
platformTypeOpenELEC,
70+
platformTypeFreeBSD
6971
};
7072

7173
// possible values for target types
@@ -108,6 +110,7 @@ private Q_SLOTS:
108110
bool platformIsWindows() const { return m_platformType == platformTypeWindows; }
109111
bool platformIsMac() const { return m_platformType == platformTypeOsx; }
110112
bool platformIsLinux() const { return m_platformType == platformTypeLinux; }
113+
bool platformIsFreeBSD() const { return m_platformType == platformTypeFreeBSD; }
111114

112115
QTimer* m_mouseOutTimer;
113116
PlatformType m_platformType;

0 commit comments

Comments
 (0)