Code Monkey home page Code Monkey logo

Comments (12)

rig0 avatar rig0 commented on May 23, 2024

After inspecting the "games.json" file I noticed that the shortcut paths for some non-steam games are not accurate. I double checked the ones that weren't working by adding a shortcut to my desktop and comparing the appid's. I suspect my problem lies in "shortcuts.vdf" or the parsing of it but I'm not exactly sure how to read that file. I tried Notepad++ (with the vdf languages) with no luck.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Which of the non-Steam games are not working and which are working? You can open shortcuts.vdf in e.g. Sublime Text if you force it to be opened with UTF-8 encoding, but there will be some garbage characters. Perhaps NP++ has similar functionality. I'm not sure why a few .vdf files are not in plain text while most others are. The AppIDs for non-Steam game shortcuts are not stored in shortcuts.vdf though and they have to be generated, which is done by concatenating two strings (the path and the name of the shortcut), converting them to a bytes object, calculating the CRC32 checksum of that object, and then doing some bitwise operations on the checksum. If you could give me the name, path, and the valid AppID generated by Steam for one of the non-functioning shortcuts, then I could try to figure out why my script is generating invalid AppIDs in some cases. A couple sets of the aforementioned values would be even better.

I'm curious as to the origin (which skin triggered them) of the two error messages you listed and I just want to make sure that they are relevant. Have you specified a set of bangs to execute when starting game and/or a game stops running? If not, then try clearing Rainmeter's log and refreshing Lauhdutin. Do the errors still show up? When do they show up? Do they show up at a specific point in e.g. the execution of the backend scripts?

The issue with the Downloading... status message is really weird. The main backend Python script is clearly able to successfully execute Rainmeter bangs (or else Downloading... would not have shown up at all) and if the banners do show up, then the Lua function, which is responsible for hiding all status messages and displaying the banners, has been executed. It must be an issue on the Rainmeter/Lua side of things.

from lauhdutin.

rig0 avatar rig0 commented on May 23, 2024

Alright that clears up most things. So I think I figured out the problem and was able to replicate it for both cases. There are only 2 games that don't work, Overwatch and The Witcher 3 - Wild Hunt.

Overwatch The Witcher 3 - Wild Hunt
"G:\Overwatch\bnetlauncher.exe" pro "G:\The Witcher 3 Wild Hunt\bin\x64\witcher3.exe"
Steam AppID: 14319242745229606912 Steam AppID: 11050366780038971392
Skin AppID: 16449766400601358336 Skin AppID: 11519613212920119296

The first problem I suspect to be with the script to move "The" to the end of the name. Steam must be generating the AppID for The Witcher 3 - Wild Hunt while your script is generating the AppID for Witcher 3 - Wild Hunt, The. I was able to replicate it by adding another game beginning in "The". (See "The non-steam Test" below)

The second problem is with handling arguments passed to steam. As you can see above, I passed an argument to the Overwatch launcher in steam. The argument must be causing an issue with your AppID script. I replicated this issue by adding another game both with and without an argument. (See "Arguments Test" below)

The non-steam Test Arguments Test
"C:\Users\User\Desktop\Manager\test.exe" "C:\Users\ADMIN\Desktop\Test" pro
Steam AppID: 12819642840678137856 Steam AppID: 14965587966968201216
Skin AppID: 15302447929940246528 Skin AppID: 15833381985956397056

I tried "Arguments Test" without the argument first and it launched. I then added the argument and rebuilt the skin. When I tried to launch it again it didn't launch at all and the AppID in games.json changed.

As far as the error's from the rainmeter log, they happen every time I refresh or rebuild the skin. I am not using any custom bangs.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Thanks for the thorough investigation. The issue encountered with The Witcher 3 - Wild Hunt should be fixed in the second alpha version of 2.4.0 that I just released. I'll look into adding support for arguments.

What is the path to the skin? Is it along the lines of \Rainmeter\Skins\Lauhdutin\ or have you modified the folder structure? There are a few places in the code that executes the !ShowMeterGroup and !HideMeterGroup bangs, but they would normally use Lauhdutin as the config/skin that they affect. I included a tentative fix for this in the new alpha as well.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

A new alpha version, which should fix the issue with non-Steam game shortcuts with arguments, is out. Regular Windows shortcuts with arguments still don't work properly.

from lauhdutin.

rig0 avatar rig0 commented on May 23, 2024

Thanks for the fast response. I admittedly changed the name of the skin to "Steam Launcher 2.4.0" so the path did change. I restored it to Lauhdutin and now the Downloading... is gone!

I also downloaded and tested the latest (2.4.0 Alpha 3) and can confirm both AppID issues have been fixed!

from lauhdutin.

rig0 avatar rig0 commented on May 23, 2024

Can also confirm that I'm able to rename the skin with no problem.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Am I correct in assuming that the error messages are not appearing in the Rainmeter log now?

Adding support for arguments in regular Windows shortcuts is going to be tricky with my current quick and dirty method for parsing .lnk files.

from lauhdutin.

rig0 avatar rig0 commented on May 23, 2024

Yes, the Rainmeter log is clean of errors now.

I will take a look at the code for windows shortcuts and see if there's anything I can possibly contribute.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

The method that I'm currently using is opening the .lnk files as binary files, reading all of the contents one byte at a time, and going from there. The advantage is that I don't need to add any additional dependencies (e.g. pywin32) for the user to download and install, but it does mean that there are some limitations because it's all a bit of a mess when you do it like that. Lately I've been looking into what could be done with Python's ctypes module.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Currently playing around with using scripts written in VBScript to get the target path and arguments.

from lauhdutin.

Kapiainen avatar Kapiainen commented on May 23, 2024

Support for arguments has been implemented and will be in the next alpha release.

from lauhdutin.

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.