-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Portable #16
Comments
I'm aware the code structure is a mess haha But the whole patch creation/application logic is outside Any way, my idea was to create a package that could be just downloaded from here and reuploaded somewhere else, so any translation team could easily offer a simple drag and drop solution in their websites for their own patches, without having to mess with paths nor code. They would only need to specify a But I'm open to hear any ideas in order to improve it. As I said, I'd like it to become a copy-and-paste solution for everyone, so any suggestions are welcome. |
Seconding this request. I'm working on a Python batch patcher (something that takes a folder of patches as input and applies them to the appropriate roms in your rom directory) and it would be great if I could simply call applyPatch() from RomPatcher.js instead of having to hunt down multiple CLI-compatible patchers. |
@GateGuy, you can easily call Marc's patcher from Python using selenium. I actually created a CLI interface with just 162 lines of code. Please let me know if you're interested and I'll publish it. PS. Anyway, I completely agree that ideally the patcher should already be divided into front/back ends so you can completely forget the web interface when not manually using the patcher. |
@HeuristicPerson If you don't mind, that would be great. I wrote a (messy) downloader about a year ago that uses selenium with the Romhacking.net version of Marc's patcher, but I want to make something that works offline and doesn't rely on a specific browser being installed (mine used a Chrome driver). |
Published here, @GateGuy: https://github.com/HeuristicPerson/RomPatcherCLI Please note I haven't used it for a long time so I could not work at all. Let me know any problem you may have and I'll take a look. Regards |
@HeuristicPerson Thanks! I was able to combine my old implementation with how you initialized the driver to automate a local copy of Marc's patcher through both Chrome and Firefox. https://github.com/GateGuy/BatchRomPatcher |
having a node-based CLI interface not requiring a browser engine would be nice... |
actually it could be an npm package which is then consumed by CLI, WebApp, Electron App etc. |
#61 should address this as well |
Hi everyone, I have been working on a Tauri app conversion. The service worker logic has been removed in order to make it works locally as an executable. I have developed and tested the patched-ROM generation only in a MacOS environment (ARM Apple Chip) for now. Despite remaining tests I start sharing the repo here (there is also an Electron-conversion branch). I would like to open the PR after the ROM working-check. |
Instead of testing in an emulator, it may be better to patch a rom manually in the standard web version, patch it with your offline version, and see if the hashes are the same. |
Nice idea, I'll try in my spare time. I think it will be fine since I barely touched the original code. |
I checked the md5 of the patched ROM generated with the online tool and the local one from my branch: they match. |
PR #70 |
For those interested, Rom Patcher JS was updated to v3.0 a few days ago at last! |
is it possible to use without creating a node project? (install globally) e.g.
(Similar to wscat) |
Yes, that should be the next logical step: to turn it into a npm module (something I've never done). Please open a new issue, chances are someone else could work on it before I can take a look at it. |
Currently, this patcher is heavily tied to the interface that you see publicly in the demo. So much so that it even calls specific DOM elements by id in the main patcher js.
It would be nice to separate the logic of the actual patcher itself from the GUI elements so that it can be easily imported and used on other websites and not, very specifically, the one provided.
Additionally, the patcher seems to require a very specific structure, with a js folder at root, etc. Quite a few of the internal scripts (particularly as it relates to creating workers in
RomPatcher.js
for example) rely on this specific structure. It would be nice if imports were a lot less absolute and more relative, so that we might be able to import these in arbitrary folders irrespective of position relative to the root directory (so, for example,static/Rompatcher/js/RomPatcher.js
should work rather than just/js/RomPatcher.js
).The text was updated successfully, but these errors were encountered: