Code Monkey home page Code Monkey logo

love-pe's Introduction

Greetings 👋

Hey there, I'm Rami Sabbagh, A 5th year IT student at Damascus University.

Started programming at the age of 13 (~9 years ago) with the help of the Internet. Been passionate in computers ever since.

Have a nice day and stay safe!

Contact information

Personal Blog email LinkedIn Twitter

Programming Languages

Mostly experienced in

TypeScript Python JavaScript Lua

Moderately experienced in

Java

Least experienced in

Rust C++ C

Operating Systems

Daily driver

Windows 11

Every now and then

Ubuntu WSL Ubuntu Server Raspberry Pi OS

Development Tools

VS Code Git GitHub Desktop GitHub GitHub Actions Codeberg Docker

Graphics Tools

GIMP Inkscape

love-pe's People

Contributors

rami-sabbagh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

love-pe's Issues

Problem using strings instead of LÖVE files

Thanks a lot for this little tool!

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.