Thread: Zipping your Extensions
-
May 14th, 2020, 20:03 #1
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
Zipping your Extensions
I didn't know if this was for the Support forum, the Armoury in general, or specific to the Extensions sub forum.
Basically I have problem when I compress the extension I am working on with Powershell:
Code:Compress-Archive ./src/* $fileName -Update
However, if I zip it using the windows context menu "Send to Compressed folder" the extension works perfectly fine.
I have tried to open a working and a non working zip file with 7zip to see if I see anything different, but they look the same, only difference is that offset 0 on the working file is for the "extension.xml" while in the non working extension offset 0 is for the lua script.
Attached are the workign and non working versions of the same extension...
What I am doing wrong? I am just trying to automate the packaging of the extension...
-
May 14th, 2020, 20:18 #2
FG can only use zip compression. Other methods, such as the default 7zip method will not work. Also, you can not zip the containing folder, you must only zip the contents of the folder.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
May 14th, 2020, 20:27 #3
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
Thanks! It is just Zip as far as I know, howdo people zip theirs? I am pretty sure there would be different ways.
Just for clarity, none of the extensions is compressed using 7zip. Both are compressed using built in windows zip compressions. One is the context menu in Windows Explorer and the other one is the PowerShell command let "Compress-Archive" which I would have expected to be doing the same thing as the context menu...
-
May 14th, 2020, 20:37 #4
I can load the SW Trait Roll Details_v0.5-dont work.ext file in a SavageWorlds campaign. I haven't tested any functionality though.
What issue were you having with it?Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 14th, 2020, 20:41 #5
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
-
May 14th, 2020, 21:05 #6
Ah, OK, so it raises a couple of warnings. Errors would cause the console window to pop up.
Looking at the raw data in Notepad++ (see the attached two images).
The one that works has the LUA file with a forward slash (lua/main.lua), the one that doesn't work has it with a backslash (lua\main.lua). This might be the reason that FG can't find the file, but I don't know how to fix it in PowerShell.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 14th, 2020, 21:09 #7
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
Oh, thanks! That's definitively a lead!
I guess PS is NOT using the *nix approach for paths. I will investigate how to deal with that.
I guess I will need to move to a different approach.
It's there anyone automating their zipping? I am using VSCode for the extension editing, and i was just trying to get a build task to pack it and deploy it in my extensions folder.Last edited by ragnarol; May 14th, 2020 at 21:12.
-
May 14th, 2020, 21:11 #8
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
-
May 15th, 2020, 07:57 #9
- Join Date
- May 2019
- Location
- Dorking, United Kingdom
- Posts
- 45
Ok, I am zipping them with 7zip CLI and that works like a charm. Annoying the bug in the powershell commandlet.
Code:&"C:\Program Files\7-Zip\7z.exe" a $fileName ./src/*
-
June 5th, 2020, 22:55 #10
I'm running Debian in WSL on Windows 10. I have a bash script in the root of the game mode.
#!/bin/bash
rm -v ../DeadlandsClassic.pak
zip -r ../DeadlandsClassic.pak * -x $0 t/ t/* misc/ misc/*
I have a folder for stuff I want to keep about but don't want in the final pak file. That's the misc. The t folder contains tests for the lua code.
Of course, I tend to run this too, or I get lots of editor back up files in there that I don't want.
#!/bin/bash
find . -iname ".*~" -o -iname "*~" | xargs rm -vf -Last edited by Ampersandrew; June 5th, 2020 at 23:03.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks