Skip to content

Commit 55af0f2

Browse files
committed
Merge branch 'master' into Copy_Mods_Fix
2 parents b39e356 + ad9aa85 commit 55af0f2

File tree

27 files changed

+7173
-5542
lines changed

27 files changed

+7173
-5542
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use_nix

.github/actions/setup/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ runs:
1818
steps:
1919
- uses: actions/setup-go@v5
2020
with:
21-
go-version: 1.22
21+
go-version: 1.25
2222

2323
- uses: pnpm/action-setup@v3
2424
if: ${{ inputs.frontend == 'true' }}
2525
with:
26-
version: 8.6.1
26+
version: 10
2727

2828
- uses: actions/setup-node@v4
2929
if: ${{ inputs.frontend == 'true' }}
3030
with:
31-
node-version: 18
31+
node-version: 22
3232
cache: 'pnpm'
3333
cache-dependency-path: frontend
3434

.github/workflows/push.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ jobs:
3131
mkdir -p frontend/build
3232
echo "" > frontend/build/.gitkeep
3333
34-
- uses: golangci/golangci-lint-action@v4
34+
- uses: golangci/golangci-lint-action@v8
3535
with:
36-
version: v1.61
36+
version: v2.6
3737
only-new-issues: true
38-
skip-pkg-cache: true
39-
skip-build-cache: true
4038

4139
lint-frontend:
4240
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ dist
77
# Specifically allow the provided code workspace with the multi-root workaround
88
!.vscode/SatisfactoryModManager.code-workspace
99

10+
# Devtools downloaded by direnv
11+
.direnv
12+
1013
# Created by https://www.toptal.com/developers/gitignore/api/goland+all,go,visualstudiocode
1114
# Edit at https://www.toptal.com/developers/gitignore?templates=goland+all,go,visualstudiocode
1215

