< prev index next >

src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxPackageBundler.java

Print this page




 118                 appImage = APP_BUNDLER.fetchFrom(params).doBundle(params,
 119                         thePackage.sourceRoot().toFile(), true);
 120                 ApplicationLayout srcAppLayout = initAppImageLayout.apply(
 121                         appImage);
 122                 if (appImage.equals(PREDEFINED_RUNTIME_IMAGE.fetchFrom(params))) {
 123                     // Application image points to run-time image.
 124                     // Copy it.
 125                     srcAppLayout.copy(thePackage.sourceApplicationLayout());
 126                 } else {
 127                     // Application image is a newly created directory tree.
 128                     // Move it.
 129                     srcAppLayout.move(thePackage.sourceApplicationLayout());
 130                     if (appImage.exists()) {
 131                         // Empty app image directory might remain after all application
 132                         // directories have been moved.
 133                         appImage.delete();
 134                     }
 135                 }
 136             }
 137 
 138             if (!StandardBundlerParam.isRuntimeInstaller(params)) {
 139                 desktopIntegration = new DesktopIntegration(thePackage, params);
 140             } else {
 141                 desktopIntegration = null;
 142             }
 143 
 144             Map<String, String> data = createDefaultReplacementData(params);
 145             if (desktopIntegration != null) {
 146                 data.putAll(desktopIntegration.create());
 147             } else {
 148                 Stream.of(DESKTOP_COMMANDS_INSTALL, DESKTOP_COMMANDS_UNINSTALL,
 149                         UTILITY_SCRIPTS).forEach(v -> data.put(v, ""));
 150             }
 151 
 152             data.putAll(createReplacementData(params));
 153 
 154             File packageBundle = buildPackageBundle(Collections.unmodifiableMap(
 155                     data), params, outputParentDir);
 156 
 157             verifyOutputBundle(params, packageBundle.toPath()).stream()
 158                     .filter(Objects::nonNull)
 159                     .forEachOrdered(ex -> {
 160                 Log.verbose(ex.getLocalizedMessage());
 161                 Log.verbose(ex.getAdvice());
 162             });




 118                 appImage = APP_BUNDLER.fetchFrom(params).doBundle(params,
 119                         thePackage.sourceRoot().toFile(), true);
 120                 ApplicationLayout srcAppLayout = initAppImageLayout.apply(
 121                         appImage);
 122                 if (appImage.equals(PREDEFINED_RUNTIME_IMAGE.fetchFrom(params))) {
 123                     // Application image points to run-time image.
 124                     // Copy it.
 125                     srcAppLayout.copy(thePackage.sourceApplicationLayout());
 126                 } else {
 127                     // Application image is a newly created directory tree.
 128                     // Move it.
 129                     srcAppLayout.move(thePackage.sourceApplicationLayout());
 130                     if (appImage.exists()) {
 131                         // Empty app image directory might remain after all application
 132                         // directories have been moved.
 133                         appImage.delete();
 134                     }
 135                 }
 136             }
 137 
 138             desktopIntegration = DesktopIntegration.create(thePackage, params);




 139 
 140             Map<String, String> data = createDefaultReplacementData(params);
 141             if (desktopIntegration != null) {
 142                 data.putAll(desktopIntegration.create());
 143             } else {
 144                 Stream.of(DESKTOP_COMMANDS_INSTALL, DESKTOP_COMMANDS_UNINSTALL,
 145                         UTILITY_SCRIPTS).forEach(v -> data.put(v, ""));
 146             }
 147 
 148             data.putAll(createReplacementData(params));
 149 
 150             File packageBundle = buildPackageBundle(Collections.unmodifiableMap(
 151                     data), params, outputParentDir);
 152 
 153             verifyOutputBundle(params, packageBundle.toPath()).stream()
 154                     .filter(Objects::nonNull)
 155                     .forEachOrdered(ex -> {
 156                 Log.verbose(ex.getLocalizedMessage());
 157                 Log.verbose(ex.getAdvice());
 158             });


< prev index next >