From a63a567abde8b1b1ee5639f7324c0da90e32fccd Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 17 Dec 2020 22:06:42 -0800 Subject: [PATCH] Move the HostOS plugin into the plugins directory --- examples/Features/HostOS/Makefile | 48 +++++++++++++++++++ .../Kaleidoscope-HostOS/library.properties | 2 + .../src}/Kaleidoscope-HostOS.h | 0 .../src}/kaleidoscope/plugin/HostOS-Focus.cpp | 0 .../src}/kaleidoscope/plugin/HostOS-Focus.h | 0 .../src}/kaleidoscope/plugin/HostOS.cpp | 0 .../src}/kaleidoscope/plugin/HostOS.h | 0 7 files changed, 50 insertions(+) create mode 100644 examples/Features/HostOS/Makefile create mode 100644 plugins/Kaleidoscope-HostOS/library.properties rename {src => plugins/Kaleidoscope-HostOS/src}/Kaleidoscope-HostOS.h (100%) rename {src => plugins/Kaleidoscope-HostOS/src}/kaleidoscope/plugin/HostOS-Focus.cpp (100%) rename {src => plugins/Kaleidoscope-HostOS/src}/kaleidoscope/plugin/HostOS-Focus.h (100%) rename {src => plugins/Kaleidoscope-HostOS/src}/kaleidoscope/plugin/HostOS.cpp (100%) rename {src => plugins/Kaleidoscope-HostOS/src}/kaleidoscope/plugin/HostOS.h (100%) diff --git a/examples/Features/HostOS/Makefile b/examples/Features/HostOS/Makefile new file mode 100644 index 00000000..19019b31 --- /dev/null +++ b/examples/Features/HostOS/Makefile @@ -0,0 +1,48 @@ +# This makefile for a Kaleidoscope sketch pulls in all the targets +# required to build the example + + + + +ifneq ($(KALEIDOSCOPE_DIR),) +search_path += $(KALEIDOSCOPE_DIR) +endif + +ifneq ($(ARDUINO_DIRECTORIES_USER),) +search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope +endif + +ifeq ($(shell uname -s),Darwin) +search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope +else +search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope +endif + +sketch_makefile := etc/makefiles/sketch.mk + +$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate)))) + +ifneq ($(ks_dir),) + +$(info Using Kaleidoscope from $(ks_dir)) + +export KALEIDOSCOPE_DIR := $(ks_dir) +include $(ks_dir)/$(sketch_makefile) + +else + +$(info I can't find your Kaleidoscope installation.) +$(info ) +$(info I tried looking in:) +$(info ) +$(foreach candidate, $(search_path), $(info $(candidate))) +$(info ) +$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment) +$(info variable to the location of your Kaleidoscope directory.) + +endif + + +null-target: + $(info You should never see this message) + @: diff --git a/plugins/Kaleidoscope-HostOS/library.properties b/plugins/Kaleidoscope-HostOS/library.properties new file mode 100644 index 00000000..3ae70bfa --- /dev/null +++ b/plugins/Kaleidoscope-HostOS/library.properties @@ -0,0 +1,2 @@ +name=Kaleidoscope-HostOS +version=0.0.0 diff --git a/src/Kaleidoscope-HostOS.h b/plugins/Kaleidoscope-HostOS/src/Kaleidoscope-HostOS.h similarity index 100% rename from src/Kaleidoscope-HostOS.h rename to plugins/Kaleidoscope-HostOS/src/Kaleidoscope-HostOS.h diff --git a/src/kaleidoscope/plugin/HostOS-Focus.cpp b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp similarity index 100% rename from src/kaleidoscope/plugin/HostOS-Focus.cpp rename to plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.cpp diff --git a/src/kaleidoscope/plugin/HostOS-Focus.h b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.h similarity index 100% rename from src/kaleidoscope/plugin/HostOS-Focus.h rename to plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS-Focus.h diff --git a/src/kaleidoscope/plugin/HostOS.cpp b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp similarity index 100% rename from src/kaleidoscope/plugin/HostOS.cpp rename to plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.cpp diff --git a/src/kaleidoscope/plugin/HostOS.h b/plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.h similarity index 100% rename from src/kaleidoscope/plugin/HostOS.h rename to plugins/Kaleidoscope-HostOS/src/kaleidoscope/plugin/HostOS.h