endlessm / endless-key-app

Endless Key app for Windows (formerly known as kolibri-app)
https://www.endlessos.org/key
MIT License
2 stars 1 forks source link

electron: Improve the way to detect it is an APPX, or not #82

Closed starnight closed 2 years ago

starnight commented 2 years ago

We set the Endless Key (Windows)'s metrics ID by detecting the directory path. However, the original pattern "Program Files\WindowsApps"'s "Program Files" might be other string with different localization. For example, "Program Files" in French will be "Programmes". This will confuse the metrics. Even, the app is installed from an APPX package or Microsoft store.

This patch replaces the "Program Files" with the environment variable %PROGRAMFILES% on Windows, which already takes care the localization.

https://phabricator.endlessm.com/T33688