Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2400ed9
Fixed a translation bug, gradle upgrade
CodeDead Apr 5, 2023
f2b5fdc
Merge pull request #75 from CodeDead/feature/fixes
CodeDead Apr 5, 2023
971ada0
Make use of the JavaFX plugin
CodeDead Apr 5, 2023
9da5d6d
Merge pull request #76 from CodeDead/feature/javafx-plugin
CodeDead Apr 6, 2023
9aec590
General improvements for building portable images, Gradle upgrade
CodeDead Apr 15, 2023
8d09968
javadoc improvement
CodeDead Apr 15, 2023
be2c05a
Merge pull request #77 from CodeDead/feature/general_code_improvements
CodeDead Apr 15, 2023
c2ae8fa
JavaFX upgrade
CodeDead Apr 22, 2023
2dc14e0
Merge pull request #78 from CodeDead/feature/jfx-upgrade
CodeDead Apr 22, 2023
45f06f2
Fixed a typo
CodeDead Apr 22, 2023
ff95fc9
Added ability to preview theme changes
CodeDead Apr 22, 2023
bbd411e
Merge pull request #79 from CodeDead/feature/theme-preview
CodeDead Apr 22, 2023
1aef07a
Improved error message handling
CodeDead Apr 22, 2023
079e765
Merge pull request #80 from CodeDead/feature/improved_error_handling
CodeDead Apr 22, 2023
e33d471
Improved the theme preview feature, improved error logging, refactori…
CodeDead Apr 26, 2023
b6ef639
Merge pull request #81 from CodeDead/feature/improved_theme_preview
CodeDead Apr 26, 2023
f0c7b70
Fixed an issue with the timer pausing mediaplayer objects that are nu…
CodeDead Apr 26, 2023
8ea7634
Merge pull request #82 from CodeDead/feature/timer_shutdown_computer
CodeDead Apr 26, 2023
559bcd0
Added missing RowConstraints
CodeDead Apr 26, 2023
865b564
Improved code quality
CodeDead Apr 26, 2023
8e50a66
Merge pull request #83 from CodeDead/feature/code_improvements
CodeDead Apr 26, 2023
ee0543b
Remove bidirectional binding, reduce memory footprint by removing unn…
CodeDead Apr 29, 2023
f066fdd
Merge pull request #84 from CodeDead/feature/memory_improvements
CodeDead Apr 29, 2023
e058318
Changed tab alignment and window height
CodeDead Apr 30, 2023
c763b0d
Some refactoring and code improvements
CodeDead May 2, 2023
6044a24
Merge pull request #85 from CodeDead/feature/refactoring
CodeDead May 2, 2023
e72d084
Added advanced settings tab that now includes the audio balance and l…
CodeDead May 2, 2023
6e50c17
Merge pull request #86 from CodeDead/feature/advanced_settings
CodeDead May 2, 2023
250ad6e
Added some logging and checks
CodeDead May 2, 2023
d4616e8
Build enhancements
CodeDead May 4, 2023
a2ec152
Merge pull request #87 from CodeDead/feature/build_enhancements
CodeDead May 4, 2023
d29a564
Dependency upgrades
CodeDead Jun 1, 2023
6561781
Merge pull request #88 from CodeDead/feature/upgrades
CodeDead Jun 1, 2023
811d06d
Added 3 new themes from AtlantaFx
CodeDead Jun 1, 2023
f7ca8fa
Merge pull request #89 from CodeDead/feature/new_themes
CodeDead Jun 1, 2023
9d1e7a7
Update Japanese translation
ScratchBuild Jun 28, 2023
38bfe28
Merge pull request #92 from ScratchBuild/i18n-ja
CodeDead Jul 1, 2023
3bac9d3
Dependency upgrades, Gradle upgrade
CodeDead Jul 1, 2023
65f615d
Added Turkish language support
CodeDead Jul 7, 2023
2db92ac
Merge pull request #93 from CodeDead/feature/turkish
CodeDead Jul 7, 2023
24494f1
Specify JDK version
CodeDead Jul 7, 2023
5521b67
Added seagulls noise
CodeDead Jul 7, 2023
c6d8f6d
Merge pull request #94 from CodeDead/feature/seagulls
CodeDead Jul 7, 2023
85dbccb
Added bell tower sound
CodeDead Jul 7, 2023
e54f51e
Merge pull request #95 from CodeDead/feature/bell_tower
CodeDead Jul 7, 2023
288f663
Added release workflow
CodeDead Jul 7, 2023
2d1c532
Rename workflow to release
CodeDead Jul 7, 2023
40697a3
Use action-gh-release
CodeDead Jul 7, 2023
dae879a
Merge pull request #96 from CodeDead/feature/release_workflow
CodeDead Jul 7, 2023
2aac8c4
Exit Opal after updating
CodeDead Jul 7, 2023
230f73d
Improved macOS build compatibility and added docs
CodeDead Jul 7, 2023
1fa31d4
Merge pull request #97 from CodeDead/feature/exit_after_update
CodeDead Jul 7, 2023
c8240dc
Merge pull request #99 from CodeDead/feature/improved_crossplatform_b…
CodeDead Jul 7, 2023
1470b76
Updated help documentation
CodeDead Jul 7, 2023
826027f
Added keyboard shortcuts
CodeDead Jul 7, 2023
fada240
Change the default settings and logging location
CodeDead Jul 7, 2023
30ef809
Merge pull request #100 from CodeDead/feature/keyboard_shortcuts
CodeDead Jul 7, 2023
91493e5
Merge pull request #101 from CodeDead/feature/change_settings_directory
CodeDead Jul 7, 2023
bc36bc4
Change portable to false by default
CodeDead Jul 7, 2023
1d2bc10
Added portable build workflow
CodeDead Jul 7, 2023
e377a67
Fixed build steps
CodeDead Jul 7, 2023
3bd564c
Merge pull request #102 from CodeDead/feature/portable_build_workflow
CodeDead Jul 7, 2023
edc5f6e
Added Modena theme back, added Caspian theme, cleaned up some of the …
CodeDead Jul 8, 2023
4e3d245
Merge pull request #103 from CodeDead/feature/more_themes
CodeDead Jul 8, 2023
cf3c98f
Added Chinese, Code quality upgrades, improved audio loop gap effect,…
CodeDead Jul 10, 2023
4dce08f
Merge pull request #104 from CodeDead/feature/qol
CodeDead Jul 10, 2023
5f1c324
Version bump
CodeDead Jul 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
build:
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
distribution: 'temurin'

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Build (jlink)
uses: gradle/gradle-build-action@v2
with:
arguments: jlink

