Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 2.3 to be built and run w/ MSBuild and Wine+Mono on GNU+Linux #1237

Merged
merged 1 commit into from
Nov 4, 2018
Merged

Conversation

YoshiRulz
Copy link
Member

@YoshiRulz YoshiRulz commented Jul 2, 2018

Tested on Manjaro, Linux 4.18.0-1-MANJARO, MSBuild 15.6.0.0 (msbuild-stable on the AUR), Mono 5.12.0 (extra repo), Wine 3.11 (multilib repo, needed for its bundled libraries).

Changes:

  • Update to latest OpenTK, add input code from mono-portable branch (kudos), and fix bugs arisen from version differences
  • Move some functionality into Win-specific classes and add Wine+Mono implementation where simple
  • Add conditions to main loop so some things only run on Windows

Steps to build and run (edit: this has since changed, check the readme):

msbuild BizHawk.sln
cd output
ln -s dll/nlua/NLua.dll   # not sure why, but putting this in LD_LIBRARY_PATH wasn't working
LD_LIBRARY_PATH="/usr/lib/wine" mono EmuHawk.exe

I promise no functionality beyond Help>About.


followed by #1430

- Update to latest OpenTK, add input code from `mono-stable` branch
(kudos), and fix bugs arisen from version differences
- Move some functionality into Win-specific classes and add Wine+Mono
implementation where simple
- Add conditions to main loop so some things only run on Windows
@vadosnaprimer
Copy link
Contributor

vadosnaprimer commented Jul 2, 2018

Every time I see something like this, I call my friends and we celebrate!

Does this mean the current releases of bizhawk start working on linux? It's just unbelievable, due to all the crazy problems Wine had with bizhawk 2.x.

Also, can you attach the build package so we could test it on linux?

@YoshiRulz
Copy link
Member Author

@vadosnaprimer: If by "build package" you mean a compiled copy, I've uploaded it to my personal Google Drive here where it'll be available for a while. If you meant a build script as in PKGBUILD, I'll be submitting one to the AUR once I can get close to feature-parity w/ Windoze.

@xy2i
Copy link

xy2i commented Jul 2, 2018

I am trying to run the binary provided above with Nix for reproducibility, however I am running into runtime errors:

https://user-images.githubusercontent.com/14931040/42176579-b7bec4ce-7e29-11e8-85ff-7f7b200cb6d0.png

Mono 5.8, wine 3.3. I am confused as the libs are present in the lib/wine path yet they don't seem to be getting picked up.

@YoshiRulz
Copy link
Member Author

@xy2ii I don't know what to tell you. Perhaps the copy of Wine on Arch/Manjaro comes with these extra libraries but your distro separates them into another package? I suggest you search your computer for d3dx9_43.dll to see if it's simply stored elsewhere.

@xy2i
Copy link

xy2i commented Jul 4, 2018

Well, stuff works now. Core load (NESHawk)) crashes, as mostly expected.
screenshot_20180704_192753

For posterity (and feos, since he is asking in IRC): I got it to run by spinning a Manjaro instance. Install wine from multilib and mono from extra. Then, following OP's steps, run BH with LD_LIBRARY_PATH="/usr/lib/wine" mono EmuHawk.exe. For building bizhawk, follow the first three steps of the first post.

It didn't work with my distro because no multilib on wine.

Also, Config > Sound crashes on the mono side. I'll extend if needed.

@Gnuk
Copy link

Gnuk commented Jul 29, 2018

On Arch Linux, latest update, i've an error message when I open a game:

Games I open:

  • Castlevania Aria of sorrow (GBA)
  • Chou makaimura (SFC) (Japanese version of Super Ghoul's n ghosts)

Trace:

System.NullReferenceException: Object reference not set to an instance of an object
  at BizHawk.Client.EmuHawk.MainForm.<ProcessInput>b__94_0 (System.Tuple`2[T1,T2] o) [0x00028] in <20767738e2694b109e8265fc343e1fa5>:0 
  at System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].MoveNext () [0x00048] in <10ce10dbd2d94d228d3c3a736756184a>:0 
  at BizHawk.Client.Common.SimpleController.AcceptNewFloats (System.Collections.Generic.IEnumerable`1[T] newValues) [0x0002c] in <d7c83fb72cd94c44805bf849b8692fc9>:0 
  at BizHawk.Client.EmuHawk.MainForm.ProcessInput () [0x00277] in <20767738e2694b109e8265fc343e1fa5>:0 
  at BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop () [0x00055] in <20767738e2694b109e8265fc343e1fa5>:0 
  at (wrapper remoting-invoke-with-check) BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop()
  at BizHawk.Client.EmuHawk.Program+UnixMonoMainLoopCrashHandler.TryCatchFinally (System.String[] args) [0x00021] in <20767738e2694b109e8265fc343e1fa5>:0 

screenshot_20180729_112932

@YoshiRulz
Copy link
Member Author

@Gnuk I never said you'd be able to load a ROM... though I suppose it's good to know exactly which cores crash (I'd simply assumed all of them would). I've edited these into a list in the first comment, assuming you were using VBANext and Snes9x.

Copy link
Contributor

@adelikat adelikat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty solid, don't think it has any downsides to merging

@vadosnaprimer
Copy link
Contributor

We're not yet releasing, so we'll have time to test.

@vadosnaprimer vadosnaprimer merged commit ca021d9 into TASEmulators:master Nov 4, 2018
@YoshiRulz YoshiRulz added the re: Multiplatform Relating to the Linux and macOS ports (Mono Framework, and eventually .NET Core) label Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: Multiplatform Relating to the Linux and macOS ports (Mono Framework, and eventually .NET Core)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants