Skip to content

Commit

Permalink
#113 improvements allowing builds on RPi
Browse files Browse the repository at this point in the history
  • Loading branch information
ylexus committed Jun 22, 2021
1 parent b12583b commit 3c7c6cc
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ runtime {
resourceDir = file("$projectDir/src/main/packaging-resources/linux")
installerOptions = ['--verbose', '--linux-shortcut', '--linux-package-name', 'jiotty-photos-uploader']
}
if (project.hasProperty("jpackageInstallerType")) {
installerType = jpackageInstallerType
}
}
}
jpackage.dependsOn 'check'
Expand Down Expand Up @@ -259,9 +262,6 @@ task runOsSpecificPackaging(type: Exec) {
}
}

def finalFileNameLinuxDeb = "Linux-jiotty-photos-uploader_$version-1_amd64.deb"
def finalFileNameLinuxRpm = "Linux-jiotty-photos-uploader-$version-1.x86_64.rpm"

task renameDistribution() {
onlyIf { !org.gradle.internal.os.OperatingSystem.current().windows }
doLast {
Expand All @@ -270,10 +270,10 @@ task renameDistribution() {
tofile: "$fullPackageOutputDir/macOS-jiotty-photos-uploader-${version}.dmg"
}
if (org.gradle.internal.os.OperatingSystem.current().linux) {
ant.move file: "$buildDir/jpackage/jiotty-photos-uploader_$version-1_amd64.deb",
tofile: "$fullPackageOutputDir/$finalFileNameLinuxDeb"
ant.move file: "$buildDir/jpackage/jiotty-photos-uploader-$version-1.x86_64.rpm",
tofile: "$fullPackageOutputDir/$finalFileNameLinuxRpm"
ant.move(todir: fullPackageOutputDir) {
fileset dir: "$buildDir/jpackage", includes: '*.deb,*.rpm'
mapper type: "glob", from : "*", to: "Linux-*"
}
}
}
}
Expand Down Expand Up @@ -367,6 +367,8 @@ task runRemoteLinuxBuild(dependsOn: requireClientSecret) {
throw new GradleScriptException("VM build execution failed, see errors above", null)
}
mkdir fullPackageOutputDir
def finalFileNameLinuxDeb = "Linux-jiotty-photos-uploader_$version-1_amd64.deb"
def finalFileNameLinuxRpm = "Linux-jiotty-photos-uploader-$version-1.x86_64.rpm"
vmrunLinux 'CopyFileFromGuestToHost', ["$remoteCloneDir/build/fullpackage/$finalFileNameLinuxDeb", "$fullPackageOutputDir/$finalFileNameLinuxDeb"]
vmrunLinux 'CopyFileFromGuestToHost', ["$remoteCloneDir/build/fullpackage/$finalFileNameLinuxRpm", "$fullPackageOutputDir/$finalFileNameLinuxRpm"]
vmrunLinux 'suspend'
Expand Down

0 comments on commit 3c7c6cc

Please sign in to comment.