Download

C++ and SVN with a team who only Blueprints?

Hi there,

Im getting bored of blueprints and they are causing me to lose my programming knowledge and im taking C++ courses so I’m going to start using c++ exclusively.

Heres the problem. We use SVN and the rest of my team is blueprints only.

So obviously I would commit /source/ in addiont to /content/ and /plugins/

Heresmy questions

  1. How would I setup SVN to not ever commit precompiled header files or binary files so that my teammates can compile them?
  2. Whats best practice for committing source code and then compiling on a team based project?
  3. How do I make sure my teammates arn’t committing any PCH’s or anything else that should be local only
  4. What about plugins that are precompiled with binarys, they still seem to need their source when building a project, how do you setup SVN to ignore any extra binarys and PCH’s from /plugins/somePlugin/ (victoryPlugin for example)

Thanks, really excited to go down the c++ path!

In our team we currently require everybody to install Visual Studio (Express, but we use Community now since that’s also free). We then submit Source files and everybody builds their binaries locally. They don’t need to open VS to do that, just delete their local ‘Binaries’ folder and the engine can recompile itself when you open it.

The only potential issue is that people can often forget to rebuild their binaries and you end up with people using different versions of the game, so you either need to be hot on enforcing that, or have somebody else build the binaries and submit them. The issue you have then is that people can submit broken binaries that can break access to the project. So you have to weigh it up. You probably still want to submit your source files and have everybody use them, because otherwise if an artist reports a crash he will have less information available for others to debug the problem.

I think Epic’s advised approach is to check in you source code files, but not your solution / VS files. We submitted VS files originally, but they screwed up when somebody added code to the project if people had the engine installed in different locations etc which made life difficult. We got around that problem by making ‘hard links’ etc, but it’s just a ballache. There is one problem at the moment with this method though, you need to regenerate your project files if somebody checks in a new source code file or something, otherwise their local copy of VS won’t pick it up. This is a small caveat, but it means any settings they’ve saved in their VS project file will be lost at that point. Regardless, it’s probably the cleanest workflow we’ve used to date.

The following is what (I suggest) you submit:

Config
Content
Source
MyProject.uproject

The rest should be set to be ‘ignored’ in your SVN client. You could also include a batch script that all end-users will get called ‘Refresh.bat’ or something, which deletes the other folders (Saved, Build, Binaries, Intermediate etc) and regenerates the solution files. That way people will always be up-to-date and on the same page.

EDIT:

I have used both TortoiseSVN and Perforce, and I think Perforce is definitely more intuitive once you have it set up, and less prone to errors / easier to clean up. Tortoise is still a great tool though, and I imagine it’s pretty awesome when used alongside Source Tree or something.

Thanks for your reply.

That is a slight, although big caveat because our team is anywhere from 1-10 people depending on the day and may grow bigger and alot of them dont code at all, only do 3D art or graphic design for example. Thats extremely annoying.

No better way then other than to say “I added a new class” everytime I add a new C++ class and have everyone right click their project file and select “Generate Visual Studio files”, over and over again?". Even if I check it in/out using the editor?

Also I still worry about plugins. When I have ramas Victory plugins and the community ocean project, its already compiled, and everything I go to compile it recompiles the source for them. This isnt an issue for SVN since you say not to check in /plugins/ but but compiling those plugins takes 95% of the time on a project with little code.

Is there a way to setup SVN, Unreal or Visual Studio to ignore the /plugins/ folder’s? Could I just delete the /source/ folders in them and re-gen my VS project?

I dont want my team-mates to have to recompile the source PLUS spend 2 minutes recompiling the plugins everytime I commit a small code change.

I’m the only c++ programmer on my team. I do all compiling on my machine and I commit the resulting .dll file.
I don’t see any advantage in having people who don’t touch any of the code having to compile when starting up the engine, are they any?
I guess a possible issue could be people using different CPU architectures or operating systems, but seems like an edge case. Even in this case though, i’d still prefer writing a small script which updates the project accordingly to the users computer.

At the moment our SVN repo contains the source code but later down the line we will probably move the source to a separate git repo so that artist/etc using the engine just need the svn stuff and programmers can do any kind of update to the code and not worry that the artists compile a broken commit or something. I’ve tried doing branches but branching is alot of extra work and makes things more complicated merges etc. To me seperating c++ code from the rest is the best solution up to now.