.golangci.yml

Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,70 @@
1-
linters-settings:
2-
wrapcheck:
3-
ignorePackageGlobs:
4-
- github.com/satisfactorymodding/SatisfactoryModManager/*
5-
6-
govet:
7-
enable-all: true
8-
disable:
9-
- shadow
10-
- fieldalignment
11-
12-
gocritic:
13-
disabled-checks:
14-
- ifElseChain
15-
16-
gci:
17-
custom-order: true
18-
sections:
19-
- standard
20-
- default
21-
- prefix(github.com/satisfactorymodding/SatisfactoryModManager)
22-
- blank
23-
- dot
24-
25-
issues:
26-
exclude-rules:
27-
- linters:
28-
- typecheck
29-
text: "no matching files found"
30-
exclude-dirs:
31-
- frontend
32-
1+
version: "2"
332
run:
34-
timeout: 5m
353
build-tags:
364
- webkit2_41
37-
385
linters:
39-
disable-all: true
6+
default: none
407
enable:
41-
- errcheck
42-
- gosimple
43-
- govet
44-
- ineffassign
45-
- staticcheck
46-
- typecheck
47-
- unused
488
- bidichk
499
- contextcheck
5010
- durationcheck
11+
- errcheck
5112
- errorlint
5213
- goconst
53-
- goimports
54-
- revive
14+
- gocritic
15+
- govet
16+
- ineffassign
5517
- misspell
18+
- nonamedreturns
5619
- prealloc
20+
- revive
21+
- staticcheck
22+
- unused
5723
- whitespace
5824
- wrapcheck
25+
settings:
26+
gocritic:
27+
disabled-checks:
28+
- ifElseChain
29+
govet:
30+
disable:
31+
- shadow
32+
- fieldalignment
33+
enable-all: true
34+
wrapcheck:
35+
ignore-package-globs:
36+
- github.com/satisfactorymodding/SatisfactoryModManager/*
37+
revive:
38+
rules:
39+
- name: var-naming
40+
arguments:
41+
- [ ] # AllowList
42+
- [ ] # DenyList
43+
- - skip-package-name-checks: true
44+
exclusions:
45+
generated: lax
46+
presets:
47+
- comments
48+
- common-false-positives
49+
- legacy
50+
- std-error-handling
51+
paths:
52+
- frontend
53+
formatters:
54+
enable:
5955
- gci
60-
- gocritic
6156
- gofumpt
62-
- nonamedreturns
57+
- goimports
58+
settings:
59+
gci:
60+
sections:
61+
- standard
62+
- default
63+
- prefix(github.com/satisfactorymodding/SatisfactoryModManager)
64+
- blank
65+
- dot
66+
custom-order: true
67+
exclusions:
68+
generated: lax
69+
paths:
70+
- frontend

.goreleaser.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ builds:
3636
- -- # Marker for task to interpret remaining arguments as CLI_ARGS
3737
- -s
3838
- -skipbindings
39+
- -devtools
3940

4041
overrides:
4142
- goos: linux
@@ -65,6 +66,7 @@ builds:
6566
- -- # Marker for task to interpret remaining arguments as CLI_ARGS
6667
- -s
6768
- -skipbindings
69+
- -devtools
6870

6971
tags:
7072
- webkit2_41
@@ -90,6 +92,7 @@ builds:
9092
- -s
9193
- -skipbindings
9294
- -nsis
95+
- -devtools
9396

9497
### Package
9598

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ for common issues and their solutions.
3838

3939
### Dependencies
4040

41-
* [Go 1.22](https://go.dev/doc/install)
41+
* [Go](https://go.dev/doc/install) (the version in [the Setup CI action `go-version`](./.github/actions/setup/action.yml))
4242
* [pnpm](https://pnpm.io/installation)
43-
* [nodejs](https://nodejs.org/en/download/)
44-
* Wails (`go install github.com/wailsapp/wails/v2/cmd/wails@latest`) (or the version in [the Setup CI action](./.github/actions/setup/action.yml))
43+
* [nodejs](https://nodejs.org/en/download/) (the version in [the Setup CI action `node-version`](./.github/actions/setup/action.yml))
44+
* Wails (to install, execute the `run` command from [the Setup CI action's `Install Wails` step](./.github/actions/setup/action.yml))
4545
* IDE of Choice. Goland or VSCode suggested.
4646

4747
### Configuration
@@ -105,6 +105,13 @@ You may also need to manually run the frontend linter. First, navigate to the `f
105105
pnpm run format
106106
```
107107

108+
### Assorted Development Helpers
109+
110+
* Browser dev tools should automatically open when running `wails dev`.
111+
* You can open the URL the frontend is being served on in a browser to use browser extensions like the Svelte Devtools.
112+
Check the logs for `Using DevServer URL:` to find the correct URL.
113+
* You can manually trigger an error popup for testing purposes by running `debugCauseErrorMessage("your message here")` in the devtools console.
114+
108115
### Localization
109116

110117
If you'd like to help translate and localize SMM to different languages, join our [discord server](https://discord.ficsit.app/).

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ tasks:
6565
lint:
6666
silent: true
6767
preconditions:
68-
- golangci-lint --version | grep -q 1.61
68+
- golangci-lint --version | grep -q 2.6
6969
cmds:
7070
- GOOS=windows golangci-lint run
7171
- GOOS=linux golangci-lint run

backend/installfinders/launchers/crossover/crossover_darwin.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
"github.com/satisfactorymodding/SatisfactoryModManager/backend/installfinders/common"
1212
"github.com/satisfactorymodding/SatisfactoryModManager/backend/installfinders/launchers"
13+
"github.com/satisfactorymodding/SatisfactoryModManager/backend/installfinders/launchers/epic"
1314
"github.com/satisfactorymodding/SatisfactoryModManager/backend/installfinders/launchers/steam"
1415
)
1516

@@ -44,11 +45,15 @@ func crossover() ([]*common.Installation, []error) {
4445
continue
4546
}
4647
bottleRoot := filepath.Join(bottlesPath, bottle.Name())
47-
bottleInstalls, bottleErrs := steam.FindInstallationsWine(bottleRoot, "CrossOver", nil)
48-
installations = append(installations, bottleInstalls...)
49-
if bottleErrs != nil {
50-
errors = append(errors, bottleErrs...)
48+
search := func(finder func(winePrefix string, launcher string, launchPath []string) ([]*common.Installation, []error)) {
49+
bottleInstalls, bottleErrs := finder(bottleRoot, "CrossOver", nil)
50+
installations = append(installations, bottleInstalls...)
51+
if bottleErrs != nil {
52+
errors = append(errors, bottleErrs...)
53+
}
5154
}
55+
search(steam.FindInstallationsWine)
56+
search(epic.FindInstallationsWine)
5257
}
5358

5459
return installations, errors

backend/installfinders/launchers/epic/epic_wine_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func FindInstallationsWine(winePrefix string, launcher string, launchPath []stri
1616
platform := common.WineLauncherPlatform(winePrefix)
1717

1818
if _, err := os.Stat(platform.ProcessPath(epicWineManifestPath)); os.IsNotExist(err) {
19-
return nil, []error{fmt.Errorf("Epic is not installed in %s", winePrefix)}
19+
return nil, []error{fmt.Errorf("epic is not installed in %s", winePrefix)}
2020
}
2121

2222
return FindInstallationsEpic(

0 commit comments

Comments
 (0)