Skip to content

Commit

Permalink
chore: store games and prefixes on real home
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioislima committed Oct 11, 2023
1 parent e2fde38 commit 1e50a96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
]
},
"snap": {
"allowNativeWayland": true,
"base": "core20",
"category": "Games",
"synopsis": "An Open Source Launcher for GOG, Amazon and Epic Games",
Expand All @@ -150,7 +149,8 @@
"interface": "personal-files",
"write": [
"$HOME/.local/share/Steam",
"$HOME/.local/share/lutris"
"$HOME/.local/share/lutris",
"$HOME/Games"
]
}
}
Expand Down
10 changes: 3 additions & 7 deletions src/backend/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const currentGameConfigVersion: GameConfigVersion = 'v0'
const currentGlobalConfigVersion: GlobalConfigVersion = 'v0'

const flatPakHome = env.XDG_DATA_HOME?.replace('/data', '') || homedir()
let userHome = homedir()
const userHome = isSnap ? env.SNAP_REAL_HOME! : homedir()
const configFolder = app.getPath('appData')
const appFolder = join(configFolder, 'heroic')
const legendaryConfigPath = isSnap
Expand All @@ -51,8 +51,8 @@ const toolsPath = join(appFolder, 'tools')
const heroicIconFolder = join(appFolder, 'icons')
const runtimePath = join(toolsPath, 'runtimes')
const userInfo = join(legendaryConfigPath, 'user.json')
const heroicInstallPath = join(homedir(), 'Games', 'Heroic')
const defaultWinePrefixDir = join(homedir(), 'Games', 'Heroic', 'Prefixes')
const heroicInstallPath = join(userHome, 'Games', 'Heroic')
const defaultWinePrefixDir = join(userHome, 'Games', 'Heroic', 'Prefixes')
const defaultWinePrefix = join(defaultWinePrefixDir, 'default')
const anticheatDataPath = join(appFolder, 'areweanticheatyet.json')
const imagesCachePath = join(appFolder, 'images-cache')
Expand Down Expand Up @@ -142,10 +142,6 @@ export function getSteamCompatFolder() {
} else if (isMac) {
return join(userHome, 'Library/Application Support/Steam')
} else {
if (isSnap) {
console.log({ snapReal: env.SNAP_REAL_HOME, home: env.HOME, userHome })
userHome = env.SNAP_REAL_HOME || userHome
}
const flatpakSteamPath = join(
userHome,
'.var/app/com.valvesoftware.Steam/.steam/steam'
Expand Down

0 comments on commit 1e50a96

Please sign in to comment.