1. Post #1
    garry
    September 0001
    13,114 Posts
    Windows/Linux/OSX:

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

    Source code:
    https://github.com/garrynewman/gmad

    Usage:
    Code:
     gmad <command> <options> 
    Code:
     //To create a new .gma file (folder should contain an addon.json - see below)
     gmad.exe create -folder "C:\path\to\addon\folder" -out "C:\where\to\save\file\out.gma"
     
     //To extract an existing .gma file into its parent folder
     gmad.exe extract -file "C:\steam\etc\garrysmod\addons\my_addon_12345.gma"
     
     //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.

    addon.json

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

    Code:
     {
      "title" : "My Test Addon",
      "type" : "ServerContent",
      "tags" : [ "fun", "cartoon" ],
      "ignore" : [
      "*.psd",
      "*.vcproj",
      "*.svn*"
      ]
     } 
    title is the name of your addon.

    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" 
    Reply With Quote Edit / Delete Reply Windows 0 Show Events Winner x 03 Dumb x 0 Late x 0 Useful x 0 Artistic x 0 Lua King x 0 Agree x 0 Funny x 0 Informative x 0 Optimistic x 0 Friendly x 0 (list)

  2. Post #2
    Gold Member
    Wizard of Ass
    April 0009
    4,448 Posts
    Ok this is probably a retarded question but, can we manually mount gma files?

    I thought this only worked via the workshop id.
    Reply With Quote Edit / Delete Reply Germany Show Events Agree Agree x 0 Dumb Dumb x 0 (list)

  3. Post #3
    garry
    September 0001
    13,114 Posts
    Not yet
    Reply With Quote Edit / Delete Reply Windows 0 Show Events Winner Winner x 0 Dumb Dumb x 0 (list)

  4. Post #4
    Gold Member
    Wizard of Ass
    April 0009
    4,448 Posts
    So, the packing is more or less useless for now?
    Reply With Quote Edit / Delete Reply Windows 0 Germany Show Events Disagree Disagree x 0 Dumb Dumb x 0 (list)

  5. Post #5

    January 0013
    438 Posts
    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

  6. Post #6
    Gold Member
    TweaK2007
    July 0007
    876 Posts
    YES! I don"t even care that I can"t mount them yet. Just hearing that it"s planned made my day!
    Reply With Quote Edit / Delete Reply Windows 0 United States Show Events Agree Agree x 0 Dumb Dumb x 0 (list)

  7. Post #7
    Gold Member
    Wizard of Ass
    April 0009
    4,448 Posts
    I"d find it much more appealing if you could do that from within gmod.
    Reply With Quote Edit / Delete Reply Windows 0 Germany Show Events Dumb x 0 Optimistic x 0 Disagree x 0 Useful x 0 Funny x 0 (list)

  8. Post #8
    garry
    September 0001
    13,114 Posts
    Do what?

  9. Post #9
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    I"d find it much more appealing if you could do that from within gmod.
    Are you ever happy about anything?
    Reply With Quote Edit / Delete Reply Linux United Kingdom Show Events Agree Agree x 0 Funny Funny x 0 Dumb Dumb x 0 (list)

  10. Post #10
    foxcock
    Bletotum
    June 0008
    5,903 Posts
    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?
    Reply With Quote Edit / Delete Reply Windows 0 United States Show Events Agree Agree x 0 Dumb Dumb x 0 (list)

  11. Post #11
    garry
    September 0001
    13,114 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 0 Show Events Informative Informative x 0 Winner Winner x 0 Dumb Dumb x 0 (list)

  12. Post #12
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    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.
    Reply With Quote Edit / Delete Reply Linux United Kingdom Show Events Agree Agree x 0 Dumb Dumb x 0 (list)

  13. Post #13
    Gold Member
    unrezt
    August 0009
    2,431 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 0 United States Show Events Agree Agree x 0 Dumb Dumb x 0 (list)

  14. Post #14

    January 0013
    438 Posts
    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.

  15. Post #15

    January 0013
    438 Posts
    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.

  16. Post #16
    garry
    September 0001
    13,114 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 0 Show Events Winner Winner x 0 Informative Informative x 0 Dumb Dumb x 0 Optimistic Optimistic x 0 (list)

  17. Post #17
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    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
    Reply With Quote Edit / Delete Reply Windows 0 United Kingdom Show Events Disagree Disagree x 0 Dumb Dumb x 0 (list)

  18. Post #18

    January 0013
    438 Posts
    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.

  19. Post #19
    Dennab
    April 0011
    5,827 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Useful Useful x 0 Dumb Dumb x 0 (list)

  20. Post #20
    The packer doesn"t seem to compress the gma"s, will the uploader do that or is it a bug?

  21. Post #21
    garry
    September 0001
    13,114 Posts
    GMA"s aren"t compressed.
    Reply With Quote Edit / Delete Reply Windows 0 Show Events Informative Informative x 0 Agree Agree x 0 Dumb Dumb x 0 (list)

  22. Post #22
    Nebual
    June 0009
    103 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows 0 Canada Show Events Disagree Disagree x 0 Dumb Dumb x 0 (list)

  23. Post #23
    garry
    September 0001
    13,114 Posts
    We will have to see what happens when delta updates come out.

  24. Post #24
    Dennab
    April 0011
    5,827 Posts
    -snip-
    nvm
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Dumb Dumb x 07 Informative Informative x 0 (list)

  25. Post #25
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    I assume we will be able to specify the various header fields at some point? Like add-on name/author.

  26. Post #26
    garry
    September 0001
    13,114 Posts
    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.

  27. Post #27
    Gold Member
    Wizard of Ass
    April 0009
    4,448 Posts
    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.

  28. Post #28
    garry
    September 0001
    13,114 Posts
    To compile and submit the addon?

  29. Post #29
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    It might be best if the addon folder includes an addon.txt that includes that information, but doesn"t include the file itself.
    That sounds pretty handy. It"s very annoying to have to maintain a separate version of your addon without the addon.txt for uploading to the workshop.
    Could you by any chance also ignore the files
    LICENSE
    COPYING
    README*
    and everything that begins with a dot?
    It would make it significantly easier to pack addons stored in repositories.

  30. Post #30
    garry
    September 0001
    13,114 Posts
    Maybe an entry in the addon.txt listing files to exclude?

  31. Post #31
    Gold Banana
    Banana Lord.
    May 0010
    7,165 Posts
    I can"t imagine there"s much benefit to adding it to the command line?
    Perhaps storing which user submitted that update?

  32. Post #32
    TGiFallen
    January 0010
    1,481 Posts
    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".

  33. Post #33
    garry
    September 0001
    13,114 Posts
    Ok, it now requires a addon.json file in the root folder. This looks like..

    Code:
     {
      "title" : "My Test Addon",
      "ignore" :
      [
      "*.lua"
      ]
     } 

  34. Post #34
    garry
    September 0001
    13,114 Posts
    And now it looks like this..

    Code:
     {
      "title" : "My Test Addon",
      "type" : "gamemode",
      "tags" : [ "fun", "cartoon" ],
      "ignore" :
      [
      "*.psd",
      "*.vcproj",
      "*.svn*"
      ]
     } 

  35. Post #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. Post #36
    Dennab
    April 0011
    5,827 Posts
    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. Post #37
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    Because you"re double clicking on it.

  38. Post #38
    Dennab
    April 0011
    5,827 Posts
    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. Post #39
    Gold Member
    Lexic
    March 0009
    6,114 Posts
    Ofc you"re supposed to run it from cmd. It"s a command line utility.

  40. Post #40
    Dennab
    April 0011
    5,827 Posts
    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?
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Dumb Dumb x 0 Useful Useful x 0 (list)

