jorio / OttoMatic

Pangea Software’s Otto Matic 🤖
https://pangeasoft.net/otto
Other
141 stars 13 forks source link

Building the game on Windows and MacOS #7

Closed foote-darrell closed 1 year ago

foote-darrell commented 2 years ago

I am trying to follow the steps in the build instructions . Does the build script in in Mac OS assume you already have Xcode installed? It is not specific if Xcode is required for the game to be built from the command line. Linux does not require Xcode at all to compile the game just from the terminal; is it necessary for Mac OS?

How do I execute the commands for the build on Windows? Is it assumed to be pasted into Command Prompt? It seems to be the only equilivent of Terminal. When I paste git clone --recurse-submodules https://github.com/jorio/OttoMatic into Command Prompt, it just returns that git is not a recognized command. I know that Windows is not a UNIX based system, so the commands aren't all the same. What do I paste that code into? It isn't specific about how to carry out that step. Do I use Command Prompt?

jorio commented 2 years ago

The prerequisites for running the build script are:

The easiest way to obtain a C++ compiler is to install Xcode (on macOS) or Visual Studio (on Windows).

On macOS, Git is also installed by Xcode, but you still need to install CMake separately. I recommend installing CMake through Homebrew because it's more convenient (brew install cmake). If you opt to use the CMake app instead, it won't be accessible to the command line, so you need to open the app, open the Tools menu and pick "install for command line use".

On Windows, you must install Git (link) and CMake (link) separately as I don't think Visual Studio provides them. If the setup program for those tools provides an option named "Add to PATH" or similar, make sure to tick it -- this will make the tools accessible from the command line. You can then run the commands from the instructions from either Command Prompt, or PowerShell.

foote-darrell commented 2 years ago

I got it to work now. Thank you so much.

foote-darrell commented 2 years ago

Trying on my Mac now, and I migrated the same modified folders I had edited before on Windows to the MacBook Pro. I did install Brew and CMake. It then said that the directory didn't match. So, I deleted the folder, and downloaded the repository from scratch. I did all the steps again, It now says that there isn't CMake at all. This is inexplicable, I installed CMake and did exactly what the instructions said. The irony is that is specifically says that CMake is installed an up to date, and command ran the first time but just didn't succeed. Now it says CMake isn't there at all. What can I do for this?

I tried cloining the git repositry adress in Xcode, but it just downloads the folder without a .xcodeprojfile. How can I make a .xcodeprojfile from a git reposoitry if Cmake doesn't work?

6exagon commented 2 years ago

That's actually saying CMake couldn't find the C and C++ compilers Xcode should have installed. sudo xcode-select --reset worked for me.

foote-darrell commented 2 years ago

I tried it again on Mac OS 12 Monterey following the steps exactly. I confirmed that Xcode, CMake, and SDL2 were installed. I ran brew install cmake in the folder, and the upper parent user folder to make sure. Does this still mean CMake in not in the right path? Where ought it be installed? The python3 build.pyscript does not work on its own as is.

jorio commented 2 years ago

CMake is correctly installed, but it can't find the compiler. Try opening the Xcode app to see if it wants to complete an update or something? Edit: you can also try sudo xcode-select --reset as suggested by @6exagon earlier

foote-darrell commented 2 years ago

The SDL2 file seems to be a dead link. If the game can't compile without it, why donchya just include it in the respoitry to begin with?