Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'org.photonvision'
version '2.3.1-photon'
version '2.3.2-photon'

if (project.hasProperty('publishVersion')) {
version = project.publishVersion
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/org/photonvision/tools/FixupNativeResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void execute(SyncSpec copySpec) {
if (currentPlat.equals(NativePlatforms.LINUXARM32)) {
String localStripCommand = "armv6-bullseye-linux-gnueabihf-strip";
try {
project.getProviders().exec(ex -> ex.commandLine(localStripCommand));
project.getProviders().exec(ex -> ex.commandLine(localStripCommand)).getResult().get();
} catch (Exception ex) {
getLogger().warn("Strip for arm32 was not found. Skipping");
return;
Expand All @@ -71,7 +71,7 @@ public void execute(SyncSpec copySpec) {
} else if (currentPlat.equals(NativePlatforms.LINUXARM64)) {
String localStripCommand = "aarch64-bullseye-linux-gnu-strip";
try {
project.getProviders().exec(ex -> ex.commandLine(localStripCommand));
project.getProviders().exec(ex -> ex.commandLine(localStripCommand)).getResult().get();
} catch (Exception ex) {
getLogger().warn("Strip for arm64 was not found. Skipping");
return;
Expand All @@ -88,7 +88,8 @@ public void execute(SyncSpec copySpec) {
continue;
}
project.getProviders()
.exec(ex -> ex.commandLine(fStripCommand, "--strip-all", "--discard-all", file.toString()));
.exec(ex -> ex.commandLine(fStripCommand, "--strip-all", "--discard-all", file.toString()))
.getResult().get();
}
}

Expand All @@ -104,15 +105,16 @@ public void execute(SyncSpec copySpec) {
}

// Strip binaries
project.getProviders().exec(ex -> ex.commandLine("strip", "-x", "-S", file.toString()));
project.getProviders().exec(ex -> ex.commandLine("strip", "-x", "-S", file.toString())).getResult()
.get();

// Get list of all dependent binaries
ByteArrayOutputStream standardOutput = new ByteArrayOutputStream();

project.getProviders().exec(ex -> {
ex.commandLine("otool", "-L", file.toString());
ex.setStandardOutput(standardOutput);
});
}).getResult().get();

filesToFixup.clear();

Expand Down Expand Up @@ -150,15 +152,15 @@ public void execute(SyncSpec copySpec) {
project.getProviders().exec(ex -> {
ex.commandLine("install_name_tool", "-change", fixupFile, "@loader_path/" + outputNameFinal,
file.toString());
});
}).getResult().get();
}

// Overwrite signature because they were invalidated by strip and
// install-name-tool.
project.getProviders().exec(ex -> {
ex.commandLine("codesign", "--force", "--sign", "-", file.toString());
ex.setStandardOutput(standardOutput);
});
}).getResult().get();
}
}
}
Expand Down