Skip to content

Commit a759cb8

Browse files
committed
1 parent a285e14 commit a759cb8

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

.github/workflows/macos-toolchain.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
- uses: n1hility/cancel-previous-runs@v2
2020
with:
2121
token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: install dependencies
23+
run: brew install nikitabobko/tap/brew-install-path
2224
- name: build mips binutils
23-
run: brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb --debug
25+
run: brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
2426
- name: build mips gcc
25-
run: brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb --debug
27+
run: brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
2628
- name: build openbios
2729
run: make -C ./src/mips/openbios

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ You need MacOS Catalina or later with the latest XCode to build, as well as a fe
130130

131131
Compiling OpenBIOS will require a mips compiler, that you can generate using the following commands:
132132
```bash
133-
brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb
134-
brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
133+
brew install nikitabobko/tap/brew-install-path
134+
brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
135+
brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
135136
```
136137

137138
Then, you can compile OpenBIOS using `make -C ./src/mips/openbios`.

src/mips/psyqo/GETTING_STARTED.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ trizen -S cross-mipsel-linux-gnu-binutils cross-mipsel-linux-gnu-gcc
2626
Using [Homebrew](https://brew.sh/), you can install the mips toolchain after downloading [these two scripts](https://github.com/grumpycoders/pcsx-redux/tree/main/tools/macos-mips) (or cloning the whole PCSX-Redux repository).
2727

2828
```bash
29-
brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb
30-
brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
29+
brew install nikitabobko/tap/brew-install-path
30+
brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
31+
brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
3132
```
3233

3334
## Windows
@@ -107,13 +108,13 @@ The recommended IDE is [Visual Studio Code](https://code.visualstudio.com/). The
107108
# Build options
108109
When using the `psyqo.mk` file, you can specify build options for the PSYQo library and your binary. It is possible to specify the following options:
109110

110-
- `make BUILD=Release`
111+
- `make BUILD=Release`
111112
This is the default build, and will enable a release build of the library and your binary. It will be fast and small, but debugging will be hard.
112-
- `make BUILD=Debug`
113+
- `make BUILD=Debug`
113114
This will enable a full debug build of the library and your binary. It will be slow and bloated, but debugging will be very easy.
114-
- `make BUILD=SmallDebug`
115+
- `make BUILD=SmallDebug`
115116
This will enable a debug build of the library and your binary with still some optimizations. Debugging is possible, but will be hindered at times. It is the best compromise if debugging is needed while retaining some speed and small code footprint.
116-
- `make BUILD=LTO`
117+
- `make BUILD=LTO`
117118
This will enable a release build of the library and your binary with [LTO](https://gcc.gnu.org/wiki/LinkTimeOptimization) enabled. It will be really fast and really small, but debugging will be impossible.
118119

119120
# Further reading

tools/vscode-extension/tools.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ let extensionUri
2020
let globalStorageUri
2121
let requiresReboot = false
2222

23-
async function checkInstalled (name) {
23+
async function checkInstalled(name) {
2424
if (tools[name].installed === undefined) {
2525
tools[name].installed = await tools[name].check()
2626
}
2727
return tools[name].installed
2828
}
2929

30-
async function checkCommands (commands, args) {
30+
async function checkCommands(commands, args) {
3131
for (const command of commands) {
3232
try {
3333
await execFile(command, args)
@@ -42,7 +42,7 @@ async function checkCommands (commands, args) {
4242
let mipsInstalling = false
4343
let win32MipsToolsInstalling = false
4444

45-
async function installMips () {
45+
async function installMips() {
4646
if (mipsInstalling) return
4747
mipsInstalling = true
4848
try {
@@ -62,7 +62,7 @@ async function installMips () {
6262
}
6363
}
6464

65-
async function installToolchain () {
65+
async function installToolchain() {
6666
switch (process.platform) {
6767
case 'win32':
6868
try {
@@ -107,9 +107,9 @@ async function installToolchain () {
107107
'scripts',
108108
'mipsel-none-elf-gcc.rb'
109109
).fsPath
110+
await terminal.run('brew', ['install', 'nikitabobko/tap/brew-install-path'])
110111
await terminal.run('brew', [
111-
'install',
112-
'--formula',
112+
'install-path',
113113
binutilsScriptPath,
114114
gccScriptPath
115115
])
@@ -139,9 +139,9 @@ async function installToolchain () {
139139
'scripts',
140140
'mipsel-none-elf-gcc.rb'
141141
).fsPath
142+
await terminal.run('brew', ['install', 'nikitabobko/tap/brew-install-path'])
142143
await terminal.run('brew', [
143-
'install',
144-
'--formula',
144+
'install-path',
145145
binutilsScriptPath,
146146
gccScriptPath
147147
])
@@ -170,7 +170,7 @@ async function installToolchain () {
170170
}
171171
}
172172

173-
async function installGDB () {
173+
async function installGDB() {
174174
switch (process.platform) {
175175
case 'win32':
176176
try {
@@ -240,7 +240,7 @@ async function installGDB () {
240240
}
241241
}
242242

243-
async function installMake () {
243+
async function installMake() {
244244
switch (process.platform) {
245245
case 'win32':
246246
try {
@@ -285,7 +285,7 @@ async function installMake () {
285285
}
286286
}
287287

288-
async function installCMake () {
288+
async function installCMake() {
289289
switch (process.platform) {
290290
case 'win32':
291291
const release = await octokit.rest.repos.getLatestRelease({
@@ -361,7 +361,7 @@ async function installCMake () {
361361
}
362362
}
363363

364-
async function installGit () {
364+
async function installGit() {
365365
switch (process.platform) {
366366
case 'win32': {
367367
const release = await octokit.rest.repos.getLatestRelease({
@@ -400,7 +400,7 @@ async function installGit () {
400400
}
401401
}
402402

403-
async function installPython () {
403+
async function installPython() {
404404
switch (process.platform) {
405405
case 'win32':
406406
const tags = await octokit.rest.repos.listTags({
@@ -457,7 +457,7 @@ async function installPython () {
457457
}
458458
}
459459

460-
async function checkPython () {
460+
async function checkPython() {
461461
switch (process.platform) {
462462
case 'win32':
463463
/*
@@ -510,7 +510,7 @@ async function checkPython () {
510510
}
511511
}
512512

513-
function unpackPsyq (destination) {
513+
function unpackPsyq(destination) {
514514
const filename = vscode.Uri.joinPath(
515515
globalStorageUri,
516516
tools.psyq.filename
@@ -666,7 +666,7 @@ const tools = {
666666
}
667667
}
668668

669-
function checkLocalFile (filename) {
669+
function checkLocalFile(filename) {
670670
return new Promise((resolve) => {
671671
filename = vscode.Uri.joinPath(globalStorageUri, filename).fsPath
672672
fs.access(filename, fs.constants.F_OK, (err) => {

0 commit comments

Comments
 (0)