public class LinuxAppBundler extends AbstractImageBundler
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
EXECUTABLE_NAME |
private static java.util.ResourceBundle |
I18N |
static BundlerParamInfo<java.io.File> |
ICON_PNG |
private static java.lang.String |
LIBRARY_NAME |
protected static java.lang.String |
LINUX_BUNDLER_PREFIX |
static BundlerParamInfo<JreUtils.Rule[]> |
LINUX_JRE_RULES |
static BundlerParamInfo<RelativeFileSet> |
LINUX_RUNTIME |
static BundlerParamInfo<java.net.URL> |
RAW_EXECUTABLE_URL |
CFG_FORMAT_INI, CFG_FORMAT_PROPERTIES, LAUNCHER_CFG_FORMAT
baseResourceLoader, BUNDLER_PREFIX, IMAGES_ROOT
Constructor and Description |
---|
LinuxAppBundler() |
Modifier and Type | Method and Description |
---|---|
private void |
copyApplication(java.util.Map<java.lang.String,? super java.lang.Object> params,
java.io.File appDirectory) |
private void |
copyRuntime(java.util.Map<java.lang.String,? super java.lang.Object> params,
java.io.File runtimeDirectory) |
private void |
createLauncherForEntryPoint(java.util.Map<java.lang.String,? super java.lang.Object> p,
java.io.File rootDir) |
(package private) java.io.File |
doBundle(java.util.Map<java.lang.String,? super java.lang.Object> p,
java.io.File outputDirectory,
boolean dependentTask) |
(package private) boolean |
doValidate(java.util.Map<java.lang.String,? super java.lang.Object> p) |
java.io.File |
execute(java.util.Map<java.lang.String,? super java.lang.Object> params,
java.io.File outputParentDir)
Creates a bundle from existing content.
|
void |
extractRuntimeFlags(java.util.Map<java.lang.String,? super java.lang.Object> params) |
static java.util.Collection<BundlerParamInfo<?>> |
getAppBundleParameters() |
java.util.Collection<BundlerParamInfo<?>> |
getBundleParameters()
The parameters that this bundler uses to generate it's bundle.
|
java.lang.String |
getBundleType() |
protected java.lang.String |
getCacheLocation(java.util.Map<java.lang.String,? super java.lang.Object> params) |
java.lang.String |
getDescription() |
java.lang.String |
getID() |
static java.lang.String |
getLauncherCfgName(java.util.Map<java.lang.String,? super java.lang.Object> p) |
static java.lang.String |
getLauncherName(java.util.Map<java.lang.String,? super java.lang.Object> p) |
java.lang.String |
getName() |
static java.io.File |
getRootDir(java.io.File outDir,
java.util.Map<java.lang.String,? super java.lang.Object> p) |
private java.lang.String |
getRuntimeLocation(java.util.Map<java.lang.String,? super java.lang.Object> params) |
boolean |
validate(java.util.Map<java.lang.String,? super java.lang.Object> p)
Determines if this bundler will execute with the given parameters.
|
private void |
writeCfgFile(java.util.Map<java.lang.String,? super java.lang.Object> params,
java.io.File rootDir) |
extractFlagsFromVersion, imageBundleValidation, testRuntime, writeCfgFile
fetchResource, fetchResource, preprocessTextResource, toString
private static final java.util.ResourceBundle I18N
protected static final java.lang.String LINUX_BUNDLER_PREFIX
private static final java.lang.String EXECUTABLE_NAME
private static final java.lang.String LIBRARY_NAME
public static final BundlerParamInfo<java.io.File> ICON_PNG
public static final BundlerParamInfo<java.net.URL> RAW_EXECUTABLE_URL
public static final BundlerParamInfo<JreUtils.Rule[]> LINUX_JRE_RULES
public static final BundlerParamInfo<RelativeFileSet> LINUX_RUNTIME
public boolean validate(java.util.Map<java.lang.String,? super java.lang.Object> p) throws UnsupportedPlatformException, ConfigException
Bundler
p
- The parameters to be validate. Validation may modify
the map, so if you are going to be using the same map
across multiple bundlers you should pass in a deep copy.UnsupportedPlatformException
- If the bundler cannot run on this
platform (i.e. creating mac apps on windows)ConfigException
- If the configuration params are incorrect. The
exception may contain advice on how to modify the params map
to make it valid.boolean doValidate(java.util.Map<java.lang.String,? super java.lang.Object> p) throws UnsupportedPlatformException, ConfigException
public static java.io.File getRootDir(java.io.File outDir, java.util.Map<java.lang.String,? super java.lang.Object> p)
public static java.lang.String getLauncherName(java.util.Map<java.lang.String,? super java.lang.Object> p)
public static java.lang.String getLauncherCfgName(java.util.Map<java.lang.String,? super java.lang.Object> p)
java.io.File doBundle(java.util.Map<java.lang.String,? super java.lang.Object> p, java.io.File outputDirectory, boolean dependentTask)
private void createLauncherForEntryPoint(java.util.Map<java.lang.String,? super java.lang.Object> p, java.io.File rootDir) throws java.io.IOException
java.io.IOException
private void copyApplication(java.util.Map<java.lang.String,? super java.lang.Object> params, java.io.File appDirectory) throws java.io.IOException
java.io.IOException
private java.lang.String getRuntimeLocation(java.util.Map<java.lang.String,? super java.lang.Object> params)
private void writeCfgFile(java.util.Map<java.lang.String,? super java.lang.Object> params, java.io.File rootDir) throws java.io.FileNotFoundException
java.io.FileNotFoundException
private void copyRuntime(java.util.Map<java.lang.String,? super java.lang.Object> params, java.io.File runtimeDirectory) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getID()
public java.lang.String getBundleType()
public java.util.Collection<BundlerParamInfo<?>> getBundleParameters()
Bundler
public static java.util.Collection<BundlerParamInfo<?>> getAppBundleParameters()
public java.io.File execute(java.util.Map<java.lang.String,? super java.lang.Object> params, java.io.File outputParentDir)
Bundler
Bundler.validate(java.util.Map)
date} returns true with the
parameters map, then you can expect a valid output. However if an exception
was thrown out of validate or it returned false then you should not
expect sensible results from this call. It may or may not return a value,
and it may or may not throw an exception. But any output should not
be considered valid or sane.params
- The parameters as specified by getBundleParameters.
Keyed by the id from the ParamInfo. Execution may
modify the map, so if you are going to be using the
same map across multiple bundlers you should pass
in a deep copy.outputParentDir
- The parent dir that the returned bundle will be placed in.protected java.lang.String getCacheLocation(java.util.Map<java.lang.String,? super java.lang.Object> params)
getCacheLocation
in class AbstractImageBundler
public void extractRuntimeFlags(java.util.Map<java.lang.String,? super java.lang.Object> params)
extractRuntimeFlags
in class AbstractImageBundler