Skip to content

Commit

Permalink
Scene viewer integrated. Improved solution building dependencies. (#252)
Browse files Browse the repository at this point in the history
* Scene viewer integrated.  Improved solution building dependencies.

* Remove and ignore build artifacts of Irrlicht

* adding libs plus a few minor fixes

* Fixed build

* Explicitly set x64 architecture in workflow scripts

* Fix lib paths

- It did work from visual studio but not from the command line

* Speedup builds

* Add missing libs to git lfs

* Integrate git lfs into the workflow scripts [CI]

Co-authored-by: mpolak <[email protected]>
  • Loading branch information
Traderain and michaelpolakatwork authored Oct 13, 2020
1 parent a0a592e commit b1ef5a9
Show file tree
Hide file tree
Showing 1,827 changed files with 708,693 additions and 27 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*.txt text eol=crlf
*.xml text eol=crlf
*.yml text eol=crlf


# Explicitly declare files you do not want to be treated as text
*.bmp binary
*.dll binary
Expand All @@ -31,3 +29,4 @@
*.tga binary
*.xbm binary
*.zip binary
*.lib filter=lfs diff=lfs merge=lfs -text
9 changes: 7 additions & 2 deletions .github/workflows/Nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Nuget.exe
uses: warrenbuckley/Setup-Nuget@v1
- name: Restore packages
run: nuget restore WolvenKit.sln
- name: Setup MSBuild.exe
uses: warrenbuckley/Setup-MSBuild@v1
- name: Build with MSBuild
run: msbuild WolvenKit.sln -p:Configuration=Release
run: msbuild WolvenKit.sln -p:Configuration=Release -p:Platform=x64 -m
- name: Zip Release
run: |
cd $Env:GITHUB_WORKSPACE\\WolvenKit\bin
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Nuget.exe
uses: warrenbuckley/Setup-Nuget@v1
- name: Restore packages
run: nuget restore WolvenKit.sln
- name: Setup MSBuild.exe
uses: warrenbuckley/Setup-MSBuild@v1
- name: Build with MSBuild
run: msbuild WolvenKit.sln -p:Configuration=Release
run: msbuild WolvenKit.sln -p:Configuration=Release -p:Platform=x64 -m
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,6 @@ docs/doxygen.warnings

#Local git wiki repository - preferred to not delve into git submodules/subtree horrors
Wolven-kit.wiki
WolvenKit.IrrlichtLime/Debug-x64
WolvenKit.IrrlichtLime/Release-x64
Libs/Irrlicht.dll
Binary file removed Libs/Irrlicht.dll
Binary file not shown.
Binary file removed Libs/IrrlichtLime.dll
Binary file not shown.
21 changes: 20 additions & 1 deletion WolvenKit.CR2W/CR2W/CR2WVerify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class CR2WVerify : IDisposable
private CR2WBuffer[] m_buffers;
private CR2WEmbedded[] m_embedded;

private bool isDisposed;
private Dictionary<uint, string> m_dictionary;
#endregion

Expand All @@ -50,6 +51,11 @@ internal CR2WVerify(Stream stream, string filePath)
}
#endregion

~CR2WVerify()
{
Dispose(false);
}

#region Main
private void ProcessFile()
{
Expand Down Expand Up @@ -296,7 +302,18 @@ private void WriteStructs<T>(T[] array, Crc32Algorithm crc32 = null) where T : s

public void Dispose()
{
m_stream.Dispose();
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (isDisposed) return;

if (disposing)
{
m_stream.Dispose();
}

m_strings = null;
m_names = null;
m_imports = null;
Expand All @@ -305,6 +322,8 @@ public void Dispose()
m_buffers = null;
m_embedded = null;
m_temp = null;

isDisposed = true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ public override void Read(BinaryReader file, uint size)
// break;
//}
case Enums.BlockDataObjectType.Mesh:
//{
// packedObject = new SBlockDataMeshObject(cr2w, this, nameof(SBlockDataMeshObject));
// break;
//}
{
// MFP - we need this for the scene viewer
packedObject = new SBlockDataMeshObject(cr2w, this, nameof(SBlockDataMeshObject));
break;
}
case Enums.BlockDataObjectType.Dimmer:
//{
// packedObject = new SBlockDataDimmer(cr2w, this, nameof(SBlockDataDimmer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace WolvenKit.CR2W.Types
{
[REDMeta(EREDMetaInfo.REDStruct)]
class SBlockDataMeshObject : CVariable
public class SBlockDataMeshObject : CVariable
{
[Ordinal(1)] [RED] public CUInt16 meshIndex { get; set; }
[Ordinal(2)] [RED] public CUInt16 forceAutoHide { get; set; }
Expand Down
Binary file added WolvenKit.Irrlicht/Irrlicht.rc
Binary file not shown.
1,629 changes: 1,629 additions & 0 deletions WolvenKit.Irrlicht/Irrlicht15.0.vcxproj

Large diffs are not rendered by default.

Loading

0 comments on commit b1ef5a9

Please sign in to comment.