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

Author Topic: SFMLEasy - Compile the lib quickly  (Read 5495 times)

0 Members and 1 Guest are viewing this topic.

msteve

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • idevlog
SFMLEasy - Compile the lib quickly
« on: July 20, 2014, 11:11:39 pm »
Hello everyone,

I created a small program to help people to easily compile SMFL. I created it because when i began to use sfml i was very discouraged because of the recompil.

So this small program can help you if you want to compil the sfml.
At the beginning you must set paths for Mingw, master, cmake and start the compilation.

You must provide the path to of your minGW and if you dont have cmake or master, just type "auto" and the sofware will download it for you.

Then you type "easy install" for compilation.
Note: On my computer I have to disable antivirus to run this command.

If you want to reconfigure type "easy config".
And using type "help"

You just need to download on github: https://github.com/smagras/SFMLEasy
And run the .bat (which launches the .jar)  because i have code this in java.

If you use the auto config, the lib will be in the download folder in master.


I hope it will please you and it will help some people because I love sfml but it's so painfull to install when you don't know ^ ^ "

Tell me if you have problems and I'm trying to fix them. I will try to add features soon and if you have any idea you can participate =)

PS: I'm french, i'm sorry for the langague.

Steve.

Strelok

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • GitHub
Re: SFMLEasy - Compile the lib quickly
« Reply #1 on: July 20, 2014, 11:40:52 pm »
 If you're not able to compile a library with excellent documentation and tutorials why even try using it? Why force the user to have java installed?

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: SFMLEasy - Compile the lib quickly
« Reply #2 on: July 21, 2014, 12:11:59 am »
If anything requires me to disable my antivirus to be able to use it, it has to have a very good reason and be extremely worth it. I don't see how this covers either of those things.
I don't understand why people would want an automatic way to compile SFML when there are two ways to use it that cover everyone already: build it yourself, use a pre-built version.

@Strelok: building a library and having fun using it are two very different things  ;D
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFMLEasy - Compile the lib quickly
« Reply #3 on: July 21, 2014, 12:14:24 am »
Everything you just described... its exactly what cmake already does  :-\

So why build another wrapper on top of it that really doesn't add anything except limit you to mingw...  :P
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

msteve

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • idevlog
Re: SFMLEasy - Compile the lib quickly
« Reply #4 on: July 21, 2014, 12:23:54 am »
I never said that the documention was bad, it's an exelent documentation! But when I'have start whit sfml it was very dificult for me to install and the only way for me to use sfml was the compilation, but I have lost many hours to understand why it's don't work... I had alway some littel problems to finish the compil and thats very exhausting when are blocked by just a configuration problem... It could be discouraging...

So when I had problems, I would use an application that could do that in my place, I would avoid wasting a lot of time ... So I want to share this littel tool whit the community to help others people in the same case =)

I use SFML because that's a very cool and powerfull lib. And for Java, you'r right but many pepole have java. But I will try to convert in exe, i see that it maybe possible.

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: SFMLEasy - Compile the lib quickly
« Reply #5 on: July 21, 2014, 12:45:37 am »
cmake-gui already does everything and gives you more choices, you can choose any compiler from the menu and set all paths and other settings. Additionally, when writing a 4 line .bat file would be sufficient requiring java is a bit much or?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFMLEasy - Compile the lib quickly
« Reply #6 on: July 21, 2014, 08:39:25 am »
There are meanwhile a lot of these "helpful tools" for SFML... and usually, the developers lose interest after some time and don't support the tool any longer, leaving people who want to use it standing in the rain.

My opinion is still that one should learn the right way (namely how to link and build C++ libraries) from the beginning, as those tools only seem to hide the complexity. Instead of working with CMake which is generic enough to be used by thousands of other software products, one has to learn your tool, which is very specific to an SFML version, and comes with high restrictions (Java-based, AntiVirus disable!?). Using CMake is really not difficult, especially given the excellent documentation. What may be more challenging is building own projects with CMake, but then that's a different story anyway.

See also here.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

msteve

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • idevlog
Re: SFMLEasy - Compile the lib quickly
« Reply #7 on: July 21, 2014, 10:40:25 am »
When I used cmake-gui I had some problem too... I was maybe very bad, but I hate to lose time with configuration. Personaly I prefear spend my time to learn how to use the SFML than learn how to install it. And that why I make that, all pepole are not comfortable whit the compilation, and i was one of this. With SFMLEasy you just have to specify the path of minGW and bam! you have your sfml ready to use!

Your right when you say that its limited by only minGW, but I dont use other so... Maybe in the futur^^

For the antivirus i found that  is cmake the problem not java, do you know why the alarm start when i want to cmake? :/
Quote
cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=TRUE c:/path...

I'm sorry if you think that app was useless, I don't force anybody to use it. I just hope that it could help some newbee like me to install this lib.
« Last Edit: July 21, 2014, 10:47:35 am by msteve »

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Re: SFMLEasy - Compile the lib quickly
« Reply #8 on: July 21, 2014, 03:37:26 pm »
It's possible java launching another program that your antivirus is having issue with. Or that it simply is false-alarming something cmake does. Anti-viruses and development tools tend not to get along, so personally I just do all development in one folder and have my Anti-Virus set to disable looking in my development folder. Perhaps not the safest of options, but since otherwise every antivirus I've found eventually trips over something to do with compilation or running self-compiled programs...

As for this as a tool, well...for SFML alone it's two lines of cmake in the command line:
Code: [Select]
cmake ${SFML_DIR} -G "${GENERATOR}" -DCMAKE_BUILD_TYPE="${BUILD_MODE}" -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
cmake --build . --config ${BUILD_MODE} --target install

More value would be in a generic tool that can support multiple libraries and compilers with caching and such, kinda like a NuGet for C++. I wrote the start of one for my university coursework, really need to pick it back up and get back to work on it (been a bit busy as of late with the job hunting and graduation from said university)...
« Last Edit: July 21, 2014, 11:23:55 pm by MorleyDev »
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

Grundkurs

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: SFMLEasy - Compile the lib quickly
« Reply #9 on: July 22, 2014, 01:27:33 am »
My opinion is still that one should learn the right way (namely how to link and build C++ libraries) from the beginning, as those tools only seem to hide the complexity.
I agree. I started coding on windows + visual studio express and though its pretty straight-forward and let you be productive it kind of spoiled me. I had literally no understanding of how using tool-chains and how everything (.hpp-files, libs, cpp-files, the compiler) is related to each other. However moving to Linux forced me to get my hands dirty and i started to compile my programs by hand. During this phase i learned a lot about programming in general and i'm really glad i did this step because it gave me a deeper understanding about whats going on. So if something didn't run as expected its nowadays much more likely that i'll figure it out in no time then back in the old days when i used these "helpful tools". That doesnt mean that i don't like a good workflow, powerful programs and helpful tools. Im just saying that in case of building software its not a bad thing to know whats going on and some software may cloud the view ;-)

 

anything