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

Launch using .exe does not print any output #1401

Open
Cervator opened this issue Nov 27, 2014 · 7 comments
Open

Launch using .exe does not print any output #1401

Cervator opened this issue Nov 27, 2014 · 7 comments
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems

Comments

@Cervator
Copy link
Member

Cervator commented Nov 27, 2014

As noted in #1395 running the game via exe trying out the new -help flag (or its other variants) doesn't print any actual output. Even hacking in System.out.println anywhere in the class gets nothing.

One link posted (http://stackoverflow.com/questions/24694275/how-can-i-make-exe-file-to-write-text-on-the-command-line) suggests it might be Launch4J being set for either console or gui mode, can't have both.

I also wonder if that relates to #1339 where you get the command prompt back immediately (so no wonder nothing is output). I still could swear using the exe blocked the command prompt not that long ago. Maybe a combination with how we start the game. Yet java -jar Terasology.jar is fine and logs right to the command prompt.

Rather than necessarily try to figure this out for Launch4j we might want to attach this to @shartte's launcher project for bundling the jre (MovingBlocks/TerasologyLauncher#260 + MovingBlocks/TerasologyLauncher#259). I figure when it works there we might want the same option for the game :-)

@Cervator Cervator added Type: Bug Issues reporting and PRs fixing problems Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. labels Nov 27, 2014
@Cervator Cervator added the Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience label Feb 26, 2015
@Cervator
Copy link
Member Author

Bump - after we experimented some with this it remains overly tricky. It may be worth considering this issue a request to pop up a super simple window with the text instead when launched from .exe

Really I can't think of any noteworthy use case where a player would be launching the game via exe without a graphical head on the launching machine. Even running a headless server on Windows via .exe could pop up a window, and actually should when we have some actual admin tools to attach to that.

The only scenario I can think of is a headless Windows Core server - but honestly if you actually manage to have a Core server available you can probably figure out launching from the .jar directly instead ... :-)

@msteiger
Copy link
Member

Yup - I agree with that. Just show a JOptionPane message box with the help text if (!headless).

@J-Dill
Copy link
Contributor

J-Dill commented Mar 10, 2018

Seeing as this is a pretty old Bug/Enhancement, I'm guessing nobody is working on this. I'll start giving it a go here, and I'll attempt what was mentioned above; opening a new, simple window that will display the text

@jdrueckert jdrueckert added the Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. label May 19, 2024
@jdrueckert
Copy link
Member

Just stumbled over this and tried to reproduce it and indeed, on executing the .exe from Windows Powershell via .\TerasologyLauncher.x64.exe, the Terasology launcher does start, but doesn't log anything on command line.
It's also not "blocking" the shell, I directly get a new prompt line.

@BenjaminAmos
Copy link
Contributor

The TerasologyLauncher.x64.exe executable comes from MovingBlocks/TerasologyJavaLauncher. It is compiled for the Windows subsystem (see TerasologyJavaLauncher.vcxproj#L309), which does not spawn a console, therefore there will not be any console output. That project was archived in favour of the launcher a while ago. Running Terasology.bat should still work as intended.

@jdrueckert
Copy link
Member

No logs may not be a bug in this case then, but maybe still something desirable for cases where the .exe is (or needs to be) used directly instead of the launcher...?
If we archived the project, we could consider removing the .exe but I think windows users are more used to executing .exe files than .bat files.
Should we change this issue to a feature request?

@BenjaminAmos
Copy link
Contributor

Actually, I do not believe that we bundle the executable with distributions anymore anyway. The launch executables were removed years ago in #4347. This issue is obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems
Projects
Status: No status
Development

No branches or pull requests

5 participants