From 9f11fc94fb651d6b8d8dcd376a9a3c307a94f089 Mon Sep 17 00:00:00 2001 From: Alissa Rao Date: Tue, 19 Dec 2023 09:41:35 -0800 Subject: [PATCH] Rework scripts for downloading dependencies. --- build.sbt | 3 +- scripts/ci/build-installer_linux.sh | 12 +- scripts/ci/build-installer_win32.ps1 | 37 ++- scripts/ci/install-deps.ps1 | 65 +++++ scripts/ci/install-deps.sh | 62 +++++ scripts/ci/install-graalvm.ps1 | 14 - scripts/ci/install-graalvm.sh | 35 --- .../common-flatlaf-linux/resource-config.json | 4 +- .../linux/reflect-config.json | 261 +++++++++++++++++- .../linux/resource-config.json | 43 ++- scripts/run-agent-flatlaf-linux.sh | 4 +- scripts/run-agent-flatlaf-win32.ps1 | 24 +- scripts/run-agent-linux.sh | 4 +- scripts/run-agent-win32.ps1 | 24 +- 14 files changed, 507 insertions(+), 85 deletions(-) create mode 100644 scripts/ci/install-deps.ps1 create mode 100755 scripts/ci/install-deps.sh delete mode 100644 scripts/ci/install-graalvm.ps1 delete mode 100755 scripts/ci/install-graalvm.sh diff --git a/build.sbt b/build.sbt index 8ad431f..6c7d31b 100644 --- a/build.sbt +++ b/build.sbt @@ -64,6 +64,7 @@ libraryDependencies += "org.tukaani" % "xz" % "1.9 ThisBuild / assemblyMergeStrategy := { case x if x.startsWith("moe/lymia") => MergeStrategy.first case x if x.endsWith("module-info.class") => MergeStrategy.discard + case x if x.startsWith("com/intellij") => MergeStrategy.first // for debug builds case x => val oldStrategy = (ThisBuild / assemblyMergeStrategy).value oldStrategy(x) @@ -71,7 +72,7 @@ ThisBuild / assemblyMergeStrategy := { // Build native binaries nativeImageInstalled := true -nativeImageGraalHome := (target.value / f"graalvm-${PlatformType.currentPlatform.name}").toPath +nativeImageGraalHome := (target.value / "deps" / f"graalvm-${PlatformType.currentPlatform.name}").toPath nativeImageOptions += "--no-fallback" nativeImageOptions += "-Djava.awt.headless=false" diff --git a/scripts/ci/build-installer_linux.sh b/scripts/ci/build-installer_linux.sh index 5ffc38e..fc072c0 100755 --- a/scripts/ci/build-installer_linux.sh +++ b/scripts/ci/build-installer_linux.sh @@ -22,9 +22,7 @@ # THE SOFTWARE. # -. scripts/ci/install-graalvm.sh - -LINUXDEPLOY_DL="https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20231026-1/linuxdeploy-x86_64.AppImage" +. scripts/ci/install-deps.sh echo "Extracting native tarballs..." rm -rfv target/native-bin || exit 1 @@ -46,12 +44,6 @@ ASSEMBLY_JAR="$(sbt "print assembly" --error || exit 1)" echo "ASSEMBLY_JAR=$ASSEMBLY_JAR" cp "$(echo "$ASSEMBLY_JAR" | head -n 1 | tr -d '\n')" target/"$ASSEMBLY_NAME" || exit 1 -echo "Downloading tools..." -if [ ! -f target/linuxdeploy ]; then - wget -O target/linuxdeploy "$LINUXDEPLOY_DL" || exit 1 - chmod +x target/linuxdeploy || exit 1 -fi - echo "Cleaning up after previous scripts..." rm -rfv target/native-image target/dist-build || exit 1 mkdir -p target/native-image target/dist-build || exit 1 @@ -80,6 +72,6 @@ cd ../../../.. || exit 1 # Build AppImage echo "Building AppImage..." cd target/dist-build/linux || exit 1 - LDAI_COMP=xz ../../linuxdeploy --appdir AppDir/ --output appimage || exit 1 + LDAI_COMP=xz ../../deps/linuxdeploy --appdir AppDir/ --output appimage || exit 1 cd ../../.. || exit 1 cp -v target/dist-build/linux/MPPatch_Installer-x86_64.AppImage target/"$APPIMAGE_NAME" || exit 1 diff --git a/scripts/ci/build-installer_win32.ps1 b/scripts/ci/build-installer_win32.ps1 index e32e73d..f8f78ce 100644 --- a/scripts/ci/build-installer_win32.ps1 +++ b/scripts/ci/build-installer_win32.ps1 @@ -1,9 +1,29 @@ -$ErrorActionPreference = "Stop" +# +# Copyright (c) 2015-2023 Lymia Kanokawa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# -$URL_RCEDIT = "https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe" +$ErrorActionPreference = "Stop" # Install graalvm -scripts/ci/install-graalvm.ps1 +scripts/ci/install-deps.ps1 # Extract native tarballs echo "Extracting native tarballs..." @@ -15,13 +35,6 @@ cd target/native-bin tar -xv -f ../../target/mppatch_ci_natives-linux.tar.gz cd ../.. -# Download rcedit if it isn't already downloaded -if (-Not(Test-Path "target/rcedit.exe" -PathType Leaf)) { - echo "Downloading 'rcedit.exe'..." - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "$URL_RCEDIT" -OutFile "target/rcedit.exe" -} - # Find the current version $VERSION = "$( sbt "print version" --error )".Trim() $VERSION = $VERSION.Split(" ")[0].Trim() # fix a weird Github Actions difference @@ -38,7 +51,7 @@ if (Test-Path target/native-image) { rm -Recurse -Force -Verbose target/native-image } sbt nativeImage -target/rcedit.exe "target/native-image/mppatch-installer.exe" ` +target/deps/rcedit.exe "target/native-image/mppatch-installer.exe" ` --set-version-string "FileDescription" "MPPatch Installer - Native Image Installer" ` --set-file-version "$FILE_VERSION" ` --set-version-string "ProductName" "MPPatch" ` @@ -78,7 +91,7 @@ echo "Writing NSIS split resources..." [System.IO.File]::WriteAllBytes("target/mppatch-installer-data.dat", @($bytes[$nsisLocation..($bytes.Count - 1)])) echo "Building final installer..." -target/rcedit.exe "target/mppatch-installer-stub.exe" ` +target/deps/rcedit.exe "target/mppatch-installer-stub.exe" ` --set-version-string "FileDescription" "MPPatch Installer" ` --set-file-version "$FILE_VERSION" ` --set-version-string "ProductName" "MPPatch" ` diff --git a/scripts/ci/install-deps.ps1 b/scripts/ci/install-deps.ps1 new file mode 100644 index 0000000..630f25d --- /dev/null +++ b/scripts/ci/install-deps.ps1 @@ -0,0 +1,65 @@ +# +# Copyright (c) 2015-2023 Lymia Kanokawa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +$ErrorActionPreference = "Stop" + +$GRAALVM_WIN32_URL = "https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-openjdk21.0.1+12-23.1.1+1-windows-amd64.zip" +$GRAALVM_WIN32_DIR = "bellsoft-liberica-vm-openjdk21-23.1.1" +$GRAALVM_WIN32_SHA = "edf9abd89a5da392488517e5135e1ac158f37e44c6c677cd7c784937b515dbdb" + +$RCEDIT_URL = "https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe" +$RCEDIT_SHA = "3e7801db1a5edbec91b49a24a094aad776cb4515488ea5a4ca2289c400eade2a" + +function Download-Dependency { + param ( + [string]$Name, + [string]$Uri, + [string]$Sha256 + ) + + if (-Not(Test-Path "target/deps/dl/$Name" -PathType Container)) { + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri "$Uri" -OutFile "target/deps/dl/$Name" + $FileSha256=$(Get-FileHash "target/deps/dl/$Name" -Algorithm SHA256).Hash + echo "${Name}: expected - $Sha256, found - $FileSha256" + if ($Sha256 -ne $FileSha256) { + Remove-Item "target/deps/dl/$Name" + throw "${Name}: sha256 mismatch" + } + } +} + +New-Item "target/deps/dl" -ItemType Directory -ea 0 -Verbose + +# Install GraalVM for Windows +if (-Not(Test-Path "target/deps/graalvm-win32" -PathType Container)) { + echo "Downloading GraalVM for Windows..." + Download-Dependency -Name "graalvm-win32.zip" -Uri "$GRAALVM_WIN32_URL" -Sha256 "$GRAALVM_WIN32_SHA" + Expand-Archive -Path "target/deps/dl/graalvm-win32.zip" -DestinationPath "target/deps/graalvm-win32" +} + +# Install rcedit +if (-Not (Test-Path "target/deps/rcedit.exe" -PathType Container)) { + echo "Downloading rcedit..." + Download-Dependency -Name "rcedit.exe" -Uri "$RCEDIT_URL" -Sha256 "$RCEDIT_SHA" + Copy-Item "target/deps/dl/rcedit.exe" "target/deps/rcedit.exe" +} diff --git a/scripts/ci/install-deps.sh b/scripts/ci/install-deps.sh new file mode 100755 index 0000000..53594d2 --- /dev/null +++ b/scripts/ci/install-deps.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# +# Copyright (c) 2015-2023 Lymia Kanokawa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +GRAALVM_LINUX_URL="https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-openjdk21.0.1+12-23.1.1+1-linux-amd64.tar.gz" +GRAALVM_LINUX_DIR="bellsoft-liberica-vm-openjdk21-23.1.1" +GRAALVM_LINUX_SHA="8b3549e3a53cd4bb5e27bf1fa373cf9573874218c55b70681799a68004d088fa" + +LINUXDEPLOY_URL="https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20231026-1/linuxdeploy-x86_64.AppImage" +LINUXDEPLOY_SHA="c242e21f573532c03adc2c356b70055ee0de2ae66e235d086b714e69d2cae529" + +mkdir -pv target/deps target/deps/dl || exit 1 + +download_file() { + if [ ! -f "target/deps/dl/$1" ]; then + wget "$2" -O "target/deps/dl/$1" || exit 1 + CUR_SHA256="$(sha256sum "target/deps/dl/$1" | cut -d' ' -f 1 | tr -d '\n')" + if [ "$CUR_SHA256" != "$3" ]; then + rm -v "target/deps/dl/$1" || exit 1 + echo "$1: sha256 mismatch" + exit 1 + fi + fi +} + +# GraalVM for Linux +if [ ! -d target/deps/graalvm-linux ]; then + echo "Downloading GraalVM for Linux..." + download_file "graalvm-linux.tar.gz" "$GRAALVM_LINUX_URL" "$GRAALVM_LINUX_SHA" || exit 1 + cd target/deps || exit 1 + tar -xv -f dl/graalvm-linux.tar.gz || exit 1 + mv -v "$GRAALVM_LINUX_DIR" graalvm-linux || exit 1 + cd ../.. || exit 1 +fi + +# linuxdeploy +if [ ! -f target/deps/linuxdeploy ]; then + echo "Downloading linuxdeploy..." + download_file "linuxdeploy" "$LINUXDEPLOY_URL" "$LINUXDEPLOY_SHA" || exit 1 + cp -v target/deps/dl/linuxdeploy target/deps/ || exit 1 + chmod -v +x target/deps/linuxdeploy || exit 1 +fi diff --git a/scripts/ci/install-graalvm.ps1 b/scripts/ci/install-graalvm.ps1 deleted file mode 100644 index 79ffc91..0000000 --- a/scripts/ci/install-graalvm.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -$ErrorActionPreference = "Stop" - -$GRAALVM_WIN32 = "https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-openjdk21.0.1+12-23.1.1+1-windows-amd64.zip" -$GRAALVM_WIN32_DIR = "bellsoft-liberica-vm-openjdk21-23.1.1" - -# Install graalvm -if (-Not(Test-Path "target/graalvm-win32" -PathType Container)) { - echo "Downloading graalvm..." - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "$GRAALVM_WIN32" -OutFile "target/graalvm-win32.zip" - Expand-Archive -Path "target/graalvm-win32.zip" -DestinationPath "target/" - mv "target/$GRAALVM_WIN32_DIR" "target/graalvm-win32" - rm "target/graalvm-win32.zip" -} diff --git a/scripts/ci/install-graalvm.sh b/scripts/ci/install-graalvm.sh deleted file mode 100755 index 583e95c..0000000 --- a/scripts/ci/install-graalvm.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2015-2023 Lymia Kanokawa -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# - -GRAALVM_LINUX="https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-openjdk21.0.1+12-23.1.1+1-linux-amd64.tar.gz" -GRAALVM_LINUX_DIR="bellsoft-liberica-vm-openjdk21-23.1.1" - -if [ ! -d target/graalvm-linux ]; then - wget $GRAALVM_LINUX -O target/graalvm-linux.tar.gz || exit 1 - cd target/ || exit 1 - tar -xv -f graalvm-linux.tar.gz || exit 1 - mv -v $GRAALVM_LINUX_DIR graalvm-linux || exit 1 - rm -rf graalvm-linux.tar.gz || exit 1 - cd .. || exit 1 -fi diff --git a/scripts/native-image-config/common-flatlaf-linux/resource-config.json b/scripts/native-image-config/common-flatlaf-linux/resource-config.json index 860cbc2..6c5eec9 100644 --- a/scripts/native-image-config/common-flatlaf-linux/resource-config.json +++ b/scripts/native-image-config/common-flatlaf-linux/resource-config.json @@ -257,10 +257,10 @@ }]}, "bundles":[{ "name":"com.formdev.flatlaf.resources.Bundle", - "locales":[""] + "locales":["", "und"] }, { "name":"com.sun.org.apache.xml.internal.serializer.XMLEntities", - "locales":[""] + "locales":["", "und"] }, { "name":"com.sun.swing.internal.plaf.basic.resources.basic", "classNames":["com.sun.swing.internal.plaf.basic.resources.basic"] diff --git a/scripts/native-image-config/linux/reflect-config.json b/scripts/native-image-config/linux/reflect-config.json index 16222f8..b1a50f8 100644 --- a/scripts/native-image-config/linux/reflect-config.json +++ b/scripts/native-image-config/linux/reflect-config.json @@ -5,6 +5,12 @@ { "name": "[C" }, + { + "name": "[Lcom.fasterxml.jackson.databind.deser.Deserializers;" + }, + { + "name": "[Lcom.fasterxml.jackson.databind.ser.Serializers;" + }, { "name": "[Ljava.awt.event.MouseMotionListener;" }, @@ -17,6 +23,21 @@ { "name": "[Ljava.lang.String;" }, + { + "name": "[Lplay.api.libs.json.JsResult;" + }, + { + "name": "[Lplay.api.libs.json.JsValue;" + }, + { + "name": "com.fasterxml.jackson.databind.ext.Java7SupportImpl", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, { "name": "com.formdev.flatlaf.FlatDarculaLaf", "methods": [ @@ -3120,6 +3141,14 @@ } ] }, + { + "name": "java.util.concurrent.atomic.AtomicReference", + "fields": [ + { + "name": "value" + } + ] + }, { "name": "java.util.concurrent.atomic.Striped64", "fields": [ @@ -3131,6 +3160,29 @@ } ] }, + { + "name": "javax.imageio.spi.ImageReaderSpi" + }, + { + "name": "javax.imageio.spi.ImageReaderWriterSpi", + "methods": [ + { + "name": "getFileSuffixes", + "parameterTypes": [] + }, + { + "name": "getFormatNames", + "parameterTypes": [] + }, + { + "name": "getMIMETypes", + "parameterTypes": [] + } + ] + }, + { + "name": "javax.imageio.spi.ImageWriterSpi" + }, { "name": "javax.swing.AbstractButton", "methods": [ @@ -3696,6 +3748,14 @@ } ] }, + { + "name": "moe.lymia.mppatch.ui.ConfigurationStore$", + "fields": [ + { + "name": "i18n$lzy1" + } + ] + }, { "name": "moe.lymia.mppatch.ui.FrameBase$ActionButton", "methods": [ @@ -3724,6 +3784,9 @@ { "name": "moe.lymia.mppatch.ui.FrameUtils$", "fields": [ + { + "name": "iconSet$lzy1" + }, { "name": "symbolFont$lzy1" } @@ -3755,15 +3818,23 @@ "allDeclaredFields": true }, { - "name": "moe.lymia.mppatch.ui.InstallerMain", + "name": "moe.lymia.mppatch.ui.InstallationConfiguration$$anon$1", "fields": [ { - "name": "i18n$lzy1" + "name": "underlying$lzy1" + } + ] + }, + { + "name": "moe.lymia.mppatch.ui.InstallationConfiguration$$anon$2", + "fields": [ + { + "name": "underlying$lzy2" } ] }, { - "name": "moe.lymia.mppatch.ui.MainFrame", + "name": "moe.lymia.mppatch.ui.LegacyMainFrame", "fields": [ { "name": "ActionButton$lzy1" @@ -3773,6 +3844,47 @@ } ] }, + { + "name": "moe.lymia.mppatch.ui.MPPatchInstaller$", + "fields": [ + { + "name": "appImageContents$lzy1" + }, + { + "name": "appImageFileLocation$lzy1" + }, + { + "name": "baseDirectory$lzy1" + }, + { + "name": "defaultPackageSource$lzy1" + }, + { + "name": "i18n$lzy1" + }, + { + "name": "isAppImage$lzy1" + }, + { + "name": "isNsis$lzy1" + }, + { + "name": "isSbt$lzy1" + }, + { + "name": "logFile$lzy1" + }, + { + "name": "nsisContents$lzy1" + }, + { + "name": "nsisFileLocation$lzy1" + }, + { + "name": "platform$lzy1" + } + ] + }, { "name": "moe.lymia.mppatch.ui.SettingsDialog", "fields": [ @@ -3802,6 +3914,9 @@ { "name": "commit$lzy1" }, + { + "name": "isCi$lzy1" + }, { "name": "isDirty$lzy1" }, @@ -3830,6 +3945,146 @@ { "name": "net.miginfocom.swing.MigLayout" }, + { + "name": "play.api.libs.json.JsPath", + "fields": [ + { + "name": "PathMissingError$lzy1" + }, + { + "name": "json$lzy1" + } + ] + }, + { + "name": "play.api.libs.json.Json$", + "fields": [ + { + "name": "Placeholder$lzy1" + } + ] + }, + { + "name": "play.api.libs.json.Reads$", + "fields": [ + { + "name": "ArrayNodeReads$lzy1" + }, + { + "name": "BigIntReads$lzy1" + }, + { + "name": "BigIntegerReads$lzy1" + }, + { + "name": "BooleanReads$lzy1" + }, + { + "name": "ByteReads$lzy1" + }, + { + "name": "DoubleReads$lzy1" + }, + { + "name": "FloatReads$lzy1" + }, + { + "name": "IntReads$lzy1" + }, + { + "name": "IsoDateReads$lzy1" + }, + { + "name": "JsArrayReads$lzy1" + }, + { + "name": "JsBooleanReads$lzy1" + }, + { + "name": "JsNumberReads$lzy1" + }, + { + "name": "JsObjectReads$lzy1" + }, + { + "name": "JsStringReads$lzy1" + }, + { + "name": "JsValueReads$lzy1" + }, + { + "name": "JsonNodeReads$lzy1" + }, + { + "name": "LongReads$lzy1" + }, + { + "name": "ObjectNodeReads$lzy1" + }, + { + "name": "ShortReads$lzy1" + }, + { + "name": "StringReads$lzy1" + }, + { + "name": "TemporalParser$lzy1" + } + ] + }, + { + "name": "play.api.libs.json.Writes$", + "fields": [ + { + "name": "BigDecimalWrites$lzy1" + }, + { + "name": "BigIntWrites$lzy1" + }, + { + "name": "BigIntegerWrites$lzy1" + }, + { + "name": "BooleanWrites$lzy1" + }, + { + "name": "ByteWrites$lzy1" + }, + { + "name": "DefaultDateWrites$lzy1" + }, + { + "name": "DoubleWrites$lzy1" + }, + { + "name": "FloatWrites$lzy1" + }, + { + "name": "IntWrites$lzy1" + }, + { + "name": "JsValueWrites$lzy1" + }, + { + "name": "JsonNodeWrites$lzy1" + }, + { + "name": "LongWrites$lzy1" + }, + { + "name": "ShortWrites$lzy1" + }, + { + "name": "StringWrites$lzy1" + }, + { + "name": "TemporalFormatter$lzy1" + }, + { + "name": "UuidWrites$lzy1" + } + ] + }, { "name": "scala.xml.PrettyPrinter", "fields": [ diff --git a/scripts/native-image-config/linux/resource-config.json b/scripts/native-image-config/linux/resource-config.json index 53a2a50..8358e22 100644 --- a/scripts/native-image-config/linux/resource-config.json +++ b/scripts/native-image-config/linux/resource-config.json @@ -22,6 +22,24 @@ { "pattern": "\\QMETA-INF/services/java.util.prefs.PreferencesFactory\\E" }, + { + "pattern": "\\QMETA-INF/services/java.util.spi.ResourceBundleControlProvider\\E" + }, + { + "pattern": "\\QMETA-INF/services/javax.imageio.spi.ImageInputStreamSpi\\E" + }, + { + "pattern": "\\QMETA-INF/services/javax.imageio.spi.ImageOutputStreamSpi\\E" + }, + { + "pattern": "\\QMETA-INF/services/javax.imageio.spi.ImageReaderSpi\\E" + }, + { + "pattern": "\\QMETA-INF/services/javax.imageio.spi.ImageTranscoderSpi\\E" + }, + { + "pattern": "\\QMETA-INF/services/javax.imageio.spi.ImageWriterSpi\\E" + }, { "pattern": "\\QMETA-INF/services/javax.xml.parsers.DocumentBuilderFactory\\E" }, @@ -85,13 +103,15 @@ { "name": "com.formdev.flatlaf.resources.Bundle", "locales": [ - "" + "", + "und" ] }, { "name": "com.sun.org.apache.xml.internal.serializer.XMLEntities", "locales": [ - "" + "", + "und" ] }, { @@ -111,6 +131,25 @@ "classNames": [ "sun.awt.resources.awt" ] + }, + { + "name": "com.formdev.flatlaf.resources.Bundle", + "locales": [ + "" + ] + }, + { + "name": "com.sun.org.apache.xml.internal.serializer.XMLEntities", + "locales": [ + "" + ] + }, + { + "name": "moe.lymia.mppatch.ui.TextData", + "locales": [ + "", + "en" + ] } ] } \ No newline at end of file diff --git a/scripts/run-agent-flatlaf-linux.sh b/scripts/run-agent-flatlaf-linux.sh index 7913431..ad78da3 100755 --- a/scripts/run-agent-flatlaf-linux.sh +++ b/scripts/run-agent-flatlaf-linux.sh @@ -22,9 +22,9 @@ # THE SOFTWARE. # -. scripts/ci/install-graalvm.sh +. scripts/ci/install-deps.sh wget https://download.formdev.com/files/flatlaf/flatlaf-demo-3.2.5.jar -O target/flatlaf-demo-3.2.5.jar || exit 1 -target/graalvm-linux/bin/java \ +target/deps/graalvm-linux/bin/java \ -agentlib:native-image-agent=config-merge-dir=scripts/native-image-config/common-flatlaf-linux \ -jar target/flatlaf-demo-3.2.5.jar || exit 1 diff --git a/scripts/run-agent-flatlaf-win32.ps1 b/scripts/run-agent-flatlaf-win32.ps1 index 6845a34..d4e7f60 100644 --- a/scripts/run-agent-flatlaf-win32.ps1 +++ b/scripts/run-agent-flatlaf-win32.ps1 @@ -1,4 +1,26 @@ -scripts/ci/install-graalvm.ps1 +# +# Copyright (c) 2015-2023 Lymia Kanokawa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +scripts/ci/install-deps.ps1 $ProgressPreference = 'SilentlyContinue' iwr -Uri "https://download.formdev.com/files/flatlaf/flatlaf-demo-3.2.5.jar" -OutFile "target/flatlaf-demo-3.2.5.jar" diff --git a/scripts/run-agent-linux.sh b/scripts/run-agent-linux.sh index bec2053..aa6573c 100755 --- a/scripts/run-agent-linux.sh +++ b/scripts/run-agent-linux.sh @@ -22,13 +22,13 @@ # THE SOFTWARE. # -. scripts/ci/install-graalvm.sh +. scripts/ci/install-deps.sh JAR_NAME="$(sbt "print assembly" --error || exit 1)" rm -rfv target/native-image-config-temp scripts/native-image-config/linux || exit 1 mkdir -p scripts/native-image-config/linux || exit 1 -target/graalvm-linux/bin/java \ +target/deps/graalvm-linux/bin/java \ -agentlib:native-image-agent=config-output-dir=target/native-image-config-temp \ -jar "$JAR_NAME" @nativeImageGenerateConfig 9e3c6db9-2a2f-4a22-9eb5-fba1a710449c || exit 1 scripts/python/merge-configs.py linux || exit 1 diff --git a/scripts/run-agent-win32.ps1 b/scripts/run-agent-win32.ps1 index 3691cd3..fcb0ea6 100644 --- a/scripts/run-agent-win32.ps1 +++ b/scripts/run-agent-win32.ps1 @@ -1,4 +1,26 @@ -scripts/ci/install-graalvm.ps1 +# +# Copyright (c) 2015-2023 Lymia Kanokawa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +scripts/ci/install-deps.ps1 $JAR_NAME = "$( sbt "print assembly" --error )".Trim()