Author Topic: OXCE running on MacOS 12  (Read 685 times)

Offline aaronrolls

  • Sergeant
  • **
  • Posts: 11
    • View Profile
OXCE running on MacOS 12
« on: March 28, 2022, 09:10:04 pm »
I was able to build and run the iOS version of OXCE natively on my M1 Mac(On MacOS 12 Monterey) without any trouble. Obviously the controls are designed for mobile so it make things a little more difficult than the original.

I have two questions, how hard would it be change the control scheme from the current mobile one back to a desktop one?

And how do I add mods such as Xcom Files to iOS OXCE prior to build? 

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7485
    • View Profile
Re: OXCE running on MacOS 12
« Reply #1 on: March 28, 2022, 09:56:20 pm »
I have two questions, how hard would it be change the control scheme from the current mobile one back to a desktop one?

I don't know, I've just literally blindly ported sfalexrog's work on OXC for iOS to OXCE for iOS.

But my guess would be that if you know what you're doing (unlike me), it shouldn't be too hard.

And how do I add mods such as Xcom Files to iOS OXCE prior to build?

OXCE discourages integrating custom mods into the standard build (`standard` folder).
There are a few lines of code that check for this (in `FileMap.cpp`)... you could remove that check and put your custom mods into the `standard` folder.

But officially, I still recommend installing custom mods into the `mods` folder.
You can find out the location of the `mods` folder in the `Options > Folders` GUI

Offline aaronrolls

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: OXCE running on MacOS 12
« Reply #2 on: March 29, 2022, 06:43:27 am »
Quote
But officially, I still recommend installing custom mods into the `mods` folder.
You can find out the location of the `mods` folder in the `Options > Folders` GUI

Thanks, I didn't realise that it told you the locations in the game.

Quote
I don't know, I've just literally blindly ported sfalexrog's work on OXC for iOS to OXCE for iOS.

But my guess would be that if you know what you're doing (unlike me), it shouldn't be too hard.

I'm not a professional programmer ether but I know enough to get a rough idea of what is going on so I'll take a look and see if I can sort it out for myself.

Thanks for your help.

Offline aaronrolls

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: OXCE running on MacOS 12
« Reply #3 on: April 01, 2022, 03:55:10 am »
Would someone be able to try this Compiled Xcom .app for me on an Apple Silicon device? I suspect it will only run on my Mac but I don't have another one to try.

It doesn't come with the UFO game files so you will need to add them yourself.

If it does work, keep in mind that this is based off the iOS version of the game. This means it runs nativity on Apple Silicon but it also means that it has mobile controls.
I am in the process of adding the desktop controls back to the game but it is not complete.

Install:

Add UFO files too "OpenXcom Extended.app/Wrapper/OpenXcom Extended.app/bin/UFO"

You can open an .app archive by right clicking and selecting "Show Package Contents".

Changes I have made so far:

  • Added Keyboard Shortcut Support - All Shortcuts other than "ALT", "CMD", "CTRL", "SHIFT" and "ARROW KEYS" should work.
  • Due to "ALT", "CMD", "CTRL" and "SHIFT" not working I have made the touch controls show by default on the Battlescape
  • Since right and middle click do not work, I added a double click feature on the purchase/Sell/Equip Craft screens that lets you double click instead of middle click to see stats.
  • I fixed the music playing too fast. I am not an audiophile so please let me know if it is playing at the right speed.
  • Added the Quit button back to the main menu and made it actually quit the app.
  • Changed the fat extended menu buttons to thinner desktop ones
  • Removed all window modes but windowed. For some reason they would mess with where the game thinks the mouse is.

General Advice

In the MacOs Xcom Preference(open by pressing cmd + `), turn Touch Alternatives to On.
This will enable you to use your track pad or magic mouse to move around the globe and battlescape.
But it will disable keys "wasd" and "space" so you might want to remap any shortcuts that use those keys.

Turn Off "Swipe to Turn" in the advanced Settings in game.


Please let me know if it runs.

Download:

https://www.icloud.com/iclouddrive/062AQLbrjciziXw1HfUKFVB6Q#OpenXcom_Extended

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7485
    • View Profile
Re: OXCE running on MacOS 12
« Reply #4 on: April 02, 2022, 09:08:19 am »
Can you try this build? https://openxcom.org/forum/index.php/topic,6596.msg145018.html#msg145018

They say it works for them on MacOS 12.

Offline aaronrolls

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: OXCE running on MacOS 12
« Reply #5 on: April 07, 2022, 03:24:30 am »
Thanks for that. It runs, but it runs through rossetta. Performance is quite bad compared to the iOS version. I built it on Xcode and it builds and runs on my m1 Mac natively but only when run from Xcode. Launching the .app crashes with what I believe is a signing error.

I don't know enough about this to fix it unfortunately.

Offline aaronrolls

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: OXCE running on MacOS 12
« Reply #6 on: April 07, 2022, 03:54:40 am »
I think I fixed it. It won't compile as a universal binary but here is a version for Apple Silicon.

If there are any issue, please let me know.