Skip to content

Commit

Permalink
Pack Windows portable (binary) folder into version sub-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Dec 1, 2023
1 parent 41dd309 commit e1dd3fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: ./gradlew :build
- name: Build Windows installers
id: gradle_jpackage
run: ./gradlew :jpackage
run: ./gradlew :windowsPortableFolder
- name: Upload Windows exe installer
id: upload_artifact_installer
uses: actions/upload-artifact@v3
Expand All @@ -86,7 +86,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: listFix-windows-binaries-${{ steps.gitDescribe.outputs.describe }}
path: build/jpackage/listFix()
path: build/distributions/portable
commentArtifacts:
name: Link build artifacts
runs-on: ubuntu-latest
Expand Down
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def manifestAttributes = [
'Main-Class' : project.mainClassName
]

def cleanVersion = project.version.substring(0, project.version.indexOf("-") == -1 ? project.version.length() : project.version.indexOf("-"))

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
Expand Down Expand Up @@ -178,12 +180,12 @@ jlink {
jvmArgs = ['-splash:images/listfixSplashScreen.png']
def currentOs = org.gradle.internal.os.OperatingSystem.current()
icon = currentOs.windows ? pathFavicon : pathPngIcon
version = project.version.substring(0, project.version.lastIndexOf("-") == -1 ? project.version.length() : project.version.lastIndexOf("-")).replace("-", ".")
description = 'Fix and repairs broken playlist'
// imageOptions += ['--win-console']
imageOptions += ['--app-version', cleanVersion]
installerOptions += [
'--vendor', project.vendor,
'--app-version', version,
'--app-version', cleanVersion
]
if (currentOs.windows) {
installerOptions += [
Expand All @@ -210,6 +212,12 @@ jlink {
}
}

task windowsPortableFolder(type: Copy, dependsOn: jpackage) {
group = 'distribution'
from "${buildDir}/jpackage/listFix()"
into "${buildDir}/distributions/portable/listFix()-${project.version}"
}

task fatJar(type: Jar) {
group = 'distribution'
manifest {
Expand Down

0 comments on commit e1dd3fb

Please sign in to comment.