Giter VIP home page Giter VIP logo

rpatchur's Introduction

RPatchur

Build Status Build status

rpatchur is a customizable, cross-platform patcher for Ragnarok Online clients.

Features

  • Customizable, web-based UI
  • Configurable through an external YAML file
  • HTTP/HTTPS support
  • GRF file patching (version 0x101, 0x102, 0x103 and 0x200)
  • THOR patch format support
  • Drop-in replacement for the Thor patcher
  • SSO login support (i.e., can act as a launcher)
  • Manual patching
  • Can use multiple patch mirrors
  • Cross-platform (Windows, Linux, macOS)

Known Limitations

  • Can only build GRF files in version 0x200
  • Cannot automatically update the patcher executable
  • No support for RGZ and GPF patch formats
  • Cannot patch GRF files containing multiple entries pointing to the same offset

Screenshot

screen

Documentation

You can find the project's documentation here.

Examples

You can find example files for the UI and the configuration file in the examples directory.

Building

The rpatchur directory contains the actual patcher code (UI, archive merging, etc.).

The mkpatch directory contains a THOR patch archive generation utility.

The gruf directory contains the core library for parsing and building GRF and THOR archives.

To clone the repository and build everything, simply run:

$ git clone https://github.com/L1nkZ/rpatchur.git
$ cd rpatchur
$ cargo build --release

Note: Rust 1.49 or later is required.

Note: For targetting 32bit Windows when building on a 64bit system, you need to manually add the target with rustup target add i686-pc-windows-msvc. You can now run:

$ cargo build --target=i686-pc-windows-msvc --release

Cross Compilation

It is recommended to build the project on the platform that you target. However, for those of you who'd like to compile from Linux and distribute to Windows, there's a Dockerfile here. This Dockerfile builds a Docker image that can be used to easily cross-compile the project from Linux to Windows.

Note: The executable's icon and description will be missing for cross compiled builds.

Additional Notes

The icon used for Windows executables was taken from rathena.org.

License

Copyright (c) 2020-2021 rpatchur developers

rpatchur is distributed under the terms of both the MIT License and the Apache License 2.0.

See the LICENSE-APACHE and LICENSE-MIT files for license details.

rpatchur's People

Contributors

akkarinage avatar dependabot[bot] avatar javirst avatar kokotewa avatar l1nkz avatar vstumpf avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpatchur's Issues

Navigator issue ?

Hello,

I just saw that Microsoft end his support for IE11 on 2022.
What is happening if an user doesn't have IE on his computer ?

Regards,

WebView Javascript error: "Can't find variable: external"

The HTML pages loaded into rpatchur's WebView will of course need to at some point use Javascript in button click handlers or whatever else to perform actions, and that means calling external.invoke() as per your own examples (e.g. /examples/basic_launcher/index.html found in this repository).

I believe this WebView integration is broken on non-Windows OS's.

On my Gentoo Linux PC, I was having issues running an rpatchur installation with no visible error. Debugging it via CLion, I saw this error pop up:

https://koko.z13.web.core.windows.net/js/jquery-3.4.1.slim.min.js:2:31216: CONSOLE WARN jQuery.Deferred exception: Can't find variable: external @https://koko.z13.web.core.windows.net/live/index.html:35:21
e@https://koko.z13.web.core.windows.net/js/jquery-3.4.1.slim.min.js:2:29662
@https://koko.z13.web.core.windows.net/js/jquery-3.4.1.slim.min.js:2:29960 undefined

With the most important bit being obviously the Can't find variable: external bit which it encountered when running this line found in the mentioned index.html

external.invoke('start_update');

I was able to fix this by replacing all calls to external.invoke() with window.webkit.messageHandlers.external.postMessage() instead. This obviously will not work when the WebView is being backed by IE on Windows, so a suitable cross-platform solution would be nice here!

SSO Login fails due wrong params order

Description: The SSO Login on rpatchur makes the client crash, and it needs to be fixed and tested in newer clients to confirm if this still happens.
Client Version: 2015-09-16aRagexe
What rpatchur does: "-1rag1" "-t:password" "username" (results on a client crash)
What rpatchur should do -t:password username server -1rag1 (it works for me)
Additional Info: Where i found the correct param order

