Skip to content

Commit 7db4ff3

Browse files
committed
fix(apps,config,launch): register EABackgroundService, -EpicPortal launch arg
Root causes (confirmed via Wine services.c + MS SC_FAILURE_ACTIONS docs): - Wine's SCM has no FailureActions restart logic; marked SERVICE_STOPPED on exit only — our FailureActions=zeros was correct but irrelevant - Services use hidden __wineservice_winstation\Default desktop; invisible windows are expected behaviour - Epic: launches in tray-only/background mode without -EpicPortal; UI never opens - EA: msiextract skips the service-registration custom action; EADesktop.exe calls StartService("EABackgroundService"), gets ERROR_SERVICE_DOES_NOT_EXIST, falls back to repair/bootstrapper mode Fixes: - config.sh: add APP_LAUNCH_ARGS associative array; epic-games gets -EpicPortal - launch.sh: launch_app appends APP_LAUNCH_ARGS[$app_key] after the exe binary - apps.sh: ea-desktop post-install regedit /s now registers EABackgroundService (Type=0x10 WIN32_OWN_PROCESS, Start=0x3 DEMAND_START, ImagePath with -start flag, ObjectName=LocalSystem) so StartService() succeeds from EADesktop.exe
1 parent c9b088a commit 7db4ff3

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

lib/apps.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,24 @@ install_app() {
131131
ea-desktop)
132132
# DEMAND_START + no restart; also create install registry key that EADesktop.exe
133133
# checks on startup — if absent it falls back to bootstrapper/repair mode.
134+
# Register EABackgroundService so StartService() succeeds — msiextract skips this CA.
134135
local _ea_ver
135136
_ea_ver=$(basename "${installer_path:-}" | grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -1)
136137
_ea_ver="${_ea_ver:-13.759.0.0}"
137138
printf 'Windows Registry Editor Version 5.00\n\n'\
138-
'[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\EABackgroundService]\n'\
139-
'"Start"=dword:00000003\n'\
140-
'"FailureActions"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\n\n'\
141139
'[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Desktop]\n'\
142140
'"InstallDir"="C:\\\\Program Files\\\\Electronic Arts\\\\EA Desktop\\\\EA Desktop\\\\"\n'\
143141
'"Version"="'"$_ea_ver"'"\n\n'\
144142
'[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Desktop\\Install]\n'\
145-
'"InstallDir"="C:\\\\Program Files\\\\Electronic Arts\\\\EA Desktop\\\\EA Desktop\\\\"\n' \
143+
'"InstallDir"="C:\\\\Program Files\\\\Electronic Arts\\\\EA Desktop\\\\EA Desktop\\\\"\n\n'\
144+
'[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\EABackgroundService]\n'\
145+
'"Type"=dword:00000010\n'\
146+
'"Start"=dword:00000003\n'\
147+
'"ErrorControl"=dword:00000001\n'\
148+
'"ImagePath"="\\"C:\\\\Program Files\\\\Electronic Arts\\\\EA Desktop\\\\EA Desktop\\\\EABackgroundService.exe\\" -start"\n'\
149+
'"DisplayName"="EABackgroundService"\n'\
150+
'"ObjectName"="LocalSystem"\n'\
151+
'"FailureActions"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00\n' \
146152
> "$_svc_reg"
147153
"$PROTON_DIR/proton" run regedit /s \
148154
"C:\\windows\\temp\\disable-bg-svc.reg" >/dev/null 2>&1 || true

lib/config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export WINEPREFIX WINEARCH=win64
1616
DXVK_CONFIG_FILE="$WINE_DIR/dxvk.conf"
1717
export DXVK_CONFIG_FILE
1818

19+
# Per-app launch arguments appended after the exe (e.g. force UI open)
20+
declare -A APP_LAUNCH_ARGS=(
21+
[epic-games]="-EpicPortal"
22+
)
23+
1924
# Ensure necessary directories exist
2025
mkdir -p "$WINE_DIR" "$BACKUP_DIR" "$CACHE_DIR" "$BIN_DIR" "$APPS_DIR" 2>/dev/null || true
2126

lib/launch.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ launch_app() {
6666
mkdir -p "$WINEPREFIX"
6767

6868
cd "$exe_dir"
69-
eval "${WG_LAUNCH_PREFIX}\"\$PROTON_DIR/proton\" run \"\$exe_bin\"" >"$WINE_DIR/${app_key}.log" 2>&1 &
69+
# APP_LAUNCH_ARGS provides per-app arguments (e.g. -EpicPortal forces EGL store window).
70+
local _args="${APP_LAUNCH_ARGS[$app_key]:-}"
71+
eval "${WG_LAUNCH_PREFIX}\"\$PROTON_DIR/proton\" run \"\$exe_bin\" ${_args}" >"$WINE_DIR/${app_key}.log" 2>&1 &
7072
else
7173
print_warning "Proton not available, using Wine fallback"
7274
export WINEDEBUG="${WINEDEBUG:--all}"

0 commit comments

Comments
 (0)