1. Windows/Linux/OSX:

These files are available in the bin folder of your Garry"s Mod install.

Source code:

Usage:
Code:
 gmad <command> <options>
Code:
 //To create a new .gma file (folder should contain an addon.json - see below)

//To extract an existing .gma file into its parent folder

//To extract an existing .gma file into another folder
gmad.exe extract -file "C:\steam\etc\garrysmod\addons\my_addon_12345.gma" -out "C:\this\folder" 
You can also simply drag"n"drop a .gma or an addon folder onto the .exe to extract the .gma or create a .gma respectively.

When creating an addon the folder should have an addon.json - which looks like this..

Code:
 {
"type" : "ServerContent",
"tags" : [ "fun", "cartoon" ],
"ignore" : [
"*.psd",
"*.vcproj",
"*.svn*"
]
} 

ignore is a simple wildcard list of files to ignore. You can have as many of these as you want - and they don"t have to be wildcarded, they can be specific files.

type is the type of addon, one of:
Code:
 "ServerContent"
"gamemode"
"map"
"weapon"
"vehicle"
"npc"
"tool"
"effects"
"model" 
tags is up to two of these:
Code:
 "fun"
"roleplay"
"scenic"
"movie"
"realism"
"cartoon"
"water"
"comic"
"build" 
x 03 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 (list)

2. Ok this is probably a retarded question but, can we manually mount gma files?

I thought this only worked via the workshop id.
Agree x 0 Dumb x 0 (list)

3. Not yet
Winner x 0 Dumb x 0 (list)

4. So, the packing is more or less useless for now?
Disagree x 0 Dumb x 0 (list)

5. I assume by the "not yet" that it means it will become available in the future. This would be useful because the legacy system isnt perfect, or if people want to make little personal changes to the addons without re uploading it. That is an opinion
Dumb x 0 (list)

6. YES! I don"t even care that I can"t mount them yet. Just hearing that it"s planned made my day!
Agree x 0 Dumb x 0 (list)

7. I"d find it much more appealing if you could do that from within gmod.
x 0 x 0 x 0 x 0 x 0 (list)

8. Do what?
Dumb x 0 (list)

9. I"d find it much more appealing if you could do that from within gmod.
Are you ever happy about anything?
Agree x 0 Funny x 0 Dumb x 0 (list)

10. Are you ever happy about anything?
He didn"t say he was unhappy, only his preference.

I"m assuming that he means an ingame menu for choosing which non-workshop .gma addons load. I"m not sure what use that would be; could someone outline the differences between addons loaded as .gma files and legacy folders?
Agree x 0 Dumb x 0 (list)

11. It"ll likely just load all the gma"s in a folder for now.

The only difference would just be that it"s a single file, and would probably mostly be used to test addons before uploading them to workshop.
Informative x 0 Winner x 0 Dumb x 0 (list)

12. He didn"t say he was unhappy, only his preference.
I didn"t say he said he was unhappy. I was referring to the way a lot of his comments seem to be negative/critical.
Agree x 0 Dumb x 0 (list)

13. Is the way the workshop handles updates under your control at all? Right now when it updates it re-downloads the entire item. This is makes the workshop and .gma files completely useless for large addons, delta updating would be nice.
Agree x 0 Dumb x 0 (list)

14. Is the way the workshop handles updates under your control at all? Right now when it updates it re-downloads the entire item. This is makes the workshop and .gma files completely useless for large addons, delta updating would be nice.
I think that would depend on the structure of GMA files, which I don"t know enough about to say anything, so I won"t.
Dumb x 0 (list)

15. I have a question here. Are there any plans to make a GUI for this, even if it"s very simple? I"m just wondering really. I"m not an addon person, but I"m always wondering about things. I assume the addon people are better at cmd-line than I am.
Dumb x 0 (list)

16. Is the way the workshop handles updates under your control at all? Right now when it updates it re-downloads the entire item. This is makes the workshop and .gma files completely useless for large addons, delta updating would be nice.
Valve tell us that delta updates are being worked on.
Winner x 0 Informative x 0 Dumb x 0 Optimistic x 0 (list)

17. I have a question here. Are there any plans to make a GUI for this, even if it"s very simple? I"m just wondering really. I"m not an addon person, but I"m always wondering about things. I assume the addon people are better at cmd-line than I am.
here try this
Disagree x 0 Dumb x 0 (list)

