Skip to content

Commit 713ac65

Browse files
author
Andrew Rabert
authored
Merge pull request #886 from bapt/master
Catchup on FreeBSD Support
2 parents 1b7eb5c + e94ccea commit 713ac65

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

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
@@ -42,6 +42,7 @@ QMap<SystemComponent::PlatformType, QString> g_platformTypeNames = { \
4242
{ SystemComponent::platformTypeWindows, "windows" },
4343
{ SystemComponent::platformTypeLinux, "linux" },
4444
{ SystemComponent::platformTypeOpenELEC, "openelec" },
45+
{ SystemComponent::platformTypeFreeBSD, "freebsd" },
4546
{ SystemComponent::platformTypeUnknown, "unknown" },
4647
};
4748

@@ -79,6 +80,8 @@ SystemComponent::SystemComponent(QObject* parent) : ComponentBase(parent), m_pla
7980
m_platformType = platformTypeOpenELEC;
8081
#elif defined(Q_OS_LINUX)
8182
m_platformType = platformTypeLinux;
83+
#elif defined(Q_OS_FREEBSD)
84+
m_platformType = platformTypeFreeBSD;
8285
#endif
8386

8487
// define target type

src/system/SystemComponent.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class SystemComponent : public ComponentBase
2626
Q_PROPERTY(bool isMacos READ platformIsMac CONSTANT)
2727
Q_PROPERTY(bool isWindows READ platformIsWindows CONSTANT)
2828
Q_PROPERTY(bool isLinux READ platformIsLinux CONSTANT)
29+
Q_PROPERTY(bool isFreeBSD READ platformIsFreeBSD CONSTANT)
2930
Q_PROPERTY(qreal scale MEMBER m_scale CONSTANT)
3031

3132
bool componentExport() override { return true; }
@@ -81,7 +82,8 @@ class SystemComponent : public ComponentBase
8182
platformTypeOsx,
8283
platformTypeWindows,
8384
platformTypeLinux,
84-
platformTypeOpenELEC
85+
platformTypeOpenELEC,
86+
platformTypeFreeBSD
8587
};
8688

8789
// possible values for target types
@@ -124,6 +126,7 @@ private Q_SLOTS:
124126
bool platformIsWindows() const { return m_platformType == platformTypeWindows; }
125127
bool platformIsMac() const { return m_platformType == platformTypeOsx; }
126128
bool platformIsLinux() const { return m_platformType == platformTypeLinux; }
129+
bool platformIsFreeBSD() const { return m_platformType == platformTypeFreeBSD; }
127130

128131
QSslConfiguration getSSLConfiguration();
129132
void setReplyTimeout(QNetworkReply* reply, int ms);

0 commit comments

Comments
 (0)