Lagrange [work/v1.8]

Loading resources from a predetermined path

=> 04b626c12cf9fcecabdf6662bd602a81aa498290

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c65bab6..0fb306f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,6 +277,8 @@ MimeType=x-scheme-handler/gemini;
          RENAME fi.skyjake.lagrange.png
     )
     if (NOT ENABLE_RESOURCE_EMBED)
+        target_compile_definitions (app PUBLIC
+            LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.binary")
         install (FILES ${EMB_BIN} DESTINATION share/lagrange)
     endif ()
 endif ()
diff --git a/src/app.c b/src/app.c
index ddd0084f..ac970865 100644
--- a/src/app.c
+++ b/src/app.c
@@ -76,6 +76,10 @@ static const char *dataDir_App_ = "~/AppData/Roaming/fi.skyjake.Lagrange";
 #define EMB_BIN  "../../share/lagrange/resources.binary"
 static const char *dataDir_App_ = "~/.config/lagrange";
 #endif
+#if defined (LAGRANGE_EMB_BIN) /* specified in build config */
+#  undef EMB_BIN
+#  define EMB_BIN LAGRANGE_EMB_BIN
+#endif
 #define EMB_BIN2 "../resources.binary" /* fallback from build/executable dir */
 static const char *prefsFileName_App_ = "prefs.cfg";
 static const char *stateFileName_App_ = "state.binary";
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.8/cdiff/04b626c12cf9fcecabdf6662bd602a81aa498290
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
62.431356 milliseconds
Gemini-to-HTML Time
0.164423 milliseconds

This content has been proxied by September (ba2dc).