On Windows, try to use the Java bundled with VASSAL.

master
Pacman Ghost 3 years ago
parent bdd2d169a2
commit ba813a0e56
  1. 3
      vasl_templates/webapp/static/help/index.html
  2. 4
      vasl_templates/webapp/utils.py
  3. 7
      vasl_templates/webapp/vassal.py

@ -139,7 +139,8 @@ Configuring the program
<tr> <td class="key"> VASL module: </td> <td class="val"> <nobr>C:\bin\vasl\vasl-6.6.1.vmod</nobr>
<tr> <td class="key"> VASL extensions: </td> <td class="val"> <nobr>C:\bin\vasl\extensions\</nobr>
<tr> <td class="key"> VASL boards: </td> <td class="val"> <nobr>C:\bin\vasl\boards\</nobr>
<tr> <td class="key"> Java: </td> <td class="val"> <nobr>C:\Program Files\VASSAL-3.4.6\jre\bin\java.exe</nobr>
<tr> <td class="key" valign="top"> Java: </td> <td class="val"> <nobr>C:\Program Files\VASSAL-3.4.6\jre\bin\java.exe</nobr>
<div class="hint"> If you're on Windows, you can leave this field blank, <br> and the version of Java that comes with VASSAL will be used. </div>
<tr> <td class="key"> Web driver: </td> <td class="val"> <nobr>C:\bin\geckodriver.exe</nobr>
</table>
For the webdriver, download and unpack one of the following:

@ -235,6 +235,10 @@ def parse_int( val, default=None ):
except (ValueError, TypeError):
return default
def is_windows():
"""Check if we're running on Windows."""
return os.name == "nt"
# ---------------------------------------------------------------------
def compare_version_strings( lhs, rhs ):

@ -17,7 +17,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
from vasl_templates.webapp.utils import TempFile, SimpleError, compare_version_strings, is_windows
from vasl_templates.webapp.webdriver import WebDriver
from vasl_templates.webapp.vasl_mod import get_reverse_remapped_gpid
@ -393,6 +393,11 @@ 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

Loading…
Cancel
Save