Fix some stuff for Mac installation (#753)

This commit is contained in:
EllipticEllipsis 2022-08-28 05:12:47 +01:00 committed by GitHub
parent 993c09a70e
commit 80b605f737
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 5 deletions

View File

@ -26,7 +26,7 @@
], ],
"cStandard": "c89", "cStandard": "c89",
"cppStandard": "c++17", "cppStandard": "c++17",
"intelliSenseMode": "gcc-x86" "intelliSenseMode": "${default}"
} }
] ]
} }

View File

@ -24,6 +24,17 @@ Install build dependencies:
./install.sh ./install.sh
``` ```
> **NOTE:** On Mac, if you get an error that looks like
>
>```sh
>Error: Cannot install md5sha1sum because conflicting formulae are installed.
> coreutils: because both install `md5sum` and `sha1sum` binaries
>
>Please `brew unlink coreutils` before continuing.
>```
>
>it's fine to just open `install.sh` in a text editor, delete the `md5sha1sum` from the `brew install` line, and rerun it (put it back after so you don't accidentally commit it!)
Copy baseroms into the following places (at least 1 is required): Copy baseroms into the following places (at least 1 is required):
* `ver/us/baserom.z64` (sha1: `3837f44cda784b466c9a2d99df70d77c322b97a0`) * `ver/us/baserom.z64` (sha1: `3837f44cda784b466c9a2d99df70d77c322b97a0`)

View File

@ -1,4 +1,3 @@
capstone
PyYAML PyYAML
lark-parser lark-parser
pypng pypng

View File

@ -714,13 +714,13 @@ if __name__ == "__main__":
# on macOS, /usr/bin/cpp defaults to clang rather than gcc (but we need gcc's) # on macOS, /usr/bin/cpp defaults to clang rather than gcc (but we need gcc's)
if args.cpp is None and sys.platform == "darwin" and "Free Software Foundation" not in exec_shell(["cpp", "--version"]): if args.cpp is None and sys.platform == "darwin" and "Free Software Foundation" not in exec_shell(["cpp", "--version"]):
if "Free Software Foundation" in exec_shell(["cpp-11", "--version"]): if "Free Software Foundation" in exec_shell(["cpp-12", "--version"]):
args.cpp = "cpp-11" args.cpp = "cpp-12"
else: else:
print("error: system C preprocessor is not GNU!") print("error: system C preprocessor is not GNU!")
print("This is a known issue on macOS - only clang's cpp is installed by default.") print("This is a known issue on macOS - only clang's cpp is installed by default.")
print("Use 'brew' to obtain GNU cpp, then run this script again with the --cpp option, e.g.") print("Use 'brew' to obtain GNU cpp, then run this script again with the --cpp option, e.g.")
print(" ./configure --cpp cpp-11") print(" ./configure --cpp cpp-12")
exit(1) exit(1)
# default version behaviour is to only do those that exist # default version behaviour is to only do those that exist