Update 'Migrating from loose files'

Lucas Schwiderski 2023-03-28 22:30:35 +02:00
parent 2b792d6dfe
commit 130accabf5

@ -1,5 +1,17 @@
> **NOTE**: If this is your first time migrating a mod, I strongly suggest going through [Building your first mod](Building-your-first-mod) once, to play around with and get a feel for the new file structure, as well as how to use DTMT to build the mod bundles. > **NOTE**: If this is your first time migrating a mod, I strongly suggest going through [Building your first mod](Building-your-first-mod) once, to play around with and get a feel for the new file structure, as well as how to use DTMT to build the mod bundles.
## Automatically
For most projects, the built-in migration command should be enough to convert a mod to the DTMT project structure:
1. Install DTMT and add its location to your PATH variable.
2. Determine a directory to migrate the mod to. The migration will create a new folder named after the mod here. In-place migrations are not supported.
E.g.: `C:\projects`
3. Locate the `.mod` file for your mod.
4. In a Command Prompt (or similar terminal application, e.g. Microsoft Terminal), execute `dtmt migrate C:\path\to\my_mod.id C:\projects`
## Manually
To migrate Lua files from a loose file structure to something that can be built into mod bundles with DTMT, the following is needed: To migrate Lua files from a loose file structure to something that can be built into mod bundles with DTMT, the following is needed:
- a `dtmt.cfg` that defines the mod's metadata, entry points and packages - a `dtmt.cfg` that defines the mod's metadata, entry points and packages