Jump to content

RPatchur, a customizable patcher


Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

8 hours ago, L1nkZ said:

I'll have to think about the idea of exposing the plist's content to the UI (plus the ability to download a particular patch file) and how that would work in practice. If I'm understanding you correctly.

yes yes, you get the idea correctly and gracias, for taking the idea.

I am interested in rpatchur as it is open source patcher, but sadly can't help much in the code since I am only started learning rust.

anyway thank you ?

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

A new version has been released! Here are the download links: https://github.com/L1nkZ/rpatchur/releases/tag/v0.3.0

The example UI and the documentation have been updated.

Warning to server administrators

This update includes breaking changes: the patcher's configuration file must be updated and the patcher's cache file will be reset.

Summary of changes

* It's now possible to apply patches manually (through the UI)

* Multiple patch servers can now be specified in the configuration (and if one is down, rpatchur will try to use the others)

* The cache file (containing the last patch index) is now saved as JSON and can therefore be modified with a text editor (be careful though)

* The window title can now be modified through the configuration file

* A lock file is now used to ensure that only one rpatchur process can update game files at a time

* Configuration errors are now displayed using native message boxes

 

  • MVP 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

missing progress bar in download patch or by default not have any ?

image.png.8a021cb5caf26608f47c41cddea34b23.png

  

10 hours ago, L1nkZ said:

* A lock file is now used to ensure that only one rpatchur process can update game files at a time

is there a way to ensure only single rpatchur instance is open or re-maximize and or bring to front if rpatchur is already running?

and before patch begin download / apply check if the target grf's / client is running?

also a config for save downloaded patch with check sum's so when reset patch can be taken from saved / previous downloaded patch files and if the sum of patch file is not match need to be redownloaded.

 

Edited by Litro Endemic
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

4 hours ago, Litro Endemic said:

missing progress bar in download patch or by default not have any ?

image.png.8a021cb5caf26608f47c41cddea34b23.png

Oh yeah, currently the progress bar represents the number of files being downloaded, that's why. Thanks for reminding me that though, I wanted to eventually allow the UI to know how many bytes are being downloaded so the progress bar can be truly linear (which is what we expect of a proper progress bar). I'll create an issue on github to remember.

Quote

is there a way to ensure only single rpatchur instance is open or re-maximize and or bring to front if rpatchur is already running?

Working with processes or native windows requires some work to do that properly in a cross-platform way, so this isn't on my priority list.

Quote

and before patch begin download / apply check if the target grf's / client is running?

Yes, it would be great to do so. However, same thing here, checking whether the client runs or not requires some work to do properly in a cross-platform way, plus there are a lot of cases to handle (EXE copies, renaming, etc.). Maybe we could get around that by checking some files' state as well (on GRFs for example).

