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

Author Topic: After building the examples, at least 2 things to be done for an example  (Read 8344 times)

0 Members and 2 Guests are viewing this topic.

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
For example, in the example "pong", there is a "resource" directory, in which there are two files (ball.wav & sansation.ttf), after building, in the project directory, there is no "resource" directory, but the directory is of course part of the project.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Are you saying that, the project files generated by CMake don't list the resource directories in the file browser?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
yes

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Quote
The issue is that it has been done when installing, why not when generating the solution for vs2013?
There are two distinct steps here. The first one is to use CMake to generate the projects that will help you build SFML and its examples with your favorite IDE / compiler. The second step is to use your favorite IDE / compiler to build and install SFML and its examples. After building, you're just in an intermediate step, you must not directly use what's inside your build directory. To complete the process you must build the INSTALL rule, to get a clean SFML SDK. After installing, all the examples will have their resources directory copied in the right location, so that you can directly execute them.
Laurent Gomila - SFML developer

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
OK, this is fine enough to generate the bin files with header files.
If the examples' projects can include the "resources" directories, it'll be better.
It'll e even better if the examples' projects could be run after building in Visual Studio, I mean they can find the dlls.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
What's the point? These examples are meant to be built and installed. You're not supposed to play with them in the generated solution; if you want to use one of the examples for your own experimentations, then create a separate project and copy the source code.
Laurent Gomila - SFML developer

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
If it is just for installing, then no problem.
Some how, I agree that the examples should not be modified, they should be in plan for installing.
My original point is that hoping it is perfect in the viewpoint, I mean when it is as a project, it should be able to compile and run. Now it should not be.