Coder Social home page Coder Social logo

williamvenner / fastgmad Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 3.0 675 KB

⚡ An extremely fast reimplementation of gmad.exe and gmpublish.exe

License: Apache License 2.0

Rust 100.00%
garry garrys garrys-mod garrysmod gma gmad gmod gmpublish gmpublisher mod

fastgmad's Introduction

⚡ fastgmad

Download


An extremely fast reimplementation of gmad.exe and gmpublish.exe.

Prefer to use a GUI? Check out gmpublisher!

Features

  • Up to x100 faster than gmad.exe
  • Publish/update Workshop addons without creating a .GMA
  • Create, extract and publish GMAs all in one tool
  • Upload addon icons in PNG, JPG or even GIF format
  • Drop-in replacement for gmad.exe and gmpublish.exe - usage is identical
  • Publish without specifying an icon if you're feeling lazy
  • -stdin and -stdout support for piping data between tools

Requirements

Windows, macOS or Linux

Usage

https://wiki.facepunch.com/gmod/Workshop_Addon_Creation
https://wiki.facepunch.com/gmod/Workshop_Addon_Updating

Drag & Drop
-----------
Drag & drop a .gma onto fastgmad to extract it
Drag & drop a folder onto fastgmad to convert it to .gma

Creating GMAs
-------------
fastgmad create -folder path/to/folder -out path/to/gma.gma
fastgmad create -folder path/to/folder -out path/to/gma.gma
fastgmad create -folder path/to/folder
fastgmad create -folder path/to/folder -stdout

Extracting GMAs
---------------
fastgmad extract -file path/to/gma.gma -out path/to/folder
fastgmad extract -file path/to/gma.gma
fastgmad extract -stdin -out path/to/folder

Publishing GMAs
---------------
>> You can publish .GMAs OR addon directories (a .GMA will be automatically created for you) <<
>> Adding an icon is OPTIONAL for publishing a new Workshop addon. A default icon will be provided for you if you don't add one. <<

Accepted Icon Formats: JPG, PNG, GIF
Icon Max Size: 1 MB
Recommended Icon Dimensions: 512x512

fastgmad publish -addon path/to/addon -icon path/to/icon
fastgmad update -id 1337 -addon path/to/addon
fastgmad update -id 1337 -addon path/to/addon -icon path/to/icon
fastgmad update -id 1337 -addon path/to/addon -changes "fixed something"
fastgmad update -id 1337 -addon path/to/addon -changes "fixed something" -icon path/to/icon

Additional flags
----------------
-max-io-threads <integer> - The maximum number of threads to use for reading and writing files. Defaults to the number of logical cores on the system.
-max-io-memory-usage <integer> - The maximum amount of memory to use for reading and writing files in parallel. Defaults to 2 GiB.
-warninvalid - Warns rather than errors if the GMA contains invalid files. Off by default.
-noprogress - Turns off progress bars.

Notes
-----
- CRC checking and computation is not a feature. Implementing this would slow down the program for no benefit and it is virtually unused and redundant in Garry's Mod.

fastgmad's People

Contributors

williamvenner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fastgmad's Issues

`fastgmad publish` errors after "preparing config" (Steam error: "a file was not found")

Here is my console log:

└─▪ >> fastgmad publish -addon auto_flashlight.gma -icon images/icon_auto_flashlight.jpg
fastgmad v0.1.1 by Billy
https://github.com/WilliamVenner/fastgmad
Prefer to use a GUI? Check out https://github.com/WilliamVenner/gmpublisher

[+16.22µs] Checking icon...
[+42.372µs] Initializing Steam...
[S_API] SteamAPI_Init(): Loaded '/home/cpcl/.local/share/Steam/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 4000
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198103347732 [API loaded no]
[+30.469575ms] Reading GMA metadata...
[+30.531192ms] Preparing content folder...
[+30.556019ms] Creating new Workshop item...
[+184.306579ms] Preparing item 16592315458883944448 upload...
[+184.325874ms] Uploading item...
[+199.13136ms] Preparing config...

ERROR: Steam error (a file was not found)

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: FastGmadError { kind: SteamError("a file was not found"), context: None }', fastgmad-bin/src/main.rs:87:31
stack backtrace:
   0:     0x5594f583d576 - <unknown>
   1:     0x5594f57cc81f - <unknown>
   2:     0x5594f583a737 - <unknown>
   3:     0x5594f583d385 - <unknown>
   4:     0x5594f583e823 - <unknown>
   5:     0x5594f583e5e4 - <unknown>
   6:     0x5594f583ed16 - <unknown>
   7:     0x5594f583ec24 - <unknown>
   8:     0x5594f583d976 - <unknown>
   9:     0x5594f583e9b2 - <unknown>
  10:     0x5594f57bf343 - <unknown>
  11:     0x5594f57bf783 - <unknown>
  12:     0x5594f5806a95 - <unknown>
  13:     0x5594f57ec523 - <unknown>
  14:     0x5594f57ed899 - <unknown>
  15:     0x5594f5833fc5 - <unknown>
  16:     0x5594f5809195 - <unknown>
  17:     0x7f0334627cd0 - <unknown>
  18:     0x7f0334627d8a - __libc_start_main
  19:     0x5594f57c522e - <unknown>
  20:                0x0 - <unknown>
Aborted (core dumped)

Seems like it gets something wrong at 'preparing config'.

For reference, I use this command to pack a folder to a .gma: fastgmad create -folder "addons/auto_flashlight" -out auto_flashlight.gma

The folder is structured like this, which I believe shouldn't cause any issues:
addons/auto_flashlight/lua/autorun/...
addons/auto_flashlight/addon.json
The addon only contains 1 Lua file and the addon.json:

{
    "title": "Auto-Flashlight",
    "type": "effects",
    "tags": ["scenic", "roleplay"],
    "ignore": []
}

Also, I'm able to use fastgmad update to update the addon without any errors being printed in fastgmad, however this doesn't seem to actually fix the addon as attempting to download the workshop addon via gmpublisher results in an error, and the displayed file size on the page still says 0.000 MB.

OS: EndeavourOS Linux x86_64 (kernel 6.1.52-1-lts)
Shell (not sure if this matters but I'll put it here anyway): bash 5.1.16
fastgmad version: 0.1.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.