You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
In the Readme you show that it's possible to use strings instead of LÖVE files:
local icodata = lovePE.extractIcon(exeString)
local success, newString = lovePE.replaceIcon(exeString,icoString)
local success, newString = lovePE.patchIcon(exeString,icoString)
--[[ Arguments:
exeString -> The source exe data as a string.
icoString -> The new ico data as a string.
newString -> The new patched exe data as a string.]]
However, when I try to do this, the output file is corrupted. It is just 214KB big, instead of the original exe which is about 4MB. After a bit of investigation, I suspect that there is something wrong with the function newStringFile(). In particular, I think this line needs to be removed:
function file:write(d,s)
if s then d = d:sub(1,s) end
> if pos+#d > #str then d = d:sub(1,#str-pos) end
str = str:sub(1,pos)..d..str:sub(pos+#d+1,-1)
pos = pos + #d
return #d
end
Once that line is removed, I was able to produce a correctly patched exe.
The text was updated successfully, but these errors were encountered:
Yes, I remember l encountered the same problem when using the library in another project myself.
I've fixed it but didn't update the library in this repository.
I'll upload the fix once l finish studying at 1/7/2019
Thanks for reminding me about this.
Thanks a lot for this little tool!
In the Readme you show that it's possible to use strings instead of LÖVE files:
However, when I try to do this, the output file is corrupted. It is just 214KB big, instead of the original exe which is about 4MB. After a bit of investigation, I suspect that there is something wrong with the function
newStringFile()
. In particular, I think this line needs to be removed:Once that line is removed, I was able to produce a correctly patched exe.
The text was updated successfully, but these errors were encountered: