Git Product home page Git Product logo

Comments (8)

2E0PGS avatar 2E0PGS commented on July 19, 2024

Luckily I waited until updates completed before clicking OK on that dialog as it did kill the bnet launcher after pressing OK.

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

The battle.net client is the one doing the update so there's really no easy way to check if a game is updating or not.

I really didn't account for updates has I usually leave the battle.net client running, so will improve the message to allow waiting for the update to complete.

Has for doing it automatically, maybe i could hook into battle.net client agent and try and look what files it has open to deduce if it's updating, so I'll try to look into it for a later version.

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

Partially address in 3323f1b which fixes teh bug part of it. There's a new pre-release 2.01 version with those changes.

As for the enhancement of detecting updates only way so far seems to doing kernel calls which are windows version dependent.

from bnetlauncher.

reed216 avatar reed216 commented on July 19, 2024

You can pull update information from the ".patch.result" files in the game install directory (it's a hidden file) 0 means the game is up to date, I don't know what value it's set to for preload updates. Will check when the 8.1 WoW prepatch is scheduled. As for finding game install directories, either Iā€™m not looking far enough, or blizzard are hiding it. This has been the main reason I never looked at submitting a pull for this since Iā€™m going off hardcoded values at the moment.

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

@iMintty yeah, I suspect it's stored in C:\ProgramData\Battle.net\Agent\product.db but seems to be a internal struct dumped into a file.

There's also the case when the client itself might be updating, but it seems the "C:\ProgramData\Battle.net\Agent" folder also has a ".patch.result" so that might be an option (assuming it's the only place that gets updated.

So I think you might be onto something, if product.db is made properly readable it would be possible to match launch command with a path and search for the patch status.

A big unknown is how it changes during the launch process, could I just check it once the client is running? would i need to keep looking at while checking if the game is running? I don't know.

Regardless, implementing patch detection seems a lot more feasible.

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

Leaving this note mostly for myself.

Tried to make some sense of products.db using a hex editor and binary templates but couldn't make sense of it. Managed to figure out strings where prefixed by a byte with their length but that's about it, no idea what the terminator byte is supposed to signal.

Attaching the binary template of the bit I uncovered. bnet_product.bt.txt

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

product.db is in the protobuf format, schema has been decoded by other projects.

from bnetlauncher.

dafzor avatar dafzor commented on July 19, 2024

After some testing i concluded that the .patch.result does not update in realtime when the game has an update. So it seems an unreliable method of verifying if it's updating or not.

from bnetlauncher.

Related Issues (20)

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.