Ensure that brew is in the environment
vesper8 opened this issue · comments
This is a followup to #3
I'm using 0.0.4 now and still having an issue even after specifying the path to my brew file which was already located at the default anyway /usr/local/bin/brew
I get this error when trying to use Orion:
![Screenshot 2023-06-10 at 8 22 27 AM](https://private-user-images.githubusercontent.com/816028/244849269-23f40552-c600-4d5b-a5b8-c06160286452.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMTA1MzUsIm5iZiI6MTcyMTIxMDIzNSwicGF0aCI6Ii84MTYwMjgvMjQ0ODQ5MjY5LTIzZjQwNTUyLWM2MDAtNGQ1Yi1hNWI4LWMwNjE2MDI4NjQ1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QwOTU3MTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05OGJmNGVhYWQyZGMxYjgzZWJjMjgxNDFiZDBlMDhkZDQ3MjhiYTk4OWNjNTY1YzRmMWM5ODk3Mzk5ZDQ5YjNiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.R1VSDaIdhNWxIJWUQngW8RbGzDUF1vrCzoVSAbdYyjQ)
On my system brew
refers to /opt/homebrew/bin/brew
, and ibrew
refers to /usr/local/bin/brew
I believe the issue is on this line https://github.com/AndrewMD5/orion/blob/ed3e6a5f39776a33c8253045a0aa986a9adecf4c/orion/ShellWrapper.cs#L167
Shouldn't brew list game-porting-toolkit
be changed to $({BrewPath} list game-porting-toolkit
?
Indeed on my system if you type brew list game-porting-toolkit
you get
Error: No such keg: /opt/homebrew/Cellar/game-porting-toolkit
But if you type /usr/local/bin/brew list game-porting-toolkit
you get
/usr/local/Cellar/game-porting-toolkit/1.0/bin/function_grep.pl
/usr/local/Cellar/game-porting-toolkit/1.0/bin/widl
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine32on64
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine32on64-preloader
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine64
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine64-preloader
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winebuild
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winecpp
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winedump
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wineg++
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winegcc
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winemaker
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wineserver
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wmc
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wrc
/usr/local/Cellar/game-porting-toolkit/1.0/include/wine/ (1150 files)
/usr/local/Cellar/game-porting-toolkit/1.0/lib/external/ (13 files)
/usr/local/Cellar/game-porting-toolkit/1.0/lib/wine/ (2329 files)
/usr/local/Cellar/game-porting-toolkit/1.0/share/man/ (14 files)
/usr/local/Cellar/game-porting-toolkit/1.0/share/wine/ (133 files)
I would like to add that I've moved gameportingtoolkit
and the other two files to /usr/local/bin
so I can easily call them from anywhere.
And I've made modifications to those files as well to replace brew
by arch -x86_64 /usr/local/bin/brew
So perhaps what is needed her is for you to let us also specify the path to gameportingtoolkit
?
Everything works and I'm able to play dx12 games with my setup btw.
Hoping to be able to use your nifty cli tool soon : )
try this release and lmk if it works: https://github.com/andrewmd5/orion/releases/tag/0.0.5
Hrm.. I see you've updated that line, but I'm still getting the same error for some reason
orion
_
___ _ __ (_) ___ _ __
/ _ \ | '__| | | / _ \ | '_ \
| (_) | | | | | | (_) | | | | |
\___/ |_| |_| \___/ |_| |_|
No config file found. Would you like to create one now? [y/n] (y): y
Enter the path to your x86-64 Homebrew binary: (/usr/local/bin/brew): /usr/local/bin/brew
Enter the path to your Wine prefix: ~/dx12-gaming
Checking for dependencies...
An error occurred while checking for dependencies.
System.Exception: gameportingtoolkit is not functioning correctly. Ensure that brew is in the environment.
at async Task Ptk.ShellWrapper.EnsureGamePortingToolkitAvailability(CancellationToken cancellationToken)
at async Task Program.<Main>$(string[] args)
If I run
/usr/local/bin/brew list game-porting-toolkit
Then I get this output
/usr/local/Cellar/game-porting-toolkit/1.0/bin/function_grep.pl
/usr/local/Cellar/game-porting-toolkit/1.0/bin/widl
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine32on64
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine32on64-preloader
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine64
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wine64-preloader
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winebuild
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winecpp
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winedump
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wineg++
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winegcc
/usr/local/Cellar/game-porting-toolkit/1.0/bin/winemaker
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wineserver
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wmc
/usr/local/Cellar/game-porting-toolkit/1.0/bin/wrc
/usr/local/Cellar/game-porting-toolkit/1.0/include/wine/ (1150 files)
/usr/local/Cellar/game-porting-toolkit/1.0/lib/external/ (13 files)
/usr/local/Cellar/game-porting-toolkit/1.0/lib/wine/ (2329 files)
/usr/local/Cellar/game-porting-toolkit/1.0/share/man/ (14 files)
/usr/local/Cellar/game-porting-toolkit/1.0/share/wine/ (133 files)
Not sure what's wrong. Can you give me the full command that is being run so I can paste it in my terminal and see what's going on maybe?
Thanks!
Does this command work?
arch -x86_64 zsh -c 'eval \\\"$(/usr/local/bin/brew shellenv)\\\"; brew list game-porting-toolkit'
@Tps-F no that command results in arch: posix_spawnp: zsh: Bad CPU type in executable
I think you don't install Rosetta
try this
softwareupdate --install-rosetta
@Tps-F I have done that. To be clear the porting toolkit is fully working on my machine and I've already played dozens of games with it.
@vesper8
Can you give me information about the terminal you are using, etc.?
and I would also like to know the results of the following two
uname -m
arch -x86_64 uname -m
It is normal to come back with arm64
, x86_64
, in order from the top
@andrewmd5
I don't think you're asking me, but it works no differently than normal in my environment!
arm64
and x86_64
are indeed the two return values for those two commands.
I'm using iTerm2 and using zsh
Your latest zip file above just works.. no issues.. here is the output:
./orion
_
___ _ __ (_) ___ _ __
/ _ \ | '__| | | / _ \ | '_ \
| (_) | | | | | | (_) | | | | |
\___/ |_| |_| \___/ |_| |_|
No config file found. Would you like to create one now? [y/n] (y): y
Enter the path to your x86-64 Homebrew binary: (/usr/local/bin/brew): /usr/local/bin/brew
Enter the path to your Wine prefix: ~/dx12-gaming
Checking for dependencies...
All dependencies are installed.
Checking for updates...
No updates are available.
Enable HUD? [y/n] (y): n
Enable esync? [y/n] (n): n
Killing previous instances of Wine processes...
Launching Steam...
Press Command+C to exit.
Sorry for the delay, but I was able to reproduce the problem on my end.
You were right, it depended on the brew path.
arm64
andx86_64
are indeed the two return values for those two commands.I'm using iTerm2 and using zsh
Your latest zip file above just works.. no issues.. here is the output:
./orion _ ___ _ __ (_) ___ _ __ / _ \ | '__| | | / _ \ | '_ \ | (_) | | | | | | (_) | | | | | \___/ |_| |_| \___/ |_| |_| No config file found. Would you like to create one now? [y/n] (y): y Enter the path to your x86-64 Homebrew binary: (/usr/local/bin/brew): /usr/local/bin/brew Enter the path to your Wine prefix: ~/dx12-gaming Checking for dependencies... All dependencies are installed. Checking for updates... No updates are available. Enable HUD? [y/n] (y): n Enable esync? [y/n] (n): n Killing previous instances of Wine processes... Launching Steam... Press Command+C to exit.
great, i’ll get a release out with my fixes
fixed in v0.0.7