Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gluonhq/scenebuilder into…
Browse files Browse the repository at this point in the history
… issue-346
  • Loading branch information
Oliver-Loeffler committed Dec 22, 2021
2 parents ab03440 + eb03ff4 commit 1196252
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 36 deletions.
7 changes: 7 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
exclude-labels:
- 'housekeeping'
categories:
- title: '🚀 Features'
labels:
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
template: |
## What’s Changed
$CHANGES
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -35,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 }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -47,6 +48,8 @@ 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"' \
--resource-dir app/assets/linux
--install-dir /opt \
--type deb
mv $INSTALL_DIR/*.deb $INSTALL_DIR/SceneBuilder-${{ env.TAG }}.deb
Expand All @@ -55,13 +58,14 @@ 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
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 }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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.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
Expand All @@ -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 }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions app/assets/linux/SceneBuilder.desktop
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<parent>
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>parent</artifactId>
<version>16.0.0-SNAPSHOT</version>
<version>17.0.0</version>
</parent>

<properties>
<main.class.name>com.oracle.javafx.scenebuilder.app.SceneBuilderApp</main.class.name>
<!-- For about.properties file -->
<buildDate>${maven.build.timestamp}</buildDate>
<javaVersion>${java.vm.version}, ${java.vendor}</javaVersion>
<javaVersion>${java.version}, ${java.runtime.name}</javaVersion>
<javafxVersion>${javafx.version}</javafxVersion>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
</properties>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>kit</artifactId>
<version>16.0.0-SNAPSHOT</version>
<version>17.0.0</version>
</dependency>

<!-- Test -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -87,7 +93,7 @@ public AboutWindowController() {
// We go with default values
}
}

@FXML
public void onMousePressed(MouseEvent event) {
if ((event.getClickCount() == 2) && event.isAltDown()) {
Expand Down Expand Up @@ -128,28 +134,45 @@ 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
*/
public String getBuildJavaVersion() {
return sbBuildJavaVersion;
}

/**
*
* @treatAsPrivate
*/
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
Expand Down Expand Up @@ -194,11 +217,50 @@ 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
sb.append(System.getProperty("java.version")).append(", ") //NOI18N
.append(System.getProperty("java.runtime.name")) // 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<String> 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -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
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -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
check_for_updates.alert.headertext = Update Check
2 changes: 1 addition & 1 deletion kit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>parent</artifactId>
<version>16.0.0-SNAPSHOT</version>
<version>17.0.0</version>
</parent>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.gluonhq.scenebuilder</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>16.0.0-SNAPSHOT</version>
<version>17.0.0</version>
<name>Scene Builder</name>
<description>Scene Builder is a visual, drag n drop, layout tool for designing JavaFX application user interfaces</description>
<inceptionYear>2012</inceptionYear>
Expand All @@ -16,7 +16,7 @@
</modules>

<properties>
<javafx.version>16</javafx.version>
<javafx.version>17</javafx.version>
<aether.version>1.1.0</aether.version>
<charm.glisten.version>5.0.0-jdk9</charm.glisten.version>
<maven.compiler.release>11</maven.compiler.release>
Expand Down Expand Up @@ -100,7 +100,7 @@

<issueManagement>
<system>GitHub</system>
<url>https://github.com/gluonhq/ChatApp/issues</url>
<url>https://github.com/gluonhq/scenebuilder/issues</url>
</issueManagement>

<licenses>
Expand Down

0 comments on commit 1196252

Please sign in to comment.