SFML community forums

General => SFML projects => Topic started by: Filosof on March 16, 2016, 02:32:59 pm

Title: How to make a release?
Post by: Filosof on March 16, 2016, 02:32:59 pm
Hello dear friends!

I faced with a problem to release my game. I mean I have no clue how to make it separate from my computer and launch on another. For example, I need to send it to my friends and colleagues so they could see it.
Didn't find common information all over the internet.
Please provide me with some hint towards to a right direction.

Thanks in advance!
Title: Re: How to make a release?
Post by: Arcade on March 16, 2016, 03:53:51 pm
There are several ways to go about this. What error are you getting on your friend's computer when they try to run it?

 If you are linking SFML and dependencies statically then you can just give out your executable and it should work.

On Windows, if you are linking dynamically, then you can distribute the SFML DLLs with your executable. You can just put them all in a folder with your exe, zip them up, and give that to your friends, for example. You may also need to install the VC++ redistributable on your friend's computer (or bundle those necessary DLLs with our program as well).

If linking dynamically on Linux, you can take a look at this thread (http://en.sfml-dev.org/forums/index.php?topic=19813.msg142623) for some ideas.

I'm not really sure how things are done on OS X, but this thread  (http://en.sfml-dev.org/forums/index.php?topic=13217.msg92603)might be helpful.

You may be able to find a lot more related threads by searching the forums.
Title: AW: How to make a release?
Post by: eXpl0it3r on March 16, 2016, 05:33:34 pm
The simplest way is to just pack everything into a 7zip or any other archive format and upload it somewhere, for example itch.io or indiedb or even Dropbox.

What OS are you working on? What compiler do you use? How do you link SFML? How do you link the runtime library?
Title: Re: How to make a release?
Post by: Filosof on March 17, 2016, 10:22:42 pm
Guys, thanks for your answers. I am a student only and my knowlege is not so deep.
Im working on Win7x64 and runnig on VS2013.
I am attaching screenshots so you could see how I am linking the SFML library.
The dll files are plased in: C:\Users\PAVLENTIY\Desktop\Dropbox\STEP\C\Projects\Chess-SFML\Debug

If you need more information please ask. I will provide.
It is very nessesary for me to make it done...
Title: Re: How to make a release?
Post by: Hapax on March 18, 2016, 02:06:24 am
It looks like you're linking dynamically. Correct?

Build the application in Release mode (not Debug mode), and check to make sure that it works by double clicking on the built executable (probably in "SolutionDir"/Release/).
If it works okay, all of the files you need should be in that Release folder: *.exe, *.dll, any files that you access via the program itself (resources etc.).
Title: Re: How to make a release?
Post by: Mörkö on March 18, 2016, 03:45:24 am
It really sucks that it is not completely obvious and a 100% solved and documented way how to share programs with other people. Some super clean and just totally reliable mechanism for doing it should exist by now.
Title: AW: Re: How to make a release?
Post by: eXpl0it3r on March 18, 2016, 07:46:38 am
It really sucks that it is not completely obvious and a 100% solved and documented way how to share programs with other people.
Once you understand what DLLs are, what the runtime libraries are, how working directory and relative paths work, it's completely obvious. Also note that all these concepts are not directly related to SFML, but are general things a programmer just has to learn and it's not SFML's job or purpose to teach people, how to become a programmer. ;)
Title: Re: How to make a release?
Post by: SeriousITGuy on March 18, 2016, 09:27:02 am
The easiest way is just trying it, simple as that. ;)

A binary will report what it is missing to run, whether it is Windows or Linux doesn't matter.
Get yourself Virtual Box, on of the best and (partially) free virtualization software, and it runs on every major OS. Get it, install a fresh Windows VM without a development environment, put your executable on it and run it. First thing it will complain about will be Microsoft C/C++ runtime, msvcr120.dll in your example, then SFML dll's, then your game assets, ..., you get the point.
Get yourself a good book on basic C++ and teach yourself how the C++ tool chain works. The sooner you get around that, the better.
Title: Re: AW: Re: How to make a release?
Post by: Mörkö on March 18, 2016, 11:53:15 am
Once you understand what DLLs are, what the runtime libraries are, how working directory and relative paths work, it's completely obvious.
I understand what those things are, and how they work. It is still not completely obvious to me how to share programs with other people in a hassle free way. I'm able to do it, but it's a hassle every time, mostly because of cross-platform compatibility related issues going from linux to windows.

Also note that all these concepts are not directly related to SFML, but are general things a programmer just has to learn and it's not SFML's job or purpose to teach people, how to become a programmer. ;)
Who said it's SFML's job to teach people how to become a programmer? I didn't, so that reply to my post is a non sequitur. If you disagree, then clarify why you believe my post somehow implies that it's SFML's job to teach programmers how to share programs.