|
|
|
@ -18,7 +18,7 @@ from flask import request, jsonify |
|
|
|
|
|
|
|
|
|
from vasl_templates.webapp import app, globvars |
|
|
|
|
from vasl_templates.webapp.config.constants import BASE_DIR, IS_FROZEN |
|
|
|
|
from vasl_templates.webapp.utils import TempFile, SimpleError, compare_version_strings, is_windows |
|
|
|
|
from vasl_templates.webapp.utils import TempFile, SimpleError, get_java_path, compare_version_strings |
|
|
|
|
from vasl_templates.webapp.webdriver import WebDriver |
|
|
|
|
from vasl_templates.webapp.vasl_mod import get_reverse_remapped_gpid |
|
|
|
|
|
|
|
|
@ -394,8 +394,8 @@ class VassalShim: |
|
|
|
|
# initialize |
|
|
|
|
logger = logging.getLogger( "vassal_shim" ) |
|
|
|
|
|
|
|
|
|
# figure out where Java is |
|
|
|
|
java_path = app.config.get( "JAVA_PATH" ) |
|
|
|
|
# locate the Java runtime |
|
|
|
|
java_path = get_java_path() |
|
|
|
|
java8_path = app.config.get( "JAVA8_PATH" ) |
|
|
|
|
if java8_path: |
|
|
|
|
# FUDGE! From 3.3, VASSAL no longer works with Java 8. We want to mantain back-compatibility |
|
|
|
@ -412,13 +412,6 @@ class VassalShim: |
|
|
|
|
if compare_version_strings( mo.group(), "3.3.0" ) < 0: |
|
|
|
|
# we're using a legacy version of VASSAL - use Java 8 |
|
|
|
|
java_path = java8_path |
|
|
|
|
if not java_path and is_windows(): |
|
|
|
|
# we're on Windows - try to use the Java that is now bundled with VASSAL |
|
|
|
|
fname = os.path.join( self._get_vassal_dir(), "jre/bin/java.exe" ) |
|
|
|
|
if os.path.isfile( fname ): |
|
|
|
|
java_path = fname |
|
|
|
|
if not java_path: |
|
|
|
|
java_path = "java" # nb: this must be in the PATH |
|
|
|
|
|
|
|
|
|
# prepare the command |
|
|
|
|
class_path = app.config.get( "JAVA_CLASS_PATH" ) |
|
|
|
|