From 1e91395eaacb40f000ddd5b82ff6cfba4bb43fd6 Mon Sep 17 00:00:00 2001 From: boreddevnl Date: Sat, 9 May 2026 18:54:51 +0200 Subject: [PATCH] build: modernize initrd structure and asset management --- Makefile | 19 ++++++++++++++++++- src/userland/Makefile | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 22307a6..4ab85fb 100644 --- a/Makefile +++ b/Makefile @@ -202,6 +202,8 @@ $(BUILD_DIR)/initrd.tar: $(KERNEL_ELF) mkdir -p $(BUILD_DIR)/initrd/Library/conf mkdir -p $(BUILD_DIR)/initrd/Library/bsh mkdir -p $(BUILD_DIR)/initrd/Library/BWM/Wallpaper + mkdir -p $(BUILD_DIR)/initrd/Library/art + mkdir -p $(BUILD_DIR)/initrd/Library/images/branding mkdir -p $(BUILD_DIR)/initrd/docs mkdir -p $(BUILD_DIR)/initrd/boot mkdir -p $(BUILD_DIR)/initrd/mnt @@ -272,6 +274,18 @@ $(BUILD_DIR)/initrd.tar: $(KERNEL_ELF) fi \ done + @printf "$(YELLOW)[COPY]$(RESET) BoredOS icons..." + @mkdir -p $(BUILD_DIR)/initrd/Library/images/icons/boredos + @for f in $(SRC_DIR)/images/icons/boredos/*.png; do \ + if [ -f "$$f" ]; then \ + printf " -> $$f"; \ + cp "$$f" $(BUILD_DIR)/initrd/Library/images/icons/boredos/; \ + fi \ + done + + @printf "$(YELLOW)[COPY]$(RESET) Branding assets..." + @cp -r branding/* $(BUILD_DIR)/initrd/Library/images/branding/ + @printf "$(YELLOW)[COPY]$(RESET) Fonts..." @for f in $(SRC_DIR)/fonts/*.ttf; do \ if [ -f "$$f" ]; then \ @@ -296,6 +310,9 @@ $(BUILD_DIR)/initrd.tar: $(KERNEL_ELF) @printf "$(YELLOW)[COPY]$(RESET) DOOM assets..." @if [ -f $(SRC_DIR)/userland/games/doom/doom1.wad ]; then printf " -> doom1.wad"; cp $(SRC_DIR)/userland/games/doom/doom1.wad $(BUILD_DIR)/initrd/Library/DOOM/; fi + @printf "$(YELLOW)[COPY]$(RESET) ASCII art..." + @if [ -f $(SRC_DIR)/library/art/boredos.txt ]; then printf " -> boredos.txt"; cp $(SRC_DIR)/library/art/boredos.txt $(BUILD_DIR)/initrd/Library/art/; fi + @printf "$(YELLOW)[COPY]$(RESET) Documentation..." @for f in $$(find docs -name '*.md' 2>/dev/null); do \ if [ -f "$$f" ]; then \ @@ -338,7 +355,7 @@ $(ISO_IMAGE): $(KERNEL_ELF) $(BUILD_DIR)/initrd.tar limine.conf limine-setup printf " module_path: boot():/initrd.tar" >> $(ISO_DIR)/limine.conf @printf "$(YELLOW)[COPY]$(RESET) Optional splash image..." - @if [ -f splash.jpg ]; then printf " -> splash.jpg"; cp splash.jpg $(ISO_DIR)/; else printf " -> no splash.jpg found"; fi + @if [ -f branding/splash.jpg ]; then printf " -> splash.jpg"; cp branding/splash.jpg $(ISO_DIR)/splash.jpg; else printf " -> no splash.jpg found"; fi @printf "$(YELLOW)[COPY]$(RESET) Limine boot files..." cp limine/limine-bios.sys $(ISO_DIR)/ diff --git a/src/userland/Makefile b/src/userland/Makefile index c4b8179..2811513 100644 --- a/src/userland/Makefile +++ b/src/userland/Makefile @@ -77,6 +77,9 @@ $(BIN_DIR)/%.o: %.c | $(BIN_DIR) $(BIN_DIR)/viewer.elf: $(LIBC_OBJS) $(BIN_DIR)/viewer.o $(BIN_DIR)/stb_image.o $(BIN_DIR)/viewer.note.o $(LD) $(LDFLAGS) $^ -o $@ +$(BIN_DIR)/about.elf: $(LIBC_OBJS) $(BIN_DIR)/about.o $(BIN_DIR)/stb_image.o $(BIN_DIR)/about.note.o + $(LD) $(LDFLAGS) $^ -o $@ + $(BIN_DIR)/settings.elf: $(LIBC_OBJS) $(BIN_DIR)/settings.o $(BIN_DIR)/stb_image.o $(BIN_DIR)/settings.note.o $(LD) $(LDFLAGS) $^ -o $@