WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Help with packaging addons (https://www.wowinterface.com/forums/showthread.php?t=58078)

FranekW 07-04-20 01:11 PM

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.

d87 07-04-20 07:11 PM

https://github.com/BigWigsMods/packager
https://www.wowinterface.com/forums/...ad.php?t=55801

FranekW 07-05-20 09:58 AM

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.

LudiusMaximus 07-05-20 12:47 PM

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.

FranekW 07-05-20 01:28 PM

Quote:

Originally Posted by LudiusMaximus (Post 336291)
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.

LudiusMaximus 07-05-20 02:50 PM

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.

Ketho 07-06-20 03:48 AM

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/[email protected]

      - uses: BigWigsMods/[email protected]
        with:
          args: release.sh

GitHub: Creating and storing encrypted secrets


Quote:

Originally Posted by FranekW (Post 336283)
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


FranekW 07-06-20 04:12 PM

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/[email protected]

to

- uses: actions/[email protected]

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

Thanks

PS. I created secrets. Thanks for the link.


All times are GMT -6. The time now is 03:55 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI