-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Check for settings.json in current directory as well #3436
Conversation
3a4f248
to
8a0a494
Compare
Hey @rajat2004, ran the sanity test on Windows (x64) and it seems to work as expected. Will try to test the fork on Windows soon |
@ahmed-elsaharti Thanks a lot for testing! I actually built the binary and tried it out, didn't work, so trying a different way right now, will push a commit soon. Side note, I wrote a small helper script to package the project, for Linux, otherwise requires the Editor to be open all the time, which is quite heavy separately. Am having some problem with the entire UE4 and Editor getting compiled entirely, every single time!. Makes packaging a 3-4 hr process on my system :(. |
@rajat2004 My pleasure 👍 Also, I really like the idea of relying on Also, I tested 6c81440 (0cec4f6 was committed as I was writing this 😂) and on the editor it looked for settings.json in the same directory as the sln file. With a compiled binary it did not do the same (tbh I can't figure out where And regarding the Linux packaging issue, it's things like this that make me change my mind whenever I decide to make the move to Linux 😂 |
This is somewhat working, the current paths being searched are -
Might be that hardcoding the path to just go another level up is required, but will try to keep looking for another way |
On Windows it looks for:
Also, I found Edit: maybe have both the 'one folder deeper' and one where it goes another level up? Since the former would be useful if the user wants to place their settings.json in the same folder as their Environment.sln (could be helpful) and the latter would do what you're originally trying to do |
@rajat2004 1st one is |
Yeah, there are different methods available,
Sure, if that's usefull I'm okay with it. IMO using the As to the
Yup, it works. I also tried |
0cec4f6
to
ed30bca
Compare
Valid point. But on the Windows side users usually (from what I've seen) launch binaries the easy way by double-clicking rather than cmd-ing. This PR would be tackling the settings issue when doing that though so it should be all good 👍
Yup, 2 hours into the searching process I finally found that tiny output window on VS2019 😂. But I agree, the logging method could probably be revamped 😎
I'll test the latest commit out on Windows and will report back 👍 |
@zimmy87 Thanks a lot for fixing the formatting and merging! |
Fixes: #3428
About
Adds a check for
settings.json
in the directory from where the binary was launchedFor e.g. in Linux, if invoking
Blocks.sh
from inside theLinuxNoEditor
folder, the path searched would be.../LinuxNoEditor/settings.json
. If started from a level above using./LinuxNoEditor/Blocks.sh
, it would be.../settings.json
.Currently, it's an additional check rather than replacing the executable location since that'll be a behavioural change, can be removed if required.
Also, this again brings up the usefulness of allowing download on the compiled binaries from the Azure Pipelines CI. It'll allow much easier testing of PRs on different platforms since packaging locally takes time, and cross-platform compilation has problems, cannot compile for Win from Linux, and for Linux requires separate toolchain install on Windows.
If its preferred to have even more checks such as inside the project location (
LinuxNoEditor/Blocks/settings.json
), or maybe keep it fixed as the root directory instead of the current variable one, please do comment.How Has This Been Tested?
The earlier method didn't work and hence has been removed completely. Compiled a Linux binary and tested the path being searched, here's the binary
/home/rajat/AirSim/Unreal/Environments/Blocks/Packaged/Development/LinuxNoEditor/settings.json
when inside theLinuxNoEditor
folder/home/rajat/AirSim/Unreal/Environments/Blocks/Packaged/Development/settings.json
when outside itWindows testing has been done by @ahmed-elsaharti, thanks a lot!
Screenshots (if appropriate):