Announcement

Collapse
No announcement yet.

Setting up Proper SVN for C++ Project

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    The poster WCode actually sorted out exactly what I needed to do, and gave me the answer I was looking for. So far, the configuration I used above is working out fine for us. This was more trying to figure out the structure of the Unreal folder than SVN.

    However, it is good to know what the bare-bones setup for an Unreal project is. However, I would make sure to include the .sln and Plugins directory.
    Last edited by The Britain; 11-30-2014, 12:32 AM.

    Leave a comment:


  • replied
    Hmmmm, this seems way more complicated then it needs to be!!!!

    Normally if you want to set everything up from scratch you just initialize an SVN repository in a location of you're choice(server or you're own computer).

    You create a project with unreal and then checkout you're repository into this file, then add some ignores to avoid sharing user data. The important files are Config, Content, Source and YouProjectName.uproject, the rest can and probably should be ignored!
    Commit and it should update the repository with the correct files, voila.

    Of course code for the project needs to be added manually outside of the unreal editor which makes sense because the editor is build with this code!!!
    All other parameters are a question of customization, actually you don't NEED to ignore any files either, you could commit them if you were the only one working on the project, but this is an issue when sharing a repo because you normally want everyone to generate the're own files.

    1. Create repository
    2. Create unreal project
    3. Checkout repository into you're unreal project file
    4. Ignore all files except Config, Content, Source and *.uproject*
    5. Commit.

    * Don't bother trying to ignore everything up front by producing the files. Reacte to them being created while you work. If a file appears then ignore it. Just keep in mind that Config, Content, source and *.uproject are the important files for you're project.

    Again, using SVN in the editor is extra and doesn't track everything, yet at least. Only assets and config files.

    I think you guys should also read up abit about SVN and revision systems, you don't seem very experienced in the matter.
    This is a good place to start if you are using windows -> http://tortoisesvn.net/docs/release/TortoiseSVN_en/

    Hope this helps, cheers


    Originally posted by The Britain View Post
    I am going to test this out with my poor partner later. We have been going through days just trying to get this to work. I will really owe you one if this works. If this does work, Unreal needs to add this to their Wiki page asap.

    //On the project side.
    1. Go to your Project Folder that you setup in your Unreal Projects folder.
    2. Take everything out of that Project folder, and move it somewhere temporarily.
    3. Rightclick the now empty project folder.
    4. Click Checkout
    5. Setup credentials and server.
    6. Copy Files Back Over Into Project Folder (Now with svn folders present.)
    7. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    8. Right Clicked Saved -> Add To Ignore List -> Recursive
    9. Deleted Intermediate and Saved
    10. Fing one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    12. Commit project folder.
    13. Update project folder for good measure.

    //On the receiving end.
    1. Make an empty project folder.
    2. Right click the project folder and checkout.
    3. Input Credentials
    4. After downloading repository, test compile and run the editor. SEE:If Your Intermediate Folder or Saved Folder is Missing:
    5. Intermediate and Saved folder should be present now.
    NOT SURE IF NEED WHAT IS BETWEEN THIS STATEMENT - WILL IT AUTO EXCLUDE ONCE PULLED?
    6. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    7. Right Clicked Saved -> Add To Ignore List -> Recursive
    10. Find one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    NOT SURE IF NEED WHAT IS BETWEEN THIS STATEMENT - WILL IT AUTO EXCLUDE ONCE PULLED?
    12. Commit project folder.
    13. Update project folder for good measure.

    Once you have deleted the Intermediate folder and the Saved folder, you will need to regenerate them. This goes for the other side receiving your project without those folders.

    If Your Intermediate Folder or Saved Folder is Missing:
    Open the .uproject file.
    Then click File->Open Visual Studio. (Wait for VS to load. You will probably get an error in VS like the post above. Don't worry.)
    Then File->Refresh Visual Studio Project. (Your project files should appear now.)
    Save and close VS and the editor.
    Open up the .sln. If you have lots of red lines, find your GamePrivate.h and look for #include "EngineMinimal.h" change that to #include "Engine.h"
    Save, and you should be golden to start the debugger.

    NOTES:
    Always open your project using the .sln, and started the editor from there.

    Quoted From WCode Above (Thanks so much for the help. I think this is going to work!)
    Tips:

    * If you need to exclude certen files or folders you have to do this recursivly so the change is made for all users.
    * ALWAYS run commit / update on the ROOT folder of your reposetory. e.g: /RepoRootFolder/trunk
    * Have your team do regulare updates if folder/ files are deleted you risk a tree conflicts if the reposetory is to old on the local machine.
    * After commiting always do a update after, sometimes the hidden .svn folder may not get fully updated. (commiting/ updating on the root folder, seem to solve this issue but we do it anyway.)

    Hope this helps, let me know if there is anythign else.
    WCode

    Leave a comment:


  • replied
    Edit: This has been tested and works. You can also exclude your 'Binaries' folder. Running the project from the sln has the added advantage of cleaning up hot-load files.

    //On the project side.
    1. Go to your Project Folder that you setup in your Unreal Projects folder.
    2. Take everything out of that Project folder, and move it somewhere temporarily.
    3. Rightclick the now empty project folder.
    4. Click Checkout
    5. Setup credentials and server.
    6. Copy Files Back Over Into Project Folder (Now with svn folders present.)
    7. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    8. Right Clicked Saved -> Add To Ignore List -> Recursive
    9. Deleted Intermediate and Saved
    10. Fing one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    12. Commit project folder.
    13. Update project folder for good measure.

    //On the receiving end.
    1. Make an empty project folder.
    2. Right click the project folder and checkout.
    3. Input Credentials
    4. After downloading repository, test compile and run the editor. SEE:If Your Intermediate Folder or Saved Folder is Missing:
    5. Intermediate and Saved folder should be present now.
    *** You may not need to do steps 6-11 as it will probably pull the exclude list as well.
    6. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    7. Right Clicked Saved -> Add To Ignore List -> Recursive
    10. Find one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    12. Commit project folder.
    13. Update project folder for good measure.

    Once you have deleted the Intermediate folder and the Saved folder, you will need to regenerate them. This goes for the other side receiving your project without those folders.

    If Your Intermediate Folder or Saved Folder is Missing:
    Open the .uproject file.
    Then click File->Open Visual Studio. (Wait for VS to load. You will probably get an error in VS like the post above. Don't worry.)
    Then File->Refresh Visual Studio Project. (Your project files should appear now.)
    Save and close VS and the editor.
    Open up the .sln. If you have lots of red lines, find your GamePrivate.h and look for #include "EngineMinimal.h" change that to #include "Engine.h"
    Save, and you should be golden to start the debugger.

    NOTES:
    Always open your project using the .sln, and started the editor from there.

    Quoted From WCode Above (Thanks so much for the help. I think this is going to work!)
    Tips:

    * If you need to exclude certen files or folders you have to do this recursivly so the change is made for all users.
    * ALWAYS run commit / update on the ROOT folder of your reposetory. e.g: /RepoRootFolder/trunk
    * Have your team do regulare updates if folder/ files are deleted you risk a tree conflicts if the reposetory is to old on the local machine.
    * After commiting always do a update after, sometimes the hidden .svn folder may not get fully updated. (commiting/ updating on the root folder, seem to solve this issue but we do it anyway.)

    Hope this helps, let me know if there is anythign else.
    WCode
    Last edited by The Britain; 11-30-2014, 12:28 AM.

    Leave a comment:


  • replied
    Alright, if you get the above, you need to open the .uproject file.
    Then click File->Open Visual Studio.
    Then File->Refresh Visual Studio Project.
    Close all of those.
    Open up the .sln. If you have lots of red lines, find your GamePrivate.h and look for #include "EngineMinimal.h" change that to #include "Engine.h"
    Save, and you should be golden to start the debugger.

    As a side note, I found that you must started your development editor from the .sln, or it corrupts.
    Last edited by The Britain; 11-23-2014, 10:36 AM.

    Leave a comment:


  • replied
    I did the above, and now when I open the solution, it will not load:
    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	27.9 KB
ID:	1061370
    Last edited by The Britain; 11-23-2014, 10:27 AM.

    Leave a comment:


  • replied
    Re-Tracing My Steps:

    //On the project side.
    1. Go to your Project Folder that you setup in your Unreal Projects folder.
    2. Take everything out of that Project folder, and move it somewhere temporarily.
    3. Rightclick the now empty project folder.
    4. Click Checkout
    5. Setup credentials and server.
    6. Copy Files Back Over Into Project Folder (Now with svn folders present.)
    7. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    8. Right Clicked Saved -> Add To Ignore List -> Recursive
    9. Deleted Intermediate and Saved
    10. Fing one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    12. Commit project folder.
    13. Update project folder for good measure.

    //On the receiving end.
    1. Make an empty project folder.
    2. Right click the project folder and checkout.
    3. Input Credentials
    4. After downloading repository, test compile and run the editor.
    5. Intermediate and Saved folder should be present now.
    6. Right Clicked Intermediate -> Add To Ignore List -> Recursive
    7. Right Clicked Saved -> Add To Ignore List -> Recursive
    10. Find one of each file type .sdf, .sin, .suo. I didn't have a .sin, so I renamed a text file to text.sin.
    11. Right clicked each one, and -> Add To Ignore List -> *.ext (recursively) For each file type.
    12. Commit project folder.
    13. Update project folder for good measure.

    Does this look right?
    Do I need to have my team setup the same block list, or will it be passed on?

    If this is right, I am going to make an info-graph tutorial for future searchers.
    Last edited by The Britain; 11-23-2014, 10:19 AM.

    Leave a comment:


  • replied
    Alright, I have done what you said to do, and this is my property list:
    *.sdf
    *.sin
    *.suo
    Intermediate
    Saved

    I did those three file types and the folder recursively.

    Leave a comment:


  • replied
    Sorry to double ask a question, and I REALLY appreciate the help!

    You said to exclude those files, do I still do that before deleting and committing even though I deleted them? Do I need to follow the SVN setup procedure at all then for Unreal?

    Leave a comment:


  • replied
    I did the following to setup a SVN repo for my team.
    1 Delete all un-needed files as mentioned above these get created by etch member when they open the project/ generate project files.
    2 Import that folder onto the trunk of your reposetory.
    3 Commit the changes and run a update for good messure.
    4 Have all other team members Check out the repo you just created.

    Tips:
    * If you need to exclude certen files or folders you have to do this recursivly so the change is made for all users.
    * ALWAYS run commit / update on the ROOT folder of your reposetory. e.g: /RepoRootFolder/trunk
    * Have your team do regulare updates if folder/ files are deleted you risk a tree conflicts if the reposetory is to old on the local machine.
    * After commiting always do a update after, sometimes the hidden .svn folder may not get fully updated. (commiting/ updating on the root folder, seem to solve this issue but we do it anyway.)

    Hope this helps, let me know if there is anythign else.
    WCode
    Last edited by WCode; 11-23-2014, 09:22 AM.

    Leave a comment:


  • replied
    To clarify #2. Do they need to setup a blank paper2d C++ project and follow the same SVN instructions as in the wiki, do we even need that wiki, or can they just right click a blank folder and setup a checkout?

    Also, I am unfamiliar with certain aspects of SVN. If I setup an exclude list, and then they pull. Will that preserve the exclude list, or do they need to set up the excludes as well?
    Last edited by The Britain; 11-23-2014, 08:31 AM.

    Leave a comment:


  • replied
    I would LOVE some help, as I have had to recreate this project several times, and I have lost allot of work.

    1. Do I need to follow the directions set forth in that wiki (minus the in editor sync stuff)?
    2. Does the team need to setup a dummy project, or do they just need a blank folder? Do they need to follow those instructions?
    3. We use Tortoise, do you mean just the regular check in check out commands?
    4. For C++, I think I figured this out the hard way. You don't open though through the editor like a blueprint project do you? You open those through the SLN file.

    Leave a comment:


  • replied
    Hey me and my team are using SVN and all works great.
    But we don`t use the Editor method and stick to the TortoiseSVN for thos of us on WIndows.
    Using Subversion SVN in UE 4 Editor gaves us a ton of problems when level designers started working.

    Some stuff worth noting is don`t add the followin stuff,
    Folders: Intermediate, Saved
    And Files: *.sdf, *.sin, *.suo

    When first creating the repo we discoverd that doing a import and have everyone then check out a the new repo.
    Avoided any issues we had relating to inacuaracys before we setup the repo.

    If you need any help with server setup or repo let me know am sure i can be of help.
    WCode.

    Leave a comment:


  • replied
    I am re-creating the project, as I am now getting a build error 3. I won't be setting up a source share until I figure out a solution that won't corrupt our project again.

    Leave a comment:


  • replied
    Every line is still underlined in red for no reason. There have been no major changes. The main .h has a reference to Engine.h.

    Leave a comment:


  • replied
    I did a verify, and sure enough, trying to share via SVN manual, will corrupt things.

    Leave a comment:

Working...
X