Detecting whether Krita comes from a store

Halla Rempt halla at valdyas.org
Thu Jul 27 08:04:26 BST 2023


On donderdag 27 juli 2023 06:48:20 CEST Iván Yossi wrote:
> The issue with the Krita on Steam for macos is that the krita.app used is the exact same as the one we have for download at krita.org. There is nothing aside from the launch location to differentiate them.
> 
> From what emmet told in chat and what I thought is
> 
> • add an argument to krita on launch to know we are from the store, we currently launch in krita on steam with a direct call to the krita bin inside MacOS directory. This will pose a problem for older versions if the argument is not recognized and causes error.
> • or locate the bundle location and flag it if its running from inside a steam library location (which can be anywhere)
> • or add a dummy file to identify the bundle (emmet did that just now and the app ran without complaint)
> 
> My guess is that adding a launch argument is more universal than adding dummy files or looking for path locations, however there could be a problem of launching an old version with a new unknown argument (I hace no idea if the launch command is individual for each upload or not for each store).

let's go with that -- a file "macossteam" in the krita.app/contents/macos folder, i.e. directly next to the application should work?


> 
> on macStore we cannot set launch options, but the krita distributed to the macstore is custom signed and can be easily identified on runtime using the sandbox entitlement (that is already coded and available) or as nicolas17 adding a method to check the paid status from the NSBundle '[[NSBundle mainBundle] appStoreReceiptURL]'
> 

Could you provide some code that does that?






More information about the kimageshop mailing list