Giter Club home page Giter Club logo

gmosh's Introduction

Gmosh

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!

Installation

When you just want to install it, please download the binaries from here: https://github.com/FPtje/gmosh/releases

How to use gmosh

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:

Publish an addon to the workshop/Update an addon on the workshop

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.

Extract a gma file

gmosh -e SomeGMAFile.gma out/directory/

or

gmosh --extract SomeGMAFile.gma out/directory/

Create a gma file from an addon

gmosh -c --dir addon_directory output.gma

or

gmosh --create-gma # creates `out.gma` from the addon in `addon_directory`

Check for "illegal" files in the current folder

Illegal files are files that are not allowed to be in a gma file.

gmosh -v

or

gmosh --verify directory

List the contents of a gma file

gmosh -l SomeGMAFile.gma

or

gmosh --list SomeGMAFile.gma

Generate an addon.json file

This is an easy way to turn your addon into a workshoppable one.

gmosh --new

or

gmosh --new-addon addons/MyAddon

Extra fields in addon.json

The addon.json file contains the necessary information to publish addons to the workshop. In addition to the default fields, gmosh understands some more.

default_changelog, string

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"

workshopid, int

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

Other

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

Compiling

Compiling prerequisites (all platforms)

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/

Compiling on Linux

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

Compiling on OS X

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

Compiling on Windows

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.

FAQ

Compiling any: Errors about "No module named 'addoninfo'"

You're trying to compile the pre-built version. Please download the source.

Compiling any: error about "construct" missing when running executable

The modules six and/or construct were not installed properly at the time of compiling

Compiling Windows: Error about zip or something when running compiled executable

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

Compiling Windows: Error during compiling: C:\Python33\Scripts\cxfreeze not found

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.

Compiling Linux: All sorts of exceptions when running the compiled program

You might have compiled with cx_freeze for Python 2.7, which is the default cx_freeze in some package repositories.

Compiling Windows: You get this cx-freeze exception when trying to run the compiled version

$ 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

gmosh's People

Contributors

bo98 avatar fptje avatar saibotk 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmosh's Issues

Python Error

I'm not sure what you can do to reproduce this bug. It happened after I added an addon.json file to gmoshui and then deleted the file addon. I closed the UI and then this error happens whenever I try to reopen it.
image

Missing binaries under Linux (Ubuntu 14.04)

When I try to install gmosh using the installer script (copied from package/Linux to root dir), I get the following error: "cp: cannot stat ‘bin/*’: No such file or directory"

I previously ran make, which gave me following output:

pyside-uic ui/mainwindow.ui -o src/view/mainwindow.py
pyside-uic ui/progressdialog.ui -o src/view/progressdialog.py

ls -la /usr/local/bin/ | grep gmosh gives following output:

lrwxrwxrwx  1 root root     18 Mai  5 13:38 gmoshui -> /opt/gmosh/gmoshui

/opt/gmosh/ however is empty

Using make install_linux to install I get following output:

# Desktop and mime files
if [ -L /usr/share/applications/gmoshui.desktop ]; then rm /usr/share/applications/gmoshui.desktop; fi
if [ -L /usr/share/pixmaps/gmosh_256.png ]; then rm /usr/share/pixmaps/gmosh_256.png; fi
if [ -L /usr/bin/gmosh ]; then rm /usr/bin/gmosh; fi
if [ -L /usr/local/bin/gmosh ]; then rm /usr/local/bin/gmosh; fi
if [ -d /opt/gmosh ]; then rm -r /opt/gmosh; fi
if [ -L /usr/lib/libsteam_api.so ]; then rm /usr/lib/libsteam_api.so; fi
if [ -L /usr/lib/libsteam_api.dylib ]; then rm /usr/lib/libsteam_api.dylib; fi
if [ -L /usr/bin/gmpublish_linux ]; then rm /usr/bin/gmpublish_linux; fi
if [ -L /usr/local/bin/gmpublish_linux ]; then rm /usr/local/bin/gmpublish_linux; fi
if [ -L /usr/bin/gmpublish_osx ]; then rm /usr/bin/gmpublish_osx; fi
if [ -L /usr/local/bin/gmpublish_osx ]; then rm /usr/local/bin/gmpublish_osx; fi
if [ ! -d /opt/gmosh ]; then mkdir -p /opt/gmosh; fi
cp -r bin/* /opt/gmosh
cp: cannot stat ‘bin/*’: No such file or directory
make: *** [install_linux] Error 1

So I assume there needs to be a directory called bin containing at least one file to satisfy "cp -r bin/* /opt/gmosh".
So doing following steps gets me closer to the solution but I'm still missing gmosh and gmoshui binaries:

mkdir bin
cd bin/
cp ../required/* ./

sudo make install_linux then gives me follwoing error:

chmod: cannot access ‘/opt/gmosh/gmosh’: No such file or directory

So my conclusion is that the "prebuilt" package is actually missing the binaries "gmosh" and "gmoshui".

Won't let me install? (OSX Problem)

Alright, so I've been trying to get gmosh on my mac and apperently it doesn't want to work. When I open up the install.command it wants me to put in the admin password. However, when I try to type, it won't let me type and I get it wrong every single time

Here it is:
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Sorry, try again.
Password:

Python Error

Sounds similar to #16
Just happened one day, haven't changed installation or anything. Tried reinstalling to both 2.2.1 and 2.1.1
This error pops up whenever I try to start the program.

http://f.donkie.co/w8k2h

cx_Freeze: Python error in main script

image

This is what I get whenever I open gmoshui. I haven't done anything out of the ordinary to cause it.

I haven't tried restarting or anything of that nature.

To work around it I just used gmpublish.

A fix to this would be amazing.

cx_Freeze: Python error in main script

bandicam 2017-06-29 12-39-10-584
Ever since I uploaded an addon to the workshop(2 Days ago), whenever I open gmoshui this happens.. I'm using v2.2.1 Alpha and I tried reinstalling it to no avail..

Download workshop percentage shows wrong

The download progress displays like a fraction but has a % after it. Should probably just multiply the progress by 100.

Looks like: 0.53%
Should be: 53%

Noticed just now that when it's finished downloading it jumps to 100.00% immediately..?

Steam Not Running

When I try to publish an addon on Ubuntu 16.04 (Xenial) Server, it tells me that Steam isn't running. I am not using a desktop environment. How do I get Steam to work? I have already tried using SteamCMD in a screen, then running gmosh, but it doesn't work. I entered all of the information it asks, then after it says Creating Temporary GMA, it says Steam isn't running.

Addon has invalid type! Error

I've been trying to use gmosh to publish a new addon to the workshop but when ever I click the publish button it fails to upload with the error Addon has invalid type! I've included screen shots of my settings and of the addon.json file for reference.

Image of errror
Image of settings
Image of settings

Can't parse some workshop info?

gmosh --workshopinfo 114313290
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
  File "src/gmosh.py", line 342, in <module>
  File "src/gmosh.py", line 54, in main
  File "src/gmosh.py", line 249, in workshopinfo
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 834: invalid continuation byte

I found one addon that seems to break gmosh's ballsack. It's not made by wiox so I don't know why it would be doing that. I will investigate further tomorrow once I get my project to download/parse this stuff itself. The offending addon:

http://steamcommunity.com/sharedfiles/filedetails/?id=114313290

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.