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

Author Topic: Porting question  (Read 1309 times)

0 Members and 1 Guest are viewing this topic.

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Porting question
« on: January 05, 2014, 10:13:14 pm »

Hello developers ! For quite some time I`m making a game and now that its playable i want to give it to a friend and he has Linux.The problem its that i dont know how to port it from windows 7 to linux.Can someone give me some help? Thanks !

P.S:I`m also intersted in knowing how to port to mac too :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Porting question
« Reply #1 on: January 05, 2014, 10:44:02 pm »
You will of course need a Linux OS running (I advise against cross-compilations). For that I suggest you get VirtualBox or any other VirtualMachine that can run a Linux distro. Then install the distro of your choice (maybe make it match your friend ones) and install all the needed development tools (GCC, etc.).

After everything is up and running, you can get your Windows code and try to compile it. If you've written good platform-in-depended code, things could even compile. Otherwise you'll have to go and add some #ifdef WIN32 preprocessor directives or abstract it as nicely as SFML does with its code and implement the Linux part.

It will be time consuming for sure! ;)

Btw. for Linux you can most of the time also bundle your Windows application with WINE (WINE Is Not an Emulator) and it should run on Linux.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Murii

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: Porting question
« Reply #2 on: January 06, 2014, 07:08:52 am »
Thanks for your answer ! This still applies to C# port of Sfml right?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
AW: Porting question
« Reply #3 on: January 06, 2014, 07:52:56 am »
Kind of yes. You'll however have to install the Mono tools (.NET framework for Linux & Mac) and have to genetally work with other tools, but you'll have to get yourself a Linux disro.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything