-
Notifications
You must be signed in to change notification settings - Fork 58
Embedding
If you want to release your layout with oUF embedded, you might think that just plopping oUF into the directory structure would do it.
In a sense, yes it would, but you'd have to manually update and make sure it's the latest for every release.
Embedding it correctly doesn't take much effort to do, and is especially rewarding when doing automated releases.
The X-oUF
line gives oUF a global name for the project, this cannot be "oUF".
The oUF.xml
reference depends on your addon's directory structure.
## Interface: 70300
## Title: MyAddOn
## X-oUF: MyAddOn
embeds\oUF\oUF.xml
MyAddOnFile.lua
...
In your layout, wherever you would normally reference oUF
, you now have to reference the embedded version instead.
To do so, at the top of your layout file(s), add the following:
local _, ns = ...
local oUF = ns.oUF
If you're using the namespace table already, adjust this part to your setup.
If you're using an automated packager such as CurseForge's packager, you'll need to tell it to fetch oUF from the source.
In your .pkgmeta
file, add the following:
package-as: MyAddOn
enable-nolib-creation: no
externals:
embeds/oUF:
url: git://github.com/oUF-wow/oUF.git
tag: latest
tools-used:
- ouf
Again, adjust this to your specific directory structure.
If you intend to develop without having oUF embedded, you can keep oUF unembedded by adding the following to your TOC file:
#@do-not-package@
..\oUF\oUF.xml
#@end-do-not-package@
This will load oUF from an adjacent directory, but not package the line in releases (see Packagers).
This is an advanced feature, don't use it unless you know what you are doing.