redromnon / HeroicBashLauncher

Directly launch any Epic Games Store and GOG game from anywhere without Heroic on Linux.
GNU General Public License v3.0
354 stars 17 forks source link

Length of appids generated with calculateappid function differs from those generated internally by Steam #124

Closed aclist closed 1 year ago

aclist commented 1 year ago

As a test (boiled down to the bare essentials):

import binascii
exepath = '"/some/path/to/game/game.exe"'
appname = 'game.exe'
appid = binascii.crc32(str.encode(exepath + appname)) | 0x80000000
print(appid)

The result is an 11-digit integer. When the same path and binary is supplied manually to Steam via Add a Non-Steam Game, the resulting appid is 21 digits long. (Steam-generated appid can be explored via shortcuts.vdf or by generating a desktop shortcut internally through Steam) Is there a reason for this discrepancy?

Using the 21-digit appids to directly launch user-defined apps via the Steam browser protocol works, but the ones generated with the function above do not. I ask because I intend to reuse a portion of the logic above in an unrelated application. Thanks.

aclist commented 1 year ago

Please disregard, seems the appid generated above is the base shortcut id and I needed to recalculate it to obtain the longer Big Picture id.