View Single Post
06-08-18, 11:24 PM   #31
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by KyrosKrane View Post
Thank you for the excellent guide! You have tremendously simplified my workflow and made it much easier to push out new releases!

My question is related to the pkgmeta file. I'm relatively new to the addon writing world, and I'm trying to understand the difference between externals, dependencies, and tools. Could you point me to a good guide on when to use each? The Curse documentation is sorely lacking beyond the bare how-to; it assumes you already know what the difference is. Besides, the automated method bypasses the Curse packager anyway.

As an example, I've been using LibStub, CallbackHandler, and LibDataBroker in my addons, and until now, I've simply placed those files in my repository and included them in my .toc file. I tried to include them as externals, but I ended up with a massive amount of files I didn't need in my addon zip file, like test cases and documentation.

I'm now moving towards the Ace3 framework, so I thought to include Ace3 and the other libraries I'm using in my externals list - but I got with something like three copies of libstub and callbackhandler, including in directories under the Ace3 hierarchy! I played around with it a bit, but eventually gave up and went back to just including the files I want in my repo.

Any advice would be appreciated.
Externals are for telling the packager which libraries it should download for you.
Optional-/required-dependencies is metadata Curse uses for their client (afaik).
Tools-used I think is just something you'd put in so that tool would get some points for the rewards program (again, CF stuff).

In your example with the three libraries:
Code:
externals:
  Libs/LibStub: https://repos.wowace.com/wow/libstub/trunk
  Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
  Libs/LibDataBroker-1.1: https://repos.wowace.com/wow/libdatabroker-1-1
This would tell the packager to download those three libs and place them in the "Libs" subdirectory of your packaged addon. The first two are from SVN, the last one from Git (the packager is smart enough to figure out which is which).

Another field in .pkgmeta is the "ignore" list. Sadly, not enough libraries use this field, such as LibStub, so you'll end up with useless files like you mentioned. The packager will recursively check for the ignore list in the externals' .pkgmeta file, but it won't recursively get their externals (if any).
You can however add externals' files you want to ignore for the packaging, as it's the last thing it does.

As for Ace3, check out Phanx's addons (specifically Grid), she's using a bucketload of Ace3 modules in that addon, and uses this packager as well. While looking at it, notice how she's managed to get all of the libraries from externals alone, you only see them referenced in .pkgmeta and Grid.toc.

Last edited by p3lim : 06-08-18 at 11:26 PM.
  Reply With Quote