mirror of
https://github.com/TangentFoxy/love-pe.git
synced 2025-07-28 10:12:16 +00:00
Update directories names
This commit is contained in:
@@ -17,24 +17,24 @@ local utf8 = require("utf8")
|
|||||||
local bor,band,lshift,rshift,tohex = bit.bor,bit.band,bit.lshift,bit.rshift,bit.tohex
|
local bor,band,lshift,rshift,tohex = bit.bor,bit.band,bit.lshift,bit.rshift,bit.tohex
|
||||||
|
|
||||||
local resourcesTypes = {
|
local resourcesTypes = {
|
||||||
"Cursors",
|
"CURSOR",
|
||||||
"Bitmaps",
|
"BITMAP",
|
||||||
"Icons",
|
"ICON",
|
||||||
"Menus",
|
"MENU",
|
||||||
"Dialogs",
|
"DIALOG",
|
||||||
"String Tables",
|
"STRING_TABLE",
|
||||||
"Font Directories",
|
"FONT_DIRECTORY",
|
||||||
"Fonts",
|
"FONT",
|
||||||
"Accelerators",
|
"ACCELERATORS",
|
||||||
"Unformatted Resource Datas",
|
"UNFORMATTED_RESOURCE_DATA",
|
||||||
"Message Tables",
|
"MESSAGE_TABLE",
|
||||||
"Group Cursors",
|
"GROUP_CURSOR",
|
||||||
"13",
|
"13",
|
||||||
"Group Icons",
|
"GROUP_ICON",
|
||||||
"15",
|
"15",
|
||||||
"Version Information",
|
"VERSION_INFORMATION",
|
||||||
"17","18","19","20","21","22","23",
|
"17","18","19","20","21","22","23",
|
||||||
"Manifests"
|
"MANIFEST"
|
||||||
}
|
}
|
||||||
|
|
||||||
--==Internal Functions==--
|
--==Internal Functions==--
|
||||||
@@ -228,7 +228,7 @@ end
|
|||||||
|
|
||||||
local function extractGroupIcon(ResourcesTree,GroupID)
|
local function extractGroupIcon(ResourcesTree,GroupID)
|
||||||
--Icon extraction process
|
--Icon extraction process
|
||||||
local IconGroup = getAnyValue(ResourcesTree["Group Icons"][tostring(GroupID)])
|
local IconGroup = getAnyValue(ResourcesTree["GROUP_ICON"][tostring(GroupID)])
|
||||||
|
|
||||||
local Icons = {""}
|
local Icons = {""}
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ local function extractGroupIcon(ResourcesTree,GroupID)
|
|||||||
|
|
||||||
local IcoID = decodeNumber(IconGroup:sub(o,o+1),true)
|
local IcoID = decodeNumber(IconGroup:sub(o,o+1),true)
|
||||||
|
|
||||||
Icons[#Icons+1] = getAnyValue(ResourcesTree["Icons"][tostring(IcoID)])
|
Icons[#Icons+1] = getAnyValue(ResourcesTree["ICON"][tostring(IcoID)])
|
||||||
|
|
||||||
local Length = #Icons[#Icons]
|
local Length = #Icons[#Icons]
|
||||||
|
|
||||||
@@ -356,15 +356,15 @@ function icapi.extractIcon(exeFile)
|
|||||||
|
|
||||||
local IconKeys,FirstIcon = {}
|
local IconKeys,FirstIcon = {}
|
||||||
|
|
||||||
for k,v in pairs(ResourcesTree["Group Icons"]) do
|
for k,v in pairs(ResourcesTree["GROUP_ICON"]) do
|
||||||
IconKeys[#IconKeys+1] = k
|
IconKeys[#IconKeys+1] = k
|
||||||
ResourcesTree["Group Icons"][k] = extractGroupIcon(ResourcesTree,k)
|
ResourcesTree["GROUP_ICON"][k] = extractGroupIcon(ResourcesTree,k)
|
||||||
if not FirstIcon then FirstIcon = ResourcesTree["Group Icons"][k] end
|
if not FirstIcon then FirstIcon = ResourcesTree["GROUP_ICON"][k] end
|
||||||
end
|
end
|
||||||
|
|
||||||
for k,v in pairs(IconKeys) do
|
for k,v in pairs(IconKeys) do
|
||||||
ResourcesTree["Group Icons"][v..".ico"] = ResourcesTree["Group Icons"][v]
|
ResourcesTree["GROUP_ICON"][v..".ico"] = ResourcesTree["GROUP_ICON"][v]
|
||||||
ResourcesTree["Group Icons"][v] = nil
|
ResourcesTree["GROUP_ICON"][v] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local function writeTree(tree,path)
|
local function writeTree(tree,path)
|
||||||
|
Reference in New Issue
Block a user