Skip to content

Commit 35e7fc2

Browse files
authored
Merge pull request #223 from satisfactorymodding/add-1.0-install-types
add FactoryGameSteam and FactoryGameEGS install types
2 parents be63180 + b23181a commit 35e7fc2

File tree

8 files changed

+41
-5
lines changed

8 files changed

+41
-5
lines changed

.vscode/tasks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Launch Wails Development Server",
8+
"type": "shell",
9+
"command": "wails dev",
10+
"problemMatcher": []
11+
}
12+
]
13+
}

backend/ficsitcli/wrapper.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package ficsitcli
33
import (
44
"fmt"
55
"log/slog"
6+
"slices"
67
"sync"
78
"time"
89

@@ -45,6 +46,13 @@ func Init() error {
4546
return nil
4647
}
4748

49+
// With and without `.exe` variants in case it is missing on Linux
50+
var executableNames = []string{
51+
"FactoryGame-Win64-Shipping.exe", "FactoryGame-Win64-Shipping",
52+
"FactoryGameSteam-Win64-Shipping.exe", "FactoryGameSteam-Win64-Shipping",
53+
"FactoryGameEGS-Win64-Shipping.exe", "FactoryGameEGS-Win64-Shipping",
54+
}
55+
4856
func (f *ficsitCLI) StartGameRunningWatcher() {
4957
gameRunningTicker := time.NewTicker(5 * time.Second)
5058
go func() {
@@ -56,7 +64,7 @@ func (f *ficsitCLI) StartGameRunningWatcher() {
5664
}
5765
f.isGameRunning = false
5866
for _, process := range processes {
59-
if process.Executable() == "FactoryGame-Win64-Shipping.exe" || process.Executable() == "FactoryGame-Win64-Shipping" {
67+
if slices.Contains(executableNames, process.Executable()) {
6068
f.isGameRunning = true
6169
break
6270
}

backend/installfinders/common/gameinfo.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ var gameInfo = []installType{
4141
versionPath: filepath.Join("Engine", "Binaries", "Win64", "FactoryServer-Win64-Shipping.version"),
4242
installType: InstallTypeWindowsServer,
4343
},
44+
// Update 1.0 stuff
45+
{
46+
executable: "FactoryGameSteam.exe",
47+
versionPath: filepath.Join("Engine", "Binaries", "Win64", "FactoryGameSteam-Win64-Shipping.version"),
48+
installType: InstallTypeWindowsClient,
49+
},
50+
{
51+
executable: "FactoryGameEGS.exe",
52+
versionPath: filepath.Join("Engine", "Binaries", "Win64", "FactoryGameEGS-Win64-Shipping.version"),
53+
installType: InstallTypeWindowsClient,
54+
},
4455
}
4556

4657
type GameVersionFile struct {

backend/installfinders/common/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package common
33
type GameBranch string
44

55
var (
6+
// TODO rename to BranchRelease later https://github.com/satisfactorymodding/SatisfactoryModManager/pull/223#issuecomment-2342831142
67
BranchEarlyAccess GameBranch = "Early Access"
78
BranchExperimental GameBranch = "Experimental"
89
)

build/windows/installer/project.nsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ Function .onVerifyInstDir
253253

254254
Check:
255255
IfFileExists $currentDir\FactoryGame.exe GameExists
256+
IfFileExists $currentDir\FactoryGameSteam.exe GameExists
257+
IfFileExists $currentDir\FactoryGameEGS.exe GameExists
256258
IfFileExists $currentDir\FactoryServer.exe GameExists
257259
IfFileExists $currentDir\FactoryServer.sh GameExists
258260
${GetParent} $currentDir $currentDir

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"Unignore",
2727
"urql",
2828
"wailsjs",
29-
"wailsjsdir"
29+
"wailsjsdir",
30+
"xsync"
3031
],
3132
// flagWords - list of words to be always considered incorrect
3233
// This is useful for offensive words and common spelling errors.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/puzpuzpuz/xsync/v3 v3.0.2
1414
github.com/samber/lo v1.39.0
1515
github.com/samber/slog-multi v1.0.2
16-
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240505210117-d051b5800ad7
16+
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240911000311-d948fdd42ee4
1717
github.com/satisfactorymodding/ficsit-resolver v0.0.2
1818
github.com/shirou/gopsutil/v3 v3.24.3
1919
github.com/spf13/viper v1.18.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
151151
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
152152
github.com/samber/slog-multi v1.0.2 h1:6BVH9uHGAsiGkbbtQgAOQJMpKgV8unMrHhhJaw+X1EQ=
153153
github.com/samber/slog-multi v1.0.2/go.mod h1:uLAvHpGqbYgX4FSL0p1ZwoLuveIAJvBECtE07XmYvFo=
154-
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240505210117-d051b5800ad7 h1:ITYfjBI+SYQs4CmykE5CIi6IU8UFpMoeYLwqUKRxysc=
155-
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240505210117-d051b5800ad7/go.mod h1:sJNDolwt76b/+iUr475IXzok710dGIJZ3xJvNkp0smI=
154+
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240911000311-d948fdd42ee4 h1:3LaQ6LMl2Lk9RYjDTKj+tJmA9EpMlMSkdu04UDcIgVA=
155+
github.com/satisfactorymodding/ficsit-cli v0.5.1-0.20240911000311-d948fdd42ee4/go.mod h1:sJNDolwt76b/+iUr475IXzok710dGIJZ3xJvNkp0smI=
156156
github.com/satisfactorymodding/ficsit-resolver v0.0.2 h1:dj/OsDLpaMUqCHpfBVHvDMUv2nf5gT4HS2ydBMkmtcQ=
157157
github.com/satisfactorymodding/ficsit-resolver v0.0.2/go.mod h1:ckKMmMvDoYbbkEbWXEsMes608uvv6EKphXPhHX8LKSc=
158158
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=

0 commit comments

Comments
 (0)