diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ec5788..650ea26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,10 @@ jobs: with: submodules: recursive + - name: install cmake + run: | + apt-get -y install cmake + - name: set guppyscreen version run: | chmod +x ./version.sh @@ -47,6 +51,9 @@ jobs: - name: make libhv run: make libhv.a + + - name: make libspdlog + run: make libspdlog.a - name: make guppyscreen run: make -j diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d401555..469a96b 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -17,7 +17,7 @@ The Guppy Screen uses features (filesystem) from C++17, so a gcc/g++ version (7. ### Environment Variables `CROSS_COMPILE` - The prefix to the toolchain architecture, e.g. `mips-linux-gnu-` -`SIMULAUTION` - Define it to build with SDL for running on your local machine. +`SIMULATION` - Define it to build with SDL for running on your local machine. `ZBOLT` - Define it to use the Z-Bolt icon set. By default the build uses the Material Design Icons. `GUPPYSCREEN_VERSION` - Version string displayed in the System Panel in the UI. @@ -53,17 +53,23 @@ Clone the guppyscreen repo (and submodules) and apply a couple of patches locall Building for the K1/Max 1. `unset SIMULATION && export CROSS_COMPILE=mips-linux-gnu-` -2. `make -C wpa_supplicant/wpa_supplicant/ clean && make wpaclient` -3. `make -C libhv clean && make libhv.a` -4. `make clean && make -j$(nproc) ### executable is in ./build/bin/guppyscreen` +2. `make wpaclean && make wpaclient` +3. `make libhvclean && make libhv.a` +4. `make spdlogclean && make libspdlog.a` +5. `make clean && make -j$(nproc)` + +The executable is ./build/bin/guppyscreen ### x86_64 (Intel/AMD) Building and running Guppy Screen on your local machine speeds up development. Changes can tested on the local machine before rebuilding for the other architectures. 1. `unset CROSS_COMPILE && export SIMULATION=1` -2. `make -C wpa_supplicant/wpa_supplicant/ clean && make wpaclient` -3. `make -C libhv clean && make libhv.a` -4. `make clean && make -j$(nproc) ### executable is in ./build/bin/guppyscreen` +2. `make wpaclean && make wpaclient` +3. `make libhvclean && make libhv.a` +4. `make spdlogclean && make libspdlog.a` +5. `make clean && make -j$(nproc)` + +The executable is ./build/bin/guppyscreen ### Simulation Guppy Screen default configurations (guppyconfig.json) is configured for the K1/Max. In order to run it remotely as a simulator build, a few thing needs to be setup. diff --git a/Makefile b/Makefile index 922ec48..73b45d0 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ BIN = guppyscreen BUILD_DIR = ./build BUILD_OBJ_DIR = $(BUILD_DIR)/obj BUILD_BIN_DIR = $(BUILD_DIR)/bin +SPDLOG_DIR = spdlog prefix ?= /usr bindir ?= $(prefix)/bin @@ -86,6 +87,11 @@ all: default libhv.a: $(MAKE) -C libhv -j$(nproc) libhv +libspdlog.a: + @mkdir -p $(SPDLOG_DIR)/build + @cmake -B $(SPDLOG_DIR)/build -S $(SPDLOG_DIR)/ + $(MAKE) -C $(SPDLOG_DIR)/build -j$(nproc) + wpaclient: $(MAKE) -C wpa_supplicant/wpa_supplicant -j$(nproc) libwpa_client.a @@ -112,6 +118,9 @@ default: $(TARGET) $(CXX) -o $(BUILD_BIN_DIR)/$(BIN) $(TARGET) $(LDFLAGS) $(LDLIBS) @echo "CXX $<" +spdlogclean: + rm -rf $(SPDLOG_DIR)/build + libhvclean: $(MAKE) -C libhv clean @@ -128,4 +137,14 @@ install: uninstall: $(RM) -r $(addprefix $(DESTDIR)$(bindir)/,$(BIN)) +build: + $(MAKE) wpaclean + $(MAKE) wpaclient + $(MAKE) libhvclean + $(MAKE) libhv.a + $(MAKE) spdlogclean + $(MAKE) libspdlog.a + $(MAKE) clean + $(MAKE) -j$(nproc) + -include $(DEPS) diff --git a/installer.sh b/installer.sh index f48d0df..1939078 100755 --- a/installer.sh +++ b/installer.sh @@ -126,7 +126,7 @@ cp $K1_GUPPY_DIR/k1_mods/S50dropbear /etc/init.d/S50dropbear printf "${white}=== Do you want to disable all Creality services (revertable) with GuppyScreen installation? ===\n" printf "${green} Pros: Frees up system resources on your K1 for critical services such as Klipper (Recommended)\n" -printf "${white} Cons: Disabling all Creality services breaks Creality Cloud/Creality Slider.\n\n" +printf "${white} Cons: Disabling all Creality services breaks Creality Cloud/Creality Slicer.\n\n" printf "Disable all Creality Services? (y/n): " read confirm_decreality