Skip to content

Commit d1d10c8

Browse files
committed
[PR] fix build for Apple MacOS
1 parent 9186720 commit d1d10c8

File tree

16 files changed

+127
-103
lines changed

16 files changed

+127
-103
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if ( "${PLATFORM}" MATCHES "osx" )
102102
FIRSTSUBDIR(SUBDIRQT "/usr/local/Cellar/qt")
103103
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${SUBDIRQT} "/usr/local/opt/qt5" )
104104
include_directories("/opt/X11/include/")
105-
SET ( DEFAULT_USB_HID ON )
105+
SET ( DEFAULT_USB_HID OFF )
106106
elseif ( "${PLATFORM}" MATCHES "rpi" )
107107
SET ( DEFAULT_WS281XPWM ON )
108108

CompileHowto.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ sometimes on RPI you may need the videocore IV headers
1313
sudo apt-get install libraspberrypi-dev
1414
```
1515

16-
## Windows (WIP)
17-
We assume a 64bit Windows 7 or higher. Install the following;
16+
## Windows
17+
We assume a 64bit Windows 10. Install the following;
1818
- [Git](https://git-scm.com/downloads) (Check: Add to PATH)
1919
- [CMake (Windows win64-x64 Installer)](https://cmake.org/download/) (Check: Add to PATH)
2020
- [Visual Studio 2019 Build Tools](https://go.microsoft.com/fwlink/?linkid=840931) ([direct link](https://aka.ms/vs/16/release/vs_buildtools.exe))
@@ -25,6 +25,13 @@ We assume a 64bit Windows 7 or higher. Install the following;
2525
- Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64`
2626
- Optional for package creation: [NSIS 3.x](https://sourceforge.net/projects/nsis/files/NSIS%203/) ([direct link](https://sourceforge.net/projects/nsis/files/latest/download))
2727

28+
## MacOs
29+
First install brew manager.
30+
Next:
31+
- brew install qt@5
32+
- brew install cmake
33+
- brew install jpeg-turbo
34+
2835
# Compiling and installing HyperHDR
2936

3037
### The general quick way (without big comments)

assets/webconfig/js/content_dashboard.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,23 @@ $(document).ready( function() {
9898

9999

100100
//determine platform
101-
var grabbers = window.serverInfo.grabbers.active;
102101
var html = "";
103-
104-
if (grabbers.indexOf('V4L2:Media Foundation') > -1)
105-
html += 'Windows (Microsoft Media Foundation)';
106-
else if (grabbers.indexOf('V4L2') > -1)
107-
html += 'Linux (V4L2)';
102+
103+
if (window.serverInfo.grabbers != null && window.serverInfo.grabbers != undefined &&
104+
window.serverInfo.grabbers.active != null && window.serverInfo.grabbers.active != undefined)
105+
{
106+
var grabbers = window.serverInfo.grabbers.active;
107+
if (grabbers.indexOf('V4L2:Media Foundation') > -1)
108+
html += 'Windows (Microsoft Media Foundation)';
109+
else if (grabbers.indexOf('V4L2') > -1)
110+
html += 'Linux (V4L2)';
111+
else
112+
html += 'Unknown';
113+
}
108114
else
109-
html += 'Unknown';
115+
{
116+
html = 'None';
117+
}
110118

111119
$('#dash_platform').html(html);
112120

cmake/osxbundle/Info.plist

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
<string>Hyperion.icns</string>
1919

2020
<key>CFBundleIdentifier</key>
21-
<string>com.hyperion-project.Hyperion</string>
21+
<string>com.hyperhdr.HyperHDR</string>
2222
<key>CFBundleName</key>
23-
<string>Hyperion</string>
23+
<string>HyperHDR</string>
2424
<key>CFBundleShortVersionString</key>
25-
<string>2.0</string>
25+
<string>16.0</string>
2626

2727
<key>BuildMachineOSBuild</key>
2828
<string>11G63</string>
@@ -57,6 +57,8 @@
5757
<string>NSApplication</string>
5858
<key>NSHighResolutionCapable</key>
5959
<true/>
60+
<key>NSCameraUsageDescription</key>
61+
<string>HyperHDR needs permission to access the grabber to capture video/camera stream.</string>
6062

6163
<key>SUEnableAutomaticChecks</key>
6264
<true/>
File renamed without changes.

include/utils/Image.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ class Image
276276
}
277277

278278
private:
279-
template<class T>
280-
friend class Image;
279+
281280

282281
///
283282
/// Translate x and y coordinate to index of the underlying vector

include/utils/ImageData.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ typedef SSIZE_T ssize_t;
1919
#endif
2020

2121

22+
2223
class ImageData : public QSharedData
23-
{
24+
{
25+
template<class T>
26+
friend class Image;
27+
2428
public:
2529
ImageData(unsigned width, unsigned height)://, const ColorRgb background) :
2630
_width(width),

include/webserver/WebServer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public slots:
7777
bool _inited = false;
7878

7979
const QString WEBSERVER_DEFAULT_PATH = ":/webconfig";
80-
const QString WEBSERVER_DEFAULT_CRT_PATH = ":/hyperion.crt";
81-
const QString WEBSERVER_DEFAULT_KEY_PATH = ":/hyperion.key";
80+
const QString WEBSERVER_DEFAULT_CRT_PATH = ":/hyperhdrcrt.pem";
81+
const QString WEBSERVER_DEFAULT_KEY_PATH = ":/hyperhdrkey.pem";
8282
quint16 WEBSERVER_DEFAULT_PORT = 8090;
8383

8484
BonjourServiceRegister * _serviceRegister = nullptr;

libsrc/effectengine/Animation_MoodBlobs.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <effectengine/Animation_MoodBlobs.h>
22

3-
#define M_PI 3.14159265358979323846
3+
#ifndef M_PI
4+
#define M_PI 3.14159265358979323846
5+
#endif
46

57
Animation_MoodBlobs::Animation_MoodBlobs(QString name) :
68
AnimationBase(name)

libsrc/hyperhdrbase/HyperHdrInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <leddevice/LedDeviceWrapper.h>
2222

2323
#include <hyperhdrbase/MultiColorAdjustment.h>
24-
#include "LinearColorSmoothing.h"
24+
#include <hyperhdrbase/LinearColorSmoothing.h>
2525

2626
// effect engine includes
2727
#include <effectengine/EffectEngine.h>

0 commit comments

Comments
 (0)