2022-03-04 17:09:10 +00:00
|
|
|
local cia = path.translate(path.join(auBuild.projectRoot, "symbols.CIA"), path.getDefaultSeparator())
|
|
|
|
local def = path.translate(path.join(auBuild.projectRoot, "symbols.def"), path.getDefaultSeparator())
|
2021-09-14 13:15:46 +00:00
|
|
|
|
|
|
|
print("Generating MSVC def file for scuffed gnome vala build", cia, def)
|
|
|
|
|
|
|
|
local ciaData = io.readfile(cia)
|
|
|
|
local exports = {}
|
|
|
|
for s in ciaData:gmatch("[^\r\n]+") do
|
|
|
|
table.insert(exports, s)
|
|
|
|
end
|
|
|
|
|
2022-03-04 17:09:10 +00:00
|
|
|
local dllName = auBuild.projectTargetName .. ".dll"
|
2021-09-14 13:15:46 +00:00
|
|
|
|
|
|
|
local buffer = ""
|
|
|
|
buffer = buffer .. "LIBRARY " .. dllName .. "\r\n"
|
|
|
|
buffer = buffer .. "EXPORTS"
|
|
|
|
|
|
|
|
local function processExport(export)
|
|
|
|
buffer = buffer .. "\r\n " .. export
|
|
|
|
end
|
|
|
|
|
|
|
|
forEach(exports, processExport)
|
|
|
|
|
|
|
|
io.writefile(def, buffer)
|