mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2026-08-01 12:50:33 +00:00
add mysql & http funcs
This commit is contained in:
+1
Submodule deps/curl added at cccd76f2aa
+1
Submodule deps/date added at c05cd34119
+1
Submodule deps/libtomcrypt added at a8ed78c2ca
+1
Submodule deps/libtommath added at ae40a87a92
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
curl = {
|
||||
source = path.join(dependencies.basePath, "curl"),
|
||||
}
|
||||
|
||||
function curl.import()
|
||||
links { "curl" }
|
||||
|
||||
filter "toolset:msc*"
|
||||
links { "Crypt32.lib" }
|
||||
filter {}
|
||||
|
||||
curl.includes()
|
||||
end
|
||||
|
||||
function curl.includes()
|
||||
filter "toolset:msc*"
|
||||
includedirs {
|
||||
path.join(curl.source, "include"),
|
||||
}
|
||||
|
||||
defines {
|
||||
"CURL_STRICTER",
|
||||
"CURL_STATICLIB",
|
||||
"CURL_DISABLE_LDAP",
|
||||
}
|
||||
filter {}
|
||||
end
|
||||
|
||||
function curl.project()
|
||||
if not os.istarget("windows") then
|
||||
return
|
||||
end
|
||||
|
||||
project "curl"
|
||||
language "C"
|
||||
|
||||
curl.includes()
|
||||
|
||||
includedirs {
|
||||
path.join(curl.source, "lib"),
|
||||
}
|
||||
|
||||
files {
|
||||
path.join(curl.source, "lib/**.c"),
|
||||
path.join(curl.source, "lib/**.h"),
|
||||
}
|
||||
|
||||
defines {
|
||||
"BUILDING_LIBCURL",
|
||||
}
|
||||
|
||||
filter "toolset:msc*"
|
||||
|
||||
defines {
|
||||
"USE_SCHANNEL",
|
||||
"USE_WINDOWS_SSPI",
|
||||
"USE_THREADS_WIN32",
|
||||
}
|
||||
|
||||
filter "toolset:not msc*"
|
||||
|
||||
defines {
|
||||
"USE_GNUTLS",
|
||||
"USE_THREADS_POSIX",
|
||||
}
|
||||
|
||||
filter {}
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
end
|
||||
|
||||
table.insert(dependencies, curl)
|
||||
Vendored
+61
@@ -0,0 +1,61 @@
|
||||
libtomcrypt = {
|
||||
source = path.join(dependencies.basePath, "libtomcrypt"),
|
||||
}
|
||||
|
||||
function libtomcrypt.import()
|
||||
links {
|
||||
"libtomcrypt"
|
||||
}
|
||||
|
||||
libtomcrypt.includes()
|
||||
end
|
||||
|
||||
function libtomcrypt.includes()
|
||||
includedirs {
|
||||
path.join(libtomcrypt.source, "src/headers")
|
||||
}
|
||||
|
||||
defines {
|
||||
"LTC_NO_FAST",
|
||||
"LTC_NO_PROTOTYPES",
|
||||
"LTC_NO_RSA_BLINDING",
|
||||
}
|
||||
end
|
||||
|
||||
function libtomcrypt.project()
|
||||
project "libtomcrypt"
|
||||
language "C"
|
||||
|
||||
libtomcrypt.includes()
|
||||
libtommath.import()
|
||||
|
||||
files {
|
||||
path.join(libtomcrypt.source, "src/**.c"),
|
||||
}
|
||||
|
||||
removefiles {
|
||||
path.join(libtomcrypt.source, "src/**/*tab.c"),
|
||||
path.join(libtomcrypt.source, "src/encauth/ocb3/**.c"),
|
||||
}
|
||||
|
||||
defines {
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"LTC_SOURCE",
|
||||
"_LIB",
|
||||
"USE_LTM"
|
||||
}
|
||||
|
||||
removedefines {
|
||||
"_DLL",
|
||||
"_USRDLL"
|
||||
}
|
||||
|
||||
linkoptions {
|
||||
"-IGNORE:4221"
|
||||
}
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
end
|
||||
|
||||
table.insert(dependencies, libtomcrypt)
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
libtommath = {
|
||||
source = path.join(dependencies.basePath, "libtommath"),
|
||||
}
|
||||
|
||||
function libtommath.import()
|
||||
links {
|
||||
"libtommath"
|
||||
}
|
||||
|
||||
libtommath.includes()
|
||||
end
|
||||
|
||||
function libtommath.includes()
|
||||
includedirs {
|
||||
libtommath.source
|
||||
}
|
||||
|
||||
defines {
|
||||
"LTM_DESC",
|
||||
"__STDC_IEC_559__",
|
||||
"MP_NO_DEV_URANDOM",
|
||||
}
|
||||
end
|
||||
|
||||
function libtommath.project()
|
||||
project "libtommath"
|
||||
language "C"
|
||||
|
||||
libtommath.includes()
|
||||
|
||||
files {
|
||||
path.join(libtommath.source, "*.c"),
|
||||
}
|
||||
|
||||
defines {
|
||||
"_LIB"
|
||||
}
|
||||
|
||||
removedefines {
|
||||
"_DLL",
|
||||
"_USRDLL"
|
||||
}
|
||||
|
||||
linkoptions {
|
||||
"-IGNORE:4221"
|
||||
}
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
end
|
||||
|
||||
table.insert(dependencies, libtommath)
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
if (os.host() ~= "windows") then
|
||||
error("automatic mysql installation is not supported on your os")
|
||||
end
|
||||
|
||||
mysql = {
|
||||
source = path.join(dependencies.basePath, "mysql"),
|
||||
version = "5.7.43",
|
||||
download = "https://cdn.alicent.cat/mysql-5.7.43-win32.zip",
|
||||
}
|
||||
|
||||
function mysql.install()
|
||||
local hfile = io.open(string.format("%s/include/mysql.h", mysql.source), "r")
|
||||
if (hfile) then
|
||||
return
|
||||
end
|
||||
|
||||
os.execute(string.format("mkdir \"%s\" 2> nul", mysql.source))
|
||||
|
||||
local folder = path.join(mysql.source, "mysql-5.7.43-win32")
|
||||
local archive = path.join(mysql.source, "mysql-5.7.43-win32.zip")
|
||||
|
||||
print("Downloading MYSQL")
|
||||
os.execute(string.format("curl \"%s\" -L -o \"%s\"", mysql.download, archive))
|
||||
|
||||
os.execute(string.format("powershell -command \"Expand-Archive -Force \\\"%s\\\" \\\"%s\\\"\"", archive, mysql.source))
|
||||
os.execute(string.format("powershell -command \"mv \\\"%s/*\\\" \\\"%s\\\"\"", folder, mysql.source))
|
||||
os.execute(string.format("powershell -command \"rm \\\"%s\\\"\"", archive))
|
||||
os.execute(string.format("rmdir \"%s\"", folder))
|
||||
end
|
||||
|
||||
function mysql.import()
|
||||
mysql.install()
|
||||
mysql.includes()
|
||||
end
|
||||
|
||||
function mysql.includes()
|
||||
includedirs {
|
||||
path.join(mysql.source, "include"),
|
||||
}
|
||||
end
|
||||
|
||||
function mysql.project()
|
||||
project "mysql"
|
||||
language "C"
|
||||
|
||||
mysql.includes()
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
end
|
||||
|
||||
table.insert(dependencies, mysql)
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
sqlpp11 = {
|
||||
source = path.join(dependencies.basePath, "sqlpp11"),
|
||||
}
|
||||
|
||||
function sqlpp11.import()
|
||||
sqlpp11.includes()
|
||||
end
|
||||
|
||||
function sqlpp11.includes()
|
||||
includedirs {
|
||||
path.join(sqlpp11.source, "include"),
|
||||
path.join(dependencies.basePath, "date/include"),
|
||||
}
|
||||
end
|
||||
|
||||
function sqlpp11.project()
|
||||
project "sqlpp11"
|
||||
language "C++"
|
||||
|
||||
sqlpp11.includes()
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
end
|
||||
|
||||
table.insert(dependencies, sqlpp11)
|
||||
+1
Submodule deps/sqlpp11 added at 8c05983a31
Reference in New Issue
Block a user