Don't include firmware in development builds (speeds install time)

pull/70/head
geeksville 2020-06-28 14:55:02 -07:00
rodzic c7c89aeb71
commit 40055f603d
9 zmienionych plików z 71 dodań i 4 usunięć

17
.project 100644
Wyświetl plik

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Mesh Util</name>
<comment>Project MeshUtil created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>

Wyświetl plik

@ -0,0 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/usr/lib/jvm/java-8-oracle
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true

Wyświetl plik

@ -1,10 +1,11 @@
# Remaining tasks before declaring 1.0
- Android frontend should refetch the android messages from backend service on Resume
- disable software update button after update finishes
- first message sent is still doubled for some people
- Android frontend should refetch the android messages from backend service on Resume
- let users set arbitrary params in android
* add a low level settings screen (let user change any of the RadioConfig parameters)
- optionally include firmware files in debug builds - currently they are release only. per https://developer.android.com/studio/build/build-variants
Things for the betaish period.

6
app/.classpath 100644
Wyświetl plik

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>

23
app/.project 100644
Wyświetl plik

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>

Wyświetl plik

@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1

Wyświetl plik

@ -1442,7 +1442,7 @@ class MeshService : Service(), Logging {
/***
* Return the filename we will install on the device
*/
fun setFirmwareUpdateFilename(info: MeshProtos.MyNodeInfo) {
private fun setFirmwareUpdateFilename(info: MeshProtos.MyNodeInfo) {
firmwareUpdateFilename = try {
if (info.region != null && info.firmwareVersion != null && info.hwModel != null)
SoftwareUpdateService.getUpdateFilename(

Wyświetl plik

@ -219,7 +219,7 @@ class SoftwareUpdateService : JobIntentService(), Logging {
hwVerIn: String,
swVer: String,
mfg: String
): String {
): String? {
val curver = context.getString(R.string.cur_firmware_version)
val regionRegex = Regex(".+-(.+)")
@ -230,7 +230,12 @@ class SoftwareUpdateService : JobIntentService(), Logging {
val (region) = regionRegex.find(hwVer)?.destructured
?: throw Exception("Malformed hw version")
return "firmware/firmware-$mfg-$region-$curver.bin"
val name = "firmware/firmware-$mfg-$region-$curver.bin"
// Check to see if the file exists (some builds might not include update files for size reasons)
return if (!context.assets.list(name).isNullOrEmpty())
name
else
null
}
/** Return the filename this device needs to use as an update (or null if no update needed)