Skip to content

Commit

Permalink
fix: bundled software not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jagodevreede committed Jul 12, 2024
1 parent 6e43753 commit 1ff83f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ public class BundledSoftware {
* Returns a stream of the bundled software, or null if the bundled software is not available.
*/
public static InputStream getSoftwareStream() {
return BundledSoftware.class.getClassLoader().getResourceAsStream("3rdparty.zip");
return BundledSoftware.class.getClassLoader().getResourceAsStream("/3rdparty.zip");
}

public static void extract(File destinationFolder) throws IOException {
InputStream softwareStream = getSoftwareStream();
if (softwareStream == null) {
return;
}
destinationFolder.mkdirs();
// extract zip file
byte[] buffer = new byte[1024];
ZipInputStream zis = new ZipInputStream(softwareStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public final class ConfigurationUtil {
static boolean preCheck(Stage stage) throws IOException {
SdkManUiPreferences sdkManUiPreferences = ServiceRegistry.INSTANCE.getSdkManUiPreferences();
if (!sdkManUiPreferences.donePreCheck) {
logger.debug("Pre-check not done, checking");
if (BundledSoftware.getSoftwareStream() != null) {
logger.info("Extracting bundled software");
File installFolder = new File(ServiceRegistry.INSTANCE.getApi().getBaseFolder(), "ui" + separator + "3rdparty");
FileUtil.deleteRecursively(installFolder);
BundledSoftware.extract(installFolder.getParentFile());
Expand Down

0 comments on commit 1ff83f5

Please sign in to comment.