diff --git a/montaukos.org/THIRD-PARTY-NOTICES.txt b/montaukos.org/THIRD-PARTY-NOTICES.txt index 0162610..35097df 100644 --- a/montaukos.org/THIRD-PARTY-NOTICES.txt +++ b/montaukos.org/THIRD-PARTY-NOTICES.txt @@ -355,6 +355,25 @@ License: Intel redistributable firmware license the MontaukOS ISO at 0:/os/licenses/Intel-ibt-firmware.txt. +================================================================================ +14. Default wallpaper photograph +================================================================================ +Shipped as the default login-screen wallpaper on the ISO +(0:/os/wallpapers/default.jpg): a photograph of blossoms against misty hills. + + Photo by Nikhil Kumar on Unsplash + Source: https://unsplash.com/photos/JdPHvI7VF0o + +License: Unsplash License (https://unsplash.com/license) + + Unsplash grants you an irrevocable, nonexclusive, worldwide copyright + license to download, copy, modify, distribute, perform, and use images + from Unsplash for free, including for commercial purposes, without + permission from or attributing the photographer or Unsplash. This license + does not include the right to compile images from Unsplash to replicate a + similar or competing service. + + ================================================================================ For licensing inquiries regarding MontaukOS itself, contact: daniel@nexlink.cloud ================================================================================ diff --git a/programs/GNUmakefile b/programs/GNUmakefile index 01f7f95..40ae225 100644 --- a/programs/GNUmakefile +++ b/programs/GNUmakefile @@ -94,9 +94,14 @@ LICDIR := data/licenses LICSRC := $(wildcard $(LICDIR)/*.txt) LICDST := $(patsubst $(LICDIR)/%,$(BINDIR)/os/licenses/%,$(LICSRC)) $(BINDIR)/os/licenses/NOTICES.txt $(BINDIR)/os/licenses/LICENSE.txt +# Wallpapers bundled into bin/os/wallpapers/. +WPDIR := data/wallpapers +WPSRC := $(wildcard $(WPDIR)/*.jpg) +WPDST := $(patsubst $(WPDIR)/%,$(BINDIR)/os/wallpapers/%,$(WPSRC)) + .PHONY: all clean 2048 doom fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap login desktop shell rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs icons fonts configs bearssl libc tls libjpeg libjpegwrite install-apps libloader libs crashpad check-syscalls gen-syscalls -all: bearssl libc libjpeg libjpegwrite tls libloader libs $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(FWDST) $(LICDST) +all: bearssl libc libjpeg libjpegwrite tls libloader libs $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr powermgr calculator charmap 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(FWDST) $(LICDST) $(WPDST) # Build BearSSL static library (cross-compiled for freestanding x86_64). BEARSSL_INCLUDES := -isystem $(shell cd .. && pwd)/kernel/freestnd-c-hdrs/x86_64/include -isystem $(abspath include/libc) @@ -370,6 +375,11 @@ $(BINDIR)/os/licenses/%: $(LICDIR)/% mkdir -p $(BINDIR)/os/licenses cp $< $@ +# Copy wallpapers into bin/os/wallpapers/. +$(BINDIR)/os/wallpapers/%: $(WPDIR)/% + mkdir -p $(BINDIR)/os/wallpapers + cp $< $@ + # Build each system program from its source files. $(BINDIR)/os/%.elf: src/%/main.cpp link.ld GNUmakefile mkdir -p $(BINDIR)/os obj/$* diff --git a/programs/data/wallpapers/default.jpg b/programs/data/wallpapers/default.jpg new file mode 100644 index 0000000..23b9e92 Binary files /dev/null and b/programs/data/wallpapers/default.jpg differ diff --git a/programs/man/legal.7 b/programs/man/legal.7 index 03f6d50..6dc31e3 100644 --- a/programs/man/legal.7 +++ b/programs/man/legal.7 @@ -53,5 +53,7 @@ Program - MPL-2.0 * Intel Bluetooth firmware (0:/os/firmware/intel), Copyright (c) Intel Corporation - Intel redistributable firmware license + * Default wallpaper photo (0:/os/wallpapers), by Nikhil Kumar - + Unsplash License Full license texts and notices are on this system in 0:/os/licenses/. \ No newline at end of file diff --git a/programs/src/login/login_wallpaper.cpp b/programs/src/login/login_wallpaper.cpp index 91fc7ca..ddac59a 100644 --- a/programs/src/login/login_wallpaper.cpp +++ b/programs/src/login/login_wallpaper.cpp @@ -8,6 +8,9 @@ namespace { +// Shipped fallback shown when no wallpaper is configured (see NOTICES.txt). +constexpr const char* kDefaultWallpaperPath = "0:/os/wallpapers/default.jpg"; + constexpr uint32_t kLoginOverlayAlpha = 0x38; constexpr uint32_t kLoginOverlayInvAlpha = 255 - kLoginOverlayAlpha; @@ -23,9 +26,10 @@ bool load_login_wallpaper(LoginState* ls) { char wp[256]; montauk::strncpy(wp, doc.get_string("wallpaper.path", ""), sizeof(wp)); doc.destroy(); - if (wp[0] == '\0') return false; - int fd = montauk::open(wp); + int fd = -1; + if (wp[0] != '\0') fd = montauk::open(wp); + if (fd < 0) fd = montauk::open(kDefaultWallpaperPath); if (fd < 0) return false; uint64_t size = montauk::getsize(fd);