View Single Post
10-14-17, 02:35 PM   #3
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Customizing the packaging

This part is specifically for instructing the packager on how to package your addon, and
where it should upload to.

TOC
You'll need to add additional fields to your addon's TOC file, this will let the packager know
where to upload your packaged addon to. You do this by finding the appropriate "IDs" for
the various supported sites and adding them to the TOC file.

The WoWInterface ID is easy to find, it's in the URL for your addon.
E.g. "22213" in wowinterface.com/downloads/info22213-BonusRollPreview.

For CurseForge you'll find it as "Project ID" under "About This Project" on the project page.
E.g. "54902" for wow.curseforge.com/projects/bonusrollpreview.



Add the ones you want to release on to the TOC file with their respective field names,
here's an example:

TOC Code:
  1. ## Interface: 70300
  2. ## Title: BonusRollPreview
  3.  
  4. ...
  5.  
  6. ## X-Curse-Project-ID: 54902
  7. ## X-WoWI-ID: 22213
  8.  
  9. ...

Packager Metadata
This file will deal with additional (all optional) things you'd like the packager to do to your
packaged addon, be it embedding external libraries, creating changelogs automatically, etc.

This is all done in a new file named ".pkgmeta" which needs to be located
at the root of your addon, next to the TOC file.

Here's a link to documentation on what you can include in this file:
https://authors.curseforge.com/knowl...ckagemeta-file

An example where I specify some libraries it should include:

YAML Code:
  1. enable-nolib-creation: no
  2.  
  3. externals:
  4.   libs/LibStub: svn://svn.wowace.com/wow/libstub/mainline/tags/1.0
  5.   libs/Wasabi:
  6.     url: git://github.com/p3lim-wow/Wasabi
  7.     tag: latest

In addition to this file, additional substitutions can be done to your addon's files (not just the TOC file),
such as filling in the Version field in the TOC file to your latest tag, inserting
localizations from CurseForge, and much more.
More info: https://authors.curseforge.com/knowl...-substitutions

I personally always use the automatic versioning, so my TOC file looks something like this (note the version field):

TOC Code:
  1. ## Interface: 70300
  2. ## Version: @project-version@
  3. ## Title: Bonus Roll Preview
  4.  
  5. ...
The "@project-version@" part will be replaced by the Git tag you used earlier for when it's packaged.

And that's it! Now you can tag and push to GitHub and the packager will do everything else!
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	6025
Size:	4.7 KB
ID:	9044  

Last edited by p3lim : 05-14-20 at 02:06 AM. Reason: Updated links
  Reply With Quote