facepunch / gmad Goto Github PK
View Code? Open in Web Editor NEWGarry's Mod Addon Creator and Extractor
Garry's Mod Addon Creator and Extractor
I would like to be able to upload xml and csv files to the workshop.
Even if Lua and Gmod dont have a built-in parser, devs can write one themselves and use these files for their own purposes (defining the user interface, game items and other assets without using Lua).
Why not do this?
I don't understand why I'm unable to create a file out of my folder containing the addon.
Here's my input into the terminal: /Users/santosbraun/Downloads/gmad_osx create -folder "/Users/santosbraun/Desktop/frostygamers/terrortown/update/ttt_advanced_disguiser_606792331" -out "/Users/santosbraun/Desktop/frostygamers/terrortown/update/"
Terminal: Garry's Mod Addon Creator 1.1
Looking in folder "/Users/santosbraun/Desktop/frostygamers/terrortown/update/ttt_advanced_disguiser_606792331/"
/Users/santosbraun/Desktop/frostygamers/terrortown/update/ttt_advanced_disguiser_606792331/addon.json error: Couldn't find file
i made code like this:
hook.Add("EntityTakeDamage", "Test", function(ent, dmg)
ent.LastDamageInfo = dmg
end)
when im trying to print dmginfo after some time, i got CTakeDamageInfo [NULL], but not damage info. This error did not exist before the patch.
Having issues here. Could you provide some more details for people who are inexperienced with C/C++ and premake4? I had no idea what premake4 was until I googled to find out.
src/Bootil/Utility/CompressionLZMA.cpp:3:26: fatal error: lzma/LzmaLib.h: No such file or directory
#include "lzma/LzmaLib.h"
^
compilation terminated.
make[1]: **\* [obj/Release/CompressionLZMA.o] Error 1
make: **\* [GMad] Error 2
I was able to get bootil to compile correctly. After that I merged the two folders (gmad-master and bootil-master) then ran the premake and make.
I am running on Ubuntu 14.04 LTS 64 bit. I tried installing the lzma libraries through apt-get and it stated that it was already installed. What have I done wrong?
p.s. - sorry if the format is strange, I've never used MD
This is the issue I get when I try to create a gma.file:
Santoss-MacBook-Pro:~ santosbraun$ /Users/santosbraun/Library/Application\ Support/Steam/steamapps/common/GarrysMod/bin/gmad_osx create -folder "/Users/santosbraun/Desktop/frostygamers/terrortown/update/ttt_bomb_station_712675840" -out "/Users/santosbraun/Desktop/newgmadfiles"
Garry's Mod Addon Creator 1.1
Looking in folder "/Users/santosbraun/Desktop/frostygamers/terrortown/update/ttt_bomb_station_712675840/"
.DS_Store
[Not allowed by whitelist]
[Filename contains captial letters]
gamemodes/.DS_Store
[Not allowed by whitelist]
[Filename contains captial letters]
gamemodes/terrortown/entities/entities/ttt_bomb_station/shared.lua
gamemodes/terrortown/entities/weapons/weapon_ttt_bomb_station/shared.lua
materials/.DS_Store
[Not allowed by whitelist]
[Filename contains captial letters]
materials/vgui/ttt/icon_health.png
File list verification failed
-End
My question is, I'm editing a downloaded file from the workshop it makes no sense that I edited one line in the config and when I try to re-create the file this happens.
While testing #35 with Ubuntu Bionic instead, it output this warning, but the build was successful:
/home/travis/build/wiremod/gmad-build/bootil/projects/linux/gmake/../../../src/Bootil/File/File.cpp:242: warning: the use of
tmpnam' is dangerous, better use mkstemp'
Tried to compile GMad using MSBuild, which throws errors.
premake5 --outdir="bin/" --bootil_lib="<path to bootil's parent>/bootil/lib/windows/vs2017/" --bootil_inc="<path to bootil's parent>/bootil/include/" vs2017
premake5 vs2017
SET VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets& "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" Bootil.sln /p:Configuration=Release
SET VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets& "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" GMad.sln /p:Configuration=Release
The final binary 'gmad.exe' should appear in the 'bin' folder at the root of the GMad folder
At step 7: 58 errors when compiling (two samples of these errors:)
bootil_static.lib(Buffer.obj) : error LNK2038: discordance found for
'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in
create_gmad.obj [...\GMad.vcxproj]
bootil_static.lib(Tree.obj) : error LNK2001: unresolved external
symbol __CrtDbgReport
[...\GMad.vcxproj]
according to the news article we can now upload addons with up to 2gb in size (or even bigger). well i tried it. i was able to make a 1.61gb gma file and upload it to the workshop but never been able to create a bigger one. last test (1.86gb) failed with this error:
Failed to write file 'PATH TO A RANDOM FILE' - written 0 bytes! (Can't grow buffer?)
Failed to create the addon
had the same error before when i tried to make a 1.96gb addon
Hello,
I tried to run the compiling toolchain for Windows, but when doing so Lua throws this error:
C:\Users\User\dir\gmad-master>..\lua-5.3.5_Win32_bi\lua53.exe premake4.lua --outdir="bin/" --bootil_lib="../bootil-master/lib/" --bootil_inc="../bootil-master/include/" vs2010
..\lua-5.3.5_Win32_bin\lua53.exe: premake4.lua:1: attempt to call a nil value (global 'solution')
stack traceback:
premake4.lua:1: in main chunk
[C]: in ?
Any idea of what could be wrong ?
Gmad on Linux, when listing all files it found, only lists addon.json, even though there are models
and materials
files filled with textures and models. If issue #15 is bypassed, it will accept addon.json and then proceed to create a very small addon (155 bytes in my test) with only addon.json contained.
A placeholder exists for printing how to use gmad in the case when no arguments are given bit the actual usage information is not present.
I was having issues creating a .gma file for a recently uploaded addon. When using gmad.exe to pack the addon, it left the .lua file empty. When I used Crowbar to check the contents of the .gma file that had been created, the .lua file was there, but empty. I ended up having to install a program called GMosh which properly included the lua file contents when packing my .gma file. gmad.exe gives me no errors as far as I can tell.
I have a pretty standard file structure, I was making a player model. The .lua file was named possum.lua, and was in the project folder "possum/lua/autorun". Everything else seemed to have been packed normally.
I might just be missing a step here, but I'm more inclined to think it's a bug as GMosh created the .gma file just fine, and it works in-game.
Here's both the working .gma created with gmosh, and the not working gmad created one:
possum_gma.zip
Gmad on Linux will not create an addon, because a required file, addon.json, is not on the whitelist. Confirmed this by observing the list contained in AddonWhiteList.h
/tmp/z2_additionalpoly/addon.json
[Not allowed by whitelist]
Hello,
I tried to compile Gmad with the provided toolchain hint, and I now have a Microsoft solution file I struggle to compile.
My problem is: it requires Microsoft Visual Studio 2010 Build Tools (v100) which can't be found anywhere nowadays.
Where am I supposed to find it ? Also, could a more modern version of MSB be used in the future, since it's really difficult to retrieve as it is clearly outdated ?
The .raw file needed for the use of color correction currently isn't whitelisted for publishing on the workshop.
Autobuilding gmad using Travis CI, which defaults to Unbuntu Xenial for the build environment.
It is failing as follows:
The command "cd linux/gmake && make -j4" exited with 0.
0.02s$ cd ../../../../gmad && premake4 --bootil_lib="../bootil/lib/linux/gmake/" --bootil_inc="../bootil/include" gmake
Building configurations...
Running action 'gmake'...
Generating Makefile...
Generating GMad.make...
Done.
The command "cd ../../../../gmad && premake4 --bootil_lib="../bootil/lib/linux/gmake/" --bootil_inc="../bootil/include" gmake" exited with 0.
1.30s$ make -j4
==== Building GMad (release) ====
gmadd.cpp
extract_gmad.cpp
create_gmad.cpp
Creating obj/Release
src/create_gmad.cpp: In function ‘bool CreateAddon::Create(Bootil::Buffer&, Bootil::BString, Bootil::String::List&, Bootil::BString, Bootil::BString)’:
src/create_gmad.cpp:92:124: error: ‘errno’ was not declared in this scope
Output::Warning( "File '%s' seems to be empty, or we couldn't get its size! (errno=%i)\n", ( strFolder + *f ).c_str(), errno );
^
GMad.make:109: recipe for target 'obj/Release/create_gmad.o' failed
make[1]: *** [obj/Release/create_gmad.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:16: recipe for target 'GMad' failed
make: *** [GMad] Error 2
The command "make -j4" exited with 2.
Currently gmad writes the entire GMA file into a ram buffer, before writing it to disk. This is already extremely bad as it means that in the 32 bit version of gmad you cannot reasonably create files bigger than 1GB without running out of ram. There also is no reason to write to ram rather than just writing everything directly to a file.
However, it gets way worse, because the way Bootil's AutoBuffer is used by gmad means that every time a file is written, the buffer has to be reallocated to fit that new file (and the buffer is made no bigger than that). This leads to a quadratic amount of ram being allocated (and free'd directly after) in the number of files in the addon.
This might not sound so bad, so to illustrate I will give some samples, assuming that the average file in an addon is 200KB.
Addon Size in MB | Total allocated ram |
---|---|
10 MB | 250 MB |
50 MB | 6.25 GB |
100 MB | 25 GB |
300 MB | 225 GB |
1 GB | 2.5 TB |
2 GB | 10 TB |
Yes you read it right, to create a 2 GB GMA file you need to allocate a total of 10 TERABYTES of buffers, and even for a reasonable 300 MB addon, you have to allocate 225 GB throughout the entire creation of the GMA file.
I propose two possible fixes:
It would be great if there were official binaries we could download or even a docker image
I've created my own here that builds directly from source, but it would be great to have an official one:
it keeps saying gmad.exe has stopped working and i dont know how to fix it?
any suggestions im uploading a swep and its not working?
When attempting to create a GMA, I receive this error from one of my files: File 'filepath/file.vmt' seems to be empty, or we couldn't get its size! (errno=132)
I have multiple files that are smaller than this one, I'm not sure what the issue could be.
When creating a gma only chosen files are shown, but ignored ones are not.
The list of chosen files is huge and doesnt really give an overview of the files, that got ignored.
When uploading an addon I made a mistake and ignored ".md"-files which includes mdl-files, just because I copied that star from another file-ending.
Didnt notice until a few days later, when the model wasnt available ingame.
Could be a nice addition to make sure in that list are only the files you wanted to ignore ^^
Both gmad and gmpublish close on start. Doesn't even show anything so I don't even know if I'm getting an error or anything.
http://gyazo.com/030bd16ca68da368a22cbf41f52b109c
So basically as it really says. I have Kaspersky IS 2016 installed on my rig and after I try to do anything with gmad.exe, KIS deletes it immediately. To resolve this I've added gmad.exe and gmpublish.exe to KIS2016's whitelist, and it does not do this amymore, However I prefer not to do that in case a virus slips trough KIS.
It will be nice to have a correction for this. Please tell me how can I help further !
I compiled this from source following the instructions you outlined for Linux, and sadly, nothing works. Like... at all.
Segmentation fault: 11
Garry's Addon Creator 1.0
Garry's Addon Creator 1.0
Looking in folder "MY_MOD/"
Looking in folder "MY_MOD/"
No files found, can't continue!
No files found, can't continue!
File list verification failed
File list verification failed
And yeah, there is a folder there.
Please either fix this or at the very least include compiled .exe's in the Garry's Mod /bin/ instead (so I can use it with WINE)! Thanks :D
So I've been working on an addon for a while, and I've figured out how to publish it to the workshop, the only problem is the gmad creator is not working properly. So I have my folder located at "~/Desktop/omgamazingaddon/" without addon.json in it. This is what gmad prints out in the terminal:
Logans-Mac-Mini:bin Logan$ ./gmad_osx create -folder ~/Desktop/omgamazingaddon -out ~/Desktop/hi.gma
Garry's Mod Addon Creator 1.1
Looking in folder "/Users/Logan/Desktop/omgamazingaddon/"
/Users/Logan/Desktop/omgamazingaddon/addon.json error: Couldn't find file
So yeah it can't find addon.json. It's not there. Now we get to the problem... If I put addon.json in the folder, it reads it... kinda... This is what it prints out:
Logans-Mac-Mini:bin Logan$ ./gmad_osx create -folder ~/Desktop/omgamazingaddon -out ~/Desktop/hi.gma
Garry's Mod Addon Creator 1.1
Looking in folder "/Users/Logan/Desktop/omgamazingaddon/"
No files found, can't continue!
File list verification failed
That's the problem I'm having. Here is how my folder is set up.
omgamzingaddon - The root folder
omgamazingaddon/addon.json - The addon.json file.
omgamazingaddon/lua Subfolder
omgamazingaddon/sound - Subfolder
omgamazingaddon/lua/autorun -SubSubFolder
omgamazingaddon/sound/addon_music - SubSubFolder
omgamazingaddon/lua/autorun/* - My lua scripts.
omgamazingaddon/sound/addon_music/* - My addon's music
I hope I've explained enough in an understandable way (judging I'm trying to give a lot... O_o)
AAAAAAAAAAAAAAAA
I need help using this because I'm not familiar with this. Can you please tell me what I need and what I have to do. Please can you help me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.