addonscript-spec/docs/install.md

47 lines
1.6 KiB
Markdown
Raw Normal View History

2021-06-29 16:34:01 +02:00
# File installing
## Install steps
### move
2021-07-18 12:32:57 +02:00
`move [location]`
2021-07-18 12:35:35 +02:00
2021-07-18 12:32:57 +02:00
`move` is simplest install step of all. It just moves the selected file to
2021-06-29 16:34:01 +02:00
the given location.
### extract
2021-07-18 12:32:57 +02:00
`extract [location]`
2021-07-18 12:35:35 +02:00
2021-07-18 12:32:57 +02:00
`extract` can be used with zip files, to extract the contents of the zip file
2021-06-29 16:34:01 +02:00
to the given location.
### rename
2021-07-18 12:32:57 +02:00
`rename [new name]`
2021-07-18 12:35:35 +02:00
2021-07-18 12:32:57 +02:00
`rename` renames the selected file to the new given filename.
2021-06-29 16:34:01 +02:00
### execute
2021-07-18 12:32:57 +02:00
`execute [location] [arguments]`
2021-07-18 12:35:35 +02:00
2021-07-18 12:32:57 +02:00
`execute` can be used with an executable jar file. The jar file will be executed with the given arguments and
2021-06-29 16:34:01 +02:00
the given location as working directory. A client should inform the user before just executing the file and
2021-07-18 12:32:57 +02:00
ask them for permission to do so and/or it should execute the jar in a closed environment like a container
to prevent malicous code from running.
2021-06-29 16:34:01 +02:00
### select
2021-07-18 12:32:57 +02:00
`select [filename]`
2021-07-18 12:35:35 +02:00
2021-07-18 12:32:57 +02:00
`select` is used to select the file with the given file name for other installation steps.
2021-06-29 16:34:01 +02:00
The file name can also be a relative path, if the file is not directly in the Minecraft directory.
If no file name is given, the selection resets to the original file itself, also if it was already moved to another location.
## Locations
2021-07-18 12:32:57 +02:00
Locations are specified as a relative path from the Minecraft directory to which the file should be installed.
For example `./mods` would point to the mods directory of the Minecraft instance.
2021-06-29 16:34:01 +02:00
## Directories
If the selected file is a directory, then it is treated like a zip file, which means, that you can move and
2021-07-18 12:32:57 +02:00
rename it like a normal file, but also use the `extract` install step to move all contents of the directory
2021-06-29 16:34:01 +02:00
to the specified location.