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.2-photon'
version '2.3.3-photon'

if (project.hasProperty('publishVersion')) {
version = project.publishVersion
Expand Down
23 changes: 8 additions & 15 deletions src/main/java/org/photonvision/tools/FixupNativeResources.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,11 @@ public void execute(SyncSpec copySpec) {
.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();
var exec = project.getProviders().exec(ex -> ex.commandLine("otool", "-L", file.toString()));

filesToFixup.clear();

String outputStr = standardOutput.toString();
String outputStr = exec.getStandardOutput().getAsText().get();
String currentFileName = file.getName();

// Search dependencies list, look for any non absolute path resolved libraries
Expand Down Expand Up @@ -149,18 +144,16 @@ public void execute(SyncSpec copySpec) {
outputName = outputName.substring("@rpath/".length());
}
String outputNameFinal = outputName;
project.getProviders().exec(ex -> {
ex.commandLine("install_name_tool", "-change", fixupFile, "@loader_path/" + outputNameFinal,
file.toString());
}).getResult().get();
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();
project.getProviders().exec(ex -> ex.commandLine("codesign", "--force", "--sign", "-", file.toString()))
.getResult().get();
}
}
}
Expand Down