Page 1 of 1

[Patch] Full macOS / Mac OS X support

Posted: Sun 12 May, 2019 11:10 pm
by kyr0
Hi :)

first of all thank you for this project and the immense amount of work you invested in PCem. It is a pleasure for me to use it and play my childhood games again. The emulation is awesome and proofs to be far ahead of DosBox in accuracy and performance for my use cases.

However, I found it a bit inconvenient to manually patch the sources, compile and mess with config paths when I use PCem on my Macbook. Also, creating and loading CD ROM images proofed to be far more complicated than I thought on Mac. Finally I was wondering why OpenGL 3 rendering wasn't enabled because Mac OS X would support it for window contexts in general.

Well, I accepted that as a challenge and invested this weekend to fix all these issues with the motivation to give a little bit back:
- Implemented an automated build process for Mac OS app bundles and DMG installers
- Changed the PCem path location as by Apple standard for Macs (to use ~/Library/Application Support/PCem). Path gets auto-created if the folder doesn't exist
- Implemented a OS/Finder extension to create MS DOS compatible (ISO 9660 joliet) images from directories with 1 click: https://github.com/kyr0/MacOS-Finder-Co ... o-CD-Image
- Implemented experimental OpenGL 3.0 support and upgraded the shader versions (branch: opengl3)

I did also release the .dmg installer file as a beta to test for Mac users. Known issues are noted on GitHub and as GitHub issues but so far everything I tested works (nothing critical): https://github.com/kyr0/PCemV14MacOSX/releases

I marked everywhere that this is unofficial. It's based on the v14 linux release sources.

Code & docs:
https://github.com/kyr0/PCemV14MacOSX

@SarahWalker I wrote a detailed description of my changes for you in case you'd like to apply my changes. I'd also offer to volunteer for a PCem 15 mac release if official support is desired.

Issues: https://github.com/kyr0/PCemV14MacOSX/issues

Those issues are all very much "minor" and are no deal-breaker at all. If you could give me a hint where to fix them in the code I would like to try to fix them all.

Again, thank you for the great work on PCem. As a programmer I do really see the great achievements made. I'm impressed by your long-term motivation and overall commitment and code quality. Thank you for the clean code. I was able to learn something new from your code and it was a pleasure to work with the code base.

The diff: OpenGL 3 on Mac: https://github.com/kyr0/PCemV14MacOSX/compare/opengl3
The diff: Mac support in general: https://github.com/kyr0/PCemV14MacOSX/c ... db0bc5c8d8

Greetings from Munich,
Aron

Re: [Patch] Full macOS / Mac OS X support

Posted: Wed 22 May, 2019 6:44 pm
by vga256
Really appreciate your hard work Aron. I tried to run the packaged DMG, unfortunately it produces a lot of missing library errors.

Code: Select all

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Applications/PCem.app/Contents/MacOS/./libwx_osx_cocoau_xrc-3.0.dylib
  Reason: image not found

Code: Select all

dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib
  Referenced from: /Applications/PCem.app/Contents/MacOS/./libwx_osx_cocoau_xrc-3.0.dylib
  Reason: Incompatible library version: libwx_osx_cocoau_xrc-3.0.dylib requires version 13.0.0 or later, but libjpeg.9.dylib provides version 12.0.0
And there are likely more missing deps, but I haven't bothered to install more libraries via brew yet. Rather than installing via brew, is there a way of including the dependencies in the .app package?

Re: [Patch] Full macOS / Mac OS X support

Posted: Fri 26 Jul, 2019 7:08 pm
by kyr0
Hi vga256,

first of all, sorry for the huge delay in responding. I'm typically not online here and for some magical reason I didn't receive any email notification (or didn't see it :)
I activated notifications for now.

Well, I'm sorry that the .dmg didn't work for you. I was aware of this issue in general and checked the binary and dmg for all external libraries linked but it seems that I left out libpng. If you like, you can open an issue on my github repo. If you'd like to help me further, you could checkout:

https://github.com/kyr0/PCemV14MacOSX/b ... dle-sh#L28

As you can see, these are the steps to copy the dependent libs into the app image and replace the links. Then you can check if the libs of the app image are used by checking the binary with "ld".

The error "Incompatible library version:" is interesting, what OS X / MacOS version are you using?

Thank you for testing and best,
Aron

Re: [Patch] Full macOS / Mac OS X support

Posted: Sat 24 Apr, 2021 7:39 am
by Cheez
elsen wrote: Fri 23 Apr, 2021 4:48 pm kyro,
Does not work, please go fuck yourself, thank you.
wow?? how about you go fuck YOUR self? you created an account just to be a shithead to someone who wasn't even talking to you, over something that nobody has to do for you or anyone else. You didn't even provide any sort of information about anything, so nobody can help your stupid ass.

Re: [Patch] Full macOS / Mac OS X support

Posted: Sat 24 Apr, 2021 8:38 am
by kyr0
Thank you Cheez! Well, if I would take it personally, the guy doesn't deserve any response, but I see that he/she must have had a very bad time and/or lives a pretty poor and sad life/situation atm... so I'm better sorry for the person.

btw there has been more and more positive community support with the initial project to bring PCem to the Mac platform and we've built a small community now. There is even growing support to port the code to support the new ARM based Apple CPUs (M1).

V15, V16 and recently V17 has been ported.

Here is the GitHub org and community: https://github.com/PCemOnMac

Re: [Patch] Full macOS / Mac OS X support

Posted: Mon 26 Apr, 2021 7:34 am
by SarahWalker
Apologies for slack moderating, offending post has been removed and idiot has been banned.

Re: [Patch] Full macOS / Mac OS X support

Posted: Mon 26 Apr, 2021 7:35 am
by SarahWalker
kyr0 wrote: Sat 24 Apr, 2021 8:38 am V15, V16 and recently V17 has been ported.

Here is the GitHub org and community: https://github.com/PCemOnMac
Glad to see this is still going, but any plans to merge back to mainline?

Re: [Patch] Full macOS / Mac OS X support

Posted: Wed 19 May, 2021 7:53 am
by Madd the Sane
Looks like you can get the gist of the changes by comparing commits: https://github.com/PCemOnMac/PCemV17mac ... 690...main

Re: [Patch] Full macOS / Mac OS X support

Posted: Wed 19 May, 2021 10:22 pm
by Madd the Sane
I have created a pull request based off of these patches here: https://github.com/sarah-walker-pcem/pcem/pull/14
If there's any question on the changes, ask me: I'll try to answer.