Skip to content

Commit 0511f47

Browse files
committed
feat: fall back to AppName when Epic manifest is missing MainGameAppName
tested on epic experimental
1 parent bf7a319 commit 0511f47

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • backend/installfinders/launchers/epic

backend/installfinders/launchers/epic/epic.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type Manifest struct {
1313
CatalogNamespace string `json:"CatalogNamespace"`
1414
CatalogItemID string `json:"CatalogItemID"`
1515
MainGameAppName string `json:"MainGameAppName"`
16+
AppName string `json:"AppName"`
1617
AppVersionString string `json:"AppVersionString"`
1718
InstallLocation string `json:"InstallLocation"`
1819
}
@@ -35,7 +36,7 @@ func GetEpicBranch(appName string) (common.GameBranch, error) {
3536
case ExperimentalDedicatedServerAppName:
3637
return common.BranchExperimental, nil
3738
default:
38-
return "", fmt.Errorf("unknown branch for %s", appName)
39+
return "", fmt.Errorf("unknown branch for '%s'", appName)
3940
}
4041
}
4142

@@ -103,6 +104,11 @@ func FindInstallationsEpic(epicManifestsPath string, launcher string, platform c
103104
}
104105

105106
branch, err := GetEpicBranch(epicManifest.MainGameAppName)
107+
108+
if err != nil {
109+
// Some Epic installs appear to come in with a null MainGameAppName; fall back to AppName
110+
branch, err = GetEpicBranch(epicManifest.AppName)
111+
}
106112
if err != nil {
107113
findErrors = append(findErrors, common.InstallFindError{
108114
Path: installLocation,

0 commit comments

Comments
 (0)