diff options
author | Adam <adamdharrison@gmail.com> | 2023-06-20 09:14:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 09:14:26 -0400 |
commit | 149960eac5348ae46b5b56643d50cf69d9ac8a1c (patch) | |
tree | 64dad26552fe39c90c94b79b9b3c1fd95d42f1e7 | |
parent | e655a6add9af02a0b40e065fc62127b92b2638f1 (diff) | |
download | lite-xl-plugin-manager-149960eac5348ae46b5b56643d50cf69d9ac8a1c.tar.gz lite-xl-plugin-manager-149960eac5348ae46b5b56643d50cf69d9ac8a1c.zip |
Revert "Set variable name with xxd instead of relying on path"revert-25-PR/xxd_set_name
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | meson.build | 12 | ||||
-rw-r--r-- | src/lpm.c | 6 |
3 files changed, 7 insertions, 13 deletions
@@ -40,7 +40,7 @@ fi if [[ "$@" == *"-DLPM_STATIC"* ]]; then [[ ! -e "lua.exe" ]] && gcc -Ilib/lua -o lua.exe lib/lua/onelua.c -lm ./lua.exe -e 'io.open("src/lpm.luac", "wb"):write(string.dump(assert(loadfile("src/lpm.lua"))))' - xxd -n lpm_luac -i src/lpm.luac > src/lpm.lua.c + xxd -i src/lpm.luac > src/lpm.lua.c fi [[ $OSTYPE != 'msys'* && $CC != *'mingw'* && $CC != "emcc" ]] && CFLAGS="$CFLAGS -DLUA_USE_LINUX" && LDFLAGS="$LDFLAGS -ldl" diff --git a/meson.build b/meson.build index b72e486..b4a8a04 100644 --- a/meson.build +++ b/meson.build @@ -34,7 +34,7 @@ if not microtar_dep.found() endif lpm_source = files('src/lpm.c') -cflags = [] +cargs = [] if get_option('static') lua_exe = find_program('lua') xxd_exe = find_program('xxd') @@ -48,17 +48,11 @@ if get_option('static') lpm_source += configure_file( capture: true, - command: [xxd_exe, '-n', 'lpm_luac', '-i', '@INPUT@'], + command: [xxd_exe, '-i', '@INPUT@'], input: lpm_luac, output: 'lpm.lua.c' ) - cflags += '-DLPM_STATIC' - endif -executable('lpm', - lpm_source, - dependencies: [zlib_dep, mbedtls_dep, libgit2_dep, libzip_dep, lua_dep, microtar_dep], - c_args: cflags -)
\ No newline at end of file +executable('lpm', lpm_source, dependencies: [zlib_dep, mbedtls_dep, libgit2_dep, libzip_dep, lua_dep, microtar_dep])
\ No newline at end of file @@ -1133,8 +1133,8 @@ static const luaL_Reg system_lib[] = { #ifdef LPM_STATIC - extern const char lpm_luac[]; - extern unsigned int lpm_luac_len; + extern const char src_lpm_luac[]; + extern unsigned int src_lpm_luac_len; #endif int main(int argc, char* argv[]) { @@ -1165,7 +1165,7 @@ int main(int argc, char* argv[]) { #ifndef LPM_STATIC if (luaL_loadfile(L, "src/lpm.lua") || lua_pcall(L, 0, 1, 0)) { #else - if (luaL_loadbuffer(L, lpm_luac, lpm_luac_len, "lpm.lua") || lua_pcall(L, 0, 1, 0)) { + if (luaL_loadbuffer(L, src_lpm_luac, src_lpm_luac_len, "lpm.lua") || lua_pcall(L, 0, 1, 0)) { #endif fprintf(stderr, "internal error when starting the application: %s\n", lua_tostring(L, -1)); return -1; |