USB Game Updates

84 views
Skip to first unread message

Greg Sealby

unread,
Sep 28, 2019, 10:52:42 PM9/28/19
to MPF Users
Does MPF have a feature (hopefully in settings/service mode) to allow users to update the game code via USB (ala the recent Game of Thrones.Ghostbusters code updates from Stern)?

jabdoa

unread,
Sep 29, 2019, 12:42:03 PM9/29/19
to MPF Users
Not currently. This has to be integrated into your operating system. MPF cannot update itself. Instead it would call to an external updater which overwrites MPF files. We could easily add that exec call but we do not currently offer an updater. However, we would be happy to include tutorials and/or upstream any updaters.


Jan

Greg Sealby

unread,
Sep 30, 2019, 5:27:50 AM9/30/19
to MPF Users
Thanks Jan.  Yes, an exec call function would be handy.  I can write a shell script to do the game update.

Greg Sealby

unread,
Jan 4, 2020, 5:17:38 AM1/4/20
to MPF Users
Hi Jan,

Did you ever end up adding this feature?  

I have a bash script at the moment in Ubuntu that does updates from a USB stick.  I can write a simple custom python function that suits my needs and call it via the Service Menu, but was hoping that you might have added this in a recent update.

I think my python code will be as simple as:

import os
os.system("[Linux command to run my script]")

Greg

jabdoa

unread,
Jan 5, 2020, 7:02:01 AM1/5/20
to MPF Users

Greg Sealby

unread,
Jan 5, 2020, 9:14:16 AM1/5/20
to MPF Users
Awesome, thanks so much Jan!

Philip Dixon

unread,
Jan 6, 2020, 5:12:36 AM1/6/20
to MPF Users
I'm approaching this from a different angle. I am going to do this via a bash script that runs before the game loads. This way if a USB pen is inserted then it will auto copy before loading. There's lots of examples for this out there.

On Sunday, January 5, 2020 at 2:14:16 PM UTC, Greg Sealby wrote:
Awesome, thanks so much Jan!

Greg Sealby

unread,
Feb 22, 2020, 6:49:01 AM2/22/20
to MPF Users
Hi Jan,

I'm trying out the Update process you added for 0.53 and trying run my script.  I've got the mode_settings configured, but my Service mode does not show the "Update" service menu item.  This is what I have added to the service mode:

mode_settings:
    software_update
: true
    software_update_script
: "Update_Game.bat"

(I'm trying it out on my Windows 10 machine first, before I transfer it over to Linux)

I'm guessing this is because it cannot find the Update_Game.bat file.  Where does it need to be stored?

Greg  


jabdoa

unread,
Feb 22, 2020, 7:35:00 AM2/22/20
to MPF Users
Probably relative to your machine folder. Might also be relative to the path you used to start mpf but that is usually the same as your machine folder. I tested this with an absolute path on my machine.

Jan

Greg Sealby

unread,
Feb 22, 2020, 7:23:58 PM2/22/20
to MPF Users
Is there an example that you can share?  I have tried all of the following combinations in my mode_settings in service.yaml and the "update" option does not come up when I cycle through the "switch test", "light test" ,"coil test", "settings" service menu entries.

    software_update_script: Projects\Code Repositories\Pinball Machines\Celts_Dev\config\Test_Batch_File.bat
    software_update_script
: Test_Batch_File.bat
    software_update_script
: Projects\Code Repositories\Pinball Machines\Celts_Dev\modes\service\config\Test_Batch_File.bat

If yours matches what I have then I'll look for a fault elsewhere in my config...


jabdoa

unread,
Feb 23, 2020, 5:49:51 AM2/23/20
to MPF Users
Looks like I added this without a test. Shame on me. I think I tested it locally. Will have a look later. Wound be probably wise to turn my local example into a test.

Jan

Greg Sealby

unread,
Mar 2, 2020, 9:23:06 AM3/2/20
to MPF Users
Hi Jan,

Have you got any more info on this one?  Some sample config of how it works on your system would be great.

Greg

jabdoa

unread,
Mar 3, 2020, 7:13:45 AM3/3/20
to MPF Users
I extended our integration test for the service mode to test software update. Also made MPF consider a relative path to your machine folder if you do not enter an absolute path. This is included in 0.54.0-dev.7. The config of our integration test can be found here: https://github.com/missionpinball/mpf-mc/tree/dev/mpfmc/integration/machine_files/service_mode

Jan
Reply all
Reply to author
Forward
0 new messages