And is important to know that the commas are sent to the emulator too. So it fails because the server receives "username" and tries to find an account including the commas, tested on a 2018 hercules emulator.

Support borderless windows

  • Verify that web-view properly support this on all platforms
  • Think of a way to replace the native title bar's functionalities (dragging, minimizing, etc.)

Show Latest Patch number Server / Client

let's say if in plist.txt the latest is 2021 and the client last patch is 2020 it will show 2020/2021 and add config where user can set the last patch in client so can select to re-patch from specific number like jikari patcher didn't need to re-download entire plist.txt

a couple questions regarding the code

let index_str = words.get(0)?;

  1. (updated) Ah nvm, I'm assuming it's so that after a lot of patches you don't need to store them all in a single plist.txt ? i.e. you can remove old patches and just start from the number where you left off.

(original question)

I was wondering why you chose to format plist as {idx} {file name} rather than infer the index based off the line number ? Basically I'm not understanding why you'd want an out of order plist e.g.

2 some-file.thor
1 other-file.thor
  1. also do you mind explaining why you return none in the case of a failure instead of letting the error bubble up ?

Thanks

Patching grf in subfolders

Is it possible to patch GRF in subfolders?
For example:
I have grf in: system/data/data.grf
and thor patch with target grf: system/data/data.grf
When patcher try to apply, it show error
"Failed to apply patch 'xxx': Can`t find path."

Adding support for patch inside subfolder

rpatchur.yml
patch_url: http://myservername.com/patch/

plist.txt
1 luas/update.thor

with those config the patcher will result in Error
Failure: Failed to download patches: Failed to create temporary file: The system cannot find the path specified. (os error 3)

can we add a support for downloading inside a subfolder ?

Failed to parse archive: Archive is malformed.

Some users experience a patching (.thor file to .grf) error with the following message: "Failed to parse archive: Archive is malformed."
When they keep pushing refresh button it corrects itself. Can you please help what might be wrong?

Open URL to default browser from patcher

I think patcher should able to open a url in default browser.
This is pretty basic feature, some may need.

external.invoke(JSON.stringify({
  function: 'open_url',
  url: 'https://ratemyserver.net'
}))

Update rpatchur libssl version

libssl.so.1.0.0 is no longer standard in MacOS/LinuxOS, so we'll need to bump the rpatchur libssl version to a newer version.

how to enable logs ?

I've been having a rough time acclimating to rust since this project is my introduction to it

Anyhoo, I'm trying to view logs to debug an issue with the patches not being read in, but I can't get the logs to show. I can get logs to show in a separate little "hello world"ish rust program but this one the logs don't show up.

I've tried installing the exact same versions of log and simple_logger into your project as well as removing the max level feature declaration in cargo.toml and any level filters in your code. Still, in rpatchur/src/main.rs, when I just do

fn main() {
    SimpleLogger::new().init().unwrap();
    log::warn!("This is an example message.");
    ...

the logs don't show up in the command line

λ cargo build && cargo run -- -w C:\my-programs\buzzy-ro
   Compiling rpatchur v0.2.0 (C:\git-repos\cloned\rpatchur\rpatchur)
    Finished dev [unoptimized + debuginfo] target(s) in 3.00s
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `c:\git-repos\cloned\rpatchur\target\debug\rpatchur.exe -w C:\my-programs\buzzy-ro`

I would appreciate any direction you can give me.

Thanks for the tool

Feature Request: Patching multiple grf in one patcher

As like the title said, if possible to add a feature that we can patch multiple grf in one patcher,
so we might need multiple plist_url, and patch_url to identify each grf.

This just a suggestion, thank you for your hard work

Implement Pulling Patch Data from Azure Data Blob Instead of Web Server

It is desirable to expand patcher functionality to be able to source data assets from an azure data blob. This is desirable for these reasons:

  • reduces bandwidth requirements/congestion on primary web server
  • azure data blob is more suited to large / rapid file transfer than a web server

Unfortunately, due to the relative infancy of the Rust:Azure SDK, it would be recommended to postpone work in this area until the SDK becomes more stable to avoid future re-work.

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.