1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Source code compilation requirements and stuff

Discussion in 'Source Code' started by mexmer, May 16, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. mexmer

    mexmer Senior Engineer

    Messages:
    1,977
    Since people don't bother to read readme.md, i will emphasize here some important points

    Requirements
    Computer that meets minimum requirements for running SE
    Windows 7 (you cannot install VS 2013 on XP)

    build in VS2013
    Visual Studio 2013 Update 4 Community Edition (around 8GB of disk space, if you install only C# and basic stuff) or better - NO Express editions are not enough (no nitpicking, there is a way, but essentialy costs more disk space and TIME)
    .NET Targeting Pack for .NET 4.6.1 - downloadable from microsoft, you can alternatively download latest .NET 4.6.2 Developer pack, which contains also 4.6.1 target
    You also need Microsoft.CodeAnalysis package - see VS2015 section, unfortunately it does require nuget 3.0, which is not available (and probly will not be for VS2013), so you either use nuget from VS2015, or ask friend to send it to you as archive and unpack into 3rd\Microsoft.CodeAnalysis folder.

    build in VS2015
    Visual Studio 2015 Community Edition (around 10 GB of disk space) or better - tested, it works and compiles properly, but sometimes has problems with asserts and breakpoints when debugging (seems directx related)
    Note: Visual Studio for Desktop is equivalent to express edition, it will not work, you need community edition at least, because lower editions missing template processing tools
    Trough nuget console run on project Vrage.Scripting following command
    Install-Package Microsoft.CodeAnalysis -Version 1.2.0
    This will install required dependent package

    Common Requirements
    Steam client
    Installed Space Engineers game - develop branch

    optional components
    Git client - Visual 2013 studio has builtin git client (under team explorer), Visual studio 2015 has also builtin Github client (optional installation component), i recommend using SourceTree or GitHub Desktop

    aditional requirements
    4GB of disk space (my sourcetree with compiled server and client takes 3.6GB)
    I recommend to have at least 8GB of RAM and QuadCore CPU, if you serious about debugging

    what to do next, when you have things above
    fork repo on github (howto) and clone to your desktop manually, using github desktop client or download source archive and extract

    create user.props file in same folder SpaceEngineers.sln - user.props overrides settings from global.props and is not commited back to repo. Please note that you should not add or change user.props within visual studio with opened solution, otherwise it will be added to solution. you will need then revert solution file back to original state.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
    <ImportGroup Label="PropertySheets" />
    <PropertyGroup Label="UserMacros" />
    <PropertyGroup>
    <!-- change this to point to proper folder with game -->
    <ContentPath>d:\SteamLibrary\SpaceEngineers\Content</ContentPath>
    <!--change this to false to link Effects2 folder from steam content, instead of source -->
    <EffectsFromSources>true</EffectsFromSources>
    <!-- change this to false to link Data folder from steam content, instead of source -->
    <DataFromSources>true</DataFromSources>
    </PropertyGroup>
    <ItemDefinitionGroup />
    <ItemGroup />
    </Project>
    
    Open SpaceEngineers.sln and do usual coding stuff

    Don't forget to sync your repo everyday.

    Unofficial guide for 64bit debuging.

    Warning regarding saves
    people noticed that in past, but sourcecode after sync is usually different build version than what you get in from retail (steam), therefore it's highly recommended to backup your saves, if you plan to load them in version build from sourcecode. not to mention, there might be changes (in debug code), that are not present in relase yet and might create incompatible savegames.

    List of release version in source based on MyFinalBuildContants.cs SpaceEngineersGame.cs can be found here
     
    Last edited: Sep 5, 2016
  2. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Yeah, Express definitely doesn't work with the Templating suite, no matter how hard I tried to get it working.
    Check that for disk requirements. It took me 10GB for VS to install on destination drive (unless your post doesn't account for that). Plus, about 1GB that my SE compilation now takes (both Debug and Release for the whole solution), but I don't know if that's bound to grow over time.
    Good call on RAM and processor. Got precisely that, and still my PC froze when placing a default Red Ship blueprint near an 8 Km planet, otherwise, it runs remarkably well for now.

    Cheers
     
  3. Gwindalmir

    Gwindalmir Senior Engineer

    Messages:
    1,006
    The other thing that is important, but probably obvious to some, is to create a NEW world for testing.
    I made the mistake of trying to load an existing world (testing one anyway), but got errors.
    Additionally, worlds created (or opened I imagine, if it does work) in the custom built version will NOT open in the regular steam version. So be warned.
     
  4. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    I can confirm that. Test worlds loaded with standard version throw a dialog of "Created with a newer version of the game".
    And an older world I loaded with the source version froze my computer.
     
  5. mexmer

    mexmer Senior Engineer

    Messages:
    1,977
    No, i didn't account for visual studio installation size, because visual studio is requirement - while those 4GB of space are "aditional requirement" (compiled output + sourcecode), but i will add VS install size, for people who have not it installed.

    @Phoenix84 i use both - old and new for testing ... problem with new world is, you cannot open it on regular client, like @Mix-martes86 says, but then you can just "mark" your new worlds for better recognition. I had no problems opening old worlds in source code version of SE, but i don't think i have any world elder than half year.
    Also you will not be able to connect to regular server, or your friend (in case you want to test stuff in MP) ... but those are things i expect people might already suspect, when they start tinkering with code ;o)
     
  6. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    I don't know how the networking works here, but you might however be able to direct connect with friends if you all had exactly the same build files, as in, the ones generated once by the same computer instead of each one building the same code on their own computers, or even, from same computer but built at different dates, which would count as separate distinct builds. I'm guessing that's how the devs try their multiplayer builds.
     
  7. mexmer

    mexmer Senior Engineer

    Messages:
    1,977
    of course, you can connect with people who have built game from same version of source, you just can't connect to retail server.
    but for them (your friends) to have same version, they either need to build from source, or you need to send them your binaries.

    on the other hand, you can always launch retail client/server from steam ...;)
     
  8. bisthebis 2

    bisthebis 2 Trainee Engineer

    Messages:
    63
    I get this when I try to start the project :

    I've already fixed the reference to steam, so I don't understand what's wrong
     
  9. Ihana_Mies

    Ihana_Mies Trainee Engineer

    Messages:
    74
    Right next to the "Start" button in Visual Studio, change Debug to Release. Then it should work.
     
  10. bisthebis 2

    bisthebis 2 Trainee Engineer

    Messages:
    63
    It doesn't, I get the same error no matter wether it is Debug or Release :'(
     
  11. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Fix for A project with an Output Type of Class Library cannot be started directly.

    On the Solution Explorer on the right, RMB at the SpaceEngineers project within the main solution, and click on Set as StartUp Project. Should work both in Debug and Release. Just like in this pic:

    [​IMG]
     
    Last edited: May 19, 2015
  12. bisthebis 2

    bisthebis 2 Trainee Engineer

    Messages:
    63
    It worked, thanks ! :)
    Now, I just have to understand bits of code :D
     
  13. mexmer

    mexmer Senior Engineer

    Messages:
    1,977
    for VS 2015 it's even easier ... not that opened dropdown menu

    [​IMG]
     
  14. mexmer

    mexmer Senior Engineer

    Messages:
    1,977
    Added link to unofficial guide for 64bit debuging.
     
    • Like Like x 1
  15. Houkime

    Houkime Trainee Engineer

    Messages:
    96
    Strange thing. Downloaded today the sources to see if I can add one useful feature to sensors.

    For a really mysterious reason VS refuses to recognize SteamSDK as a namespace in SpaceEngineers.Game (and only in it! It still can use it for Sandbox.Game but not for SpaceEngineers.Game) (though .dll is in place it just cannot find a path)

    FIXED: deleted and recreated the reference. Seriously don't know why it happened.
     
    Last edited: Jul 1, 2015
  16. WarDave

    WarDave Trainee Engineer

    Messages:
    28
    So Houkime I know you where talking about this error and how did you fix this? It gives this error a few times on compile.
    Error 2 The type or namespace name 'SteamSDK' could not be found (are you missing a using directive or an assembly reference?) C:\Users\David\Desktop\SpaceEngineers-master\SpaceEngineers-master\Sources\SpaceEngineers.Game\World\MySpaceRespawnComponent.cs 17 7 SpaceEngineers.Game

    So how did you do "FIXED: deleted and recreated the reference. Seriously don't know why it happened."?
     
  17. JoeTheDestroyer

    JoeTheDestroyer Junior Engineer

    Messages:
    573
  18. Houkime

    Houkime Trainee Engineer

    Messages:
    96
    If you want a step-by-step instruction (link above does not provide it):
    1.Solution explorer => SpaceEngineers.Game => References => see if SteamSDK has a warning sign.
    2. If it has=>delete it.
    3. RMB click (SpaceEngineers.Game => Reference)=>Add reference=>(right bottom corner) Browse => (SteamSDK is in 3d)
     
  19. Ihana_Mies

    Ihana_Mies Trainee Engineer

    Messages:
    74
    This was fixed 2 hours ago in Github. Just redownload the source pack
     
  20. willi28ac

    willi28ac Trainee Engineer

    Messages:
    16
    Hello!, I have done the instructions with exception of adding user.props because i do not under stand the instruction on how to do it, need a video or screenshot. Anyways when I load a habitual planet what i assume are supposed to be trees are small black boxes all over certain parts of the planet will putting the user.prop fix this issue? as well as the first few worlds i created with planets I could build ships/ stations, etc. now whenever I try to it says not enough memory i deleted the old worlds and always build from new what has taken up my memory? I am very novice at this and do not understand a lot of the jargon that goes along with the user.prop insert please explain more thoroughly!
     
  21. DevilDesire

    DevilDesire Trainee Engineer

    Messages:
    12
    How i can commit changes to GitHub?
    Normally i using only TFS

    EDIT: ok i'm done
     
    Last edited: Jul 24, 2015
  22. Frenklan Rusvelti

    Frenklan Rusvelti Trainee Engineer

    Messages:
    4
    So I tried to enable planets through the source code, but when I debug it, it gives me the error "Visual Studio cannot start debugging because the debug target 'C:\Users\MYNAME\Desktop\SpaceEngineers-master\Sources\SpaceEngineers\bin\x86\Debug\SpaceEngineers.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly." How do I fix this?
     
  23. Fuzzy Fennec

    Fuzzy Fennec Trainee Engineer

    Messages:
    1
    I am requesting help, PMs or otherwise regarding an issue i've stumbled across. After successfully compiling the source code to enable the planets everything has been fine, no problems for this.

    However, after successfully compiling the spaceengineers.dedicated for use of the server so that me and a few friends can connect, I had found that the server would not stay loaded for more than half a second.

    From memory it loads up the GUI, I select my options and it closes to the command prompt window of the server, ok no problems here, however it closes shortly after loading up the server, instantly "log off", could you explain how i could fix this?

    Edit: Fixed it, no worries.
     
    Last edited: Aug 16, 2015
  24. Butcher8923

    Butcher8923 Trainee Engineer

    Messages:
    49
    I've got the same issue, except it occours when i try to run the x64 version.
    I am able to launch the x86 release and create a new world (asteorids), but when i try to spawn a planet (25km size) it crashes with the "not enough memory" message error. So i tried to follow the instructions to debug it in 64bit, but the error quoted occurs (except the folder is the bin\x64\Debug). Can anyone help me out ?

    I am using visual studio 2013 Update 5 (v12.0.40629.0)
    My notebook specs: i7-3630QM (2.40Ghz), 8 Gb Ram, Nvidia GT650m (4gb Vram), win 8.1 (64bit).
     
  25. woostyboy 2

    woostyboy 2 Trainee Engineer

    Messages:
    8
    ...eeer... Don't understand this funny language you are all speaking.... Is there a magical place I can download an EXE file that I can just double click on to load SE with planets in it?
    :)
     
  26. Mix-martes86

    Mix-martes86 Senior Engineer

    Messages:
    1,110
    Nope.
     
    • Like Like x 1
  27. LocInt

    LocInt Apprentice Engineer

    Messages:
    264
    The unofficial trick doesn't seem to work anymore.
     
  28. Malware

    Malware Master Engineer

    Messages:
    9,867
    Not surprising since the GitHub source code is a month old.
     
  29. LocInt

    LocInt Apprentice Engineer

    Messages:
    264
    Yea it would be nice to get keep the source up to date as well. : (
     
  30. Malware

    Malware Master Engineer

    Messages:
    9,867
Thread Status:
This last post in this thread was made more than 31 days old.