- java.lang.Object
-
- com.gluonhq.substrate.target.AbstractTargetConfiguration
-
- com.gluonhq.substrate.target.LinuxTargetConfiguration
-
- All Implemented Interfaces:
TargetConfiguration
public class LinuxTargetConfiguration extends AbstractTargetConfiguration
-
-
Field Summary
-
Fields inherited from class com.gluonhq.substrate.target.AbstractTargetConfiguration
crossCompile, ENABLED_FEATURES
-
-
Constructor Summary
Constructors Constructor Description LinuxTargetConfiguration(ProcessPaths paths, InternalProjectConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompile()Compile sets the required command line arguments and runs native-imagebooleancreateSharedLib()Creates a native image that can be used as shared libraryprotected java.util.List<java.nio.file.Path>getLinkerLibraryPaths()Creates a list of Paths that will be added to the library search path for the linker.protected java.util.List<java.nio.file.Path>getStaticJDKLibPaths()protected java.util.List<java.lang.String>getTargetSpecificCCompileFlags()booleaninstall()Installs the packaged application on the local system or on a device that is attached to the local system.booleanlink()Links a previously created objectfile with the required dependencies into a native executable or librarybooleanrunUntilEnd()Run the generated native image and returns true if the process ended successfully-
Methods inherited from class com.gluonhq.substrate.target.AbstractTargetConfiguration
compileAdditionalSources, createStaticLib, getCLibPath, getNativeCodeList, getTargetNativeCodeExtensions, packageApp, run
-
-
-
-
Constructor Detail
-
LinuxTargetConfiguration
public LinuxTargetConfiguration(ProcessPaths paths, InternalProjectConfiguration configuration) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
compile
public boolean compile() throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from class:AbstractTargetConfigurationCompile sets the required command line arguments and runs native-image- Specified by:
compilein interfaceTargetConfiguration- Overrides:
compilein classAbstractTargetConfiguration- Returns:
- true if the process ends successfully, false otherwise
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
link
public boolean link() throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from interface:TargetConfigurationLinks a previously created objectfile with the required dependencies into a native executable or library- Specified by:
linkin interfaceTargetConfiguration- Overrides:
linkin classAbstractTargetConfiguration- Returns:
- true if linking succeeded, false otherwise
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
install
public boolean install() throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from class:AbstractTargetConfigurationInstalls the packaged application on the local system or on a device that is attached to the local system. By default, this method is no-op returning true.- Specified by:
installin interfaceTargetConfiguration- Overrides:
installin classAbstractTargetConfiguration- Returns:
- true if installing succeeded or is a no-op, false if it failed.
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
runUntilEnd
public boolean runUntilEnd() throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from class:AbstractTargetConfigurationRun the generated native image and returns true if the process ended successfully- Specified by:
runUntilEndin interfaceTargetConfiguration- Overrides:
runUntilEndin classAbstractTargetConfiguration- Returns:
- true if the process ended successfully, false otherwise
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
getStaticJDKLibPaths
protected java.util.List<java.nio.file.Path> getStaticJDKLibPaths() throws java.io.IOException- Overrides:
getStaticJDKLibPathsin classAbstractTargetConfiguration- Throws:
java.io.IOException
-
getLinkerLibraryPaths
protected java.util.List<java.nio.file.Path> getLinkerLibraryPaths() throws java.io.IOExceptionDescription copied from class:AbstractTargetConfigurationCreates a list of Paths that will be added to the library search path for the linker. Targets are allowed to override this, e.g. in case they don't want the static JDK directory on the library path (see https://github.com/gluonhq/substrate/issues/879) Note: we should probably invert this logic: the static library path should not be used as linkLibraryPath unless explicitly asked by the target.- Overrides:
getLinkerLibraryPathsin classAbstractTargetConfiguration- Returns:
- a list of Paths to add to the library search path
- Throws:
java.io.IOException
-
getTargetSpecificCCompileFlags
protected java.util.List<java.lang.String> getTargetSpecificCCompileFlags()
-
createSharedLib
public boolean createSharedLib() throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from class:AbstractTargetConfigurationCreates a native image that can be used as shared library- Specified by:
createSharedLibin interfaceTargetConfiguration- Overrides:
createSharedLibin classAbstractTargetConfiguration- Returns:
- true if the process succeeded or false if the process failed
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-