aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lowjs/lib-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/lowjs/lib-path.patch')
-rw-r--r--testing/lowjs/lib-path.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/lowjs/lib-path.patch b/testing/lowjs/lib-path.patch
new file mode 100644
index 0000000000..e6711783e3
--- /dev/null
+++ b/testing/lowjs/lib-path.patch
@@ -0,0 +1,33 @@
+--- a/app/low_config.h
++++ b/app/low_config.h
+@@ -25,4 +25,8 @@
+
+ #define LOW_ESP32_LWIP_SPECIALITIES 0
+
++#ifndef LOW_LIB_PATH
++#define LOW_LIB_PATH "../lib/"
++#endif
++
+ #endif /* __LOW_CONFIG_H__ */
+--- a/app/main.cpp
++++ b/app/main.cpp
+@@ -37,7 +37,7 @@
+ if(*argc < 2)
+ return;
+
+- const char postfix[] = "../lib/low-exe";
++ const char postfix[] = LOW_LIB_PATH "/low-exe";
+ int len = strlen((*argv)[0]);
+ if(len < sizeof(postfix) || strcmp((*argv)[0] + len - (sizeof(postfix) - 1), postfix) != 0)
+ return;
+--- a/src/low_system.cpp
++++ b/src/low_system.cpp
+@@ -129,7 +129,7 @@
+
+ g_low_system.lib_path = NULL;
+
+- const char lib_add_path[] = "../lib/";
++ const char lib_add_path[] = LOW_LIB_PATH;
+ int lib_add_path_len = sizeof(lib_add_path) - 1;
+
+ #ifdef __APPLE__