Skip to content

Commit ee4d0f0

Browse files
authored
Handle Epic manifest missing MainGameAppName (#357)
* feat: fall back to `AppName` when Epic manifest is missing `MainGameAppName` tested on epic experimental * docs: WIP directions on redirecting to local ficsit-cli build * docs: go replace directive info * Pin golangci-lint version 2.6.2 * Run formatter
1 parent bf7a319 commit ee4d0f0

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
3434
- uses: golangci/golangci-lint-action@v9
3535
with:
36-
version: v2.6
36+
version: v2.6.2
3737
only-new-issues: true
3838

3939
lint-frontend:

DEPLOYMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Since the build action is triggered on every push to any branch,
99
non developers can obtain testing builds easily from [GitHub Actions](https://github.com/satisfactorymodding/SatisfactoryModManager/actions/workflows/push.yml) artifact output.
1010
You need to be signed into GitHub to download them, and they expire after some time.
1111

12-
TODO how to point dev builds to ficsit.dev (staging) instead?
12+
To point development builds to ficsit.dev instead of production, see the [Readme's configuration section](./README.md#Configuration).
1313

1414
## Releases
1515

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ If you want to point to the SMR staging API instead of production, edit:
5151
* `main.go` to set `api-base` to the staging api (`https://api.ficsit.dev`)
5252
* `frontend\.graphqlrc.yml` to set `schema` to the staging api (`https://api.ficsit.dev/v2/query`)
5353

54+
If you want to use a local build of [ficsit-cli](https://github.com/satisfactorymodding/ficsit-cli),
55+
use the [Go `replace` directive](https://go.dev/wiki/Modules#when-should-i-use-the-replace-directive) (and do not commit the change),
56+
for example:
57+
58+
```ps1
59+
go mod edit -replace github.com/satisfactorymodding/ficsit-cli=C:\Git\ficsit-cli
60+
```
61+
5462
### Development Server
5563

5664
The development server will hot reload whenever you make changes to the Go or Typescript code.

backend/installfinders/launchers/epic/epic.go

Lines changed: 6 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,10 @@ func FindInstallationsEpic(epicManifestsPath string, launcher string, platform c
103104
}
104105

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

0 commit comments

Comments
 (0)