mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
build: modernize initrd structure and asset management
This commit is contained in:
parent
5c2347d5d1
commit
1e91395eaa
2 changed files with 21 additions and 1 deletions
19
Makefile
19
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)/
|
||||
|
|
|
|||
|
|
@ -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 $@
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue