Skip to content

Adjust starsector core directory to work on linux and unix#6

Open
DesperatePeter wants to merge 3 commits intowispborne:masterfrom
DesperatePeter:master
Open

Adjust starsector core directory to work on linux and unix#6
DesperatePeter wants to merge 3 commits intowispborne:masterfrom
DesperatePeter:master

Conversation

@DesperatePeter
Copy link
Copy Markdown
Contributor

@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.

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"
Copy link
Copy Markdown
Contributor Author

@DesperatePeter DesperatePeter Jun 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant