fufexan/nix-gaming

Can't launch star-citizen

Sntx626 opened this issue · 10 comments

Hi, I'm trying to get star-citizen working with the help of this flake.

Here's the the relevant part of my config adding star-citizen.

However when launching star-citzen, I get the following error:

Error: File not found - /home/sntx/.games/star-citizen/drive_c/Program
Error: File not found - Files/Roberts
Error: File not found - Space
Error: File not found - Industries/RSI
Error: File not found - Launcher/RSI
Error: File not found - Launcher.exe
fsync: up and running.
wine: Using setpriority to control niceness in the [-10,10] range
002c:fixme:winediag:LdrInitializeThunk wine-staging 8.0 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
wine: could not load kernel32.dll, status c0000135
fsync: up and running.
wine: Using setpriority to control niceness in the [-10,10] range
wine: could not load kernel32.dll, status c0000135
gamemodeauto: 
gamemodeauto: 
fsync: up and running.
wine: Using setpriority to control niceness in the [-10,10] range
002c:fixme:winediag:LdrInitializeThunk wine-staging 8.0 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
wine: failed to open "/home/sntx/.games/star-citizen/drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe": c0000135
gamemodeauto:

Please tell me if you have any suggestions on how to circumvent the problem.

I'm having a similar issue, though not sure if it's fully related:

Error: File not found - /home/joe/Games/star-citizen/drive_c/Program
Error: File not found - Files/Roberts
Error: File not found - Space
Error: File not found - Industries/RSI
Error: File not found - Launcher/RSI
Error: File not found - Launcher.exe
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
gamemodeauto: 
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.

In both our cases, it appears that wine is trying to read "$RSI_LAUNCHER" as a set of arguments, rather than a single path. I've tried all sorts of extras to force it to wrap the string correctly, but everything results in a variation of the above. E.g. I've had

Error: File not found - "/home/joe/Games/star-citizen/drive_c/Program
Error: File not found - Files/Roberts
Error: File not found - Space
Error: File not found - Industries/RSI
Error: File not found - Launcher/RSI
Error: File not found - Launcher.exe"

where the string is clearly being wrapped, but is somehow still being interpreted as separate arguments.

I'm up to date on Nixpkgs-unstable if that makes a difference, haven't tried with stable yet.

wine: failed to open "/home/sntx/.games/star-citizen/drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe": c0000135

The game did not fully install before you re-ran the application you may need to delete your Prefix and reinstall. Make sure you do not have any lingering processes from wine running @Sntx626

I'm having a similar issue, though not sure if it's fully related:
In both our cases, it appears that wine is trying to read "$RSI_LAUNCHER" as a set of arguments, rather than a single path. I've tried all sorts of extras to force it to wrap the string correctly, but everything results in a variation of the above. E.g. I've had

Unrelated issue, but a PR will be done for it soon, currently out of town and am not really able to test of my changes work

If anyone is able, please test the PR I won't be able to test it on my PC until the 31st. You will need to remove your previous wine prefix if you are receiving the error wine: failed to open .../drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe": c0000135

I can't find anything on how to use a specific PR as a flake input (sorry, relatively new to Nix), so I tried using the commit directly by passing nix-gaming.url = "github:fufexan/nix-gaming/908a96de215d34dc1926f1274e5e54e7c6706771". However, this seems to pull in the commit from your fork, which is 14 commits behind the currently cached master branch here. This was causing all of proton-ge to be compiled from scratch, which was taking years, so I made a fork with only your changes to pkgs/star-citizen/default.nix so I could still use the cached proton-ge.

Creating a fresh wine prefix, I get the following:

------------------------------------------------------
Creating WINEPREFIX "/home/joe/Games/star-citizen" with WINEARCH=win64
------------------------------------------------------
wine: created the configuration directory '/home/joe/Games/star-citizen'
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 12
drwxr-xr-x 3 joe users 4096 Oct 23 21:54 .
drwxr-xr-x 4 joe users 4096 Oct 23 21:54 ..
drwxr-xr-x 3 joe users 4096 Oct 23 21:54 windows

