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

Author Topic: SFML.Net and Mono with Ubuntu (Linux?) Guide  (Read 4488 times)

0 Members and 1 Guest are viewing this topic.

chilliboy999

  • Newbie
  • *
  • Posts: 16
    • View Profile
SFML.Net and Mono with Ubuntu (Linux?) Guide
« on: January 13, 2014, 09:07:26 pm »
Hey guys,
I will show you how to install SFML .Net and Mono under Ubuntu.
Because there are many hints in this forum, but no actual Guide.

Note:
You don't need to compile any libraries  ;D

Dependencies:
-libjpeg
-libglew

First of all, you install Mono and Monodevelop:
sudo apt-get install mono-devel
sudo apt-get install monodevelop

After you installed these programs, you have to download the
SFML .Net, CSFML and SFML libraries. (32Bit or 64Bit)

Then you create a directory for your SFML libraries and copy all
*audio*, *graphics*, *window* and *system* libraries in this directory.

Now you must „register“ your libraries:
Create a *.conf file in /etc/ld.so.conf.d with your SFML library path in it.
Now run the following command:
sudo ldconfig

Now you have to map your dll's:
Edit the config file in /etc/mono/ and add your dllmaps
<configuration>
...
<dllmap dll="csfml-graphics-2" target="libcsfml-graphics.so.2" />
<dllmap dll="csfml-window-2" target="libcsfml-window.so.2" />
<dllmap dll="csfml-audio-2" target="libcsfml-audio.so.2" />
</configuration>

Start a new monodevelop project, add your sfmlnet dll's, make sure the csfml*.dll's
and the sfmlnet*.dll's are in the same directory as your executable and it should be fine :)

Hauste,
Chilli
« Last Edit: January 17, 2014, 11:46:56 am by chilliboy999 »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML .Net and Mono with Ubuntu (Linux?) Guide
« Reply #1 on: January 13, 2014, 09:32:18 pm »
I would recommend, instead of editing the global configuration file, just add a configuration file to each project. This way you can redistribute the configuration file with your project.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

chilliboy999

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: SFML .Net and Mono with Ubuntu (Linux?) Guide
« Reply #2 on: January 13, 2014, 09:34:18 pm »
Yes, I know, I tried to add a configuration file to my project, but it didn't work :/
With the global config-file it works.

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Re: SFML .Net and Mono with Ubuntu (Linux?) Guide
« Reply #3 on: January 13, 2014, 10:23:40 pm »
Quote
I tried to add a configuration file to my project, but it didn't work :/
Try adding two files similar to these in your project:

sfmlnet-window-2.dll.config
<configuration>
    <dllmap dll="csfml-window-2" target="/usr/local/lib/libcsfml-window.so.2.1"/>
</configuration>

sfmlnet-graphics-2.dll.config
<configuration>
    <dllmap dll="csfml-window-2" target="/usr/local/lib/libcsfml-window.so.2.1"/>
    <dllmap dll="csfml-graphics-2" target="/usr/local/lib/libcsfml-graphics.so.2.1"/>
</configuration>

Thats how I got my projects working. I'm not sure if the full path to the files is really necessary though.
« Last Edit: January 13, 2014, 10:26:54 pm by texus »
TGUI: C++ SFML GUI