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

Author Topic: Why are there no resources folder in example (opengl or pong)?  (Read 1316 times)

0 Members and 1 Guest are viewing this topic.

abcnb

  • Newbie
  • *
  • Posts: 12
    • View Profile
Why are there no resources folder in example (opengl or pong)?
« on: October 13, 2022, 07:52:01 am »
https://www.sfml-dev.org/download/sfml/2.5.1/ ---> Source code ---> CMake (SFML_BUILD_EXAMPLES) ---> MSVC ---> build.
Then \examples\opengl\Debug will not have resource folder with background.jpg, sansation.ttf and sansation.jpg.
Have I lost something?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Why are there no resources folder in example (opengl or pong)?
« Reply #1 on: October 13, 2022, 09:06:28 am »
Unlike C# there isn't an easy "copy to output" option for C++.
I suggest to build the install target, which should move the resources and executable into the same directory.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

abcnb

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Why are there no resources folder in example (opengl or pong)?
« Reply #2 on: October 13, 2022, 11:40:36 am »
But why are there images in this compiled libraries https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc15-64-bit.zip ? Just because someone added them manually?
For example: SFML-2.5.1-windows-vc15-64-bit\SFML-2.5.1\examples\pong\resources, so pong.exe can be run immediately (it is very convenience!).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Why are there no resources folder in example (opengl or pong)?
« Reply #3 on: October 13, 2022, 12:30:45 pm »
As I said, you'll get that if you build the INSTALL target.
Just building things, will generate the executables, but not copy around any resources
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

abcnb

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Why are there no resources folder in example (opengl or pong)?
« Reply #4 on: October 14, 2022, 05:08:46 am »
I think I understand and my assumption was right. Many thanks.

 

anything