![]() |
another (external) patcher for work with nsis -> aPatch (instead vpatch)
geez i was looking these days for a script or patcher for nsis
(in general - a patcher with simple byte replacing at fix address) the most patchers are search&replace in all combinations. but that wasnt wanted, moreover they need a source/target file. (vpatch wasnt uselful same way) so i found aPatch http://www.ibsensoftware.com/ this patcher works with a script which can be written from nsis. easy way: Quote:
(use fileopen/filewrite/filewritebyte0D0A/fileclose) the the script must be compiled "apatch.exe script.aps" (apatch.exe need to be included in nsis-package /pluginsdir) (File /oname=$PLUGINSDIR\apatch.exe "apatch.exe") it generates a simple patch.exe. unfortunaltely it has a GUI with a textfiled and two buttons: "Patch" and "Quit" but is is the only me known one: 1) freeware 2) script-based 3) very easy (hand full of commands) In my case easy as simple - in nsis: get word, get file (io) - write apatch-script - compile with apatch - start patch (execwait) - remove all temp-files - done part of my script: Quote:
Use NSIS to write the filename, old_text, new_text, custom errormessages aso. aPatch is recognized from PEid, so it contains specific bytes as a exe-packer - and "patch.exe" is packed with this method - so you cant disassemble it to get rid of the GUI. feel free to post other soulutions this way - if you have one without GUI - write it here pls. btw, i tried "fileseek #", but then i got 933125 00-bytes and then my text. so nsis can only work on textfiles !? |
Quote:
Read NSIS manual about differences between r/w/a Quote:
If you need fixed offset patch, automatic compare of original/patched files that is offered by all these kind of patch creators just make it easier for you. Why input all the offsets and byte values by hand when you can have it done automatically. Quote:
Normally you compile patcher on your system and distribute it. |
hmm, i needed filewrite /a ?
idd i used /w... vpatch needs a source and target file to compare, like all others i know. there was no one with a simple replace like apatch. The source file isnt fixed, that was the main problem, so specific code changes from time to time the patcher is used. it just modifies a printed line which is given at a fixed address. so search/replace isnt my friend you see!? i need to compile at runtime but user has no apatch on its system ;) |
Using w will delete the contents of the file.
Using a will not delete the contents of the file and so using FileSeek will allow you to move the write pointer to the end of the file for continuous writing. -Stu |
well i think youre right, i did it now with /a and it works, thx so much.
|
Quote:
|
| All times are GMT. The time now is 04:48. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.