Compare commits

..

3 Commits

Author SHA1 Message Date
Zamitto
51f8b12e13 chore: bump version 2025-09-02 05:59:34 -03:00
Zamitto
957a6b512e fix: handle case where steam is not installed 2025-09-02 05:59:15 -03:00
Zamitto
8bc1c1c58c fix: handle error on getting steam path from windows registry
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled
2025-09-01 21:41:18 -03:00
5 changed files with 23 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "hydralauncher",
"version": "3.6.4",
"version": "3.6.6",
"description": "Hydra",
"main": "./out/main/index.js",
"author": "Los Broxas",

View File

@@ -94,7 +94,7 @@ const createSteamShortcut = async (
if (!steamUserIds.length) {
logger.error("No Steam user ID found");
return;
throw new Error("No Steam user ID found");
}
const [iconImage, heroImage, logoImage, coverImage, libraryImage] =

View File

@@ -279,13 +279,17 @@ export const findAchievementFiles = (game: Game) => {
};
const steamUserIds = await getSteamUsersIds();
const steamPath = await getSteamLocation();
const steamPath = await getSteamLocation().catch(() => null);
export const findAchievementFileInSteamPath = async (game: Game) => {
if (!steamUserIds.length) {
return [];
}
if (!steamPath) {
return [];
}
const userPreferences = await db.get<string, UserPreferences | null>(
levelKeys.userPreferences,
{

View File

@@ -42,6 +42,10 @@ export const getSteamLocation = async () => {
reject(err);
}
if (!value) {
reject(new Error("SteamPath not found in registry"));
}
resolve(value.value);
});
});
@@ -78,7 +82,15 @@ export const getSteamAppDetails = async (
};
export const getSteamUsersIds = async () => {
const userDataPath = await getSteamLocation();
const userDataPath = await getSteamLocation().catch(() => null);
if (!userDataPath) {
return [];
}
if (!fs.existsSync(userDataPath)) {
return [];
}
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
withFileTypes: true,

View File

@@ -41,7 +41,9 @@ export function GameItem({ game }: GameItemProps) {
setAdded(exists);
}, [library, game.shop, game.objectId]);
const addGameToLibrary = async (event: React.MouseEvent | React.KeyboardEvent) => {
const addGameToLibrary = async (
event: React.MouseEvent | React.KeyboardEvent
) => {
event.stopPropagation();
if (added || isAddingToLibrary) return;