On 2021-05-10, Thangalin
Happy to announce that invoking ConTeXt from KeenWrite is now possible.
Cool. To make it easier to install in macOS, I have quickly cooked a couple of Homebrew formulas (see below). Use like this: cd <directory containing the scripts> brew install ./zulufx16.rb brew install ./keenwrite.rb keenwrite Nicola ############################################################ # Save as zulufx16.rb ############################################################ cask "zulufx16" do version "16.0.1,16.30.15-ca" if Hardware::CPU.intel? sha256 "cbb3b96d80a0675893f21dc51ba3f532049c501bd7dc4c8d1ee930e63032c745" url "https://cdn.azul.com/zulu/bin/zulu#{version.after_comma}-fx-jdk#{version.before_comma}-macosx_x64.tar.gz", referer: "https://www.azul.com/downloads/zulu/zulu-mac/" else sha256 "6b66194ee69ac0abc28a6fb00cad37fc29a8b5085776cfbaeebf4a600b03a16e" url "https://cdn.azul.com/zulu/bin/zulu#{version.after_comma}-fx-jdk#{version.before_comma}-macosx_aarch64.tar.gz", referer: "https://www.azul.com/downloads/zulu/zulu-mac/" end name "ZuluFX 16" desc "Azul Zulu Java 16 Standard Edition Development Kit" homepage "https://www.azul.com/downloads/zulu/zulu-mac/" depends_on macos: ">= :yosemite" artifact "zulu16.30.15-ca-fx-jdk16.0.1-macosx_x64/zulu-16.jdk", target: "/Library/Java/JavaVirtualMachines/zulu-16.jdk" zap delete: "/Library/Java/JavaVirtualMachines/zulu-16.jdk" end ############################################################ ############################################################ # Save as keenwrite.rb ############################################################ class Zulufx16Requirement < Requirement fatal true satisfy(build_env: false) { Dir.exist?("/Library/Java/JavaVirtualMachines/zulu-16.jdk/Contents/Home") } def message <<~EOS Execute `brew install --cask zulufx16` before installing Keenwrite. EOS end end class Keenwrite < Formula desc "Java-based desktop text editor with live preview, string interpolation, and formulas" homepage "https://github.com/DaveJarvis/keenwrite" url "https://github.com/DaveJarvis/keenwrite/releases/download/2.0.0/keenwrite.ja..." version "2.0.0" sha256 "259743af0728502e89abac043973ef5c213573183ba71ba93accb2a330f0e7a8" head "https://github.com/DaveJarvis/keenwrite.git" def install java_home = "/Library/Java/JavaVirtualMachines/zulu-16.jdk/Contents/Home" ENV["JAVA_HOME"] = java_home libexec.install "keenwrite.jar" (bin/"keenwrite").write <<~EOS #!/bin/bash export JAVA_HOME="#{java_home}" exec "${JAVA_HOME}/bin/java" --illegal-access=permit -jar "/usr/local/Cellar/keenwrite/#{version}/libexec/keenwrite.jar" "$@" EOS end test do false end end ############################################################