SpottyMatt / raspbian-stepmania-arcade

Guide & scripts to turn a Raspberry Pi into a StepMania arcade machine
83 stars 7 forks source link

How to update Stepmania? #4

Closed kangalio closed 5 years ago

kangalio commented 5 years ago

Is there an elegant way to update Stepmania using these scripts?

I would guess

git submodule update
make stepmania-prep
make stepmania-build
make stepmania-install

But I'm not sure.

SpottyMatt commented 5 years ago

Close. I don't know if I'd call it elegant...

Unfortunately, StepMania's CMake generates a whole ton of files in its source code directory. I don't have a clean way to remove these, but they should be regenerated if the StepMania source code changes, because they are generated based on some of the source files. But, CMake will not alkways regenerate these files if they exist, so... you basically have to do everything all over from the beginning in a fresh directory to be sure it'll work:

  1. Move your existing /usr/local/stepmania-5.x directory, perhaps mv /usr/local/stepmania-5.1 /usr/local/stepmania-5.1.bak.d
  2. Just follow the steps from beginning to end in a brand-new local directory... BUT
  3. After cloning this repository and before running any make commands, cd into the stepmania submodule and run git fetch --all; git checkout <commit or branch you want to build>. Now the stepmania submodule points to the code that you want to build.
  4. Follow the rest of this repository's instructions.
  5. You've now built a new version of StepMania

Probably Also Works

If the files that determine what CMake will generate haven't changed - and they probably won't change often - then you might be able to just:

  1. cd stepmania (the submodule)
  2. git fetch --all; git checkout <commit or branch you want to build>
  3. cd .. (you're now in this repository's directory) make stepmania-prep make stepmania-build make stepmania-install
kangalio commented 5 years ago

That will work, thanks