- name: Build (jpackage)
uses: gradle/gradle-build-action@v2
with:
arguments: jpackage

- name: Publish artifacts
uses: softprops/action-gh-release@v1
with:
prerelease: false
files: |
build/jpackage/*
env:
GITHUB_TOKEN: ${{ github.token }}

build-portable:
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y fuse libfuse2

- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
distribution: 'temurin'

- name: Switch portable flag (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sed -i 's/final boolean PORTABLE = false/final boolean PORTABLE = true/g' src/main/java/com/codedead/opal/utils/SharedVariables.java

- name: Switch portable flag (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: (Get-Content src\main\java\com\codedead\opal\utils\SharedVariables.java).replace('final boolean PORTABLE = false', 'final boolean PORTABLE = true') | Set-Content src\main\java\com\codedead\opal\utils\SharedVariables.java

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Build (AppImage)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: gradle/gradle-build-action@v2
with:
arguments: AppImage

- name: Build (jlink)
uses: gradle/gradle-build-action@v2
with:
arguments: jlink

- name: Build (jpackage)
uses: gradle/gradle-build-action@v2
with:
arguments: jpackage

- name: ZIP artifacts
if: ${{ matrix.os == 'windows-latest' }}
run: Compress-Archive -Path build/jpackage/Opal/* -Destination build/jpackage/Opal-win-portable.zip

- name: Publish artifacts
uses: softprops/action-gh-release@v1
with:
prerelease: false
files: |
build/AppImage/*.AppImage
build/jpackage/*.zip
env:
GITHUB_TOKEN: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20'
java-version: '20.0.1'
distribution: 'temurin'

- name: Test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ logs/*
/default.properties
/help.pdf
.opal/
.com.codedead.opal/
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can create an executable installer by running the `jpackage` Gradle task on
```shell
./gradlew jpackage
```
*Do note that you will need the [WiX Toolset](https://wixtoolset.org/) in order to create MSI packages.*
*Do note that you will need the [WiX Toolset](https://wixtoolset.org/) in order to create `msi` packages.*

#### Portable image

Expand All @@ -32,19 +32,19 @@ You can create a portable image by running the `jpackageImage` Gradle task on a

#### rpm

You can create an RPM, by running the `jpackage` Gradle task on a Linux host:
You can create an `rpm`, by running the `jpackage` Gradle task on a Linux host:
```shell
./gradlew jpackage
```
*Do note that you will need the `rpm-build` package in order to create an RPM.*
*Do note that you will need the `rpm-build` package in order to create an `rpm`.*

#### AppImage

You can create an [AppImage](https://appimage.github.io/) by executing the `AppImage` Gradle task on a Linux host:
```shell
./gradlew AppImage
```
*Do note that running this task will execute a shell script in order to download and run the [appimagetool](https://appimage.github.io/appimagetool/) in order to create the AppImage file.*
*Do note that running this task will execute a shell script in order to download and run the [appimagetool](https://appimage.github.io/appimagetool/) in order to create the `AppImage` file.*

#### Portable image

Expand All @@ -53,6 +53,22 @@ You can create a portable image by running the `jpackageImage` Gradle task on a
./gradlew jpackageImage
```

### macOS

#### dmg

You can create a `dmg`, by running the `jpackage` Gradle task on a macOS host:
```shell
./gradlew jpackage
```

#### Portable image

You can create a portable image by running the `jpackageImage` Gradle task on a macOS host:
```shell
./gradlew jpackageImage
```

## Dependencies

A couple of dependencies are required in order to build Opal. Some of which require a specific host machine,
Expand Down
63 changes: 40 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ plugins {
id 'eclipse'
id 'application'
id 'org.beryx.jlink' version '2.26.0'
id 'org.openjfx.javafxplugin' version '0.0.14'
}

group 'com.codedead'
version '1.1.0'
version '1.2.0'

def currentOS = DefaultNativePlatform.currentOperatingSystem

Expand All @@ -23,6 +24,12 @@ application {
mainClass = 'com.codedead.opal.OpalApplication'
}

javafx {
version = '20.0.1'
configuration = 'implementation'
modules = ['javafx.base', 'javafx.controls', 'javafx.fxml', 'javafx.media']
}

jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
forceMerge('log4j-api', 'jackson')
Expand All @@ -46,12 +53,16 @@ jlink {
installerOptions = [
'--win-menu',
'--win-menu-group', 'CodeDead',
'--win-shortcut',
'--win-shortcut-prompt',
'--win-upgrade-uuid', '876c5464-9a66-4913-89a4-c63a4b8b4bb9',
'--win-help-url', 'https://codedead.com/contact',
'--win-dir-chooser',
'--copyright', 'Copyright (c) 2023 CodeDead',
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
'--vendor', 'CodeDead',
'--license-file', 'LICENSE'
'--license-file', 'LICENSE',
'--app-version', "${project.version.toString()}",
'--about-url', 'https://codedead.com'
]
}
} else if (currentOS.isLinux()) {
Expand All @@ -65,7 +76,25 @@ jlink {
'--copyright', 'Copyright (c) 2023 CodeDead',
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
'--vendor', 'CodeDead',
'--license-file', 'LICENSE'
'--license-file', 'LICENSE',
'--app-version', "${project.version.toString()}",
'--about-url', 'https://codedead.com'
]
}
} else if (currentOS.isMacOsX()) {
jpackage {
installerType = 'dmg'
icon = "${project.rootDir}/src/main/resources/images/opal.png"
installerOptions = [
'--mac-package-name', 'Opal',
'--mac-package-identifier', 'com.codedead.opal',
'--mac-app-category', 'public.app-category.music',
'--copyright', 'Copyright (c) 2023 CodeDead',
'--description', 'Opal is a free and open-source JavaFX application that can play relaxing music in the background',
'--vendor', 'CodeDead',
'--license-file', 'LICENSE',
'--app-version', "${project.version.toString()}",
'--about-url', 'https://codedead.com'
]
}
}
Expand Down Expand Up @@ -98,38 +127,26 @@ configure(AppImage) {
description = 'Create an AppImage after creating the image of the application'
}

def homeConfig = System.properties['user.home'] + '/.config/com.codedead.opal'
clean.doFirst {
delete 'default.properties'
delete 'license.pdf'
delete 'help.pdf'
delete 'logs'
delete '.opal'
delete '.com.codedead.opal'
delete "$homeConfig"
}

repositories {
mavenCentral()
}

def platform
if (currentOS.isWindows()) {
platform = 'win'
} else if (currentOS.isLinux()) {
platform = 'linux'
} else if (currentOS.isMacOsX()) {
platform = 'mac'
}

dependencies {
implementation "org.openjfx:javafx-base:20:${platform}"
implementation "org.openjfx:javafx-controls:20:${platform}"
implementation "org.openjfx:javafx-graphics:20:${platform}"
implementation "org.openjfx:javafx-fxml:20:${platform}"
implementation "org.openjfx:javafx-media:20:${platform}"
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'io.github.mkpaz:atlantafx-base:1.2.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
implementation 'io.github.mkpaz:atlantafx-base:2.0.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
}

tasks.named('test') {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-8.1-20230330100852+0000-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion gradlew

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

Loading