18. I thought workshopper only if you wanted to actually upload it, though i suppose the functionality of the GMad may be built in later on as I never thought of that.
Dumb x 0 (list)

19. Ok, so someone from wiremod forums made a python script that did this in order to bring the latest SVN of wire for mac users like me

What you have to do to mount unnoficial GMAs at the moment is you have to find a workshop dummy addon-basically any addon that you don"t really want and probably won"t get updated. Troll uploads like that azerty-blah blah blah upload work perfectly.

You need to delete the dummy addon"s GMA file and rename the one you want to use to the name of that addon. This way you can get it to mount (make sure you are disconnected from any games before you do)

Edited:

Until Garry releases that fix of his, of course.
Useful x 0 Dumb x 0 (list)

20. The packer doesn"t seem to compress the gma"s, will the uploader do that or is it a bug?
Dumb x 0 (list)

21. GMA"s aren"t compressed.
Informative x 0 Agree x 0 Dumb x 0 (list)

22. The .gma format currently does not support compression at all, files are simply appended consecutively to the end of the .gma file after the header info, like a .tar file.

I believe this makes them entirely incompatible with differential updates, but I could be mistaken or the format could change significantly if Valve allows them.
Disagree x 0 Dumb x 0 (list)

23. We will have to see what happens when delta updates come out.
Dumb x 0 (list)

24. -snip-
nvm
Dumb x 07 Informative x 0 (list)

25. I assume we will be able to specify the various header fields at some point? Like add-on name/author.
Dumb x 0 (list)

26. I"m mulling over the best way to do that. It might be best if the addon folder includes an addon.txt that includes that information, but doesn"t include the file itself. I can"t imagine there"s much benefit to adding it to the command line?

One of the issues is with workshop that information is totally disregarded and it uses the name/desc stored on Workshop.
Dumb x 0 (list)

27. Do what?
Basically integrate the command line into the main gmod menu, open up a file dialoge that origins in the /addons folder and then lets you neatly select your files, like the workshopper kind of.
Dumb x 0 (list)

28. To compile and submit the addon?
Dumb x 0 (list)

29. It might be best if the addon folder includes an addon.txt that includes that information, but doesn"t include the file itself.
Could you by any chance also ignore the files
COPYING
and everything that begins with a dot?
It would make it significantly easier to pack addons stored in repositories.
Agree x 0 (list)

30. Maybe an entry in the addon.txt listing files to exclude?
Winner x 02 (list)

31. I can"t imagine there"s much benefit to adding it to the command line?
Perhaps storing which user submitted that update?

32. Maybe an entry in the addon.txt listing files to exclude?
That"s a great idea, hopefully it could support basic patterns aswell. e.g "*.svn".
Agree x 0 (list)

33. Ok, it now requires a addon.json file in the root folder. This looks like..

Code:
 {
"ignore" :
[
"*.lua"
]
} 
Winner x 0 (list)

34. And now it looks like this..

Code:
 {
"type" : "gamemode",
"tags" : [ "fun", "cartoon" ],
"ignore" :
[
"*.psd",
"*.vcproj",
"*.svn*"
]
} 
Winner x 00 (list)

35. Do you really need a CRC32 at the end of the file? If all the file CRC"s validate it"s pretty much going to work perfectly, right? Plus doesn"t Steam Workshop CRC the entire file for you?

I was also working on a .NET implementation , but I hit a block when no CRC32 implementation for .NET I could find would produce compatible hashes.

36. With both Mac and PC versions the command line closes before I can even get a good look at it
With Mac I think its because I have to put it into /bin or something which I unfortunately can"t do, but I don"t see why it"s not working on Windows

37. Because you"re double clicking on it.

38. Because you"re double clicking on it.
No, i"m running it from terminal on Mac
Am i supposed to do the same for windows

Edited:

Care to offer a solution rather than a diagnosis?

39. Ofc you"re supposed to run it from cmd. It"s a command line utility.
Agree x 0 (list)

40. Ofc you"re supposed to run it from cmd. It"s a command line utility.
But it opens the command line for me
but then it closes it
what the fuck
All I can think of is that I have it in the wrong directory?
Dumb x 0 Useful x 0 (list)