Open Zitchas opened 1 month ago
That being said, given that I have a copy of endless-ships downloaded (via github desktop), is it possible to manually place the data files from endless-sky instead of doing it via the program?
edit1 : Just discovered the game data is located inside the .../endless-ships/resources/game/
folder
So that is in place, albeit old as I note it is 0.10.4, but that's alright. For the moment, this is just trying to get it to run properly locally.
Can you please try doing git submodule set-url resources/game https://github.com/endless-sky/endless-sky.git
when you're in the endless-ships
directory, then try git submodule update --init
once again?
At this point, while in the endless-ships folder, I tried running the boot build
command
java.lang.IllegalArgumentException: Cannot open <nil> as a Reader.
clojure.lang.ExceptionInfo: Cannot open <nil> as a Reader.
line: 47
Yes, I can.
Can you please try doing
git submodule set-url resources/game https://github.com/endless-sky/endless-sky.git
when you're in the endless-ships directory
It gave this result: Synchronizing submodule url for 'resources/game'
then try
git submodule update --init
And it didn't display anything after the second command, and at a glance there isn't any changes in the resource/game folder.
Well, since the game files are already in resources/game
, then the git submodule should be fine. Now you can switch to it with cd resources/game
and do anything git allows you to do, like checking out a given game version with git checkout v0.10.8
(though I would avoid changing anything in there).
As for the Cannot open <nil> as a Reader
error, I need to check it when I have the time.
By the way, are you sure you ran boot build
when the game files were already in place at resources/game
?
Yes, although I can relaunch powershell and try again.
It gave the same error message.
I'll look into it, thanks for the bug report.
Thank you!
@Zitchas can you please try replacing /
with \
in this line and launch boot build
again?
Just tried doing that, and it gave me an error. I think most of the feedback isn't relevant, but there was this:
java.lang.RuntimeException: Unsupported escape character: \d
clojure.lang.ExceptionInfo: Unsupported escape character: \d
line: 10
Sorry, I forgot that backslashes need to be escaped inside strings in Clojure. Please add a second backslash, so that it's "game\\data"
.
OK, I added the \
to escape it. Unfortunately, it still gives an error.
java.lang.IllegalArgumentException: Cannot open <nil> as a Reader.
clojure.lang.ExceptionInfo: Cannot open <nil> as a Reader.
line: 47
A question regarding this error: Do you know what document it is referring to? Just trying to look at things to see if I can get any insight on it, but I can't even tell what file that line: 47 is in.
edit: In the build.boot file at L 47 there is a []
Should this be a location or something?
edit: In the build.boot file at L 47 there is a
[]
Should this be a location or something?
No, it's just an empty parameters list for a function.
From the stack trace it seems like it cannot find the resources/parser.bnf
file, can you please check if it exists on your machine? Maybe it was accidentally deleted.
OK, yes, from the root of Endless-Ships there's a folder called resources
, and within it there is a file called parser.bnf
Any chance that it's looking for a hardcoded location (for instance, located directly at the root of C: ?
edit:
Just comparing the contents here on GitHub and my local copy, I note that in the resources
folder the parser.bnf
file has the same name, but other item is a folder referred to as game @ c7874d3
on GitHub, but only as game
locally.
edit2: Just did a cursory visual check between the file on GitHub and locally, and the two appear to be identical.
Any chance that it's looking for a hardcoded location (for instance, located directly at the root of C: ?
I don't think so but I have pretty much no experience working with Java/Clojure under Windows. Unfortunately I don't have a Windows machine to check it.
edit: Just comparing the contents here on GitHub and my local copy, I note that in the
resources
folder theparser.bnf
file has the same name, but other item is a folder referred to asgame @ c7874d3
on GitHub, but only asgame
locally.
game @ c7874d3
is how Github shows git submodules, and the game is plugged into endless-ships as a submodule; in the filesystem it's just game
, it is the expected behavior.
I guess the problem can also be related to file permissions and the user who is launching boot build
, but I can't really help here due to my lack of knowledge of Windows. It would be great if you could investigate something on your own.
I did try running it under admin as well as regular user, but it didn't change the error.
Unfortunately my java experience is limited to making a really basic game (use arrow keys to move from one side of the field to the other. You win!) and running a Minecraft server (which does not involve doing anything with the java code at all).
Given my lack of technical abilities to really troubleshoot much two alternative routes present themselves:
a) figuring out how to run a linux VM of some kind in order to do this in that environment.
b) figure out how to run Endless-Ships to generate the website package via GitHub.
I note that Endless Sky's current automatic checks and release process actually involves running the game within the build environment in order to run the engine through a specific sequence of commands and tests and get an output. If we can do that, I would think that it should be possible to run Endless-Ships long enough to generate the package, and then save that as part of the artifacts.
Well, endless-ships can be run in a Docker container, so if you install Docker you can follow the instructions in readme. Furthermore, I think you could make changes to the source files and relaunch the docker run
command described there to see them in action.
As for the automated build via Github Actions, it actually doesn't need to launch the game itself - basically there are 3 required operations:
git
commands I mentioned earlierboot build
(or even build a Docker image)If you want to launch this process from the Endless Sky repository after each commit, then this repository needs to be cloned before doing these 3 steps.
I would gladly help but unfortunately I'm extremely busy with other projects right now, so I'd suggest you try the local Docker container approach for now.
I will try the docker method. I did look into it a few days ago, but that was in the middle of the Crowdstrike problems affecting the internet, and I couldn't even create an account/login. I'll try again in the near future.
I don't think this needs to run after every commit. I just mentioned that if we can run the game in a GitHub runner, we should be able to run this too. I'm not particularly knowledgeable in doing so, though.
@Zitchas it finally reproduced on my machine, and I decided it's time to move the project from boot-clj
to tools.deps
(the problem seemed to be related to the way boot-clj handles temporary files). Can you please try the latest version from the master
branch?
Unfortunately the Docker installation method does not work (as described in #19), I still did not find the reason, so for now manual build is the only way that works (on my machine). See README for updated instructions.
Thanks for the update. I was running into problems with geting docker to do it. Glad it wasn't just me not being able to follow directions. :) Anyway, yes, I can attempt to follow the updated instructions using the new method. Unfortunately I can't do it right now, but I can do it within the next 12. I will update once I have tried it.
OK, using clojure it looked promising. The first time I ran it, it downloaded a few things, then the feedback was a long list of "parsing __" where is a long listing of all the data files.
Unfortunately, it finally terminates with the following error:
Execution error (IOException) at java.lang.ProcessImpl/create (ProcessImpl.java:-2).
CreateProcess error=2, The system cannot find the file specified
Second time I ran it, it didn't download anything, and generated an output that looked basically identical to the first time, just without the download info at the start.
Oh, the reason is that the build script uses the rm
Unix command which doesn't exist in Windows. I replaced it and some other file management commands with Clojure/Java functions, I think now it should work.
Second time I ran it, it didn't download anything, and generated an output that looked basically identical to the first time, just without the download info at the start.
This is expected, it always downloads the dependencies on the first launch (or right after they get changed).
This is expected, it always downloads the dependencies on the first launch (or right after they get changed).
Yes, I suspected (or hoped, for the sake of efficiency) that it was probably a first-time-only sort of thing. That's why I ran it a second time to see if having everything already downloaded would prevent the error.
OK, updated to include the recent push and ran it again. Still generates an error, but it is a different one. I'm including the last handful of lines showing where it was in the parsing process:
parsing flight checks.txt...
parsing help.txt...
parsing interfaces.txt...
parsing landing messages.txt...
parsing ratings.txt...
parsing tooltips.txt...
"Elapsed time: 59039.3171 msecs"
Execution error (IOException) at endless-ships.core/build (core.clj:116).
Couldn't delete .\build
Full report at: ...
Yep, sorry, forgot to check if directory exists before trying to delete it. Now it's fixed.
Thanks! Trying it now.
The full out put mentions that it can't find yarn. That one sounds like it might be on me to fix.
parsing ratings.txt...
parsing tooltips.txt...
"Elapsed time: 61724.3037 msecs"
Execution error (IOException) at java.lang.ProcessImpl/create (ProcessImpl.java:-2).
CreateProcess error=2, The system cannot find the file specified
Full report at:
hmmm... yarn says it's installed, but still generates the same error.
@Zitchas can you please run yarn install
manually from the project's root directory and paste the result here?
Sure!
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager
yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.07s.
GitHub Desktop reports the following change to the repository after I did the yarn install
:
I think I'll just replace yarn
with npm
later when I have the time (I was going to do that anyway), then we can check again.
Ok. Just let me know when you would like me to try something.
Thanks for your work developing this!
I am interested in learning how to run the program in order to generate a site for Endless Sky Delta; either running it locally or on Github via actions.
I am currently trying to run it locally on a Windows machine. I have boot and yarn installed (as well as node.js), but when I get to the last step of this section:
I get an error