initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit bf6b52fd94
9654 changed files with 4035664 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
-- Assign script arguments and check validity
codeFileName = "temp/langtabl_current.txt"
function trim(s)
return s:match'^%s*(.*%S)' or ''
end
fo2 = io.open('temp/wx_loadlangtabl.sql','w')
fo2:write("create table if not exists wx_langmap (wxlangname char, wxlangid char, wxlocregion, wxversion char, primary key (wxlangname));\n")
fo2:write('delete from wx_langmap;\nbegin;\n')
count = 0
for line in io.lines(codeFileName) do
wxlangname = trim(string.sub(line,1,55))
wxversion = trim(string.sub(line,57,65))
wxlangid = trim(string.sub(line,82,106))
wxlocregion = trim(string.sub(line,108,121))
fo2:write("insert into wx_langmap values ('" .. wxlangname .. "', '" .. wxlangid .. "', '" .. wxlocregion .. "', '" .. wxversion .. "');\n")
count = count + 1
end
print(" Number of languages = " .. count)
fo2:write('commit;\n')
fo2:close()

View File

@@ -0,0 +1,45 @@
-- Assign script arguments and check validity
codeFileName = "temp/synonymtabl_current.txt"
function trim(s)
return s:match'^%s*(.*%S)' or ''
end
function split(str, character)
result = {}
index = 1
-- (.-),
-- for s in string.gmatch(str, "[^"..character.."]+") do
for s in string.gmatch(str .. character, "(.-)"..character) do
result[index] = s
index = index + 1
end
return result
end
fo2 = io.open('temp/wx_loadsynonymtabl.sql','w')
fo2:write('-- Known syonyms in wx\n-- Date: ' .. os.date("%Y-%m-%d %H:%M") .. '\n\n')
fo2:write("create table if not exists wx_synonyms (wxnamesyn char, wxnameprim char, winlocid char, wxversion char, primary key (wxnamesyn));\n")
fo2:write('delete from wx_synonyms;\nbegin;\n')
-- Code|N°|English Name|Nom français|Alias|Age|Date
count = 0
for line in io.lines(codeFileName) do
rem = string.sub(line,1,1)
if rem ~= "#" then
wxnamesyn = trim(string.sub(line,1,55))
wxnameprim = trim(string.sub(line,57,111))
winlocid = trim(string.sub(line,113,126))
wxversion = trim(string.sub(line,128,136))
fo2:write("insert into wx_synonyms values ('" .. wxnamesyn .. "', '" .. wxnameprim .. "', '" .. winlocid .. "', '" .. wxversion .. "');\n")
count = count + 1
end
end
print(" Number of synonyms = " .. count)
fo2:write('commit;\n')
fo2:close()

View File

@@ -0,0 +1,32 @@
-- Retrieve current wxWidgets version
codeFileName = "../../../include/wx/version.h"
function trim(s)
return s:match'^%s*(.*%S)' or ''
end
fo2 = io.open('temp/wx_loadversion.sql','w')
fo2:write('-- Current wxWidgets version\n-- Date: ' .. os.date("%Y-%m-%d %H:%M") .. '\n\n')
fo2:write("create table if not exists wx_version (version char, primary key (version));\n")
fo2:write('delete from wx_version;\nbegin;\n')
count = 0
for line in io.lines(codeFileName) do
vkey = trim(string.sub(line,1,28))
vval = trim(string.sub(line,30,35))
if vkey == "#define wxMAJOR_VERSION" then
vmajor = vval
elseif vkey == "#define wxMINOR_VERSION" then
vminor = vval
elseif vkey == "#define wxRELEASE_NUMBER" then
vrelno = vval
elseif vkey == "#define wxSUBRELEASE_NUMBER" then
vsubno = vval
end
end
wxversion = vmajor .. "." .. vminor .. "." .. vrelno
print(" wxWidgets version number:", wxversion)
fo2:write("insert into wx_version values('" .. wxversion .. "');\n")
fo2:write('commit;\n')
fo2:close()