Commit 707aacf60a550856ac747d89574b636b48426214

Thomas de Grivel 2025-04-07T18:18:36

wip install img

diff --git a/Makefile b/Makefile
index a4776c1..01497f2 100644
--- a/Makefile
+++ b/Makefile
@@ -591,9 +591,13 @@ install:
 	${INSTALL} -m 0755 -d ${prefix}/lib/kc3
 	${INSTALL} -m 0755 -d ${prefix}/lib/kc3/0.1
 	find lib -type d | while read F; do \
-	    ${INSTALL} -m 0755 -d ${prefix}/$$F; done
+	    ${INSTALL} -m 0755 -d ${prefix}/"$$F"; done
 	find lib -name '*.facts' -or -name '*.kc3' | while read F; do \
-	    ${INSTALL} -m 0644 $$F ${prefix}/$$F; done
+	    ${INSTALL} -m 0644 $$F ${prefix}/"$$F"; done
+	find img -type d | while read F; do \
+	    ${INSTALL} -m 0755 -d ${prefix}/share/kc3/"$$F"; done
+	find img | while read F; do \
+	    ${INSTALL} -m 0644 "$$F" ${prefix}/share/kc3/"$$F"; done
 	${MAKE} -C libtommath install
 	${MAKE} -C libkc3 install
 	${MAKE} -C ikc3 install
diff --git a/libkc3/env.c b/libkc3/env.c
index 5971ddb..4082378 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -1105,12 +1105,13 @@ s_env * env_init (s_env *env, int *argc, char ***argv)
   env->path = list_new_str_1
     (NULL, "./", list_new_str_1
      (NULL, "../", list_new_str_1
-      (NULL, "../Resources/", list_new_str_1
-       (NULL, "../../", list_new_str_1
-        (NULL, "../../../", list_new_str_1
-         (NULL, "../../../../", list_new_str_1
-          (NULL, "../../../../../", list_new_str_1
-           (NULL, "../../../../../../", NULL))))))));
+      (NULL, "../share/kc3/", list_new_str_1
+       (NULL, "../Resources/", list_new_str_1
+        (NULL, "../../", list_new_str_1
+         (NULL, "../../../", list_new_str_1
+          (NULL, "../../../../", list_new_str_1
+           (NULL, "../../../../../", list_new_str_1
+            (NULL, "../../../../../../", NULL)))))))));
   str_init_1(&path, NULL, "lib/kc3/0.1/");
   if (! (env->module_path = alloc(sizeof(s_str))))
     return NULL;