Skip to content

Commit

Permalink
Changes from v2.5.4, run tests in Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
airsquared committed Dec 28, 2020
1 parent ea7fc3a commit 3b1fb3d
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 27 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,31 @@ jobs:
with:
java-version: '1.8'
java-package: jdk+fx
- name: Install Linux dependencies
run: sudo apt install libcurl4-openssl-dev libzip-dev && git clone --depth=1 https://github.com/tihmstar/libgeneral.git && cd libgeneral && ./autogen.sh && make && sudo make install && git clone --depth=1 https://github.com/tihmstar/libfragmentzip.git && cd libfragmentzip && ./autogen.sh && make && sudo make install && sudo ln -s /usr/local/lib/libfragmentzip.so /usr/lib/
if: runner.os == 'Linux'
- name: Fix macOS AppleScript permissions
run: sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "insert into access (service, client, client_type, allowed, prompt_count, indirect_object_identifier_type, indirect_object_identifier) values ('kTCCServiceAppleEvents', '`which java`', 1, 1, 1, 0, 'com.apple.finder')"
if: runner.os == 'macOS'
- name: Create macOS dmg
if: runner.os == 'macOS'
uses: eskatos/gradle-command-action@v1
with:
arguments: createDmg
arguments: test createDmg
wrapper-cache-enabled: true
dependencies-cache-enabled: true
- name: Create Linux tar.gz
if: runner.os == 'Linux'
uses: eskatos/gradle-command-action@v1
with:
arguments: createLinuxTargz
arguments: test createLinuxTargz
wrapper-cache-enabled: true
dependencies-cache-enabled: true
- name: Create Windows exe
if: runner.os == 'Windows'
uses: eskatos/gradle-command-action@v1
with:
arguments: createWindowsInstaller
arguments: test createWindowsInstaller --no-daemon
wrapper-cache-enabled: true
dependencies-cache-enabled: true
- uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .idea/blobsaver.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/blobsaver.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/blobsaver.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ plugins {
* REMEMBER: also update the version string in:
* - Main.java
*/
version "v2.5.3"
version "v2.5.4"
sourceCompatibility = 1.8
mainClassName = "airsquared.blobsaver.app.Main"
String appIdentifier = "airsquared.blobsaver.app"
Expand Down Expand Up @@ -88,14 +88,12 @@ task createMacApp(dependsOn: shadowJar) {

doLast {
copy {
from "${projectDir}/dist/macos/Contents"
into "${buildDir}/macApp/blobsaver.app/Contents"
from "${projectDir}/dist/macos/Contents" into "${buildDir}/macApp/blobsaver.app/Contents"
}
copy {
from "${projectDir}/dist/macos/Info.plist"
from "${projectDir}/dist/macos/Info.plist" into "${buildDir}/macApp/blobsaver.app/Contents"
expand(CFBundleIdentifier: appIdentifier, NSHumanReadableCopyright: copyright, JVMMainClassName: mainClassName, CFBundleName: project.name,
version: version)
into "${buildDir}/macApp/blobsaver.app/Contents"
}
copy {
from "${projectDir}/LICENSE", "${projectDir}/libraries_used.txt"
Expand Down Expand Up @@ -175,11 +173,10 @@ task createLinuxTargz(type: Tar, dependsOn: shadowJar, group: "build") {
}

launch4j { // Windows only, don't use this, use createWindowsInstaller
mainClassName = "airsquared.blobsaver.app.Main"
launch4j.copyright = copyright
downloadUrl = "https://github.com/airsquared/blobsaver/wiki/Making-sure-you-have-the-right-Java-version"
icon = "${projectDir}/dist/windows/blob.ico"
mutexName = "airsquared.blobsaver.app"
mutexName = appIdentifier
windowTitle = "blobsaver"
jar = "${buildDir}/libs/blobsaver.jar"
jreRuntimeBits = "64"
Expand All @@ -198,15 +195,13 @@ task createWindowsInstaller(dependsOn: createExe, group: "build") {
doFirst {
delete "${buildDir}/tmp/innosetup"
copy {
from "${projectDir}/dist/windows"
into "${buildDir}/tmp/innosetup"
from "${projectDir}/dist/windows" into "${buildDir}/tmp/innosetup"
rename "LICENSE_windows", "LICENSE"
rename "libraries_used_windows.txt", "libraries_used.txt"
}
copy {
from "${projectDir}/dist/windows/blobsaver.iss"
filter(ReplaceTokens, tokens: [MyAppName: project.name, MyAppVersion: version, AppMutex: appIdentifier])
into "${buildDir}/tmp/innosetup"
from "${projectDir}/dist/windows/blobsaver.iss" into "${buildDir}/tmp/innosetup"
filter(ReplaceTokens, tokens: [AppName: project.name, AppVersion: version, AppCopyright: copyright, AppMutex: appIdentifier])
}
copy {
from "${buildDir}/launch4j/blobsaver.exe" into "${buildDir}/tmp/innosetup/files"
Expand Down
Binary file modified dist/linux/tsschecker
Binary file not shown.
Binary file modified dist/macos/Contents/Frameworks/libplist.dylib
100755 → 100644
Binary file not shown.
Binary file modified dist/macos/Contents/MacOS/tsschecker
Binary file not shown.
9 changes: 5 additions & 4 deletions dist/windows/blobsaver.iss
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
; Script generated by the Inno Setup Script Wizard.
; This script should only be run from Gradle; otherwise some values will not be set properly

#define MyAppName "@MyAppName@"
#define MyAppVersion "@MyAppVersion@"
#define MyAppName "@AppName@"
#define MyAppVersion "@AppVersion@"
#define MyAppPublisher "airsquared"
#define MyAppURL "https://www.github.com/airsquared/blobsaver"
#define MyAppExeName "blobsaver.exe"
#define MyAppCopyright "Copyright (c) 2020 airsquared"
#define MyAppCopyright "@AppCopyright@"
#define MyAppMutex "@AppMutex@"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
Expand All @@ -21,7 +22,7 @@ AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppCopyright={#MyAppCopyright}
AppMutex=@AppMutex@
AppMutex={#MyAppMutex}
ArchitecturesAllowed=x64 arm64
ArchitecturesInstallIn64BitMode=x64 arm64
Uninstallable=not IsTaskSelected('portableMode')
Expand Down
Binary file modified dist/windows/files/lib/tsschecker.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/java/airsquared/blobsaver/app/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

public class Main {

static final String appVersion = "v2.5.3";
static final String appVersion = "v2.5.4";
static final Preferences appPrefs = Preferences.userRoot().node("airsquared/blobsaver/prefs");
static Stage primaryStage;
static final File jarDirectory;
Expand Down Expand Up @@ -149,7 +149,7 @@ public void start(Stage primaryStage) {
}
primaryStage.setTitle("blobsaver");
primaryStage.setScene(new Scene(root));
if (!PlatformUtil.isMac()) {
if (PlatformUtil.isWindows()) {
primaryStage.getIcons().clear();
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("blob_emoji.png")));
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/airsquared/blobsaver/app/TSS.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ private void parseTSSLog(String tsscheckerLog) throws TSSException {
} else if (containsIgnoreCase(tsscheckerLog, "[Error] [TSSC] manually specified ApNonce=" + apnonce + ", but parsing failed")
|| containsIgnoreCase(tsscheckerLog, "[Error] [TSSR] parsed APNoncelen != requiredAPNoncelen")) {
throw new TSSException("\"" + apnonce + "\" is not a valid apnonce", false);
} else if (containsIgnoreCase(tsscheckerLog, "could not get id0 for installType=Erase")
&& containsIgnoreCase(tsscheckerLog, "could not get id0 for installType=Update")
} else if (containsIgnoreCase(tsscheckerLog, "could not get BuildIdentity for installType=Erase")
&& containsIgnoreCase(tsscheckerLog, "could not get BuildIdentity for installType=Update")
&& containsIgnoreCase(tsscheckerLog, "checking tss status failed")) {
throw new TSSException("Saving blobs failed. Check the board configuration or try again later.", true, tsscheckerLog);
} else if (containsIgnoreCase(tsscheckerLog, "Could not resolve host")) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/airsquared/blobsaver/app/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ static File getTsschecker() {
if (!Main.runningFromJar) {
if (PlatformUtil.isWindows()) {
tsschecker = new File(getPlatformDistDir(), "lib/tsschecker.exe");
} else {
} else if (PlatformUtil.isMac()) {
tsschecker = new File(getPlatformDistDir(), "MacOS/tsschecker");
} else {
tsschecker = new File(getPlatformDistDir(), "tsschecker");
}
} else if (PlatformUtil.isMac()) {
tsschecker = new File(Main.jarDirectory.getParentFile(), "MacOS/tsschecker");
Expand Down

0 comments on commit 3b1fb3d

Please sign in to comment.