forked from addonscript/addonscript-spec
launch configuration overhaul
This commit is contained in:
parent
6414425d5e
commit
f2ca4f5177
9 changed files with 60 additions and 90 deletions
|
@ -20,7 +20,6 @@
|
||||||
- [Repository Object](schema/repository.md)
|
- [Repository Object](schema/repository.md)
|
||||||
- [Meta Object](schema/meta.md)
|
- [Meta Object](schema/meta.md)
|
||||||
- [Launch Config Object](schema/launch.md)
|
- [Launch Config Object](schema/launch.md)
|
||||||
- [Library Object](schema/library.md)
|
|
||||||
- [API Addon Object](schema/api_addon.md)
|
- [API Addon Object](schema/api_addon.md)
|
||||||
- [API File Object](schema/api_file.md)
|
- [API File Object](schema/api_file.md)
|
||||||
- [Environment Builder Request Object](schema/api_builder_request.md)
|
- [Environment Builder Request Object](schema/api_builder_request.md)
|
||||||
|
|
|
@ -35,10 +35,9 @@ RECOMMENDED to have a timeout of at least 5 minutes, better about 10 minutes.
|
||||||
After the launch environment was build by the API instance, this endpoint will respond with a list of
|
After the launch environment was build by the API instance, this endpoint will respond with a list of
|
||||||
[file objects](../../schema/api_builder_response.md#files), the AddonScript
|
[file objects](../../schema/api_builder_response.md#files), the AddonScript
|
||||||
[schema version](../../schema/api_builder_response.md#addonscript) for the response and the
|
[schema version](../../schema/api_builder_response.md#addonscript) for the response and the
|
||||||
[launch configuration](../../schema/api_builder_response.md#launch) for this addon. These files MUST be considered
|
[launch configuration](../../concepts/instance.md#launch-configurations) for this addon.
|
||||||
to be part of the [files](../../schema/manifest.md#files) of the addon, from which the request was send
|
These files MUST be considered to be part of the [files](../../schema/manifest.md#files) of the addon,
|
||||||
and can then be installed. The launch configuration will override the
|
from which the request was send and can then be installed. The launch configuration will override the entirely.
|
||||||
[local launch configuration](../../schema/manifest.md#launch) entirely.
|
|
||||||
|
|
||||||
#### Request Body:
|
#### Request Body:
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,10 @@ addon manifest, including for which side it is available and for which side it i
|
||||||
that they can't be installed together in the same instance. For a file this flag specifies, that the file can't be
|
that they can't be installed together in the same instance. For a file this flag specifies, that the file can't be
|
||||||
installed on the side which has this flag set.
|
installed on the side which has this flag set.
|
||||||
- `launch` This flag is only valid for relations of [instance addons](instance.md). It specifies, that the
|
- `launch` This flag is only valid for relations of [instance addons](instance.md). It specifies, that the
|
||||||
[launch configuration](../schema/launch.md) should be inherited from the related addon (which MUST als be an
|
[launch configuration](../schema/launch.md) should be inherited from the related addon (which MUST also be an
|
||||||
instance addon or [Minecraft](./minecraft.md) itself). The inherited launch configuration, MAY still be modified
|
instance addon). The inherited launch configuration, MAY still be modified
|
||||||
using the [launch object](../schema/launch.md) of this addon. This flag always also implies any effect of `required`.
|
using the [launch object](../schema/launch.md) of this addon or by adding libraries with the `library` flag.
|
||||||
|
This flag always also implies any effect of `required`.
|
||||||
- `env` This flag is only valid for relations of [instance addons](instance.md).
|
- `env` This flag is only valid for relations of [instance addons](instance.md).
|
||||||
An addon, that is inheriting the launch configuration from one, which uses the
|
An addon, that is inheriting the launch configuration from one, which uses the
|
||||||
[environment builder](../api/features/builder.md), uses this flag to tell AddonScript, which version of the `expected`
|
[environment builder](../api/features/builder.md), uses this flag to tell AddonScript, which version of the `expected`
|
||||||
|
@ -49,3 +50,6 @@ addon manifest, including for which side it is available and for which side it i
|
||||||
environment, which are optional and which versions of them are valid. If an addon, which uses the
|
environment, which are optional and which versions of them are valid. If an addon, which uses the
|
||||||
[environment builder](../api/features/builder.md), gets manually installed, meaning not as a dependency, the user
|
[environment builder](../api/features/builder.md), gets manually installed, meaning not as a dependency, the user
|
||||||
SHOULD be asked, which optional `expected` addons and which version of each `expected` addon will be requested.
|
SHOULD be asked, which optional `expected` addons and which version of each `expected` addon will be requested.
|
||||||
|
- `library` This flag is only valid for files of [instance addons](instance.md). It specifies, that this file
|
||||||
|
will be added as a libary to the [launch configuration](../concepts/instance.md#launch-configurations) of this
|
||||||
|
addon.
|
|
@ -3,7 +3,8 @@
|
||||||
Instance addons represent instances of Minecraft itself, while non-instance addons
|
Instance addons represent instances of Minecraft itself, while non-instance addons
|
||||||
have to be installed into an existing instance of Minecraft. An instance addon MUST have
|
have to be installed into an existing instance of Minecraft. An instance addon MUST have
|
||||||
a launch configuration for each side by inheriting the launch configuration of another
|
a launch configuration for each side by inheriting the launch configuration of another
|
||||||
instance addon or [Minecraft](./minecraft.md) itself using the `launch` [flag](flags.md).
|
instance addon using the `launch` [flag](flags.md) or by modifying the [Minecraft](./minecraft.md)
|
||||||
|
launch configuration directly using a [launch config object](../schema/launch.md).
|
||||||
Inheriting a launch configuration MAY be recursive which
|
Inheriting a launch configuration MAY be recursive which
|
||||||
means, that an instance addon MAY inherit it's launch configuration from another addon, which
|
means, that an instance addon MAY inherit it's launch configuration from another addon, which
|
||||||
itself inherits it. Instance addons MAY modify inherited launch configurations using a
|
itself inherits it. Instance addons MAY modify inherited launch configurations using a
|
||||||
|
@ -22,11 +23,12 @@ without this restriction.
|
||||||
|
|
||||||
Instance launch configurations are always based on a
|
Instance launch configurations are always based on a
|
||||||
[Minecraft launch config](./minecraft.md#launch-configuration) and MAY have modifications
|
[Minecraft launch config](./minecraft.md#launch-configuration) and MAY have modifications
|
||||||
applied to it. Modifications are done by [launch config objects](../schema/launch.md) and
|
applied to it. Modifications are done by [launch config objects](../schema/launch.md), which
|
||||||
can override the main class or main file and include additional libraries and arugments.
|
can override the main class or main file and include additional arugments, and by adding
|
||||||
|
libraries using the `library` [flag](flags.md).
|
||||||
When launching a Minecraft instance, AddonScript implementations SHOULD take the Minecraft
|
When launching a Minecraft instance, AddonScript implementations SHOULD take the Minecraft
|
||||||
launch configuration as specified [here](./minecraft.md#launch-configuration) and then apply
|
launch configuration as specified [here](./minecraft.md#launch-configuration) and then apply
|
||||||
all modifications by instance addons in the instance stack to it. When overriding the main class
|
all modifications by instance addons in the launch inheritance stack to it.
|
||||||
or file, an instance addon has always priority over the instance addon, from which it inherits
|
When overriding the main class or file, an instance addon has always priority over the instance addon,
|
||||||
the launch config. When adding arguments, they are always appended at the end of those
|
from which it inherits the launch config. When adding arguments, they are always appended at the end of those
|
||||||
arguments from the inherited launch config.
|
arguments from the inherited launch config.
|
|
@ -2,9 +2,15 @@
|
||||||
|
|
||||||
Minecraft itself can be used as a [relation](../schema/relation.md) in AddonScript
|
Minecraft itself can be used as a [relation](../schema/relation.md) in AddonScript
|
||||||
[manifests](../schema/manifest.md). This way addons MAY define, with which versions
|
[manifests](../schema/manifest.md). This way addons MAY define, with which versions
|
||||||
of Minecraft they are compatible. [Instance addons](./instance.md) MUST either
|
of Minecraft they are compatible. [Instance addons](./instance.md) MUST have
|
||||||
directly or indirectly inherit their launch configuration from Minecraft. This
|
their [launch configuration](./instance.md#launch-configurations) based on
|
||||||
way it is also defined, on which version of Minecraft an instance is base on.
|
the launch configuration of a Minecraft version. This way it is also defined,
|
||||||
|
on which version of Minecraft an instance is base on. The version of Minecraft,
|
||||||
|
which will be used, MUST be defined either by using the
|
||||||
|
`included` [relational flag](./flags.md#relational-flags) with an exact Minecraft
|
||||||
|
version or by using the `expected` [relational flag](./flags.md#relational-flags),
|
||||||
|
while the exact version later gets defined by the user or by the `env`
|
||||||
|
[relational flag](./flags.md#relational-flags).
|
||||||
There is no AddonScript manifest for Minecraft, AddonScript implementations
|
There is no AddonScript manifest for Minecraft, AddonScript implementations
|
||||||
MUST know the [ID and namespace](#id-and-namespace) of Minecraft and how to
|
MUST know the [ID and namespace](#id-and-namespace) of Minecraft and how to
|
||||||
handle it as specified below.
|
handle it as specified below.
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
{
|
{
|
||||||
"addonscript": {},
|
"addonscript": {},
|
||||||
"files": [],
|
"files": [],
|
||||||
"launch": {}
|
"launch_client": {},
|
||||||
|
"launch_server": {},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -22,6 +23,10 @@ environment was build, and MUST be treated equal to the [files in the manifest](
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
||||||
### launch
|
### launch_client
|
||||||
|
|
||||||
This is a [Launch Config object](./launch.md) which can be used, to modify the launch configuration of the instance.
|
This is a [Launch Config object](./launch.md) for the client, which can be used, to modify the launch configuration of the instance.
|
||||||
|
|
||||||
|
### launch_server
|
||||||
|
|
||||||
|
This is a [Launch Config object](./launch.md) for the server, which can be used, to modify the launch configuration of the instance.
|
|
@ -1,46 +1,12 @@
|
||||||
# Launch Config Object
|
# Launch Config Object
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"libraries": [],
|
|
||||||
"java_version": 8,
|
|
||||||
"client": {},
|
|
||||||
"server": {}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Optional properties
|
|
||||||
|
|
||||||
|
|
||||||
### libraries
|
|
||||||
|
|
||||||
This is an array of [libraries](library.md), which are added to the instance in
|
|
||||||
addition to those of inherited launch configurations.
|
|
||||||
|
|
||||||
### java_version
|
|
||||||
|
|
||||||
This is the recommended major Java version for this instance. It MAY work on other
|
|
||||||
Java versions, but there is no guarantee for that. This overrides inherited `java_version`
|
|
||||||
settings.
|
|
||||||
|
|
||||||
### client
|
|
||||||
|
|
||||||
This is a [side config object](#side-config-object) containing the launch configuration
|
|
||||||
for the client.
|
|
||||||
|
|
||||||
### server
|
|
||||||
|
|
||||||
This is a [side config object](#side-config-object) containing the launch configuration
|
|
||||||
for the server.
|
|
||||||
|
|
||||||
# Side Config Object
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"main_file": "somefilequalifier",
|
"main_file": "somefilequalifier",
|
||||||
"main_class": "com.example.SomeClass",
|
"main_class": "com.example.SomeClass",
|
||||||
"arguments": ["--someArgument"],
|
"arguments": ["--someArgument"],
|
||||||
"jvm_arguments": ["-Djvmargument"]
|
"jvm_arguments": ["-Djvmargument"],
|
||||||
|
"java_version": 8
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -50,10 +16,10 @@ for the server.
|
||||||
|
|
||||||
This is the [qualifier](./file.md#qualifier) of the main jar file for
|
This is the [qualifier](./file.md#qualifier) of the main jar file for
|
||||||
this side. It will override any inherited main file for this side.
|
this side. It will override any inherited main file for this side.
|
||||||
That file MUST be specified in the [manifest](./manifest.md), which
|
That file MUST be specified in the [manifest](./manifest.md) of this
|
||||||
uses this library. Setting this to an empty string will indicate, that
|
addon. Setting this to an empty string will indicate, that
|
||||||
there is no main file for this instance, in which case the
|
there is no main file for this instance, in which case the
|
||||||
[main_file](#mainfile) MUST be explicitly configured.
|
[main_class](#mainclass) MUST be explicitly configured.
|
||||||
|
|
||||||
### main_class
|
### main_class
|
||||||
|
|
||||||
|
@ -64,7 +30,7 @@ specified in of manifest of the [main jar file](#mainfile) should be used.
|
||||||
|
|
||||||
### arguments
|
### arguments
|
||||||
|
|
||||||
This is an array of arguments, which will be used to launch the instance
|
This is an array of game arguments, which will be used to launch the instance
|
||||||
in addition to inherited arguments. They will be appended after inherited
|
in addition to inherited arguments. They will be appended after inherited
|
||||||
arguments.
|
arguments.
|
||||||
|
|
||||||
|
@ -73,3 +39,9 @@ arguments.
|
||||||
This is an array of JVM arguments, which will be used to launch the instance
|
This is an array of JVM arguments, which will be used to launch the instance
|
||||||
in addition to inherited JVM arguments. They will be appended after inherited
|
in addition to inherited JVM arguments. They will be appended after inherited
|
||||||
JVM arguments.
|
JVM arguments.
|
||||||
|
|
||||||
|
### java_version
|
||||||
|
|
||||||
|
This is the recommended major Java version for this instance. It MAY work on other
|
||||||
|
Java versions, but there is no guarantee for that. This overrides inherited `java_version`
|
||||||
|
settings.
|
|
@ -1,24 +0,0 @@
|
||||||
# Library Object
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"file": "somequalifier",
|
|
||||||
"side": "both"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Required properties
|
|
||||||
|
|
||||||
### file
|
|
||||||
|
|
||||||
This is the [qualifier](./file.md#qualifier) of the file of this library.
|
|
||||||
That file MUST be specified in the [manifest](./manifest.md), which
|
|
||||||
uses this library.
|
|
||||||
|
|
||||||
### Optional properties
|
|
||||||
|
|
||||||
### side
|
|
||||||
|
|
||||||
This specifies, for which side this library should be used. Valid values
|
|
||||||
are `client`, `server` and `both`. If this property is not present,
|
|
||||||
it defaults to `both`.
|
|
|
@ -12,7 +12,8 @@
|
||||||
"repositories": [],
|
"repositories": [],
|
||||||
"instance": false,
|
"instance": false,
|
||||||
"use_builder": false,
|
"use_builder": false,
|
||||||
"launch": {},
|
"launch_client": {},
|
||||||
|
"launch_server": {},
|
||||||
"meta": {}
|
"meta": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -70,10 +71,16 @@ This is a boolean which specifies, if this addon will use the [environment build
|
||||||
Only valid if [instance](#instance) is `true`.
|
Only valid if [instance](#instance) is `true`.
|
||||||
If this property is not present, it defaults to `false`.
|
If this property is not present, it defaults to `false`.
|
||||||
|
|
||||||
### launch
|
### launch_client
|
||||||
|
|
||||||
This is a [launch config object](launch.md) which can be used to modify the
|
This is a [launch config object](launch.md) for the client,
|
||||||
inherited launch configuration of this instance.
|
which can be used to modify the launch configuration of this instance.
|
||||||
|
Only available for [instance addons](../concepts/instance.md).
|
||||||
|
|
||||||
|
### launch_server
|
||||||
|
|
||||||
|
This is a [launch config object](launch.md) for the server,
|
||||||
|
which can be used to modify the launch configuration of this instance.
|
||||||
Only available for [instance addons](../concepts/instance.md).
|
Only available for [instance addons](../concepts/instance.md).
|
||||||
|
|
||||||
### meta
|
### meta
|
||||||
|
|
Loading…
Reference in a new issue