Skip to content

Commit f2108a2

Browse files
committed
JavaFX 16, minor build improvements, update copyright
1 parent 5e5c6fe commit f2108a2

File tree

26 files changed

+50
-82
lines changed

26 files changed

+50
-82
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
- uses: actions/upload-artifact@v2
2929
with:
3030
name: ${{ runner.os }}
31-
path: build/jpackage/*
31+
path: build/distributions/*

.idea/bashsupport_project.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 airsquared
2+
* Copyright (c) 2021 airsquared
33
*
44
* This file is part of blobsaver.
55
*
@@ -51,10 +51,10 @@ dependencies {
5151
else if (os.isWindows()) fxPlatform = 'win'
5252
else if (os.isLinux()) fxPlatform = 'linux'
5353

54-
implementation "org.openjfx:javafx-base:15.0.1:$fxPlatform"
55-
implementation "org.openjfx:javafx-controls:15.0.1:$fxPlatform"
56-
implementation "org.openjfx:javafx-graphics:15.0.1:$fxPlatform"
57-
implementation "org.openjfx:javafx-fxml:15.0.1:$fxPlatform"
54+
implementation "org.openjfx:javafx-base:16:$fxPlatform"
55+
implementation "org.openjfx:javafx-controls:16:$fxPlatform"
56+
implementation "org.openjfx:javafx-graphics:16:$fxPlatform"
57+
implementation "org.openjfx:javafx-fxml:16:$fxPlatform"
5858

5959
implementation group: 'org.json', name: 'json', version: '20210307'
6060
implementation 'de.jangassen:nsmenufx:3.1.0'
@@ -83,7 +83,7 @@ private String getJarDirectory() {
8383
if (DefaultNativePlatform.currentOperatingSystem.isMacOsX()) dir = "macos/Contents"
8484
else if (DefaultNativePlatform.currentOperatingSystem.isWindows()) dir = "windows/files"
8585
else if (DefaultNativePlatform.currentOperatingSystem.isLinux()) dir = "linux"
86-
return "${projectDir}/dist/${dir}";
86+
return "${projectDir}/dist/${dir}"
8787
}
8888

8989
run {
@@ -104,6 +104,7 @@ jlink {
104104
}
105105
jpackage {
106106
imageOptions = [ '--copyright', copyright, '--description', description, '--vendor', 'airsquared']
107+
installerOutputDir = file("${buildDir}/distributions/")
107108

108109
if (os.isMacOsX()) {
109110
installerType = "dmg"
@@ -145,28 +146,35 @@ jlink {
145146

146147
}
147148

149+
if (!os.isWindows()) {
150+
assemble.dependsOn jpackage
151+
}
152+
148153
task createLinuxTargz(type: Tar, dependsOn: jpackageImage) {
149-
archiveFileName = "blobsaver-linux.tar.gz"
154+
archiveFileName = "blobsaver-${project.version}.tar.gz"
150155
compression = Compression.GZIP
151156
destinationDirectory = file("${buildDir}/distributions/")
152157
from "${buildDir}/jpackage/blobsaver"
153158

154159
if (os.isLinux()) {
155-
assemble.dependsOn createLinuxTargz
160+
jpackage.finalizedBy createLinuxTargz
156161
}
157162
}
158163

159164
task windowsInstaller(dependsOn: jpackageImage) { // requires inno setup to be installed
160165
doFirst {
161166
copy {
162167
from "${projectDir}/dist/windows/blobsaver.iss" into "${buildDir}/jpackage"
163-
filter(ReplaceTokens, tokens: [AppName: project.name, AppVersion: version, AppCopyright: copyright])
168+
filter(ReplaceTokens, tokens: [AppName: project.name, AppVersion: version, AppCopyright: copyright,
169+
OutputDir: "${buildDir}\\distributions".toString()])
164170
}
165171
exec {
166172
commandLine "iscc", "/Qp", "${buildDir}\\jpackage\\blobsaver.iss"
167173
}
168174
delete "${buildDir}/jpackage/blobsaver.iss"
169175
}
170-
}
171176

172-
assemble.dependsOn os.isWindows() ? windowsInstaller : jpackage
177+
if (os.isWindows()) {
178+
assemble.dependsOn windowsInstaller
179+
}
180+
}

dist/windows/blobsaver.iss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define MyAppURL "https://www.github.com/airsquared/blobsaver"
88
#define MyAppExeName "blobsaver.exe"
99
#define MyAppCopyright "@AppCopyright@"
10+
#define OutputDir "@OutputDir@"
1011

1112
[Setup]
1213
; NOTE: The value of AppId uniquely identifies this application.
@@ -21,13 +22,13 @@ AppPublisherURL={#MyAppURL}
2122
AppSupportURL={#MyAppURL}
2223
AppUpdatesURL={#MyAppURL}
2324
AppCopyright={#MyAppCopyright}
24-
ArchitecturesAllowed=x64 arm64
25-
ArchitecturesInstallIn64BitMode=x64 arm64
25+
ArchitecturesAllowed=x64
26+
ArchitecturesInstallIn64BitMode=x64
2627
Uninstallable=not IsTaskSelected('portableMode')
2728
DefaultDirName={pf}\{#MyAppName}
2829
DisableProgramGroupPage=yes
29-
OutputDir=.
30-
OutputBaseFilename=blobsaver-windows
30+
OutputDir={#OutputDir}
31+
OutputBaseFilename=blobsaver-{#MyAppVersion}
3132
SetupIconFile=blobsaver\blobsaver.ico
3233
Compression=lzma
3334
SolidCompression=yes

settings.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
/*
2-
* Copyright (c) 2020 airsquared
3-
*
4-
* This file is part of blobsaver.
5-
*
6-
* blobsaver is free software: you can redistribute it and/or modify
7-
* it under the terms of the GNU General Public License as published by
8-
* the Free Software Foundation, version 3 of the License.
9-
*
10-
* blobsaver is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License
16-
* along with blobsaver. If not, see <https://www.gnu.org/licenses/>.
17-
*/
18-
191
pluginManagement {
202
repositories {
213
mavenCentral()

src/main/java/airsquared/blobsaver/app/Background.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 airsquared
2+
* Copyright (c) 2021 airsquared
33
*
44
* This file is part of blobsaver.
55
*

src/main/java/airsquared/blobsaver/app/Controller.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 airsquared
2+
* Copyright (c) 2021 airsquared
33
*
44
* This file is part of blobsaver.
55
*
@@ -294,7 +294,7 @@ public void aboutMenuHandler(Event ignored) {
294294

295295
alert.setTitle("About");
296296
alert.setHeaderText("blobsaver " + Main.appVersion);
297-
alert.setContentText("blobsaver Copyright (c) 2019 airsquared\n\n" +
297+
alert.setContentText("blobsaver Copyright (c) 2021 airsquared\n\n" +
298298
"This program is licensed under GNU GPL v3.0-only");
299299
Utils.resizeAlertButtons(alert);
300300

src/main/java/airsquared/blobsaver/app/DebugWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 airsquared
2+
* Copyright (c) 2021 airsquared
33
*
44
* This file is part of blobsaver.
55
*

src/main/java/airsquared/blobsaver/app/Devices.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 airsquared
2+
* Copyright (c) 2021 airsquared
33
*
44
* This file is part of blobsaver.
55
*
@@ -27,6 +27,7 @@
2727
import java.util.Map;
2828
import java.util.Properties;
2929

30+
@SuppressWarnings({"unchecked", "rawtypes"})
3031
public class Devices {
3132

3233
private static final ObservableList<String> iPhones = unmodifiableArrayList("iPhone 3G[S]", "iPhone 4 (GSM)",
@@ -78,7 +79,6 @@ public class Devices {
7879
try {
7980
Properties properties = new Properties();
8081
properties.load(Devices.class.getResourceAsStream("devicemodels.properties"));
81-
//noinspection unchecked,rawtypes
8282
deviceModelIdentifiers = (Map) properties;
8383
deviceModelIdentifiers.forEach((k, v) -> identifierDeviceModels.put(v, k));
8484
} catch (IOException e) {

0 commit comments

Comments
 (0)