Skip to content

Commit 8288a9a

Browse files
authoredMar 15, 2025··
Merge pull request #1 from EmerickH/main
Fix Linux compilation
2 parents 40dd85d + 7cf0a6f commit 8288a9a

14 files changed

+49
-28
lines changed
 

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Builds/*/x64
66
Builds/VisualStudio2022/RuleMapPool_App.vcxproj
77

88
Builds/VisualStudio2022/RuleMapPool_App.vcxproj.filters
9+
Builds/LinuxMakefile/build
10+
Builds/Raspberry/build
11+
Builds/Raspberry64/build
912

1013
Binaries/Release/
1114

‎External/servus/lib/linux/libServus.so

-1
This file was deleted.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libServus.so.1.6.0

‎External/servus/lib/linux/libServus.so.6

-1
This file was deleted.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libServus.so.1.6.0

‎External/vlc/lib/linux/libvlc.so

632 KB
Binary file not shown.

‎External/vlc/lib/linux/libvlc.so.12

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libvlc.so

‎External/vlc/lib/linux/libvlccore.so

5.66 MB
Binary file not shown.

‎MapGyver.jucer

+12-12
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,13 @@
532532
<MODULEPATH id="juce_javascript" path="JUCE/modules"/>
533533
</MODULEPATHS>
534534
</XCODE_MAC>
535-
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" extraLinkerFlags="-Wl,-rpath,&quot;lib&quot;&#10;-Wl,--as-needed"
536-
externalLibraries="Servus" smallIcon="AKcEsb" bigIcon="AKcEsb">
535+
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" externalLibraries="Servus&#10;vlc&#10;vlccore&#10;ndi"
536+
smallIcon="AKcEsb" bigIcon="AKcEsb" extraLinkerFlags="-Wl,-rpath,&quot;lib&quot;&#10;-Wl,--as-needed">
537537
<CONFIGURATIONS>
538-
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/dnssd/include&#10;"
539-
libraryPath="../../External/servus/lib/linux&#10;/usr/lib/x86_64-linux-gnu/"/>
540-
<CONFIGURATION isDebug="0" name="Release" headerPath="../../External/servus/include&#10;../../External/dnssd/include&#10;"
541-
libraryPath="../../External/servus/lib/linux&#10;/usr/lib/x86_64-linux-gnu/"/>
538+
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"
539+
libraryPath="../../External/servus/lib/linux&#10;../../External/vlc/lib/linux&#10;/usr/lib/x86_64-linux-gnu/"/>
540+
<CONFIGURATION isDebug="0" name="Release" headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"
541+
libraryPath="../../External/servus/lib/linux&#10;../../External/vlc/lib/linux&#10;/usr/lib/x86_64-linux-gnu/"/>
542542
</CONFIGURATIONS>
543543
<MODULEPATHS>
544544
<MODULEPATH id="juce_core" path="JUCE/modules"/>
@@ -564,13 +564,13 @@
564564
</MODULEPATHS>
565565
</LINUX_MAKE>
566566
<LINUX_MAKE targetFolder="Builds/Raspberry" extraLinkerFlags="-Wl,-rpath,&quot;lib&quot;&#10;-Wl,--as-needed&#10;-lm"
567-
externalLibraries="Servus&#10;curl&#10;pthread&#10;atomic&#10;stdc++"
567+
externalLibraries="Servus&#10;vlc&#10;vlccore&#10;ndi&#10;curl&#10;pthread&#10;atomic&#10;stdc++"
568568
smallIcon="AKcEsb" bigIcon="AKcEsb">
569569
<CONFIGURATIONS>
570-
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/dnssd/include"
570+
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"
571571
libraryPath="../../External/servus/lib/raspberry&#10;/usr/lib/arm-linux-gnueabihf"
572572
linuxArchitecture="-march=armv8-a"/>
573-
<CONFIGURATION isDebug="0" name="Release" headerPath="../../External/servus/include&#10;../../External/dnssd/include"
573+
<CONFIGURATION isDebug="0" name="Release" headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"
574574
libraryPath="../../External/servus/lib/raspberry&#10;/usr/lib/arm-linux-gnueabihf"
575575
linuxArchitecture="-march=armv8-a"/>
576576
</CONFIGURATIONS>
@@ -598,13 +598,13 @@
598598
</MODULEPATHS>
599599
</LINUX_MAKE>
600600
<LINUX_MAKE targetFolder="Builds/Raspberry64" extraLinkerFlags="-Wl,-rpath,&quot;lib&quot;&#10;-Wl,--as-needed"
601-
externalLibraries="Servus&#10;curl&#10;pthread&#10;atomic&#10;stdc++"
601+
externalLibraries="Servus&#10;vlc&#10;vlccore&#10;ndi&#10;curl&#10;pthread&#10;atomic&#10;stdc++"
602602
smallIcon="AKcEsb" bigIcon="AKcEsb">
603603
<CONFIGURATIONS>
604-
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/dnssd/include"
604+
<CONFIGURATION isDebug="1" name="Debug" headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"
605605
libraryPath="../../External/servus/lib/raspberry64"/>
606606
<CONFIGURATION isDebug="0" name="Release" libraryPath="../../External/servus/lib/raspberry64"
607-
headerPath="../../External/servus/include&#10;../../External/dnssd/include"/>
607+
headerPath="../../External/servus/include&#10;../../External/vlc/include&#10;../../External/vlc/include/vlc/plugins&#10;../../External/vlc/vlcpp&#10;../../External/NDI/Include/"/>
608608
</CONFIGURATIONS>
609609
<MODULEPATHS>
610610
<MODULEPATH id="juce_core" path="JUCE/modules"/>

‎README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ Features :
2020
- Windows : https://benjamin.kuperberg.fr/mapgyver/download/app/MapGyver-win-x64-bleedingedge.exe
2121
- MacOS Intel : https://benjamin.kuperberg.fr/mapgyver/download/app/MapGyver-osx-intel-bleedingedge.pkg
2222
- MacOS Silicon : https://benjamin.kuperberg.fr/mapgyver/download/app/MapGyver-osx-silicon-bleedingedge.pkg
23-
- Linux x64 : Not ready yet (you can contribute by compiling and testing it yourself)
23+
- Linux x64 : Not ready yet (you can contribute by compiling and testing it yourself with the instructions below)
2424
- Raspberry 32 bit : Not ready yet (you can contribute by compiling and testing it yourself)
2525
- Raspberry 64 bit : Not ready yet (you can contribute by compiling and testing it yourself)
26+
27+
## Linux specific instructions
28+
29+
- You need to install the [NDI SDK](https://ndi.video/for-developers/ndi-sdk/) (you can use the `ndi-sdk` AUR package on Arch)
30+
- `libvlc` **4.0.x** (for 64bit x86 only) and `Servus` pre-built libraries are included but you might need to recompile them for your needs
31+
- After compiling, run MapGyver with :
32+
```bash
33+
LD_LIBRARY_PATH=../../External/servus/lib/linux:../../External/vlc/lib/linux:$LD_LIBRARY_PATH build/MapGyver
34+
```

‎Source/Engine/MGEngine.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ MGEngine::~MGEngine()
5858
MediaManager::deleteInstance();
5959
ScreenManager::deleteInstance();
6060
NDIManager::deleteInstance();
61+
#if !JUCE_LINUX
6162
WebcamManager::deleteInstance();
63+
#endif
6264
RMPSettings::deleteInstance();
6365
MediaClipFactory::deleteInstance();
6466
CompositionLayerFactory::deleteInstance();
File renamed without changes.
File renamed without changes.

‎Source/Media/MediaIncludes.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929

3030
#include "medias/video/VideoMedia.cpp"
3131

32-
#include "medias/Webcam/WebcamDevice.cpp"
33-
#include "medias/Webcam/WebcamManager.cpp"
34-
#include "medias/Webcam/WebcamDeviceParameter.cpp"
35-
#include "medias/Webcam/ui/WebcamDeviceChooser.cpp"
36-
#include "medias/Webcam/ui/WebcamDeviceParameterUI.cpp"
37-
#include "medias/Webcam/WebcamMedia.cpp"
32+
#if !JUCE_LINUX
33+
#include "medias/webcam/WebcamDevice.cpp"
34+
#include "medias/webcam/WebcamManager.cpp"
35+
#include "medias/webcam/WebcamDeviceParameter.cpp"
36+
#include "medias/webcam/ui/WebcamDeviceChooser.cpp"
37+
#include "medias/webcam/ui/WebcamDeviceParameterUI.cpp"
38+
#include "medias/webcam/WebcamMedia.cpp"
39+
#endif
3840

3941
#include "medias/node/NodeMedia.cpp"
4042

@@ -57,4 +59,4 @@
5759
#include "ui/MediaGridUI.cpp"
5860
#include "ui/MediaManagerGridUI.cpp"
5961
#include "ui/MediaPreviewPanel.cpp"
60-
#include "ui/MediaEditor.cpp"
62+
#include "ui/MediaEditor.cpp"

‎Source/Media/MediaIncludes.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@
5151
#include "vlcpp/vlc.hpp"
5252
#include "medias/video/VideoMedia.h"
5353

54-
#include "medias/Webcam/WebcamDevice.h"
55-
#include "medias/Webcam/WebcamManager.h"
56-
#include "medias/Webcam/WebcamDeviceParameter.h"
57-
#include "medias/Webcam/ui/WebcamDeviceChooser.h"
58-
#include "medias/Webcam/ui/WebcamDeviceParameterUI.h"
59-
#include "medias/Webcam/WebcamMedia.h"
54+
#if !JUCE_LINUX
55+
#include "medias/webcam/WebcamDevice.h"
56+
#include "medias/webcam/WebcamManager.h"
57+
#include "medias/webcam/WebcamDeviceParameter.h"
58+
#include "medias/webcam/ui/WebcamDeviceChooser.h"
59+
#include "medias/webcam/ui/WebcamDeviceParameterUI.h"
60+
#include "medias/webcam/WebcamMedia.h"
61+
#endif
6062

6163
#include "medias/node/NodeMedia.h"
6264

@@ -72,4 +74,4 @@
7274
#include "ui/MediaPreviewPanel.h"
7375
#include "ui/MediaGridUI.h"
7476
#include "ui/MediaManagerGridUI.h"
75-
#include "ui/MediaEditor.h"
77+
#include "ui/MediaEditor.h"

‎Source/Media/MediaManager.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ MediaManager::MediaManager() :
2222
factory.defs.add(Factory<Media>::Definition::createDef<ColorMedia>(""));
2323
factory.defs.add(Factory<Media>::Definition::createDef<PictureMedia>(""));
2424
factory.defs.add(Factory<Media>::Definition::createDef<VideoMedia>(""));
25+
#if !JUCE_LINUX
2526
factory.defs.add(Factory<Media>::Definition::createDef<WebcamMedia>(""));
27+
#endif
2628
factory.defs.add(Factory<Media>::Definition::createDef<NDIMedia>(""));
2729
factory.defs.add(Factory<Media>::Definition::createDef<SharedTextureMedia>(""));
2830
factory.defs.add(Factory<Media>::Definition::createDef<ShaderMedia>(""));

0 commit comments

Comments
 (0)
Please sign in to comment.