Giter Site home page Giter Site logo

Comments (3)

dreamer avatar dreamer commented on June 3, 2024

I remember this issue existing since the very beginning, and one of the reason was: correctly handling package updates (which was non-trivial when some game engines decided to effectively avoid doing any versioning at all).

I considered several options, and ATM I think checking for hashes might be the best solution after all... Perhaps we don't need to store hashes in packages themselves - they could be calculated once after tarball is downloaded and kept in a file in the cache.

from luxtorpeda.

d10sfan avatar d10sfan commented on June 3, 2024

Yeah that's a good idea, hashing the downloads as they come in and storing the result in a file, then can check if there's any differences between the hashes found on disk and the ones generated at runtime.

The hash file could be a file with an array of hashes for each app id & choice combination. So then when the game launches again, a new array would be generated of all the hashes used, and if any of them don't match, extract the ones that don't match. So the hash file could be stored in ~/.cache/luxtorpeda/hashes/appid-choice.json. Choice would be there in cases for doom, where someone could pick between gzdoom and other engines for example.

It looks like there's some examples of hashing files in sha: https://github.com/RustCrypto/hashes#hashing-readable-objects.

It'll probably also be a good idea to make this configurable with the config.json file, to allow it to do what it does currently, to extract on each run, but then if enabled, it'd check the hash first and if so, skip the extraction step.

from luxtorpeda.

d10sfan avatar d10sfan commented on June 3, 2024

This is implemented in #206

The next release will have it.

from luxtorpeda.

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.