Skip to content

Commit

Permalink
Bundle Choreo AppImage
Browse files Browse the repository at this point in the history
Fixes #465.
  • Loading branch information
calcmogul committed Nov 18, 2024
1 parent 5f1c42f commit 207d1cf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/choreo.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def fileNameMacArm = "Choreo-$choreoGitTag-macOS-aarch64-standalone.zip"

def downloadUrlMacArm = baseUrl + fileNameMacArm

def fileNameLinux = "Choreo-$choreoGitTag-Linux-x86_64-standalone.zip"
def fileNameLinux = "Choreo-$choreoGitTag-Linux-x86_64.AppImage"

def downloadUrlLinux = baseUrl + fileNameLinux

Expand Down Expand Up @@ -44,8 +44,7 @@ def downloadTaskMacArm = tasks.register('downloadChoreoMacArm', Download) {

def downloadTaskLinux = tasks.register('downloadChoreoLinux', Download) {
src downloadUrlLinux
def fileName = file(src.file).name
dest "$buildDir/downloads/$fileName"
dest "$buildDir/downloads/choreo"
overwrite true
}

Expand Down Expand Up @@ -80,13 +79,19 @@ ext.choreoConfigFileSetup = { AbstractArchiveTask zip->
}
}

task chmodChoreo(type: Exec) {
workingDir "$buildDir"
commandLine 'chmod', '+x', 'choreo'
}

ext.choreoZipSetup = { AbstractArchiveTask zip->
if (project.hasProperty('linuxBuild')) {
zip.dependsOn downloadTaskLinux

zip.inputs.files downloadTaskLinux.get().outputFiles
zip.dependsOn chmodChoreo

zip.from(project.zipTree(downloadTaskLinux.get().outputFiles.first())) {
zip.from(downloadTaskLinux.get().outputFiles.first()) {
into '/choreo'
includeEmptyDirs = false
}
Expand Down

0 comments on commit 207d1cf

Please sign in to comment.