A CLI interface for publishing packages, and a simple graphical interface for inspecting GMA files.
WARNING Unmaintained! Unsupported! Publishing packages no longer works because the included gmpublish
is out-of-date!
When you just want to install it, please download the binaries from here: https://github.com/FPtje/gmosh/releases
Gmosh is a command line interface (cli) program. This means that the program has no visual interface. Rather, it is run from the command prompt/terminal. This might sound frightening, but it makes sense: Typing is faster than pointing and clicking, this program was made so updates can be pushed to the workshop /super fast/. Gmosh was loosely inspired by the git cli. Pushing an update to a git repository is as easy as entering "git push" in the terminal. Likewise, publishing an update to the workshop is as easy as entering "gmosh" in the terminal.
Cli justification aside, you can do many things with gmosh. When you don't know how to do something, you can run gmosh --help in the terminal. Here are some examples:
If you're publishing the addon for the first time, run the following command:
gmosh --logo test.jpg
When updating you can just run
gmosh
Note: If the addon has been published to the workshop before, gmosh will ask for the workshop ID once (and only once!) This workshop ID can be found in the URL of the workshop addon.
gmosh -e SomeGMAFile.gma out/directory/
or
gmosh --extract SomeGMAFile.gma out/directory/
gmosh -c --dir addon_directory output.gma
or
gmosh --create-gma # creates `out.gma` from the addon in `addon_directory`
Illegal files are files that are not allowed to be in a gma file.
gmosh -v
or
gmosh --verify directory
gmosh -l SomeGMAFile.gma
or
gmosh --list SomeGMAFile.gma
This is an easy way to turn your addon into a workshoppable one.
gmosh --new
or
gmosh --new-addon addons/MyAddon
The addon.json file contains the necessary information to publish addons to the workshop. In addition to the default fields, gmosh understands some more.
When you're too lazy to type a new changelog every time you update your addon, the default changelog is the right thing for you.
"default_changelog": "All changes can be found on my website"
The ID of the addon on the workshop. gmosh uses this ID to know where to upload the addon to. If you do not enter this yourself, gmosh will ask it once and then store it in the addon.json file.
"workshopid": 123456789
The following fields are read and then put in the GMA, but I am unsure what they do. They might cause problems when you fill them in.
- steamid64, int
- description, string
- author, string
Make sure python 3.8 or 3.7 is installed.
Make sure the module construct is installed. https://pypi.org/project/construct/ If you want to compile binaries, then make sure to install cx_freeze: https://pypi.org/project/cx-Freeze/
cd to the root of the repository enter "make" in the terminal enter "sudo make install_linux" in the terminal to install it on your system
cd to the root of the repository enter "make osx" in the terminal enter "sudo make install_osx" in the terminal to install it on your system Note: You may have to change the path of cxfreeze in the makefile. Currently it's /Library/Frameworks/Python.framework/Versions/3.8/bin/cxfreeze
Open the command prompt in the root of the repository run compile_windows.bat. Note: You might have to change the path of cxfreeze in the batch file. Currently it's C:\Python33\Scripts\cxfreeze.
You're trying to compile the pre-built version. Please download the source.
The modules six and/or construct were not installed properly at the time of compiling
This happened to me when I tried to compile with Python 3.4 and cx_freeze for 3.4. Roll back to Python 3.3 and cx_freeze for 3.4
Open the batch file and change the path of cxfreeze to the real path. For some strange reason cxfreeze wasn't added to $PATH for me.
You might have compiled with cx_freeze for Python 2.7, which is the default cx_freeze in some package repositories.
$ gmosh --help
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "src/gmosh/gmosh.py", line 5, in <module>
File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2214, in _find_and_load
File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2203, in _find_and_load_unlocked
File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
AttributeError: 'module' object has no attribute '_fix_up_module'
Please see this link: http://stackoverflow.com/questions/23920073/cx-freeze-error-python-34