Skip to content

Commit

Permalink
Copying scripts in data dir on install. Only english for now, too har…
Browse files Browse the repository at this point in the history
…d to get the user lang in automake!
  • Loading branch information
Vincent-FA committed Nov 23, 2018
1 parent 36ef7f1 commit 9cde40e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
24 changes: 17 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ export CC CFLAGS CPPFLAGS

SUBDIRS = deps/kplot po src

# set language of the scripts to be installed (en or fr)
SCRIPT_LANG = en

install-data-local:
@$(NORMAL_INSTALL)
if test -d $(srcdir)/pixmaps; then \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
fi \
done \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
fi \
done \
fi
$(INSTALL_DATA) src/gui/siril3.glade $(DESTDIR)$(pkgdatadir)
$(INSTALL_DATA) src/gui/gtk_old.css $(DESTDIR)$(pkgdatadir)
Expand All @@ -21,7 +24,14 @@ install-data-local:
$(INSTALL_DATA) AUTHORS LICENSE.md $(DESTDIR)$(docdir)
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) siril.1.gz $(DESTDIR)$(mandir)/man1
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/scripts/
for script in $(srcdir)/scripts/*; do \
$(INSTALL_DATA) $$script $(DESTDIR)$(pkgdatadir)/scripts; \
done
for script in $(srcdir)/3rdparty/scripts/$(SCRIPT_LANG)/*; do \
$(INSTALL_DATA) $$script $(DESTDIR)$(pkgdatadir)/scripts; \
done

ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = config.rpath
AUTOMAKE_OPTIONS = foreign
AUTOMAKE_OPTIONS = foreign
1 change: 1 addition & 0 deletions src/gui/script_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ static GSList *initialize_script_paths(){
g_free(path);
}
#else
list = g_slist_append(list, g_build_filename(PACKAGE_DATA_DIR, "scripts", NULL));
list = g_slist_append(list, g_build_filename(g_get_home_dir(), ".siril", "scripts", NULL));
list = g_slist_append(list, g_build_filename(g_get_home_dir(), "siril", "scripts", NULL));
#endif
Expand Down

0 comments on commit 9cde40e

Please sign in to comment.