Registry info:
/home/joe/Games/star-citizen/system.reg:#arch=win32
/home/joe/Games/star-citizen/userdef.reg:#arch=win32
/home/joe/Games/star-citizen/user.reg:#arch=win32
------------------------------------------------------
------------------------------------------------------
warning: wine cmd.exe /c echo '%AppData%' returned empty string, error message "wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation." 
------------------------------------------------------
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
gamemodeauto: 
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
gamemodeauto:

Wine seems pretty insistent on creating a 32 bit prefix, despite it acknowledging WINEPREFIX=win64 being set. I get no graphical output other than a couple of elevated permissions prompts (I assume for gamemode). The base directories under "$WINEPREFIX/drive_c/Program Files/Roberts Space Industries/StarCitizen/"{LIVE,PTU} are created but RSI-Setup-${version}.exe doesn't seem to run. Running the script again just yields the following:

wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
gamemodeauto: 
wine: WINEARCH set to win64 but '/home/joe/Games/star-citizen' is a 32-bit installation.
gamemodeauto: 

However, the Error: File not found problem does seem to have gone.

It could be possible that something in those 14 commits behind that your fork is running would make a difference, but I'd need to spend some time compiling an older proton-ge. I can do that tomorrow evening if you think it would be worthwhile?

I did confirm at least that the launcher installs and opens just the laptop isn't actually capable of running the game. You can give it a try.

wine: failed to open "/home/sntx/.games/star-citizen/drive_c/Program Files/Roberts Space Industries/RSI Launcher/RSI Launcher.exe": c0000135

The game did not fully install before you re-ran the application you may need to delete your Prefix and reinstall. Make sure you do not have any lingering processes from wine running @Sntx626

Thank you very much for your detailed replies!

I've now reinstalled the launcher and it starts normally.

Howerver upon starting the install I get the following error:

image

12:38:30.919 > "Error while attempting to create director
ies with command: \"C:\\Program Files\\Roberts Space Industries\\RSI L
auncher\\resources\\installer-support.exe\" --create-installation-dire
ctory \"C:\\Program Files\\Roberts Space Industries\\StarCitizen\" --c
reate-installation-directory \"C:\\Program Files\\Roberts Space Indust
ries\\StarCitizen\\LIVE\", Error: User did not grant permission."
12:38:30.920 > "Starting download of base pack (SC LIVE 3
.21.0-live.8779972) in C:\\Program Files\\Roberts Space Industries\\St
arCitizen"
12:38:30.921 > "Initial download start"
0460:fixme:thread:NtSetInformationThread ThreadPowerThrottling stub!
12:38:31.933 > "Verification header found for initial dow
nload: Filename: Data_Kickstart_20200806_2.p4k FileSize: 15009779712"
12:38:31.935 > "Error installing at C:\\Program Files\\Ro
berts Space Industries\\StarCitizen\\LIVE: Error: ERR_INTERNAL: Create
File failed. Path not found.\r\n"
12:38:31.944 > {
 "event": "INSTALLER@INSTALL_FAILED",
 "data": {
  "error": {
   "name": "InstallerError",
   "message": "ERR_INTERNAL: CreateFile failed. Path not found.\r\n"
  }
 }
}

All files within that directory are owned by my user/group.
(The launcher was just installed to that path)

I've confirmed that no lingering Wine, Proton or star-citizen processes remain between tests.
I tried erasing the contents of ~/.games/star-citizen an reinstalling, that just reproduces the error though.

Could my drive layout be the problem?
I'm running NixOS on tmpfs with impermanence, with my root partition being defined here (config) and my persistent partition being defined here (config) as BTRFS. The Star Citizen directory is being bind-mounted to my root partition from my persistent partition here (config).

Update: The Problem could be solved by manually creating the directories with mkdir "~/.games/star-citizen/drive_c/Program Files/Roberts Space Industries/StarCitizen/LIVE".

I'll keep this issue open until the installation has completed.

We're at a point where our issues seem to have completely diverged, so I'll open a new issue and carry on there.

I'll keep this issue open until the installation has completed.

Star Citizen now runs flawlessly with the flake!

Thank you very much, I hope this Issue helps others with the same problem.