dmadisetti / steam-tui

Rust TUI client for steamcmd
MIT License
858 stars 17 forks source link

Windows Support #48

Closed keysrun closed 6 months ago

keysrun commented 2 years ago

Hello. My question is - is it possible to somehow run and use steam-tui on windows 10. I only managed to install steamcmd. It is not clear how to start binary.

dmadisetti commented 2 years ago

Good question. Maybe through WSL? I will try at add a cross platform compilation target, but my first impression is that this will require some additional work

keysrun commented 2 years ago

I installed cargo, and tried to run the command cargo run , like the process went, but at the end it showed errors. Attached screenshots - cmd_cQdbXplrmo cmd_TcyvIG9aaV

dmadisetti commented 2 years ago

So this is due to us using termion- which does not support linux. There is a windows patch:

[patch.crates-io]
termion = { git = "https://gitlab.redox-os.org/Jezza/termion.git", branch = "windows-support" }

and the other alternative is to use crossterm over termion (which is now the default for tui).

keysrun commented 2 years ago

I moved the crossterm library to the steamcmd folder, ran steam-tui via cargo run, and other errors showed up...

cmd_pHvFMZifzf

keysrun commented 2 years ago

I only used the version with the crossterm library, because I don't understand how to install this patch)

dmadisetti commented 2 years ago

Yeah, so more needs to be done than just change the library, we have to change the code for it too. The blog I link in #50 shows some of the work required.

I don't have the bandwidth for this right now, but I think it might be a pretty simple change if you can find someone familiar with rust and tui-rs

keysrun commented 2 years ago

I ran cargo run via WSL and steam-tui started up! But immediately showed an error that steamcmd was not installed (I tried to install steamcmd for windows and for linux)

cmd_41UNzsA6Tr explorer_K36P7MorYM

dmadisetti commented 2 years ago

Cool! I appreciate your dedication to getting this to work lol. You need to download steamcmd. You can see how we set up the test box here:

https://github.com/dmadisetti/steam-tui/blob/744b9841b9bc332a60741584760d4abf55fe41bf/.github/workflows/test.yml#L21-L26

(try running those lines) But note, running through WSL will not be the same as running native. It will be linux gaming on windows. You will have to set up X windows for that: https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

I might be able to add crossterm sometime this weekend

keysrun commented 2 years ago

I installed those components and steam-tui started showing my library! But now it's not clear to me how to configure X windows so that the games run.

cmd_FVrjveEeBd

dmadisetti commented 2 years ago

Hmm, I thought I shared a blog about someone who does this: https://medium.com/geekculture/gaming-on-wsl-b367459f6977

Anyway, I am not sure if X will work with Windows 10. I will try to get crossterm working this evening, and then it should (maybe) run native windows

keysrun commented 2 years ago

Unfortunately, I was unable to install the game. probably the only option is to wait for your upgraded version of crossterm.

keysrun commented 2 years ago

hi, is there any success with running crossterm on windows?

Terraphice commented 2 years ago

Ah, what a shame. Another TUI without Windows support... 😞

Tom60chat commented 10 months ago

Just checked, you can built it for now. The only issue I fixed it's to replace KeyCode::Char('\n') by KeyCode::Enter because the Enter key would not work.

But after that I'm stuck at login, like the app was not able to pass the login command to steamcmd.exe (And I give up here)

dmadisetti commented 10 months ago

Do you have a branch I can see your changes @Tom60chat

dmadisetti commented 6 months ago

Since steam tui can run custom scripts, and cross term works- I'm going to count this as won't fix / completed- since you can just rig up your script to launch windows siide

guihkx commented 6 months ago

@dmadisetti Can you please consider reopening this?

While steam-tui builds just fine on Windows nowadays, I can't get past this screen:

image

It looks like steam-tui spawns steamcmd.exe just fine:

image

But my guess is that when steam-tui sends the login <user> command to steamcmd.exe, that doesn't actually work... And yes, I have followed what the README says.

I'm not a Windows programmer (though I occasionally use it for gaming), so I'm not sure how to debug this further...

dmadisetti commented 6 months ago

Hmm, have you never been able to get past the prompt?

Mind if we open a separate issue since Windows should technically work?

guihkx commented 6 months ago

Hmm, have you never been able to get past the prompt?

This is actually my first time building and running steam-tui on Windows, but yeah, I do get past the prompt asking for my Steam username. After I hit Enter, the screen from the screenshot above appears, and steam-ui seems to get stuck there.

Mind if we open a separate issue since Windows should technically work?

Sounds good to me, I'll do that shortly.