diff --git a/Makefile b/Makefile index a27d8fd..5dc3d4f 100644 --- a/Makefile +++ b/Makefile @@ -78,4 +78,6 @@ install: $(BIN) $(INSTALL) -d $(BINDIR) $(INSTALL) $(BIN) $(BINDIR) $(INSTALL) -d $(MANDIR)$(MANSECTION) - $(INSTALL) $(MANPAGE) $(MANDIR)$(MANSECTION) + $(INSTALL) -m 444 $(MANPAGE) $(MANDIR)$(MANSECTION) + $(INSTALL) -d $(DATADIR)/$(BIN)/plugins + $(INSTALL) -m 444 plugins/* $(DATADIR)/$(BIN)/plugins/ diff --git a/main.cpp b/main.cpp index fb5a0a9..d35c020 100644 --- a/main.cpp +++ b/main.cpp @@ -86,7 +86,11 @@ bool handle_window_resize(const SDL_Event& event, bool quit) { int main(int argc, const char * argv[]) { try { // gather plugins +#if DEBUG sc::plugin::scan_plugins(sc::dirname(sc::tool_path(argv[0])) + "/plugins", "saver"); +#else + sc::plugin::scan_plugins("/usr/local/share/screensaver/plugins", "saver"); +#endif std::unique_ptr saver; int opt_char, opt_val;