Build Besiege from source - 50% complete - need help.
Feb 28, 2015 7:06:10 GMT
SuburbanSB likes this
Post by SarahC on Feb 28, 2015 7:06:10 GMT
I've been setting up a Visual Studio 2013 solution to build Besiege from source - for complete control of modding.
The dependencies are all linked, and build order is in place. "Firstpass" projects create the DLL's referenced in the other projects.
I've included the references already, but their paths may need to be re-added once everything's compiling properly.
The only thing slowing me down is some of the compiler generated code that mixes in with the source.
Using a combination of JetBrains DotPeek, and Telerik JustDecompile - several of these can be fixed, by using the code offered in the alternative compiler to the one you used.
An example of such code is below, the <>f__switch$mapB is compiler generated, and while ILM accepts < and > as valid variable names, C# does not:
Assembly-CSharp / iTween / void GenerateLookToTargets():
Adding this to the classes variables:
I then replaced the code <>f__switch$mapB with z5, across the whole file:
And so on...........
Two of the 4 projects now compile (I've been editing them), but there's plenty to finish in the last two projects.
The Steamworks code can mostly be commented out - I'm using the stand-alone download.
The compiler generated code needs editing, and replacing with the original developer written code.
You'll see [DebuggerHidden] directives above some functions - usually these can be commented out entirely, as they're produced when Visual Studio compiles the classes, and are not part of the original source.
Here's the source in a Visual Studio 2013 solution (stand alone, NOT steam version).... you should be able to open it in VS 2010 too:
MOD EDIT: Link temporally removed.
(You'll see Steamworks code in there even though it's not via Steam...)
Nearly there...
The dependencies are all linked, and build order is in place. "Firstpass" projects create the DLL's referenced in the other projects.
I've included the references already, but their paths may need to be re-added once everything's compiling properly.
The only thing slowing me down is some of the compiler generated code that mixes in with the source.
Using a combination of JetBrains DotPeek, and Telerik JustDecompile - several of these can be fixed, by using the code offered in the alternative compiler to the one you used.
An example of such code is below, the <>f__switch$mapB is compiler generated, and while ILM accepts < and > as valid variable names, C# does not:
Assembly-CSharp / iTween / void GenerateLookToTargets():
if (str != null)
{
if (iTween.<>f__switch$mapB == null)
{
Dictionary<string, int> strs = new Dictionary<string, int>(3)
{
{ "x", 0 },
{ "y", 1 },
{ "z", 2 }
};
iTween.<>f__switch$mapB = strs;
Adding this to the classes variables:
static Dictionary<string, int> z5; //<>f__switch$mapB
I then replaced the code <>f__switch$mapB with z5, across the whole file:
if (str != null)
{
if (iTween.z5 == null)
{
Dictionary<string, int> strs = new Dictionary<string, int>(3)
{
{ "x", 0 },
{ "y", 1 },
{ "z", 2 }
};
iTween.z5 = strs;
And so on...........
Two of the 4 projects now compile (I've been editing them), but there's plenty to finish in the last two projects.
The Steamworks code can mostly be commented out - I'm using the stand-alone download.
The compiler generated code needs editing, and replacing with the original developer written code.
You'll see [DebuggerHidden] directives above some functions - usually these can be commented out entirely, as they're produced when Visual Studio compiles the classes, and are not part of the original source.
Here's the source in a Visual Studio 2013 solution (stand alone, NOT steam version).... you should be able to open it in VS 2010 too:
MOD EDIT: Link temporally removed.
(You'll see Steamworks code in there even though it's not via Steam...)
Nearly there...