Skip to content

Commit

Permalink
permit install into windows program files
Browse files Browse the repository at this point in the history
when installing terasology into program files, that dir is not writeable.
starting up, terasology tries to create a folder in .local, which then
fails.

therefor, permit two things with this change. first, permit calling
the windows bat script from a different directory. it then needs to
find the library relative to the start script location, not to the
location where the script is called from.

second, before starting java, change to home directory. ideally,
terasology itself should find a proper path by default. but
program files as run directory is in any case wrong, so change.
  • Loading branch information
soloturn committed Oct 11, 2024
1 parent bceffdd commit b7265dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions facades/PC/src/main/startScripts/windowsStartScript.bat.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ goto fail

<% if ( mainClassName.startsWith('--module ') ) { %>set MODULE_PATH=$modulePath<% } %>

@rem Execute ${applicationName}
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %> <% if ( mainClassName.startsWith('--module ') ) { %>--module-path "%MODULE_PATH%" <% } %>-jar lib\\Terasology.jar %*
@rem Execute ${applicationName} in home directory
cd /d %homedrive%%homepath%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %> <% if ( mainClassName.startsWith('--module ') ) { %>--module-path "%MODULE_PATH%" <% } %>-jar "%APP_HOME%\\lib\\Terasology.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down

0 comments on commit b7265dd

Please sign in to comment.