Thread Tools Display Modes
07-04-20, 01:11 PM   #1
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
Help with packaging addons

Can someone help with packaging addons? I have two questions regarding ZIP files generated from the Git Control Panel:
* Is it possible to collect external libraries without having them in a repository
* How to make ZIP which will contain a project folder in the zip ready to copy/move to WoW interface folder.

This is a small addon that loads some media files for my WA in case some files are missing. The addon also requires two libraries: LibStub and LibSharedMedia. I made a current zip file manually and uploaded it to my addon website.

The process of creating a ZIP file in the Git Control Panel only adds files to the ZIP. The structure is:



Libs\Media\File1.ogg
...........File2.ogg
AddOnName.toc
embeds.xml
core.lua


What I would need is following. The process would first create a folder with the addon name and then put everything in that folder and then create the ZIP:


AddOnName\Libs\Media\File1.ogg
.....................File2.ogg
AddOnName\AddOnName.toc
AddOnName\embeds.xml
AddOnName\core.lua


Edit. I just realised I could simply copy everything to one folder but still don't know how to auto-include external libraries.

Last edited by FranekW : 07-04-20 at 05:44 PM.
  Reply With Quote
07-04-20, 07:11 PM   #2
d87
A Chromatic Dragonspawn
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 163
https://github.com/BigWigsMods/packager
https://www.wowinterface.com/forums/...ad.php?t=55801
  Reply With Quote
07-05-20, 09:58 AM   #3
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
Thanks for the links. I am currently trying the first one. It took me the whole morning to establish environment to run the release.sh file. I was going to ask about it but then I read windows 10 allows running Linux. It’s working now but I still need to manually upload zip files but external links work. I’ve quickly looked at the other link as well but I need another afternoon to digest it.
  Reply With Quote
07-05-20, 12:47 PM   #4
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
I don't know what you mean by "windows 10 allows running Linux". You do not need a virtual box or anything. You can simply do this using cygwin. It also includes a version of curl which is used to do the uploading automatically. Let me know if you are stuck.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
07-05-20, 01:28 PM   #5
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
Originally Posted by LudiusMaximus View Post
I don't know what you mean by "windows 10 allows running Linux" ... Let me know if you are stuck.
In Windows 10 you can run Ubuntu Linux and I think SUSE as well as if you were booted into that system. Have a look at this link:

https://www.microsoft.com/en-us/p/ub...ot:overviewtab

This is included in every version of Windows 10 including Home. You just need to enable developer mode.

I am not an expert here but it seems a fully working Linux terminal, e.g. I had to run "sudo apt install zip subversion" etc. to install required applications. You have also easy access to C: D: drives. I feel it's easier solution than Cygwin.

And BTW thanks for the offer. I've never used curl so I will definitely have to read about it.

Last edited by FranekW : 07-05-20 at 01:34 PM.
  Reply With Quote
07-05-20, 02:50 PM   #6
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Wow, this is the first time I am hearing about this "Windows Subsystem for Linux (WSL)".
For the moment I am not touching my cygwin setup though. Took me long enough to get this to work
But on my next PC I will give WSL a try.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
07-06-20, 03:48 AM   #7
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
WSL is nice if you want to package it manually. You can also use GitHub Actions to let them package it for you
Code:
name: Release AddOn

on:
  push:
    tags:
      - '**'

env:
  CF_API_KEY: ${{ secrets.CF_API_KEY }}
  WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
  # uploads your zip to GitHub releases, GITHUB_TOKEN is already available
  GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      - uses: BigWigsMods/packager@master
        with:
          args: release.sh
GitHub: Creating and storing encrypted secrets


Originally Posted by FranekW View Post
still don't know how to auto-include external libraries.

You use the .pkgmeta file for including external libraries (provided you use the CurseForge or BigWigs packager)
Code:
package-as: SomeAddon

externals:
  Libs/LibStub: https://repos.wowace.com/wow/libstub/tags/1.0
  Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
  Libs/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0
  Libs/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
  Libs/AceEvent-3.0: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
  Libs/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0
  Libs/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0
  Libs/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
  Libs/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0

Last edited by Ketho : 07-06-20 at 05:30 AM.
  Reply With Quote
07-06-20, 04:12 PM   #8
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
First, thanks for the clue on .pkgmeta. I have run `release.sh` and created a package plus a zip file, which collected external libraries.

Sorry but I don't really know what I am doing with GitHub Actions, though. I read through the links but these are I believe different approaches to GitHub Actions. I made a file in .github/workflow called main.yaml which is almost the same as yours. I only changed the line

- uses: actions/checkout@v1

to

- uses: actions/checkout@master

I create a package from the master commit. I was on GitHub Actions, I saw the `main.yaml` file but nothing happens

Thanks

PS. I created secrets. Thanks for the link.

Last edited by FranekW : 07-06-20 at 04:15 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Help with packaging addons

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off