e2u.ultra-shop.homelinux.org prokopevsk.profultra-shop.xyz 3zn.ultra-shop.homelinux.org xfu.15-privat.tk 7du.15-privat.ml plf.15-porno.gq gsx.super-privat24-dom.cf snb.mir-privat77-life.ga eov.privat-02.ml 37k.mirprivatcentr77.gq cxf.15-xxl.ga 6yz.privat-02.cf ac6.15-xxl.cf jp7.mir-privat77-life.tk zlf.15-xxl.ml 6ef.mirprivat24trade.ga cgm.15privat.tk t57.15-porno.cf ufx.mirprivatcentr77.ga ei4.privat-02.gq hwc.15privat.cf kdx.15-privat.ga pyo.super-privat24-dom.ga ajj.15-xxl.tk 1ql.15-privat.cf 7rs.privat-02.tk dc6.mirprivatgroup.ga wla.mir-privat77-life.gq q7v.mir-privat77-life.cf el2.15-porno.ml dqq.mirprivatcentr77.cf zpv.super-privat24-dom.tk 5k6.15-xxl.gq kq6.mirprivatgroup.ml kqf.privat02.ml t3o.15-porno.ga 44b.mirprivatgroup.tk cgp.super-privat24-dom.ml 1vf.privat-02.ga mvf.15-porno.tk nqb.15privat.ml yzv.mirprivatgroup.gq kda.mirprivatcentr77.tk 5ke.15privat.ga главная rss sitemap html link