Adjust starsector core directory to work on linux and unix#6
Open
DesperatePeter wants to merge 3 commits intowispborne:masterfrom
Open
Adjust starsector core directory to work on linux and unix#6DesperatePeter wants to merge 3 commits intowispborne:masterfrom
DesperatePeter wants to merge 3 commits intowispborne:masterfrom
Conversation
…or dir via env var (which is mainly useful when working with multiple people)
DesperatePeter
commented
Jun 10, 2023
build.gradle.kts
Outdated
| * Note: On Linux, if you installed Starsector into your home directory, you have to write /home/<user>/ instead of ~/ | ||
| */ | ||
| val starsectorDirectory = "C:/Program Files (x86)/Fractal Softworks/Starsector" | ||
| val starsectorDirectory = System.getenv("STARSECTOR_DIRECTORY") ?: "C:/Program Files (x86)/Fractal Softworks/Starsector" |
Contributor
Author
There was a problem hiding this comment.
if(providers.gradleProperty("starsector.dir").isPresent) providers.gradleProperty("starsector.dir").get() else "C:/Program Files (x86)/Fractal Softworks/Starsector"
might actually be better than System.getenv, since IntelliJ doesn't seem to care much about environment variables that were set on the system =/
…adle var rather than env var, as gradle vars are available by default in IntelliJ, whereas env vars might not be
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@wispborne
I decided to go ahead and just create a PR :)
I hope these changes look good to you. Actually the first change (getting install dir via System.getenv()) was added to my build.gradle.kts in AdvancedGunneryControl by a contributor and I thought it was a really nice idea.