Building MiSTer SMDB Packs using a Mac

Just got a MiSTer and need some help? Join the forum and post your questions here!
User avatar
_ben_w
Posts: 8
Joined: Sat Mar 20, 2021 2:33 pm
Has thanked: 5 times

Building MiSTer SMDB Packs using a Mac

Unread post by _ben_w »

Hey - I'm totally new and have just got my MiSTer up and running and love it but I was hoping to use Smokemonster's packs to organise my ROMs and haven't been able to get this to work using a Mac.

I've tried using both the scripts and the GUI linked from the main GitHub page but can't get either to work (the GUI just does nothing when I say build). I think it's something to do with the scripts needing to be converted using the dos2unix command but I've tried this and still no luck.

Has anyone managed to make this work on a Mac (ideally on Big Sur)? Anyone know of a guide anywhere to help?

Thanks for any help.
User avatar
BigMac2
Posts: 36
Joined: Mon Jun 15, 2020 3:24 am
Has thanked: 9 times
Been thanked: 15 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by BigMac2 »

The SmokeMonster packs scripts appear to work on my setup, I'm on Catalina and I used brew https://brew.sh/index_fr to install the latest Python and required unix tools.
User avatar
_ben_w
Posts: 8
Joined: Sat Mar 20, 2021 2:33 pm
Has thanked: 5 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by _ben_w »

BigMac2 wrote: Mon Mar 29, 2021 12:57 am The SmokeMonster packs scripts appear to work on my setup, I'm on Catalina and I used brew https://brew.sh/index_fr to install the latest Python and required unix tools.
Thanks - good to know that it works and I'm not wasting my time. I have downloaded and installed Homebrew.
Did you need to use dos2unix on the scripts first?

I'm probably making a very stupid mistake as I'm not really experienced with Terminal etc, I have only ever done things following instructions but usually manage to figure it out in the end.

Here's what I'm entering into terminal:

Code: Select all

“/Users/XXX/MiSTer/Hardware-Target-Game-Database-master/build_pack.py" -i "/Users/XXX/MiSTer/ROMs/Nintendo - Game Boy" -d "/Users/XXX/MiSTer/Hardware-Target-Game-Database-master/EverDrive Pack SMDBs/Game Boy SMDB.txt" -o "/Users/XXX/MiSTer/ROMs" -m "/Users/XXX/MiSTer/Hardware-Target-Game-Database-master/EverDrive Pack SMDBs/Missing.txt”
And I get this error:

Code: Select all

zsh: no such file or directory: “/Users/XXX/MiSTer/Hardware-Target-Game-Database-master/build_pack.py -i /Users/XXX/MiSTer/ROMs/Nintendo
I know the path names are right as I copied them from Finder and have double checked a bunch of times. I'm guessing there's something wrong with the formatting of them because the error seems to cut off at the space, but even if I remove the space I get a similar error.

Thanks to anyone who can help or point towards a more Mac specific guide.
User avatar
BigMac2
Posts: 36
Joined: Mon Jun 15, 2020 3:24 am
Has thanked: 9 times
Been thanked: 15 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by BigMac2 »

First, does running the script alone (./build_pack.py) gives you something? If you've clone the smoke monster git repo, first you need to set the execute bits on the python scripts to made them executable: chmod 755 *.py

Spaces in directory path is always a pain with terminal commands, most of the time encapsulates them in single or double quoting marks is not enough, you need to add escape characters too (i.e.: "Nintendo\ -\ Game\ Boy"). It is much easier to just try to avoid them while working with terminal scripts.
User avatar
_ben_w
Posts: 8
Joined: Sat Mar 20, 2021 2:33 pm
Has thanked: 5 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by _ben_w »

BigMac2 wrote: Mon Mar 29, 2021 5:13 pm First, does running the script alone (./build_pack.py) gives you something? If you've clone the smoke monster git repo, first you need to set the execute bits on the python scripts to made them executable: chmod 755 *py.
No I definitely didn’t do that step so I’ll give it a go tonight.

Thanks!
User avatar
_ben_w
Posts: 8
Joined: Sat Mar 20, 2021 2:33 pm
Has thanked: 5 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by _ben_w »

Thank you BigMac2 - I finally got it working.

I hadn't done the chmod 755 so I did that then still had the same issue. Then I removed all spaces from any of file/folder names and all the " from the command and after a bit of tweaking (like making sure I was running in python3) I've just managed to get the first one to work.
keilmillerjr
Posts: 47
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

Re: Building MiSTer SMDB Packs using a Mac

Unread post by keilmillerjr »

For Mac and Linux, asdf is a good cli manager for programming languages. Endlines is also a better solution than dos2unix. I made a fork that has a man file. Made an aur package of official repo. No PR accepted main, been months. Plan is to make CI push to package repos, including brew. Maybe I should go ahead with plan on my fork.

https://github.com/asdf-vm/asdf
https://github.com/keilmillerjr/endlines
Post Reply