SFML community forums

General => General discussions => Topic started by: KevinKeyser on September 22, 2016, 09:38:08 pm

Title: Contribution - Visual Studio 2015 Installer
Post by: KevinKeyser on September 22, 2016, 09:38:08 pm
Hello SFML Community,

I've been following SFML for some time now, and never had a chance to fully get into using it since my knowledge of computer science was vague at the time. But now I'm back and remember that there was a weird learn curve for new programmers with Visual Studios on Windows. So I just wanted to share my solution installer with everyone here in hope of helping people get started and make the process of creating a new project easier.

Right now I have templates for SFML 2.4.0 release on Visual Studio 2015 native console apps and windows applications both in 32bit. Anyone that wants to contribute to this project are welcome to.

Here's the repository: https://github.com/KevinKeyser/SFML-Installer
Here's the releases: https://github.com/KevinKeyser/SFML-Installer/releases

I an open for any questions and bug reports

Thank you,
Kevin Keyser
Title: Re: Contribution - Visual Studio 2015 Installer
Post by: Mario on September 23, 2016, 10:19:31 am
Ah, cool. I remember trying something similar but in the end didn't want to bother with the weird template setup. :)

Edit: Wait, does this install new templates for the "New Project" dialog box in VS or is it just some extra directory with templates in there?
Title: Re: Contribution - Visual Studio 2015 Installer
Post by: KevinKeyser on September 23, 2016, 11:07:12 pm
Ah, cool. I remember trying something similar but in the end didn't want to bother with the weird template setup. :)

Edit: Wait, does this install new templates for the "New Project" dialog box in VS or is it just some extra directory with templates in there?
This will install templates for Visual Studio 2015, So when you click "New Project" it will have 2 SFML projects under C++>SFML.

It also installs the lib/dlls/includes in a SFML folder under ProgramFiles(x86) which is linked with an environment variable for the templates to locate the items.
All included resources need to be under the Resources folder some how. I have a post build event that copies all of the items under resources folder to the built path.

while loading an item included in the resources make sure you have the file path included in the string
texture.loadFromFile("Resources/Textures/sfml.png")

Did the installer go to the end for you and the .vsix didnt launch? or did it error out somewhere inbetween?
Title: Re: Contribution - Visual Studio 2015 Installer
Post by: Mario on September 24, 2016, 09:39:28 pm
Haven't had time to try it yet, so just skipped over the sources. :)
Title: Re: Contribution - Visual Studio 2015 Installer
Post by: Jonny on September 26, 2016, 04:15:19 pm
Awesome, I actually did something very similar for my own use, but also uploaded to the VS extension gallery so that if anyone else wanted to use them it can be easily accessed from the "New project" online tab (if you search for "SFML" there you will find them):

https://social.msdn.microsoft.com/Profile/jonny%20paton/extensions

I've been meaning to tidy them up and fix a few issues for quite some time (Also just noticed the comment asking for 2.4 so I need to add that to the list!)

Admittedly had kind of forgotten about them but seeing as they're consistently getting double digit downloads each day I should probably go back and sort them out...