diff --git a/Makefile b/Makefile index 2b1bf08..0877ca2 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,23 @@ LIGHTGUI_SRC ?= /opt/lightgui PY ?= python3 -.PHONY: regen check check-registry check-palette check-props check-events check-indicators +.PHONY: regen check check-registry check-palette check-props check-events check-indicators install + +# Install the XFrame widget headers (header-only) so generated apps +# build on any machine where LightGUI is installed. The headers live +# in the C repo ($(LIGHTGUI_SRC)/widgets); this just copies them to +# $(PREFIX)/include/lightgui. The Rust generator emits the same +# default include path as the C generator. +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include/lightgui + +install: + @echo "Installing LightGUI widget headers to $(INCLUDEDIR)" + @mkdir -p $(INCLUDEDIR) + @cd $(LIGHTGUI_SRC)/widgets && find common core components -name '*.h' | while read f; do \ + install -D -m 644 "$$f" "$(INCLUDEDIR)/$$f"; \ + done + @echo "Installed $$(find $(LIGHTGUI_SRC)/widgets/common $(LIGHTGUI_SRC)/widgets/core $(LIGHTGUI_SRC)/widgets/components -name '*.h' | wc -l) headers to $(INCLUDEDIR)" regen: LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/extract_all.py diff --git a/crates/lightgui-gen/src/gen.rs b/crates/lightgui-gen/src/gen.rs index 9359992..c2fc338 100644 --- a/crates/lightgui-gen/src/gen.rs +++ b/crates/lightgui-gen/src/gen.rs @@ -1743,14 +1743,14 @@ fn emit_cmake_lists(cls: &str) -> String { let mut o = String::new(); o.push_str("# Generated by LightGUI (C++/XFrame).\n"); o.push_str("# Build: cmake -S . -B build && cmake --build build\n"); - o.push_str("# The XFrame widget sources live in the LightGUI repo; point at\n"); + o.push_str("# The XFrame widget headers live in the installed location; point at\n"); o.push_str("# them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the\n"); o.push_str("# default below.\n"); o.push_str("cmake_minimum_required(VERSION 3.20)\n"); o.push_str(&format!("project({cls} CXX)\n")); o.push_str("set(CMAKE_CXX_STANDARD 17)\n"); o.push_str("set(CMAKE_CXX_STANDARD_REQUIRED ON)\n"); - o.push_str("set(LIGHTGUI_WIDGETS_DIR \"/opt/lightgui/widgets\" CACHE PATH \"LightGUI XFrame widget sources (widgets/common/registry.h)\")\n"); + o.push_str("set(LIGHTGUI_WIDGETS_DIR \"/usr/local/include/lightgui\" CACHE PATH \"LightGUI XFrame widget sources (widgets/common/registry.h)\")\n"); o.push_str("if(NOT EXISTS \"${LIGHTGUI_WIDGETS_DIR}/common/registry.h\")\n"); o.push_str(" message(FATAL_ERROR \"XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets\")\n"); o.push_str("endif()\n"); @@ -1764,10 +1764,10 @@ fn emit_cmake_lists(cls: &str) -> String { fn emit_makefile() -> String { let mut o = String::new(); o.push_str("# Generated by LightGUI (C++/XFrame).\n"); - o.push_str("# Build: make [WIDGETS_DIR=/widgets]\n"); + o.push_str("# Build: make [WIDGETS_DIR=]\n"); o.push_str("CXX ?= g++\n"); o.push_str("CXXFLAGS ?= -O2 -Wall -std=c++17\n"); - o.push_str("WIDGETS_DIR ?= /opt/lightgui/widgets\n"); + o.push_str("WIDGETS_DIR ?= /usr/local/include/lightgui\n"); o.push_str("X11FLAGS := $(shell pkg-config --cflags x11)\n"); o.push_str("X11LIBS := $(shell pkg-config --libs x11)\n\n"); o.push_str("app: main.cpp\n"); @@ -1788,7 +1788,7 @@ fn emit_readme(project: &Project, widgets: &[Widget]) -> String { o.push_str("```\n\n"); o.push_str("Both need the XFrame widget sources from the LightGUI repo\n"); o.push_str("(`widgets/common/registry.h`). Default location is\n"); - o.push_str("`/opt/lightgui/widgets`; override with\n"); + o.push_str("`/usr/local/include/lightgui`; override with\n"); o.push_str("`-DLIGHTGUI_WIDGETS_DIR=` (CMake) or\n"); o.push_str("`make WIDGETS_DIR=`.\n\n"); o.push_str("## Run\n\n"); diff --git a/crates/lightgui-gen/tests/fixtures/01_empty/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/01_empty/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/01_empty/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/01_empty/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/01_empty/Makefile b/crates/lightgui-gen/tests/fixtures/01_empty/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/01_empty/Makefile +++ b/crates/lightgui-gen/tests/fixtures/01_empty/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/01_empty/README.md b/crates/lightgui-gen/tests/fixtures/01_empty/README.md index bb921c7..133e591 100644 --- a/crates/lightgui-gen/tests/fixtures/01_empty/README.md +++ b/crates/lightgui-gen/tests/fixtures/01_empty/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/02_all_types/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/02_all_types/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/02_all_types/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/02_all_types/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/02_all_types/Makefile b/crates/lightgui-gen/tests/fixtures/02_all_types/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/02_all_types/Makefile +++ b/crates/lightgui-gen/tests/fixtures/02_all_types/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/02_all_types/README.md b/crates/lightgui-gen/tests/fixtures/02_all_types/README.md index 9a87beb..504be7a 100644 --- a/crates/lightgui-gen/tests/fixtures/02_all_types/README.md +++ b/crates/lightgui-gen/tests/fixtures/02_all_types/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/03_all_props/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/03_all_props/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/03_all_props/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/03_all_props/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/03_all_props/Makefile b/crates/lightgui-gen/tests/fixtures/03_all_props/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/03_all_props/Makefile +++ b/crates/lightgui-gen/tests/fixtures/03_all_props/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/03_all_props/README.md b/crates/lightgui-gen/tests/fixtures/03_all_props/README.md index 9a87beb..504be7a 100644 --- a/crates/lightgui-gen/tests/fixtures/03_all_props/README.md +++ b/crates/lightgui-gen/tests/fixtures/03_all_props/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/04_enum_values/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/04_enum_values/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/04_enum_values/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/04_enum_values/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/04_enum_values/Makefile b/crates/lightgui-gen/tests/fixtures/04_enum_values/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/04_enum_values/Makefile +++ b/crates/lightgui-gen/tests/fixtures/04_enum_values/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/04_enum_values/README.md b/crates/lightgui-gen/tests/fixtures/04_enum_values/README.md index 7a0d2e5..d496c83 100644 --- a/crates/lightgui-gen/tests/fixtures/04_enum_values/README.md +++ b/crates/lightgui-gen/tests/fixtures/04_enum_values/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/05_menus/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/05_menus/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/05_menus/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/05_menus/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/05_menus/Makefile b/crates/lightgui-gen/tests/fixtures/05_menus/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/05_menus/Makefile +++ b/crates/lightgui-gen/tests/fixtures/05_menus/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/05_menus/README.md b/crates/lightgui-gen/tests/fixtures/05_menus/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/05_menus/README.md +++ b/crates/lightgui-gen/tests/fixtures/05_menus/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/Makefile b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/Makefile +++ b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/README.md b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/README.md index de88112..f4d3f92 100644 --- a/crates/lightgui-gen/tests/fixtures/06_hostile_strings/README.md +++ b/crates/lightgui-gen/tests/fixtures/06_hostile_strings/README.md @@ -11,7 +11,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/07_class_spaces/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/07_class_spaces/CMakeLists.txt index 7520c0a..bf3c48d 100644 --- a/crates/lightgui-gen/tests/fixtures/07_class_spaces/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/07_class_spaces/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(mycoolapp CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/07_class_spaces/Makefile b/crates/lightgui-gen/tests/fixtures/07_class_spaces/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/07_class_spaces/Makefile +++ b/crates/lightgui-gen/tests/fixtures/07_class_spaces/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/07_class_spaces/README.md b/crates/lightgui-gen/tests/fixtures/07_class_spaces/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/07_class_spaces/README.md +++ b/crates/lightgui-gen/tests/fixtures/07_class_spaces/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/08_class_digit/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/08_class_digit/CMakeLists.txt index 5597ad1..38b8a85 100644 --- a/crates/lightgui-gen/tests/fixtures/08_class_digit/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/08_class_digit/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(W9lives CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/08_class_digit/Makefile b/crates/lightgui-gen/tests/fixtures/08_class_digit/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/08_class_digit/Makefile +++ b/crates/lightgui-gen/tests/fixtures/08_class_digit/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/08_class_digit/README.md b/crates/lightgui-gen/tests/fixtures/08_class_digit/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/08_class_digit/README.md +++ b/crates/lightgui-gen/tests/fixtures/08_class_digit/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/09_class_empty/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/09_class_empty/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/09_class_empty/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/09_class_empty/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/09_class_empty/Makefile b/crates/lightgui-gen/tests/fixtures/09_class_empty/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/09_class_empty/Makefile +++ b/crates/lightgui-gen/tests/fixtures/09_class_empty/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/09_class_empty/README.md b/crates/lightgui-gen/tests/fixtures/09_class_empty/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/09_class_empty/README.md +++ b/crates/lightgui-gen/tests/fixtures/09_class_empty/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/Makefile b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/Makefile +++ b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/README.md b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/README.md index 6ec987f..6203371 100644 --- a/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/README.md +++ b/crates/lightgui-gen/tests/fixtures/10_spreadsheet_toplevels/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/Makefile b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/Makefile +++ b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/README.md b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/README.md index a72a90e..f76923d 100644 --- a/crates/lightgui-gen/tests/fixtures/11_forty_widgets/README.md +++ b/crates/lightgui-gen/tests/fixtures/11_forty_widgets/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/12_window_huge/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/12_window_huge/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/12_window_huge/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/12_window_huge/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/12_window_huge/Makefile b/crates/lightgui-gen/tests/fixtures/12_window_huge/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/12_window_huge/Makefile +++ b/crates/lightgui-gen/tests/fixtures/12_window_huge/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/12_window_huge/README.md b/crates/lightgui-gen/tests/fixtures/12_window_huge/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/12_window_huge/README.md +++ b/crates/lightgui-gen/tests/fixtures/12_window_huge/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/13_window_tiny/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/13_window_tiny/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/13_window_tiny/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/13_window_tiny/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/13_window_tiny/Makefile b/crates/lightgui-gen/tests/fixtures/13_window_tiny/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/13_window_tiny/Makefile +++ b/crates/lightgui-gen/tests/fixtures/13_window_tiny/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/13_window_tiny/README.md b/crates/lightgui-gen/tests/fixtures/13_window_tiny/README.md index bb921c7..133e591 100644 --- a/crates/lightgui-gen/tests/fixtures/13_window_tiny/README.md +++ b/crates/lightgui-gen/tests/fixtures/13_window_tiny/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/14_stockchart/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/14_stockchart/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/14_stockchart/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/14_stockchart/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/14_stockchart/Makefile b/crates/lightgui-gen/tests/fixtures/14_stockchart/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/14_stockchart/Makefile +++ b/crates/lightgui-gen/tests/fixtures/14_stockchart/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/14_stockchart/README.md b/crates/lightgui-gen/tests/fixtures/14_stockchart/README.md index dc78249..414a658 100644 --- a/crates/lightgui-gen/tests/fixtures/14_stockchart/README.md +++ b/crates/lightgui-gen/tests/fixtures/14_stockchart/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/14_stockchart/main.cpp b/crates/lightgui-gen/tests/fixtures/14_stockchart/main.cpp index 27aaf82..c919f18 100644 --- a/crates/lightgui-gen/tests/fixtures/14_stockchart/main.cpp +++ b/crates/lightgui-gen/tests/fixtures/14_stockchart/main.cpp @@ -37,7 +37,7 @@ int main() { StockChart_001.w.set_up_color(Srgb{0, 200, 0}); StockChart_001.w.set_down_color(Srgb{220, 0, 0}); // NOTE: StockChart design data not representable through the StockCandlestickChart API: - // data-file: "/tmp/lightgui-xframe-fixtures/14_stockchart/SPY_fake.csv" + // data-file: "/tmp/genprobe3/14_stockchart/SPY_fake.csv" // scale-mode: 0 (0 = price, 1 = percent) lg::Holder Label_001(display, screen, window, gc, &styles, 10, 340, 100, 24); Label_001.w.set_text("Label_001"); diff --git a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/Makefile b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/Makefile +++ b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/README.md b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/README.md +++ b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/main.cpp b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/main.cpp index 4af8698..682e0bf 100644 --- a/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/main.cpp +++ b/crates/lightgui-gen/tests/fixtures/15_stockchart_indicators/main.cpp @@ -37,7 +37,7 @@ int main() { StockChart_001.w.set_up_color(Srgb{0, 200, 0}); StockChart_001.w.set_down_color(Srgb{220, 0, 0}); // NOTE: StockChart design data not representable through the StockCandlestickChart API: - // data-file: "/tmp/lightgui-xframe-fixtures/15_stockchart_indicators/SPY_fake_long.csv" + // data-file: "/tmp/genprobe3/15_stockchart_indicators/SPY_fake_long.csv" // indicators: "SMA(20), EMA(50), Bollinger Bands, RSI, MACD, Engulfing" // scale-mode: 0 (0 = price, 1 = percent) std::vector widgets = { &StockChart_001 }; diff --git a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/CMakeLists.txt b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/CMakeLists.txt index 744be85..47e8a6b 100644 --- a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/CMakeLists.txt +++ b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/CMakeLists.txt @@ -1,13 +1,13 @@ # Generated by LightGUI (C++/XFrame). # Build: cmake -S . -B build && cmake --build build -# The XFrame widget sources live in the LightGUI repo; point at +# The XFrame widget headers live in the installed location; point at # them with -DLIGHTGUI_WIDGETS_DIR= if they are not at the # default below. cmake_minimum_required(VERSION 3.20) project(MyWindow CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") +set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)") if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h") message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=/widgets") endif() diff --git a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/Makefile b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/Makefile index 6b72ec8..96d8d27 100644 --- a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/Makefile +++ b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/Makefile @@ -1,8 +1,8 @@ # Generated by LightGUI (C++/XFrame). -# Build: make [WIDGETS_DIR=/widgets] +# Build: make [WIDGETS_DIR=] CXX ?= g++ CXXFLAGS ?= -O2 -Wall -std=c++17 -WIDGETS_DIR ?= /opt/lightgui/widgets +WIDGETS_DIR ?= /usr/local/include/lightgui X11FLAGS := $(shell pkg-config --cflags x11) X11LIBS := $(shell pkg-config --libs x11) diff --git a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/README.md b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/README.md index 8752720..89c8a33 100644 --- a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/README.md +++ b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/README.md @@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make Both need the XFrame widget sources from the LightGUI repo (`widgets/common/registry.h`). Default location is -`/opt/lightgui/widgets`; override with +`/usr/local/include/lightgui`; override with `-DLIGHTGUI_WIDGETS_DIR=` (CMake) or `make WIDGETS_DIR=`. diff --git a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/main.cpp b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/main.cpp index e989286..4c594e5 100644 --- a/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/main.cpp +++ b/crates/lightgui-gen/tests/fixtures/16_stockchart_pro/main.cpp @@ -37,10 +37,10 @@ int main() { StockChart_001.w.set_up_color(Srgb{0, 200, 0}); StockChart_001.w.set_down_color(Srgb{220, 0, 0}); // NOTE: StockChart design data not representable through the StockCandlestickChart API: - // data-file: "/tmp/lightgui-xframe-fixtures/16_stockchart_pro/SPY_fake_long.csv" + // data-file: "/tmp/genprobe3/16_stockchart_pro/SPY_fake_long.csv" // indicators: "SMA(20), RSI" // drawings: "trend 790 676 1150 690 red; hline 688 blue; fib 800 674 1000 692 purple; text 830 691 orange Resistance zone; rect 860 678 960 684 teal; arrow 920 690 1090 680 magenta; measure 840 677 1010 689 black" - // compare-files: "/tmp/lightgui-xframe-fixtures/16_stockchart_pro/QQQ_fake_long.csv" + // compare-files: "/tmp/genprobe3/16_stockchart_pro/QQQ_fake_long.csv" // scale-mode: 1 (0 = price, 1 = percent) std::vector widgets = { &StockChart_001 }; auto redraw_all = [&]() {