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
Moved Terasology.jar to libs subfolder to avoid confusion. #1575
Conversation
Replaced Windows launchers with new JLI based launchers and removed old one. Remade TeraEd.exe to prefer 1.8 JRE.
Alright, looked at it some :-) Comments
Hit an error on running with 32-bit exe + 32-bit Java (but I believe this is due to my video card driver screwing up again - more notable for the CR interaction later)
@msteiger - after I got the CR with the above error and X'ed out of the window (on the first page) the game didn't dispose :-( Not fully terminating on the X? Although on retesting even going through each page doesn't seem to eventually dispose. Oddly I can't even find the process holding a lock on the command prompt, but it stays stuck till I CTRL-C Running with the old .exe got me a popup instead and no CR (and no disposal - splash screen stayed up forever). That's kind odd, but I guess the new .exe handles a broken video driver better somehow? Huh, oddly I get the same popup with the new 64-bit .exe. But the 32-bit hits the CR ... probably not good reports due to screwy graphics issues. I can't actually test the game right now, will have to get back to that later. Why oh why did I accept the prompt to update my video card drivers to the latest version ... first BSOD then better but still brokeny :-( When we're ready to merge this I'd like to run a final stable build so I can call that the last Java 7 build - although not really since you can still launch Java 7 without the .exes. But anyway. Thanks for the good work! Feels like we're very close :-) |
Oh, on the .exe names I didn't think about the OS+bit specific zips. So I guess if you download Win64bit the 64bit exe would rename to Terasology.exe? And yeah the weird CR interactions + disposal must to some degree relate to the strange "Press enter to disconnect" thing |
The problem that the game does not dispose all thread pools on crashs is independent from CR, I think. The splash screen should close in any case though. Will have a look at that. |
Not at all, I was hoping that to be the plan anyway :)
Yes, that's the plan. Regarding the single exe: I will also check the console attach issues. It's a bit finnicky in Windows, sadly. |
I checked what we can do about the GUI program detaching but still controlling the console: not much, really. |
Looking around a bit it appears an assortment of improvisations have been used, I wonder if any of them are good enough. Like one suggests a way to avoid the "double window" approach of supporting both and redirection to the GUI app if no arguments: Did you see that or similar ones? It seems to emulate an "enter" press at some point. I could see how that would make "terasology -help" feet right (it would exit back to the prompt immediately after printing the text), but I'm not sure if that would help the headless server. Unless - could we somehow choose to just log a quick snippet when headless "Starting headless server - this prompt will exit, please review the log file to check on the server and terminate it by .." ... uh, not sure how you would actually terminate it... Come to think of it, if you're running an exe manually you're almost guaranteed to be on a headed Windows system, meaning you could indeed launch a server admin window and forego the console hook to the prompt. If you're wanting to run as a service there are alternative options available, probably excluding the exe. What we really want:
The third scenario's window could be delayed till later so we can move forward in the meantime. Which still leaves the question of what to do there. We can't lock on the console and log to it or we'll get the weird "user can hit enter and get strange behavior" I'm beginning to question my desire to support in-console help text with the .exe. Instead pop up a simple help window with an exit button like you suggested on IRC. Would work in "Run" as well. Headless could do the same with a simple button to exit the server. It ... feels wrong, somehow. But then Windows is hardly OS nirvana. Headless server with exe not being "Windows" headless. Wee! |
Headless on Windows would be a service executable, which is a whole lot different from what we are currently doing. We should probably provide one later, but that might be a separate distribution, really. For now I would remove the AttachConsole thing entirely and focus on other ways of debugging. |
Alright, fixed my system, actually able to launch the game again, with this setup live :-) Agreed on service executable for consistent headless, we worry about that later. The quirkiness sucks, but what can we do, oh well. It works! Want to go ahead then and remove AttachConsole and make the .exe launch "silent" from command line again? I think we can merge with that in place, then after make some future goals to get to later. Anybody else want to take it for a spin or provide more feedback? @msteiger @skaldarnar @mkalb etc? We might want to tweak the readme sometime with a note on the exes. |
I will remove the AttachConsole part. Do you think having a TerasologyCli.exe would have any actual benefit? I highly doubt it to be honest since for actual servers as a service it would not help. |
Nah, I'd leave out CLI. If for some reason there's more of a point to it later one day we can deal with it then. |
Allright i updated the launchers and removed AttachConsole. Instead I added an option to the launcher cfg file that will redirect STDOUT/STDERR to a log file (filename can be specified). This helps with debugging launcher issues since sometimes the JVM just writes an error to stderr and fails (even in UI mode). I can't really catch those errors since it just calls ExitProcess to exit :-/ |
A bit about the config file: The native launcher reads a file that is named the same as the exe, but with the cfg extension. I.e. Terasology.x64.exe automatically reads Terasology.x64.cfg. Supported options:
Lines starting with ; are ignored Example:
The plan is to have the launcher write this file when the user clicks launch. Then run the executable appropriate for the platform. |
Thanks for the extra info :-) Most my early evening went poof for RL reasons, so not enough time to test this tonight, just merged a couple quick PRs. Will do a stable build after work tomorrow then merge this in and announce Java 8 requirement for using the Windows exes Curiously, how do the Linux/Mac launch scripts relate to the new fancy config file? Only works for the exes I figure? And should we use a different comment symbol like # or // ? edit maybe that's a Windows thing There's some talk about logging over in #1574 including some difficulty with the initial logging / initial log file rolling. Maybe we could work something helpful for that in later? Although it sounds like we'd eventually be at risk for making a mini-launcher of some sort, heh |
Adding such a launcher-config file for the linux/macosx launcher scripts is a todo i'll tackle when we get to the Terasology Launcher part. It's a multi-step process to get where we wanna go. |
Agreed - submitted #1588 for later since a related Mac scenario came up again :-) Tested around some more. Noticed the splash screen doesn't appear when launching from .exe, is that on purpose or not working? I see a removal of I did notice it work (exceedingly briefly) with Thanks for the work and patience! |
Can also confirm applet still looks good. Yay! |
Regarding the splash screen: I thought that the splash screen was read from the jar file (?) I might need to check on that. And thanks for mergin! |
The splash is part of the jar file and loaded directly by the Java Runtime. The filename is specified in This page gives a nice (short) overview on how it works: |
Replaced Windows launchers with new JLI based launchers and removed old one.
Remade TeraEd.exe to prefer 1.8 JRE.