From 70a8ae1583a16b7fb6abe7d97ec36ee73a2e19ad Mon Sep 17 00:00:00 2001 From: Abhinay Agarwal Date: Mon, 13 Sep 2021 21:54:51 +0530 Subject: [PATCH 1/7] release-drafter should group changes into category (#410) --- .github/release-drafter.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a234535a6..e20a3b493 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,12 @@ exclude-labels: - 'housekeeping' +categories: + - title: '๐Ÿš€ Features' + labels: + - 'enhancement' + - title: '๐Ÿ› Bug Fixes' + labels: + - 'bug' template: | ## Whatโ€™s Changed $CHANGES \ No newline at end of file From fe2c4c3bd042e2110dc085d795a9cb7020e61248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20L=C3=B6ffler?= <22102800+Oliver-Loeffler@users.noreply.github.com> Date: Tue, 14 Sep 2021 10:12:02 +0200 Subject: [PATCH 2/7] Custom 'java.library.path' for Linux packages to avoid startup issues (#380) --- .github/workflows/linux.yml | 1 + .../app/about/AboutWindowController.java | 74 +++++++++++++++++-- .../app/i18n/SceneBuilderApp.properties | 11 ++- 3 files changed, 78 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8c2ee92fd..f18af2cab 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -47,6 +47,7 @@ jobs: --icon app/assets/linux/icon-linux.png \ --java-options '"-Djdk.gtk.version=2"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ + --java-options '"-Djava.library.path=/opt/scenebuilder/lib/runtime/bin:/opt/scenebuilder/lib/runtime/lib"' \ --install-dir /opt \ --type deb mv $INSTALL_DIR/*.deb $INSTALL_DIR/SceneBuilder-${{ env.TAG }}.deb diff --git a/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java b/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java index b5c8ab6e1..9db2c759b 100644 --- a/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java +++ b/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java @@ -40,6 +40,12 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import javafx.fxml.FXML; import javafx.scene.control.TextArea; @@ -57,7 +63,7 @@ public final class AboutWindowController extends AbstractFxmlWindowController { private GridPane vbox; @FXML private TextArea textArea; - + private String sbBuildInfo; private String sbBuildVersion; private String sbBuildDate; @@ -87,7 +93,7 @@ public AboutWindowController() { // We go with default values } } - + @FXML public void onMousePressed(MouseEvent event) { if ((event.getClickCount() == 2) && event.isAltDown()) { @@ -128,12 +134,29 @@ private String getAboutText() { .append(getLoggingParagraph()) .append(getJavaFXParagraph()) .append(getJavaParagraph()) + .append(getJavaLibraryPathParagraph()) .append(getOsParagraph()) + .append(getApplicationDirectoriesParagraph()) .append(I18N.getString(sbAboutCopyrightKeyName)); return text.toString(); } - + + private StringBuilder getApplicationDirectoriesParagraph() { + return new StringBuilder(I18N.getString("about.app.data.directory")) + .append("\n\t") // NOI18N + .append(Paths.get(AppPlatform.getApplicationDataFolder()).normalize()) //NOI18N + .append("\n\n") //NOI18N + .append(I18N.getString("about.app.user.library")) + .append("\n\t") //NOI18N + .append(Paths.get(AppPlatform.getUserLibraryFolder()).normalize()) //NOI18N + .append("\n\n") //NOI18N + .append(I18N.getString("about.app.program.directory")) + .append("\n\t") //NOI18N + .append(Paths.get(".").toAbsolutePath().normalize()) //NOI18N + .append("\n\n"); //NOI18N + } + /** * * @treatAsPrivate @@ -141,7 +164,7 @@ private String getAboutText() { public String getBuildJavaVersion() { return sbBuildJavaVersion; } - + /** * * @treatAsPrivate @@ -149,7 +172,7 @@ public String getBuildJavaVersion() { public String getBuildInfo() { return sbBuildInfo; } - + private StringBuilder getVersionParagraph() { StringBuilder sb = new StringBuilder(I18N.getString("about.product.version")); sb.append("\nJavaFX Scene Builder ").append(sbBuildVersion) //NOI18N @@ -195,10 +218,49 @@ private StringBuilder getJavaFXParagraph() { private StringBuilder getJavaParagraph() { StringBuilder sb = new StringBuilder("Java\n"); //NOI18N sb.append(System.getProperty("java.runtime.version")).append(", ") //NOI18N - .append(System.getProperty("java.vendor")).append("\n\n"); //NOI18N + .append(System.getProperty("java.vendor")) // NOI18N + .append("\n\n"); return sb; } + private StringBuilder getJavaLibraryPathParagraph() { + StringBuilder sb = new StringBuilder(I18N.getString("about.java.library.paths")) + .append("\n"); //NOI18N + String libPaths = System.getProperty("java.library.path"); //NOI18N + List invalidPaths = new ArrayList<>(); + String separator = getPathSeparator(); + for (String libPath : libPaths.split(separator)) { + try { + Path absolutePath = Paths.get(libPath).normalize().toAbsolutePath(); + if (Files.exists(absolutePath)) { + String path = absolutePath.toString(); + sb.append("\t").append(path).append("\n"); + } else { + invalidPaths.add(libPath); + } + } catch (InvalidPathException error) { + invalidPaths.add(libPath); + } + } + sb.append("\n"); + if (!invalidPaths.isEmpty()) { + sb.append(I18N.getString("about.java.library.paths.invalids")); //NOI18N + sb.append("\n"); + invalidPaths.forEach(invalidPath -> sb.append("\t").append(invalidPath).append("\n")); + sb.append("\n"); + } + return sb; + } + + private String getPathSeparator() { + String os = System.getProperty("os.name").toLowerCase(); + if (os.indexOf("win") >= 0) { + return ";"; + } else { + return ":"; + } + } + private StringBuilder getOsParagraph() { StringBuilder sb = new StringBuilder(I18N.getString("about.operating.system")); sb.append("\n").append(System.getProperty("os.name")).append(", ") //NOI18N diff --git a/app/src/main/resources/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties b/app/src/main/resources/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties index 695a7ef20..aa2c49385 100644 --- a/app/src/main/resources/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties +++ b/app/src/main/resources/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2016, 2019, Gluon and/or its affiliates. +# Copyright (c) 2016, 2021, Gluon and/or its affiliates. # Copyright (c) 2012, 2014, Oracle and/or its affiliates. # All rights reserved. Use is subject to license terms. # @@ -300,6 +300,13 @@ about.logging.body.second = The default file path is {0} about.operating.system = Operating System about.product.version = Product Version +about.app.data.directory = Application Data Folder: +about.app.user.library = User Library Folder: +about.app.program.directory = Application Folder: + +about.java.library.paths = Java Library Path(s): +about.java.library.paths.invalids = Missing or invalid Java Library Path(s): + # ----------------------------------------------------------------------------- # Themes # ----------------------------------------------------------------------------- @@ -517,4 +524,4 @@ check_for_updates.alert.error.message = Can't check for latest version with serv check_for_updates.alert.error.title = Scene Builder check_for_updates.alert.up_to_date.message = You already have the latest version of Scene Builder installed. check_for_updates.alert.up_to_date.title = Scene Builder -check_for_updates.alert.headertext = Update Check \ No newline at end of file +check_for_updates.alert.headertext = Update Check From bdb89186b2cf5bf75f7cfffdaeb905529baa7c93 Mon Sep 17 00:00:00 2001 From: Abhinay Agarwal Date: Tue, 14 Sep 2021 18:30:05 +0530 Subject: [PATCH 3/7] Prepare SB 17 (#409) --- .github/workflows/build.yml | 5 +++-- .github/workflows/kit.yml | 5 +++-- .github/workflows/linux.yml | 11 ++++++----- .github/workflows/mac.yml | 11 ++++++----- .github/workflows/win.yml | 11 ++++++----- app/pom.xml | 4 ++-- kit/pom.xml | 2 +- pom.xml | 4 ++-- 8 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f6a0ea82..315ee35f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,9 +24,10 @@ jobs: uses: actions/checkout@v2 - name: Setup Java - uses: joschi/setup-jdk@v2 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'temurin' + java-version: '17-ea' - name: Run Tests (Linux) if: runner.os == 'Linux' diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index 41ab71a10..b83176362 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -11,9 +11,10 @@ jobs: run: sudo apt-get install xdg-utils xvfb tigervnc-standalone-server tigervnc-common - uses: actions/checkout@v2 - name: Setup java - uses: joschi/setup-jdk@v2 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'temurin' + java-version: '17-ea' - name: Store Variables id: variables run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f18af2cab..7f2258101 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,9 +11,10 @@ jobs: run: sudo apt-get install xdg-utils - uses: actions/checkout@v2 - name: Setup java - uses: joschi/setup-jdk@v2 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'temurin' + java-version: '17-ea' - name: Store Variables id: variables run: | @@ -32,8 +33,8 @@ jobs: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - name: Setup JavaFX run: | - wget -P /tmp https://download2.gluonhq.com/openjfx/16/openjfx-16_linux-x64_bin-jmods.zip - unzip /tmp/openjfx-16_linux-x64_bin-jmods.zip -d /tmp + wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17_linux-x64_bin-jmods.zip + unzip /tmp/openjfx-17_linux-x64_bin-jmods.zip -d /tmp - name: Build and package JAR run: | mvn -q versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false @@ -62,7 +63,7 @@ jobs: ls $INSTALL_DIR env: MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp - JAVAFX_HOME: /tmp/javafx-jmods-16/ + JAVAFX_HOME: /tmp/javafx-jmods-17/ JPACKAGE_HOME: ${{ env.JAVA_HOME }} TAG: ${{ steps.variables.outputs.SOURCE_TAG }} VERSION: ${{ steps.variables.outputs.SOURCE_VERSION }} diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e12c3d520..424ed3f22 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -9,9 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup java - uses: joschi/setup-jdk@v2 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'temurin' + java-version: '17-ea' - uses: Apple-Actions/import-codesign-certs@v1 with: p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} @@ -34,8 +35,8 @@ jobs: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - name: Setup JavaFX run: | - wget -P /tmp https://download2.gluonhq.com/openjfx/16/openjfx-16_osx-x64_bin-jmods-SIGNED.zip - unzip /tmp/openjfx-16_osx-x64_bin-jmods-SIGNED.zip -d /tmp + wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17_osx-x64_bin-jmods-SIGNED.zip + unzip /tmp/openjfx-17_osx-x64_bin-jmods-SIGNED.zip -d /tmp - name: Build and package JAR run: | mvn -q versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false @@ -59,7 +60,7 @@ jobs: echo ::set-output name=path::$INSTALL_DIR/SceneBuilder-${{ env.TAG }}.dmg env: MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp - JAVAFX_HOME: /tmp/javafx-jmods-16/ + JAVAFX_HOME: /tmp/javafx-jmods-17/ JPACKAGE_HOME: ${{ env.JAVA_HOME }} GLUON_MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }} GLUON_MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }} diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index cae85f8a5..dd39dac79 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -9,9 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup java - uses: joschi/setup-jdk@v2 + uses: actions/setup-java@v2 with: - java-version: 16 + distribution: 'temurin' + java-version: '17-ea' - name: Store Variables id: variables run: | @@ -30,8 +31,8 @@ jobs: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - name: Setup JavaFX run: | - bitsadmin /Transfer DownloadJavaFX https://download2.gluonhq.com/openjfx/16/openjfx-16_windows-x64_bin-jmods.zip D:\openjfx-16_windows-x64_bin-jmods.zip - Expand-Archive -Force D:\openjfx-16_windows-x64_bin-jmods.zip D:\ + bitsadmin /Transfer DownloadJavaFX https://download2.gluonhq.com/openjfx/17/openjfx-17_windows-x64_bin-jmods.zip D:\openjfx-17_windows-x64_bin-jmods.zip + Expand-Archive -Force D:\openjfx-17_windows-x64_bin-jmods.zip D:\ - name: Build and package JAR shell: cmd run: | @@ -47,7 +48,7 @@ jobs: call dir ${{ env.INSTALL_DIR }} env: MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp - JAVAFX_HOME: D:\javafx-jmods-16 + JAVAFX_HOME: D:\javafx-jmods-17 JPACKAGE_HOME: ${{ env.JAVA_HOME }} TAG: ${{ steps.variables.outputs.SOURCE_TAG }} VERSION: ${{ steps.variables.outputs.SOURCE_VERSION }} diff --git a/app/pom.xml b/app/pom.xml index 492f604da..bddc3f443 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -7,7 +7,7 @@ com.gluonhq.scenebuilder parent - 16.0.0-SNAPSHOT + 17.0.0 @@ -23,7 +23,7 @@ com.gluonhq.scenebuilder kit - 16.0.0-SNAPSHOT + 17.0.0 diff --git a/kit/pom.xml b/kit/pom.xml index d7456bb31..5df858dc9 100644 --- a/kit/pom.xml +++ b/kit/pom.xml @@ -7,7 +7,7 @@ com.gluonhq.scenebuilder parent - 16.0.0-SNAPSHOT + 17.0.0 diff --git a/pom.xml b/pom.xml index 9d38c3317..560a27e9d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.gluonhq.scenebuilder parent pom - 16.0.0-SNAPSHOT + 17.0.0 Scene Builder Scene Builder is a visual, drag n drop, layout tool for designing JavaFX application user interfaces 2012 @@ -16,7 +16,7 @@ - 16 + 17 1.1.0 5.0.0-jdk9 11 From 40c33cf732eb447291c00fcab073adce274bf283 Mon Sep 17 00:00:00 2001 From: Abhinay Agarwal Date: Wed, 15 Sep 2021 18:15:07 +0530 Subject: [PATCH 4/7] Fix workflows: * kit shouldn't build app module * fix url link for mac jmods --- .github/workflows/kit.yml | 2 +- .github/workflows/mac.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index b83176362..636edb524 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -36,7 +36,7 @@ jobs: chmod -v 600 /home/runner/.vnc/passwd vncserver :90 -localhost -nolisten tcp mvn -q versions:set -DnewVersion=${{ env.TAG }} -DgenerateBackupPoms=false - mvn clean package -Dmaven.test.skip=true -X + mvn clean package -Dmaven.test.skip=true -f kit -X vncserver -kill :90 env: TAG: ${{ steps.variables.outputs.SOURCE_TAG }} diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 424ed3f22..8d974041d 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -35,8 +35,8 @@ jobs: AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - name: Setup JavaFX run: | - wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17_osx-x64_bin-jmods-SIGNED.zip - unzip /tmp/openjfx-17_osx-x64_bin-jmods-SIGNED.zip -d /tmp + wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17_osx-x64_bin-jmods.zip + unzip /tmp/openjfx-17_osx-x64_bin-jmods.zip -d /tmp - name: Build and package JAR run: | mvn -q versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false From 5b463132e826359e5cce8a746f99220795647dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20L=C3=B6ffler?= <22102800+Oliver-Loeffler@users.noreply.github.com> Date: Thu, 23 Sep 2021 14:41:39 +0200 Subject: [PATCH 5/7] Fix app name on Ubuntu (#407) --- .github/workflows/linux.yml | 2 ++ app/assets/linux/SceneBuilder.desktop | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 app/assets/linux/SceneBuilder.desktop diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7f2258101..c9cd0392c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -49,6 +49,7 @@ jobs: --java-options '"-Djdk.gtk.version=2"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ --java-options '"-Djava.library.path=/opt/scenebuilder/lib/runtime/bin:/opt/scenebuilder/lib/runtime/lib"' \ + --resource-dir app/assets/linux --install-dir /opt \ --type deb mv $INSTALL_DIR/*.deb $INSTALL_DIR/SceneBuilder-${{ env.TAG }}.deb @@ -57,6 +58,7 @@ jobs: --icon app/assets/linux/icon-linux.png \ --java-options '"-Djdk.gtk.version=2"' \ --java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ + --resource-dir app/assets/linux --install-dir /opt \ --type rpm mv $INSTALL_DIR/*.rpm $INSTALL_DIR/SceneBuilder-${{ env.TAG }}.rpm diff --git a/app/assets/linux/SceneBuilder.desktop b/app/assets/linux/SceneBuilder.desktop new file mode 100644 index 000000000..87e1ab5c5 --- /dev/null +++ b/app/assets/linux/SceneBuilder.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=APPLICATION_NAME +Comment=APPLICATION_DESCRIPTION +Exec=APPLICATION_LAUNCHER +Icon=APPLICATION_ICON +Terminal=false +Type=Application +Categories=DEPLOY_BUNDLE_CATEGORY +DESKTOP_MIMES +StartupWMClass=com.oracle.javafx.scenebuilder.app.SceneBuilderApp \ No newline at end of file From 3cdd5a113d7da55f7c3a61b6fe095d6c898afef4 Mon Sep 17 00:00:00 2001 From: Abhinay Agarwal Date: Thu, 23 Sep 2021 21:17:03 +0530 Subject: [PATCH 6/7] Fix URL for issue management (#414) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 560a27e9d..34d8e556f 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ GitHub - https://github.com/gluonhq/ChatApp/issues + https://github.com/gluonhq/scenebuilder/issues From eb03ff42bb2c5e573e3d325268c759bb705603da Mon Sep 17 00:00:00 2001 From: Debayan Sutradhar Date: Wed, 29 Sep 2021 14:54:54 +0530 Subject: [PATCH 7/7] Show Java version and runtime name in About Dialog (#415) --- app/pom.xml | 2 +- .../javafx/scenebuilder/app/about/AboutWindowController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/pom.xml b/app/pom.xml index bddc3f443..5767a0843 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -14,7 +14,7 @@ com.oracle.javafx.scenebuilder.app.SceneBuilderApp ${maven.build.timestamp} - ${java.vm.version}, ${java.vendor} + ${java.version}, ${java.runtime.name} ${javafx.version} yyyy-MM-dd HH:mm:ss diff --git a/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java b/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java index 9db2c759b..98a953df3 100644 --- a/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java +++ b/app/src/main/java/com/oracle/javafx/scenebuilder/app/about/AboutWindowController.java @@ -217,8 +217,8 @@ private StringBuilder getJavaFXParagraph() { private StringBuilder getJavaParagraph() { StringBuilder sb = new StringBuilder("Java\n"); //NOI18N - sb.append(System.getProperty("java.runtime.version")).append(", ") //NOI18N - .append(System.getProperty("java.vendor")) // NOI18N + sb.append(System.getProperty("java.version")).append(", ") //NOI18N + .append(System.getProperty("java.runtime.name")) // NOI18N .append("\n\n"); return sb; }