0 votes

I can only run /Applications/Godot.app/Contents/MacOS/Godot to start the godot editor with the project list window.
If I run this command inside the project, it won't start this project.
And it also can not run a scene by
/Applications/Godot.app/Contents/MacOS/Godot scene.tscn

Has anybody successfully run these commands from Mac OS ?

in Engine by (255 points)

2 Answers

+1 vote

Placing the Godot binary in /usr/local/bin and making sure it is called godot

  1. in terminal. create bash_profile file if not exist;

    touch ~/.bash_profile
    
  2. open file with TextEdit;

    open -a TextEdit ~/.bash_profile
    
  3. paste this export PATH=/usr/local/bin:$PATH into TextEdit. save
    and close.

  4. apply changes;

    source ~/.bash_profile
    
  5. Create symlink for Godot binary;

    ln -s /Applications/Godot.app/Contents/MacOS/Godot /usr/local/bin/godot
    

Finally Read Command line tutorial

by (154 points)
0 votes

Nowadays, default Mac Terminal is ZSH.
Henceforth:

echo 'alias godot="/Applications/Godot.app/Contents/MacOS/Godot"' >> ~/.zprofile && source .zprofile && which godot

Edited thanks to @razah's comment (https://unix.stackexchange.com/questions/71253/what-should-shouldnt-go-in-zshenv-zshrc-zlogin-zprofile-zlogout for more ZSH configuration information).

by (14 points)
edited by

use ~/.zprofile instead of ~/.zshrc

% echo 'alias godot="/Applications/Godot.app/Contents/MacOS/Godot"' >> ~/.zprofile

or as a symlink

% ln -s /Applications/Godot.app/Contents/MacOS/Godot /usr/local/bin/godot

Then restart terminal, Let's test which file path it is;

% which godot
/usr/local/bin/godot
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.