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

Author Topic: Export project in VS Code  (Read 205 times)

0 Members and 2 Guests are viewing this topic.

s4game

  • Newbie
  • *
  • Posts: 10
    • View Profile
Export project in VS Code
« on: January 29, 2025, 05:40:24 pm »
Good day.
I have made a little project using VS Code in C++ CMake on Windows 10. While there are guides for release using Visual Studio Community, seems to be none for VS Code. How can one export their project there?

Thanks in advance

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11110
    • View Profile
    • development blog
    • Email
Re: Export project in VS Code
« Reply #1 on: January 30, 2025, 08:36:02 am »
Depends what you want to define as "release".

You could add install commands to your CMake script, so if you build the install target, it would copy all the necessary files to the destination.
Simpler yet, you could just run the CMake: Release command, which builds your application in release mode and then you can copy the files manually and maybe put them in a ZIP file.
You could also use CMake's CPack to create an installer
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

s4game

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Export project in VS Code
« Reply #2 on: January 30, 2025, 02:08:50 pm »
There seems to be no CMake: Release command when looking through CMake commands. Maybe it has a different name?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11110
    • View Profile
    • development blog
    • Email
Re: Export project in VS Code
« Reply #3 on: January 30, 2025, 03:13:01 pm »
Ah right, I confused myself ;D

The command in the command palette to use is "CMake: Select Variant" (which only shows up if don't have a preset).
There you can select a release build and then simply build your application in Release mode.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything