--- a/etc/settings Mon Jan 29 20:37:03 2024 +0000
+++ b/etc/settings Wed Jan 31 13:44:56 2024 +0100
@@ -47,11 +47,14 @@
### Document preparation (cf. isabelle latex)
###
-if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then
- ISABELLE_PDFLATEX="pdflatex -interaction=nonstopmode -c-style-errors"
-else
- ISABELLE_PDFLATEX="pdflatex -interaction=nonstopmode -file-line-error"
-fi
+case "$ISABELLE_PLATFORM_FAMILY" in
+ windows*)
+ ISABELLE_PDFLATEX="pdflatex -interaction=nonstopmode -c-style-errors"
+ ;;
+ *)
+ ISABELLE_PDFLATEX="pdflatex -interaction=nonstopmode -file-line-error"
+ ;;
+esac
ISABELLE_LUALATEX="lualatex --interaction=nonstopmode --file-line-error"
ISABELLE_BIBTEX="bibtex"
@@ -82,11 +85,14 @@
ISABELLE_TOOLS="$ISABELLE_HOME/lib/Tools"
# Location for temporary files (should be on a local file system).
-if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then
- ISABELLE_TMP_PREFIX="$TMPDIR/isabelle"
-else
- ISABELLE_TMP_PREFIX="/tmp/isabelle-${USER:-$LOGNAME}"
-fi
+case "$ISABELLE_PLATFORM_FAMILY" in
+ windows*)
+ ISABELLE_TMP_PREFIX="$TMPDIR/isabelle"
+ ;;
+ *)
+ ISABELLE_TMP_PREFIX="/tmp/isabelle-${USER:-$LOGNAME}"
+ ;;
+esac
# Heap locations.
ISABELLE_HEAPS="$ISABELLE_HOME_USER/heaps"
@@ -121,13 +127,13 @@
# "open" within desktop environment (potentially asynchronous)
case "$ISABELLE_PLATFORM_FAMILY" in
- linux)
+ linux*)
ISABELLE_OPEN="xdg-open"
;;
- macos)
+ macos*)
ISABELLE_OPEN="open"
;;
- windows)
+ windows*)
ISABELLE_OPEN="cygstart"
;;
esac
--- a/lib/Tools/scala Mon Jan 29 20:37:03 2024 +0000
+++ b/lib/Tools/scala Wed Jan 31 13:44:56 2024 +0100
@@ -12,8 +12,10 @@
export jvm_cp_args="$(platform_path "$ISABELLE_CLASSPATH")"
export JAVA_OPTS="$ISABELLE_JAVA_SYSTEM_OPTIONS -J-Dscala.usejavacp=true"
-if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then
- export TERM=dumb
+case "$ISABELLE_PLATFORM_FAMILY" in
+ windows*)
+ export TERM=dumb
+ ;;
fi
isabelle_scala scala $ISABELLE_SCALAC_OPTIONS "$@"
--- a/lib/scripts/getfunctions Mon Jan 29 20:37:03 2024 +0000
+++ b/lib/scripts/getfunctions Wed Jan 31 13:44:56 2024 +0100
@@ -137,21 +137,21 @@
for X in "$@"
do
case "$ISABELLE_PLATFORM_FAMILY" in
- linux)
+ linux*)
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="$X"
else
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$X"
fi
;;
- macos)
+ macos*)
if [ -z "$JAVA_LIBRARY_PATH" ]; then
export JAVA_LIBRARY_PATH="$X"
else
export JAVA_LIBRARY_PATH="$JAVA_LIBRARY_PATH:$X"
fi
;;
- windows)
+ windows*)
if [ -z "$PATH" ]; then
export PATH="$X"
else
--- a/lib/scripts/getsettings Mon Jan 29 20:37:03 2024 +0000
+++ b/lib/scripts/getsettings Wed Jan 31 13:44:56 2024 +0100
@@ -94,11 +94,14 @@
fi
#POLYML_EXE
-if [ "$ISABELLE_PLATFORM_FAMILY" = "windows" ]; then
- POLYML_EXE="$ML_HOME/poly.exe"
-else
- POLYML_EXE="$ML_HOME/poly"
-fi
+case "$ISABELLE_PLATFORM_FAMILY" in
+ windows*)
+ POLYML_EXE="$ML_HOME/poly.exe"
+ ;;
+ *)
+ POLYML_EXE="$ML_HOME/poly"
+ ;;
+esac
#ML system identifier
if [ -z "$ML_PLATFORM" ]; then
--- a/lib/scripts/java-gui-setup Mon Jan 29 20:37:03 2024 +0000
+++ b/lib/scripts/java-gui-setup Wed Jan 31 13:44:56 2024 +0100
@@ -2,10 +2,11 @@
#
# java-gui-setup --- platform-specific setup for Java/Swing GUI applications
-if [ "$ISABELLE_PLATFORM_FAMILY" = "macos" ]
-then
- JAVA_VERSION="$("$ISABELLE_JDK_HOME/bin/java" -version 2>&1 | head -n 1 | cut -d '"' -f2)"
- JAVA_DOMAIN="com.azul.zulu.${JAVA_VERSION}.java"
- defaults read "$JAVA_DOMAIN" AppleWindowTabbingMode >/dev/null 2>/dev/null ||
- defaults write "$JAVA_DOMAIN" AppleWindowTabbingMode manual >/dev/null 2>/dev/null
-fi
+case "$ISABELLE_PLATFORM_FAMILY" in
+ macos*)
+ JAVA_VERSION="$("$ISABELLE_JDK_HOME/bin/java" -version 2>&1 | head -n 1 | cut -d '"' -f2)"
+ JAVA_DOMAIN="com.azul.zulu.${JAVA_VERSION}.java"
+ defaults read "$JAVA_DOMAIN" AppleWindowTabbingMode >/dev/null 2>/dev/null ||
+ defaults write "$JAVA_DOMAIN" AppleWindowTabbingMode manual >/dev/null 2>/dev/null
+ ;;
+esac
--- a/src/Pure/Admin/component_jdk.scala Mon Jan 29 20:37:03 2024 +0000
+++ b/src/Pure/Admin/component_jdk.scala Wed Jan 31 13:44:56 2024 +0100
@@ -91,15 +91,15 @@
component_dir.write_settings("""
case "$ISABELLE_PLATFORM_FAMILY" in
- linux)
+ linux*)
ISABELLE_JAVA_PLATFORM="$ISABELLE_PLATFORM64"
ISABELLE_JDK_HOME="$COMPONENT/$ISABELLE_JAVA_PLATFORM"
;;
- windows)
+ windows*)
ISABELLE_JAVA_PLATFORM="$ISABELLE_WINDOWS_PLATFORM64"
ISABELLE_JDK_HOME="$COMPONENT/$ISABELLE_JAVA_PLATFORM"
;;
- macos)
+ macos*)
if [ -n "$ISABELLE_APPLE_PLATFORM64" -a -d "$COMPONENT/$ISABELLE_APPLE_PLATFORM64" ]
then
ISABELLE_JAVA_PLATFORM="$ISABELLE_APPLE_PLATFORM64"
--- a/src/Pure/System/isabelle_platform.scala Mon Jan 29 20:37:03 2024 +0000
+++ b/src/Pure/System/isabelle_platform.scala Wed Jan 31 13:44:56 2024 +0100
@@ -52,11 +52,9 @@
if (family0 == "linux" && is_arm) "linux_arm" else family0
}
- def is_linux: Boolean =
- ISABELLE_PLATFORM_FAMILY == "linux" ||
- ISABELLE_PLATFORM_FAMILY == "linux_arm"
- def is_macos: Boolean = ISABELLE_PLATFORM_FAMILY == "macos"
- def is_windows: Boolean = ISABELLE_PLATFORM_FAMILY == "windows"
+ def is_linux: Boolean = ISABELLE_PLATFORM_FAMILY.startsWith("linux")
+ def is_macos: Boolean = ISABELLE_PLATFORM_FAMILY.startsWith("macos")
+ def is_windows: Boolean = ISABELLE_PLATFORM_FAMILY.startsWith("windows")
def arch_64: String = if (is_arm) "arm64" else "x86_64"
def arch_64_32: String = if (is_arm) "arm64_32" else "x86_64_32"
--- a/src/Tools/VSCode/src/component_vscodium.scala Mon Jan 29 20:37:03 2024 +0000
+++ b/src/Tools/VSCode/src/component_vscodium.scala Wed Jan 31 13:44:56 2024 +0100
@@ -376,13 +376,16 @@
component_dir.write_settings("""
ISABELLE_VSCODIUM_HOME="$COMPONENT/${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}"
-if [ "$ISABELLE_PLATFORM_FAMILY" = "macos" ]; then
- ISABELLE_VSCODIUM_ELECTRON="$ISABELLE_VSCODIUM_HOME/VSCodium.app/Contents/MacOS/Electron"
- ISABELLE_VSCODIUM_RESOURCES="$ISABELLE_VSCODIUM_HOME/VSCodium.app/Contents/Resources"
-else
- ISABELLE_VSCODIUM_ELECTRON="$ISABELLE_VSCODIUM_HOME/electron"
- ISABELLE_VSCODIUM_RESOURCES="$ISABELLE_VSCODIUM_HOME/resources"
-fi
+case "$ISABELLE_PLATFORM_FAMILY" in
+ "macos"*)
+ ISABELLE_VSCODIUM_ELECTRON="$ISABELLE_VSCODIUM_HOME/VSCodium.app/Contents/MacOS/Electron"
+ ISABELLE_VSCODIUM_RESOURCES="$ISABELLE_VSCODIUM_HOME/VSCodium.app/Contents/Resources"
+ ;;
+ *)
+ ISABELLE_VSCODIUM_ELECTRON="$ISABELLE_VSCODIUM_HOME/electron"
+ ISABELLE_VSCODIUM_RESOURCES="$ISABELLE_VSCODIUM_HOME/resources"
+ ;;
+esac
""")