Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Feb 22, 2022
1 parent 2c79975 commit c889135
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,35 @@ So what does this mean for you?
1. You only need to build a file once! Just create [multiple TOC files](https://wowpedia.fandom.com/wiki/TOC_format#Multiple_client_flavors),
one for each supported game type, and game versions will be set from them on
upload. So if you've already been dabbling with multiple tocs and/or
upload. So if you've already been dabbling with multiple TOC files and/or
multiple versions, you no longer need to manually set the versions via `-g`
or on the CurseForge website.

**Note:** CurseForge still requires that a fallback TOC file exists. So if
you support all three game types, you may as well leave the fallback TOC file
as one of the game types instead of creating three game type specific ones.

2. If you are using multiple `## Interface-Type` lines in your TOC file, you can
now use the `-S` option to automatically generate game type specific TOC
files based on your existing preproccessing logic. You will still need to
merge `.pkgmeta` files if your old workflow used a different file per build.
3. If you use build type keywords (e.g., `@version-retail@` ... `@end-version-retail@`)
for controlling what code blocks execute based on the build version, in a
multi-version build, everything will get commented out since no specific
version is being targeted.

For a multi-version build, you should switch keyword usage to plain old lua
control statements. Fortunately, there are builtin constants you can use for
this. `WOW_PROJECT_ID` is what game version you are currently running and
can be checked against `WOW_PROJECT_MAINLINE`, `WOW_PROJECT_CLASSIC`, and
`WOW_PROJECT_BURNING_CRUSADE_CLASSIC` (e.g., `if WOW_PROJECT_ID ==
WOW_PROJECT_MAINLINE then ... end`).
now use the `-S` command line option or add `enable-toc-creation: yes` to
your `.pkgmeta` file to automatically generate game type specific TOC files
based on your existing preprocessing logic. The fallback TOC file will use
the base interface value as it's version.

```toc
## Interface: 90105
## Interface-Classic: 11402
## Interface-BCC: 20502
```

Splitting the above TOC file would end up with `MyAddon_Vanilla.toc`,
`MyAddon_TBC.toc`, and `MyAddon.toc` (retail).

3. If you use build version keywords (e.g., `@version-retail@` ... `@end-version-retail@`)
for controlling what code blocks execute based on the build version, you
need to switch to plain old Lua control statements. Fortunately, there are
some [constants](https://wowpedia.fandom.com/wiki/WOW_PROJECT_ID) set by
Blizzard you can use for this. If you use these keywords in xml files, you
will have to reorganize your includes in the appropriate TOC files.

## Customizing the build

Expand Down Expand Up @@ -358,6 +369,7 @@ environment provided the following are available:

- bash >= 4.3
- awk
- grep
- sed
- curl
- zip
Expand Down

0 comments on commit c889135

Please sign in to comment.