From 0ba61bb5903a22044decaa9390437e83be0dadd7 Mon Sep 17 00:00:00 2001 From: txtsd Date: Tue, 8 Feb 2022 08:55:52 +0530 Subject: [PATCH] Implement even more PR suggestions --- .github/scripts/prepare_JREs.sh | 38 +++++++++++++-------------------- .github/workflows/build.yml | 2 +- README.md | 5 +++++ 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/scripts/prepare_JREs.sh b/.github/scripts/prepare_JREs.sh index 1525fdb96..b85e9c2f3 100755 --- a/.github/scripts/prepare_JREs.sh +++ b/.github/scripts/prepare_JREs.sh @@ -13,33 +13,25 @@ for file in *; do mkdir temp - # Handle OpenJDK17 archive - re='(OpenJDK17U-jre_x64_linux_hotspot_17.(.*).tar.gz)' + re='(OpenJDK([[:digit:]]+)U-jre_x64_linux_hotspot_([[:digit:]]+)(.*).tar.gz)' if [[ $file =~ $re ]]; then - version=${BASH_REMATCH[2]} - version_edit=$(echo $version | sed -e 's/_/+/g') - dir_name=jdk-17.$version_edit-jre - echo $dir_name - mkdir jre17 + version_major=${BASH_REMATCH[2]} + version_trailing=${BASH_REMATCH[4]} + + if [ $version_major = 17 ]; + then + hyphen='-' + else + hyphen='' + fi + + version_edit=$(echo $version_trailing | sed -e 's/_/+/g' | sed -e 's/b/-b/g') + dir_name=jdk$hyphen$version_major$version_edit-jre + mkdir jre$version_major tar -xzf $file -C temp pushd temp/$dir_name - cp -r . ../../jre17 - popd - - fi - - # Handle OpenJDK8 archive - re='(OpenJDK8U-jre_x64_linux_hotspot_8(.*).tar.gz)' - if [[ $file =~ $re ]]; - then - version=${BASH_REMATCH[2]} - version_edit=$(echo $version | sed -e 's/b/-b/g') - dir_name=jdk8$version_edit-jre - mkdir jre8 - tar -xzf $file -C temp - pushd temp/$dir_name - cp -r . ../../jre8 + cp -r . ../../jre$version_major popd fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 600831c05..42661b095 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,7 +124,7 @@ jobs: LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_DIR }}/usr/lib/jvm/java-17-openjdk/lib/server" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_DIR }}/usr/lib/jvm/java-17-openjdk/lib" - ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_DIR }} --output appimage --plugin qt -d ${{ env.INSTALL_DIR }}/usr/share/applications/org.polymc.polymc.desktop -i ${{ env.INSTALL_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg + ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg - name: Run windeployqt if: runner.os == 'Windows' diff --git a/README.md b/README.md index 74d0493c8..99f69b27e 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,11 @@ sudo dnf install polymc MacOS currently does not have any packages. We are still working on setting up MacOS packaging. Meanwhile, you can [build](https://github.com/PolyMC/PolyMC/blob/develop/BUILD.md#macos) it for yourself. +## Development Builds + +There are per-commit development builds available [here](https://github.com/PolyMC/PolyMC/actions). These have debug information in the binaries, so their file sizes are relatively larger. +Builds are provided for Linux, AppImage on Linux, Windows, and macOS. + # Help & Support Feel free to create an issue if you need help. However, you might find it easier to ask in the Discord server.