Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4 Issue - Launch SMAPI with console enabled on Windows #1135

Closed
Tracked by #1164
Al12rs opened this issue Mar 27, 2024 · 4 comments · Fixed by #1205
Closed
Tracked by #1164

v0.4 Issue - Launch SMAPI with console enabled on Windows #1135

Al12rs opened this issue Mar 27, 2024 · 4 comments · Fixed by #1205
Assignees
Labels
Bug Something isn't working os-windows This affects Windows related code.
Milestone

Comments

@Al12rs
Copy link
Contributor

Al12rs commented Mar 27, 2024

Bug Report

Summary

Apparently when you run smapi you are supposed to get a Console, but starting it from the App does not produce it.
We might need to use https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.useshellexecute?view=net-8.0 to allow the console to open.

Steps to reproduce

Install SMAPI, Apply, hit Launch button.

What is the expected behaviour?

A console and the game both open.

Other information

The console is apparently useful and desirable to have for modding, so no need to have a setting to enable or disable it.

@Al12rs Al12rs added Bug Something isn't working area-game-support labels Mar 27, 2024
@Al12rs Al12rs added this to the v0.4 milestone Mar 27, 2024
@erri120
Copy link
Member

erri120 commented Mar 27, 2024

Works fine on Linux.

@Pickysaurus
Copy link
Contributor

Untitled.video.-.Made.with.Clipchamp.mp4

Comparison between Vortex and the App in Windows 11

@erri120 erri120 added the os-windows This affects Windows related code. label Mar 27, 2024
@erri120 erri120 changed the title Launch SMAPI with console enabled Apr 2, 2024
@Al12rs Al12rs mentioned this issue Apr 3, 2024
4 tasks
@LukeNexusMods LukeNexusMods changed the title Launch SMAPI with console enabled on Windows Apr 10, 2024
@erri120
Copy link
Member

erri120 commented Apr 11, 2024

See Tyrrrz/CliWrap#114 for why CliWrap doesn't support UseShellExecute.

@Al12rs Al12rs self-assigned this Apr 11, 2024
@Al12rs
Copy link
Contributor Author

Al12rs commented Apr 11, 2024

Yeah, we were only collecting the stderr and stdout to print them in the log in case the program exit code wasn't 0.
But allowing programs to start the console seems more useful, especially since many of these can be interacted with by users to execute commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working os-windows This affects Windows related code.
3 participants