andrewmd5 / orion

a command-line game launcher for the Game Porting Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure that brew is in the environment

vesper8 opened this issue · comments

commented

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

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)
commented

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 : )

commented

try this release and lmk if it works: https://github.com/andrewmd5/orion/releases/tag/0.0.5

commented

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!

commented

Does this command work?
arch -x86_64 zsh -c 'eval \\\"$(/usr/local/bin/brew shellenv)\\\"; brew list game-porting-toolkit'

commented

@Tps-F no that command results in arch: posix_spawnp: zsh: Bad CPU type in executable

commented

I think you don't install Rosetta
try this
softwareupdate --install-rosetta

commented

@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.

commented

@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.

Can you run this and share what it says?
orion.zip

commented

@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.

Also, here is another build that uses zsh directly instead; let me know if either work.
orion.zip

commented

@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!

commented

@Tps-F

arm64 and x86_64 are indeed the two return values for those two commands.

I'm using iTerm2 and using zsh

@andrewmd5

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.
commented

@vesper8

Sorry for the delay, but I was able to reproduce the problem on my end.
You were right, it depended on the brew path.

commented

@Tps-F

arm64 and x86_64 are indeed the two return values for those two commands.

I'm using iTerm2 and using zsh

@andrewmd5

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