Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What process would I follow to port my game from Windows to Mac?  (Read 1775 times)

0 Members and 1 Guest are viewing this topic.

John6

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hi all,

I am nearly finished creating a game in SFML for windows. I used visual studio as my environment. I want the game to be playable on OSX as well, but I'm not sure how much work it will take. The instructions to build on Mac using XCode are clear, but I'm wondering if there is a way to simply convert my already made windows project into one that will run on a Mac. Any advice or resources would be greatly appreciated.

Thanks,
John

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: What process would I follow to port my game from Windows to Mac?
« Reply #1 on: July 21, 2020, 06:17:21 pm »
do you mean to convert your windows .exe to a mac aplication? I wouldn't agree to that. its better to simply compile it again in an OSX. same for Linux based distros...
Visit my game site (and hopefully help funding it? )
Website | IndieDB

John6

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: What process would I follow to port my game from Windows to Mac?
« Reply #2 on: July 21, 2020, 06:22:15 pm »
I'm just unfamiliar with the process. What would be the simplest way to do that? Would I just open Visual Studio on a Mac, download my project from github, try to compile it, and just start fixing any emergent bugs? Would I have to recreate the project from scratch and then copy paste the code in each file?

Thanks for your help!

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: What process would I follow to port my game from Windows to Mac?
« Reply #3 on: July 21, 2020, 06:35:47 pm »
I dont know if there is Visual Studio for MAC, but it would be something like that. you just take your code and compile it again in a OSX. you don't need to copy/paste all the code, just use the same files (.c, .cpp, .h, .hpp, etc). they are text files, so they work everywhere.
an easier way would be using crosscompilers. OR you can use a virtual machine to compile your program.
« Last Edit: July 21, 2020, 06:38:57 pm by Stauricus »
Visit my game site (and hopefully help funding it? )
Website | IndieDB

John6

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: What process would I follow to port my game from Windows to Mac?
« Reply #4 on: July 21, 2020, 06:37:53 pm »
Awesome, I appreciate the help. I just checked it out and I think there is visual studio on Mac. It would be really helpful to reuse the exact same project file because of all of the various compile settings in visual studio that will carry over. If that doesn't work for whatever reason I'll just try the same thing on XCode. Thanks again!

EDIT:

It looks like CrossCompiler was the magic word! This seems to be the exact solution to my problem, I can just add a build option for linux and for Mac. This is great!

https://devblogs.microsoft.com/cppblog/using-visual-studio-for-cross-platform-c-development-targeting-windows-and-linux/

EDIT2:

Woops, it looks like I jumped the gun on posting. The crosscompiler on visual studio seems to only be for Linux. Looks like the best option is still just to use a mac.
« Last Edit: July 21, 2020, 06:43:40 pm by John6 »

 

anything