Skip to content

Commit

Permalink
0.80 Installation instructions: checkout branch, windows symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Jun 16, 2024
1 parent b40bf08 commit 1c59021
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
5 changes: 5 additions & 0 deletions docs/config/sound_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ title: "sound_system:"

--8<-- "config_section.md"

!!! warning "Deprecated in MPF 0.80

The GMC used by MPF 0.80 manages audio outside of configuration files. See the [GMC Setup Guide](../gmc/setup.md) for instructions on configuring the audio system in GMC.


| Valid in | |
|-----|:----:|
|[machine](instructions/machine_config.md) config files |**YES** :white_check_mark:|
Expand Down
28 changes: 20 additions & 8 deletions docs/gmc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ For complete control, you can clone the MPF-GMC repository to your computer and

You now have a copy of the MPF-GMC source code on your machine, and you need to share it with your Godot project. To update GMC, go to the repository folder in your terminal and type `git fetch` and `git pull`.

#### Option 1: Symbolic Links (Mac & Linux)
#### Option 1: Symbolic Links

A symbolic link is a way to mirror one file or folder in a second location, which makes it easy to keep data synchronized. With a symbolic link from the GMC repository to your project folder, your project will always have the latest changes whenever you pull from the GMC repository.

You will create a symbolic link *mpf-gmc* in your project */addons* folder that points to the *mpf-gmc* folder in the GMC repository. The syntax is `sudo ln -s <path to GMC repository/addons/mpf-gmc> <path to project folder/addons/mpf-gmc>`, and will look something like this:
You will create a symbolic link *mpf-gmc* in your project */addons* folder that points to the *mpf-gmc* folder in the GMC repository.

**Mac & Linux**

The syntax is `sudo ln -s <path to GMC repository/addons/mpf-gmc> <path to project folder/addons/mpf-gmc>`, and will look something like this:

``` console
(mpf080) $> sudo ln -s /Users/tommy/git/mpf-gmc/addons/mpf-gmc /Users/tommy/pinballgame/addons/mpf-gmc
Expand All @@ -80,13 +84,21 @@ When successful, you should see a new *mpf-gmc* folder in the *addons* folder yo
lrwxr-xr-x 41 Apr 8 19:09 mpf-gmc -> /Users/tommy/git/mpf-gmc/addons/mpf-gmc
```

#### Option 2: Copy the MPF-GMC Folder (Windows)
**Windows**

Windows does not support symbolic links in the same way, so you must manually copy the *mpf-gmc* folder from the GMC repository */addons* folder to your project *addons* folder. You'll know it's in the right place if your project root (in this example, "pinballgame") has the file path `/pinballgame/addons/mpf-gmc/plugin.cfg`.
The syntax is `mklink /d <path to project folder/addons/mpf-gmc> <path to GMC repository/addons/mpf-gmc>` and will look something like this:

The downside of copying the folder is that you will need to manually re-copy the folder each time you download a new update to the GMC.
``` console
(mpf080) $> mklink /d "C:\repos\pinballgame\addons\mpf-gmc" "C:\repos\mpf-gmc\addons\mpf-gmc"
```


#### Option 2: Copy the MPF-GMC Folder

If you do not create a symbolic link, you can manually copy the *mpf-gmc* folder from the GMC repository */addons* folder to your project *addons* folder. You'll know it's in the right place if your project root (in this example, "pinballgame") has the file path `/pinballgame/addons/mpf-gmc/plugin.cfg`.

The downside of copying the folder is that you will need to manually re-copy the folder each time you download a new update to the GMC.

## Keeping MPF-GMC Up-To-Date
MPF-GMC is in active development and changes frequently, including new features, fixes, and other changes. In order to ensure that you are experiencing the latest and greatest, please ensure that you periodically run the following commands to get the changes to both projects. Once they are pulled into your local copy, you will immediately have access to the new features in building your game.

Expand All @@ -100,17 +112,17 @@ If you cloned the MPF-GMC repository, you need to fetch and pull:
(mpf080) ~/git/mpf-gmc $> git pull
```

**Mac and Linux Users:** If you are using a symlink to mirror the *mpf-gmc* folder in your project *addons* folder, the above steps are enough.
**Symlink Users:** If you are using a symlink to mirror the *mpf-gmc* folder in your project *addons* folder, the above steps are enough.

**Windows Users:** If you have copy+pasted the *mpf-gmc* folder from the GMC repository to your project *addons* folder, you will need to re-copy+paste the folder after you fetch and pull.
**Copy+Paste Users:** If you have copy+pasted the *mpf-gmc* folder from the GMC repository to your project *addons* folder, you will need to re-copy+paste the folder after you fetch and pull.

Because of how Godot processes and caches plugins and autoloads, sometimes pulling a fresh update of GMC will trigger errors and warnings in the Godot log. This is expected the first time you open your project in Godot after a GMC update. You can use the *Project > Reload Current Project* menu to refresh the Godot editor and clear out errors after updating.

!!! note "In Case of Catastrophe"

In some cases, a godot project can get corrupted with cached variants of GMC autoload/class files that cause a slew of errors on startup, even after restarting the editor.

In these rare cases, exit the editor and from the Project List, remove your project from the list of saved projects. Then in your project folder delete the *.godot* folder and re-import your project.godot file into the Project List.
In these rare cases, exit the editor and from the Project List, remove your project from the list of saved projects. Then in your project folder delete the */.godot* folder and re-import your project.godot file into the Project List.

## Activate the GMC Plugin

Expand Down
4 changes: 3 additions & 1 deletion docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ After creating your Python 3.8+ [virtual environment](virtual-environments.md),
``` console

git clone https://github.com/missionpinball/mpf
pip install -e mpf
cd mpf
git checkout 0.80.x
pip install -e .
```

Now when inside your virtual environment, you can run MPF simply by typing `mpf` while in your machine folder. Typing `pip list` will reveal that the MPF module is being run directly from the repo folder on your computer. To update MPF, navigate inside the MPF repo folder and type `git fetch` and `git pull`.
Expand Down

0 comments on commit 1c59021

Please sign in to comment.