mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-17 23:24:46 +00:00
extension.js imports ./dbus.js, but gnome-extensions pack never bundled it, so the packed extension (the EGO zip) was missing the module and would fail to load. Add dbus.js and the new util.js to the pack sources. util.js holds the shared logError helper, replacing the per-file copies in extension.js and panel.js and the raw console.error calls in clipboardItem.js.
49 lines
1.7 KiB
Makefile
49 lines
1.7 KiB
Makefile
EXTENSION_UUID = strata@edu4rdshl.dev
|
|
DAEMON_RELEASE = strata-daemon/target/release/strata-daemon
|
|
SCHEMA_DIR = $(EXTENSION_UUID)/schemas
|
|
INSTALL_DIR = $(HOME)/.local/share/gnome-shell/extensions/$(EXTENSION_UUID)
|
|
DAEMON_INSTALL = $(HOME)/.local/bin
|
|
|
|
.PHONY: all daemon schemas install install-daemon pack clean
|
|
|
|
all: daemon schemas
|
|
|
|
daemon:
|
|
cargo build --release --manifest-path=strata-daemon/Cargo.toml
|
|
|
|
schemas:
|
|
glib-compile-schemas $(SCHEMA_DIR)
|
|
|
|
# Install the daemon binary to ~/.local/bin (must be in PATH).
|
|
install-daemon: daemon
|
|
mkdir -p $(DAEMON_INSTALL)
|
|
cp $(DAEMON_RELEASE) $(DAEMON_INSTALL)/strata-daemon
|
|
@echo "Installed daemon to $(DAEMON_INSTALL)/strata-daemon"
|
|
@echo "Make sure $(DAEMON_INSTALL) is in your PATH."
|
|
|
|
# Install the GNOME Shell extension only (daemon must already be in PATH).
|
|
install: schemas
|
|
mkdir -p $(INSTALL_DIR)/schemas $(INSTALL_DIR)/ui
|
|
cp $(EXTENSION_UUID)/schemas/*.gschema.xml $(INSTALL_DIR)/schemas/
|
|
cp $(SCHEMA_DIR)/gschemas.compiled $(INSTALL_DIR)/schemas/
|
|
cp $(EXTENSION_UUID)/*.js $(INSTALL_DIR)/
|
|
cp $(EXTENSION_UUID)/*.css $(INSTALL_DIR)/
|
|
cp $(EXTENSION_UUID)/metadata.json $(INSTALL_DIR)/
|
|
cp $(EXTENSION_UUID)/ui/*.js $(INSTALL_DIR)/ui/
|
|
@echo "Installed to $(INSTALL_DIR)"
|
|
@echo "Run: gnome-extensions enable $(EXTENSION_UUID)"
|
|
|
|
# Pack the extension (JS only - no binary).
|
|
pack: schemas
|
|
gnome-extensions pack $(EXTENSION_UUID) \
|
|
--extra-source=ui \
|
|
--extra-source=dbus.js \
|
|
--extra-source=util.js \
|
|
--extra-source=light.css \
|
|
--force
|
|
@echo "Packed: $(EXTENSION_UUID).shell-extension.zip"
|
|
|
|
clean:
|
|
cargo clean --manifest-path=strata-daemon/Cargo.toml
|
|
rm -f $(SCHEMA_DIR)/gschemas.compiled
|
|
rm -f $(EXTENSION_UUID).shell-extension.zip
|