Code patching
BlitzMax Forums/BlitzMax Programming/Code patching
| ||
Hi, Does anyone know if there is a standard code patcher around? One that works with any language and just requires some tags to work, like: [OPEN]myfile.bmx[/] [FIND]"hello world[/] [INSERT AFTER] and worldets[/] [FIND]"Funky!"[/] [REPLACE WITH]"Groovy!"[/]Or something similar. I want to make my max module tweaks, so that they can be easily applied after a sync mods... Otherwise I'll have to make a simple system myself. |
| ||
I don't know but there is a " missing after world and after worldets... |
| ||
Hi, Well, I made my own really simple one since I couldn't find one. The syntax is ugly and it's not very versatile, but it does the job. Here it is: And here is a script to apply the SetMaxWindowSize for Windows: And the Textfield Return tweak: And a tweak to block hotkeys from being triggered in textfields and textareas: |
| ||
This would be an ideal AutoHotKey job I suspect. |
| ||
why not just use patch? patch --help Usage: patch [OPTION]... [ORIGFILE [PATCHFILE]] (should be part of mingw if not *easily* installable) There are even GUI's for it :o |
| ||
I did something similar to search for Function or Method and stuck debuglog messages in each BRL.mod module to say when a function/method was entered. Worked pretty well and helped find out how images/pixmaps worked. |
| ||
Yeah, patch uses the unified diff format (which is pretty much a standard) and is used by the likes of Subversion for its diff/merge/patching. "diff" is also a nice tool for comparing differences between two files - also outputs unified diff format. |