summaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2023-08-07 22:52:47 +0800
committerMole Shang <[email protected]>2023-08-07 22:59:19 +0800
commit204ab98bea93754beef914fe93ee249e346ee628 (patch)
treec056c82f4de392be506ed2298dbb66411414e350 /xmake.lua
parentb6c2d97d3bf98c46656a7e6697c1c0f4686d7d97 (diff)
downloadhinata-204ab98bea93754beef914fe93ee249e346ee628.tar.gz
hinata-204ab98bea93754beef914fe93ee249e346ee628.tar.bz2
hinata-204ab98bea93754beef914fe93ee249e346ee628.zip
hinata: support specifying cookies in curl_easy
We use tomlc99 to parse strings. To use cookies for higher resolution video downloading, add a config.toml in the executable path. e.g. ```filename: config.toml cookie="SESSDATA=xxx; some_more_cookie=xxx" ```
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua21
1 files changed, 19 insertions, 2 deletions
diff --git a/xmake.lua b/xmake.lua
index 98ba483..e287c0b 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -2,7 +2,7 @@ add_rules("mode.debug", "mode.release", "mode.releasedbg", "mode.minsizerel")
add_requires("nuklear", "nuklear_glfw_gl3", "nuklear_fonts", "glew", "glfw", "tinyfiledialogs",
"c11threads", "pcre2",
- "cjson", "ffmpeg")
+ "cjson", "ffmpeg", "tomlc99")
add_requires("libcurl", { configs = { zlib = true } })
if is_plat("linux") then
@@ -24,7 +24,7 @@ if is_mode("debug") then
end
add_packages("nuklear", "nuklear_glfw_gl3", "nuklear_fonts", "glew", "glfw", "libcurl", "tinyfiledialogs",
"c11threads", "pcre2",
- "cjson", "ffmpeg")
+ "cjson", "ffmpeg", "tomlc99")
package("tinyfiledialogs")
@@ -142,3 +142,20 @@ end)
on_test(function(package)
assert(package:has_cfuncs("cJSON_malloc", { includes = "cjson/cJSON.h" }))
end)
+
+package("tomlc99")
+
+set_homepage("https://github.com/cktan/tomlc99")
+set_description("TOML C library ")
+set_license("MIT")
+
+set_urls("https://github.com/cktan/tomlc99.git")
+
+on_install("linux", "macosx", "windows", "mingw", function(package)
+ import("package.tools.make").make(package, {})
+ import("package.tools.make").make(package, { "install", "prefix = " .. package:installdir() })
+end)
+
+on_test(function(package)
+ assert(package:has_cfuncs("toml_parse_file", { includes = "toml.h" }))
+end)