Fortunately though, updating while the client is running should not be as risky (in that there's way fewer opportunities to corrupt anything).

Quote

also a config for save downloaded patch with check sum's so when reset patch can be taken from saved / previous downloaded patch files and if the sum of patch file is not match need to be redownloaded.

Yes, that's something I'm thinking about. Having to re-download everything when cancelling is annoying. Issue #20 on github is related to this and I think I'll work on both features at the same time when I do.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

From what I understand about that its enable custom enabling of certain features I guess..

Like having a button to enable Gray maps or low performance, maybe 4k HD textures ? something like that .. or just regular plain RO

Idk how something like that could work.. I mean to make it useable, like is there gonna be "uninstallation" support? I dont think so.. Hmm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  22
  • Reputation:   1
  • Joined:  06/21/20
  • Last Seen:  

On 5/11/2021 at 6:37 AM, M45T3R said:

Like having a button to enable Gray maps or low performance, maybe 4k HD textures ? something like that .. or just regular plain RO

This could be done if the patcher allows the user to download a specific .THOR file by pressing a button on the UI.
Like "Press Here to get 4K Textures" > Patcher downloads 4KTextures.thor> Patcher applies the changes into the GRF.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   2
  • Joined:  01/23/14
  • Last Seen:  

L1nkZ, first of all, thank you very much for your hard work on this! I 've been willing to use SSO for a while and I will finally do that inspired by your patcher!

I am not sure how your priority list is atm, but I'd like to recommend one thing I consider vital and still makes me miss thor patcher (not sure, though, how hard it is to implement:

  • the hability to match the CRC of (at least) the ragnarok executable and if they dont match, to re-download it. in thor main.ini config file:

    [Patch]
    //use CheckSum tool, hash for client & patcher
    // used to make sure exe is up to date
    //  (leave empty to disable this feature)
    ClientSum=
    PatcherSum=


    //This is compressed file for patcher & client update
    // To make these work, ClientSum and/or PatcherSum can't be empty
    // Note: these files should put same place as patch file (file_url in internal config)
    //Relative address, not FULL URL!
    ClientPath=
    PatcherPath=

    I find this very useful to avoid people from connecting using older clients. I use this along with the login-server hash control:

    // Client MD5 hashes
    // The client with the specified hash can be used to log in by players with
    // a group_id equal to or greater than the given value.
    // If you specify 'disabled' as hash, players with a group_id greater than or
    // equal to the given value will be able to log in regardless of hash (and even
    // if their client does not send a hash at all.)
    // Format: group_id, hash
    // Note: see 'doc/md5_hashcheck.txt' for more details.
    client_hash: 0, xxxxx

    and that is a perfect combo to force people to play whe the latest client and also to do that in a very user-friendly way.

 

again, than you very much for your hard work and for sharing this with us!

 

Best,

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

On 5/20/2021 at 1:05 PM, biali said:

L1nkZ, first of all, thank you very much for your hard work on this! I 've been willing to use SSO for a while and I will finally do that inspired by your patcher!

I am not sure how your priority list is atm, but I'd like to recommend one thing I consider vital and still makes me miss thor patcher (not sure, though, how hard it is to implement:

  • the hability to match the CRC of (at least) the ragnarok executable and if they dont match, to re-download it. in thor main.ini config file:

      [...]

again, than you very much for your hard work and for sharing this with us!

 

Best,

Hi, thank you for the feedback!

That's something that should be fairly quick to add if something like @xVaan and @M45T3R suggested (i.e., the ability to apply an arbitrary remote patch) is added as well.

I'll create an issue on github.

Edited by L1nkZ
  • Upvote 1
  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

Do you think is it possible to support video in the background and also adding login functionality  with the SSO Packet 

.......... NVM LOL you already support it great job !

 

Does it support a video as background? or a SWF file? (non clickable ofc)

Edited by M45T3R
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

54 minutes ago, M45T3R said:

Do you think is it possible to support video in the background and also adding login functionality  with the SSO Packet 

.......... NVM LOL you already support it great job !

 

Does it support a video as background? or a SWF file? (non clickable ofc)

Yes you should be able to easily embed videos (from youtube for example), maybe not in all formats though since they have to be supported by IE11. You shouldn't use Adobe Flash (SWFs) in this day and age though as it's a dead technology.

Edited by L1nkZ
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

On 5/24/2021 at 10:45 PM, L1nkZ said:

Yes you should be able to easily embed videos (from youtube for example). You shouldn't use Adobe Flash (SWFs) in this day and age though as it's a dead technology.

but what about making them non-clickable, the web engine supports video playback with local file loading?

Like read the file from the game directory or smt like that so it doesnt have delay on loading

What about LZMA patching? 

Do .thor files support LZMA? they can I think with grf editor

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

Is it normal that if I add 

<a href="google.com" target="_blank">Click Me</a>

in the bootstrap or page it won't work? It's not clickable in the exe.

Edited by Foob
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

11 hours ago, Foob said:

Is it normal that if I add 


<a href="google.com" target="_blank">Click Me</a>

in the bootstrap or page it won't work? It's not clickable in the exe.

Hi,

 

Well you should rather do

<a href="https://www.google.com/" target="_blank">Click Me</a>

But apart from that, it should work: an internet explorer window should open with a tab displaying https://www.google.com

Edited by L1nkZ
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

22 hours ago, L1nkZ said:

Hi,

 

Well you should rather do


<a href="https://www.google.com/" target="_blank">Click Me</a>

But apart from that, it should work: an internet explorer window should open with a tab displaying https://www.google.com

Tried the the same, it only opens the same window with the patcher. Doesn't open a new internet explorer.

I only have edge, does this matter? How to make it open a default browser?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

 Since we sorted this out via private messages, here's the answer for other people wondering:

Quote

 Yes it seems it's not working in all cases then.

If you've compiled the project from the master branch (as you probably have) it's pretty straightforward.

You can define a helper function in your JavaScript like so:


function open_url(url) {
	external.invoke(JSON.stringify({
		function: 'open_url',
		parameters: {
			url: url
		}
	}));
}

 

And then use it in your HTML like that:


<a href="#" onclick="open_url('https://ratemyserver.net')">Click Me</a>

 

 

  • MVP 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

Is it possible to remove the window name? And just show the web part itself?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

8 hours ago, Foob said:

Is it possible to remove the window name? And just show the web part itself?

No, unfortunately border-less designs are not doable yet. That's something I'd really like to make possible in the future though.

  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   10
  • Joined:  11/12/11
  • Last Seen:  

Hey @L1nkZ, great work on the patcher. I thought about using it as an automated command line patcher but my needs are a bit different and I don't know rust to make these changes. So I decided to create a simple patcher that simply downloads and applies patches to the filesystem.

Your patcher has been a huge help by (I think as the first) detailing the Thor file format. My question is also about that: Is the format correct/complete that you implemented? The only source I have is the ThorPrototype that Aeomin released years ago which has (almost) nothing to do with todays format. For example I couldn't reproduce the single file mode that your patcher supports using the newest Thor patcher. I assume it is a legacy format from earlier Thor versions?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

On 6/21/2021 at 9:19 PM, zhade said:

Hey @L1nkZ, great work on the patcher. I thought about using it as an automated command line patcher but my needs are a bit different and I don't know rust to make these changes. So I decided to create a simple patcher that simply downloads and applies patches to the filesystem.

Your patcher has been a huge help by (I think as the first) detailing the Thor file format. My question is also about that: Is the format correct/complete that you implemented? The only source I have is the ThorPrototype that Aeomin released years ago which has (almost) nothing to do with todays format. For example I couldn't reproduce the single file mode that your patcher supports using the newest Thor patcher. I assume it is a legacy format from earlier Thor versions?

Hi,

Oh yeah, getting rid of the UI should not be too hard. Take a look at rpatchur/src/ui.rs and basically ditch all the things related to web-view. You also need to get rid of #![windows_subsystem = "windows"] in rpatchur/src/main.rs to have the console back.

Well IIRC I just used Tokei's work on the format, from the source of GRF Editor he released a while ago here: https://herc.ws/board/files/file/138-grf-editor/. I guess the single file mode was mainly used for sending updates for the patcher executable.

Edited by L1nkZ
Link to comment
Share on other sites

  • 5 weeks later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

Hi @L1nkZ,

Awesome patcher. I've been using this for a while now.

Do you have any idea what could be causing this?
image.thumb.png.238e84daaced5bd757b8031958b8eb58.png
 

This happens to a quite few of my players

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

5 hours ago, Snaehild said:

Hi @L1nkZ,

Awesome patcher. I've been using this for a while now.

Do you have any idea what could be causing this?
image.thumb.png.238e84daaced5bd757b8031958b8eb58.png
 

This happens to a quite few of my players

Hi, thanks!

Well it seems something's wrong with what the client receives when downloading patch files. The content of the response is supposedly not as long as expected. Taking a look at your web server's access logs could maybe give a hint on what goes on.

Edited by L1nkZ
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Will this work on Windows 7? or in 32 bit servers? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   72
  • Joined:  01/24/18
  • Last Seen:  

15 hours ago, Meister said:

Will this work on Windows 7? or in 32 bit servers? 

Hi,

Yes, Windows 7 32-bit is supported.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

20 hours ago, L1nkZ said:

Hi,

Yes, Windows 7 32-bit is supported.

Alright thanks. I have tried to make it work but can't am I missing something? Should I download IE 11 or Edge?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  22
  • Reputation:   1
  • Joined:  06/21/20
  • Last Seen:  

17 hours ago, Meister said:

Alright thanks. I have tried to make it work but can't am I missing something? Should I download IE 11 or Edge?

I recommend you to download IE 11.
W7 users will experiencie issues if they don't have installed IE 11.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...