From 744f65defbc8c675e102e2d7b39300a472e29fc2 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Fri, 21 Oct 2022 22:57:12 -0400 Subject: [PATCH] All files included in Windows build - Displays that only work on linux have a compile guard --- colorchord2/DisplayDMX.c | 8 ++++++-- colorchord2/DisplayFileWrite.c | 8 ++++++-- colorchord2/DisplaySHM.c | 8 ++++++-- colorchord2/DisplayUSB2812.c | 8 ++++++-- colorchord2/windows/compile-clang.bat | 10 ++++++---- colorchord2/windows/compile.bat | 5 +++-- 6 files changed, 33 insertions(+), 14 deletions(-) diff --git a/colorchord2/DisplayDMX.c b/colorchord2/DisplayDMX.c index e2499bd..f287b16 100644 --- a/colorchord2/DisplayDMX.c +++ b/colorchord2/DisplayDMX.c @@ -1,5 +1,10 @@ //Copyright 2015 <>< Charles Lohr under the ColorChord License. +// only compile file if we are one a unix system +#if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \ + defined( _WIN32 ) || defined( _WIN64 ) +#warning Windows does not support the DisplayDMX module +#else #include "outdrivers.h" #include "notefinder.h" #include @@ -123,5 +128,4 @@ static struct DriverInstances * DisplayDMX() } REGISTER_OUT_DRIVER(DisplayDMX); - - +#endif \ No newline at end of file diff --git a/colorchord2/DisplayFileWrite.c b/colorchord2/DisplayFileWrite.c index f90af8c..a72ea0c 100644 --- a/colorchord2/DisplayFileWrite.c +++ b/colorchord2/DisplayFileWrite.c @@ -1,5 +1,10 @@ //Copyright 2015 <>< Charles Lohr under the ColorChord License. +// only compile file if we are one a unix system +#if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \ + defined( _WIN32 ) || defined( _WIN64 ) +#warning Windows does not support the DisplayFileWrite module +#else #include "outdrivers.h" #include "notefinder.h" #include @@ -116,5 +121,4 @@ static struct DriverInstances * DisplayFileWrite(const char * parameters) } REGISTER_OUT_DRIVER(DisplayFileWrite); - - +#endif diff --git a/colorchord2/DisplaySHM.c b/colorchord2/DisplaySHM.c index 2c80d14..6c7b912 100644 --- a/colorchord2/DisplaySHM.c +++ b/colorchord2/DisplaySHM.c @@ -1,5 +1,10 @@ //Copyright 2015 <>< Charles Lohr under the ColorChord License. +// only compile file if we are one a unix system +#if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \ + defined( _WIN32 ) || defined( _WIN64 ) +#warning Windows does not support the DisplaySHM module +#else #include "outdrivers.h" #include "notefinder.h" #include @@ -117,5 +122,4 @@ static struct DriverInstances * DisplaySHM(const char * parameters) } REGISTER_OUT_DRIVER(DisplaySHM); - - +#endif diff --git a/colorchord2/DisplayUSB2812.c b/colorchord2/DisplayUSB2812.c index 2ada8c9..78be9bd 100644 --- a/colorchord2/DisplayUSB2812.c +++ b/colorchord2/DisplayUSB2812.c @@ -1,5 +1,10 @@ //Copyright 2015 <>< Charles Lohr under the ColorChord License. +// only compile file if we are one a unix system +#if defined( WINDOWS ) || defined( USE_WINDOWS ) || defined( WIN32 ) || defined( WIN64 ) || \ + defined( _WIN32 ) || defined( _WIN64 ) +#warning Windows does not support the DisplayUSB2812 module +#else #include "outdrivers.h" #include "notefinder.h" #include @@ -166,5 +171,4 @@ static struct DriverInstances * DisplayUSB2812() } REGISTER_OUT_DRIVER(DisplayUSB2812); - - +#endif diff --git a/colorchord2/windows/compile-clang.bat b/colorchord2/windows/compile-clang.bat index a669412..d3d7e04 100644 --- a/colorchord2/windows/compile-clang.bat +++ b/colorchord2/windows/compile-clang.bat @@ -4,10 +4,12 @@ rem To enable OpenGL rendering use the -DCNFGOGL option set CCFLAGS=-g -D_CRT_SECURE_NO_WARNINGS -DCNFGOGL set CCIFLAGS=-I../../embeddedcommon -I../cnfa -I../rawdraw -I../ -O2 set CCLFLAGS=-lwinmm -lgdi32 -lws2_32 -lsetupapi -lkernel32 -luser32 -ldbghelp -lole32 -lmmdevapi -lAvrt -lopengl32 -set SOURCES=../main.c ../dft.c ../decompose.c ../filter.c ../color.c ../notefinder.c ../util.c ../outdrivers.c ^ -../parameters.c ../chash.c ../OutputVoronoi.c ../OutputProminent.c ../DisplayArray.c ^ -../OutputLinear.c ../DisplayPie.c ../DisplayNetwork.c ../hook.c ../RecorderPlugin.c ^ -../../embeddedcommon/DFT32.c ../OutputCells.c ../configs.c ../hidapi.c ../DisplayHIDAPI.c +set SOURCES=..\main.c ..\chash.c ..\color.c ..\configs.c ..\decompose.c ..\dft.c ..\filter.c ^ +..\outdrivers.c ..\hidapi.c ..\hook.c ..\parameters.c ..\util.c ..\notefinder.c ^ +..\..\embeddedcommon\DFT32.c symbol_enumerator.c ^ +..\DisplayArray.c ..\DisplayDMX.c ..\DisplayFileWrite.c ..\DisplayHIDAPI.c ..\DisplayNetwork.c ^ +..\DisplayOUTDriver.c ..\DisplayPie.c ..\DisplayRadialPoles.c ..\DisplaySHM.c ..\DisplayUSB2812.c ^ +..\OutputCells.c ..\OutputLinear.c ..\OutputProminent.c ..\OutputVoronoi.c . @echo on %CC% %CCFLAGS% %CCIFLAGS% -o ../colorchord.exe %SOURCES% %CCLFLAGS% diff --git a/colorchord2/windows/compile.bat b/colorchord2/windows/compile.bat index d9912be..c84d7c9 100644 --- a/colorchord2/windows/compile.bat +++ b/colorchord2/windows/compile.bat @@ -11,8 +11,9 @@ rem lots of source files set SOURCES=..\main.c ..\chash.c ..\color.c ..\configs.c ..\decompose.c ..\dft.c ..\filter.c ^ ..\outdrivers.c ..\hidapi.c ..\hook.c ..\parameters.c ..\util.c ..\notefinder.c ^ ..\..\embeddedcommon\DFT32.c tcc_stubs.c symbol_enumerator.c ^ -..\DisplayNetwork.c ..\DisplayArray.c ..\DisplayHIDAPI.c ..\DisplayOUTDriver.c ..\DisplayPie.c ^ -..\OutputCells.c ..\OutputLinear.c ..\OutputProminent.c ..\OutputVoronoi.c +..\DisplayArray.c ..\DisplayDMX.c ..\DisplayFileWrite.c ..\DisplayHIDAPI.c ..\DisplayNetwork.c ^ +..\DisplayOUTDriver.c ..\DisplayPie.c ..\DisplayRadialPoles.c ..\DisplaySHM.c ..\DisplayUSB2812.c ^ +..\OutputCells.c ..\OutputLinear.c ..\OutputProminent.c ..\OutputVoronoi.c . set ARCH_SPECIFIC=-L32 C:\windows\system32\winmm.dll -DWIN32_LEAN_AND_MEAN set CC=C:\tcc\tcc.exe