Skip to content

Commit c17c456

Browse files
committed
Add xrEditor project stub
1 parent fc57908 commit c17c456

File tree

6 files changed

+207
-0
lines changed

6 files changed

+207
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#include "pch.hpp"
2+
#include "editors/xrECore/Core/ELog.h"
3+
4+
using namespace XRay;
5+
6+
int entry_point(pcstr commandLine)
7+
{
8+
System::Windows::Forms::Application::EnableVisualStyles();
9+
auto splash = gcnew ECore::Props::WindowSplash();
10+
splash->Show();
11+
12+
splash->SetStatus("Loading xrDebug...");
13+
xrDebug::Initialize(false);
14+
15+
splash->SetStatus("Loading Core...");
16+
Core.Initialize("OpenXRayEditor", nullptr, true);
17+
18+
splash->SetStatus("Loading finished.");
19+
splash->Close();
20+
21+
auto windowMain = gcnew ECore::Props::WindowIDE();
22+
System::Windows::Forms::Application::Run(windowMain);
23+
Core._destroy();
24+
return 0;
25+
}
26+
27+
int StackoverflowFilter(const int exceptionCode)
28+
{
29+
if (exceptionCode == EXCEPTION_STACK_OVERFLOW)
30+
return EXCEPTION_EXECUTE_HANDLER;
31+
return EXCEPTION_CONTINUE_SEARCH;
32+
}
33+
34+
[System::STAThread]
35+
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int)
36+
{
37+
int result = 0;
38+
// BugTrap can't handle stack overflow exception, so handle it here
39+
__try
40+
{
41+
result = entry_point(lpCmdLine);
42+
}
43+
__except (StackoverflowFilter(GetExceptionCode()))
44+
{
45+
_resetstkoflw();
46+
FATAL("stack overflow");
47+
}
48+
return 0;
49+
}

src/editors/xrEditor/pch.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "pch.hpp"

src/editors/xrEditor/pch.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include "Common/Common.hpp"
4+
#include "Common/FSMacros.hpp"
5+
#include "xrCore/xrCore.h"
6+
#include "xrCommon/xr_vector.h"
7+
#include "xrCommon/xr_string.h"
8+
9+
#include <msclr/marshal.h>
10+
11+
inline System::String^ BackSlashToSlash(pcstr originalString)
12+
{
13+
System::String^ newString = gcnew System::String(originalString);
14+
return newString->Replace('\\', '/');
15+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Mixed|Win32">
9+
<Configuration>Mixed</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Debug|x64">
17+
<Configuration>Debug</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Mixed|x64">
21+
<Configuration>Mixed</Configuration>
22+
<Platform>x64</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x64">
25+
<Configuration>Release</Configuration>
26+
<Platform>x64</Platform>
27+
</ProjectConfiguration>
28+
</ItemGroup>
29+
<PropertyGroup Label="Globals">
30+
<VCProjectVersion>15.0</VCProjectVersion>
31+
<ProjectGuid>{BE4B23E7-2CA8-4607-A473-116C4242F23D}</ProjectGuid>
32+
<RootNamespace>xrEditor</RootNamespace>
33+
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
34+
</PropertyGroup>
35+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
36+
<PropertyGroup Label="Configuration">
37+
<ConfigurationType>Application</ConfigurationType>
38+
<PlatformToolset>v141</PlatformToolset>
39+
<CharacterSet>MultiByte</CharacterSet>
40+
<CLRSupport>true</CLRSupport>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
43+
<WholeProgramOptimization>true</WholeProgramOptimization>
44+
</PropertyGroup>
45+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46+
<ImportGroup Label="ExtensionSettings">
47+
</ImportGroup>
48+
<ImportGroup Label="Shared">
49+
</ImportGroup>
50+
<ImportGroup Label="PropertySheets">
51+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
52+
<Import Project="..\..\Common.props" />
53+
</ImportGroup>
54+
<PropertyGroup Label="UserMacros" />
55+
<PropertyGroup />
56+
<ItemDefinitionGroup>
57+
<ClCompile>
58+
<ConformanceMode>true</ConformanceMode>
59+
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile>
60+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
61+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
62+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
63+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
64+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
65+
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
66+
</ClCompile>
67+
<Link>
68+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Windows</SubSystem>
69+
</Link>
70+
<Link>
71+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">Windows</SubSystem>
72+
</Link>
73+
<Link>
74+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Windows</SubSystem>
75+
</Link>
76+
<Link>
77+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Windows</SubSystem>
78+
</Link>
79+
<Link>
80+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">Windows</SubSystem>
81+
</Link>
82+
<Link>
83+
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Windows</SubSystem>
84+
</Link>
85+
</ItemDefinitionGroup>
86+
<ItemGroup>
87+
<ClInclude Include="pch.hpp" />
88+
</ItemGroup>
89+
<ItemGroup>
90+
<ClCompile Include="entry_point.cpp" />
91+
<ClCompile Include="pch.cpp">
92+
<PrecompiledHeader>Create</PrecompiledHeader>
93+
</ClCompile>
94+
</ItemGroup>
95+
<ItemGroup>
96+
<ProjectReference Include="..\..\xrCore\xrCore.vcxproj">
97+
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project>
98+
</ProjectReference>
99+
<ProjectReference Include="..\xrECore\xrECore.vcxproj">
100+
<Project>{87d068ec-1789-4f09-a9ec-54cf276955e0}</Project>
101+
</ProjectReference>
102+
<ProjectReference Include="..\xrSdkControls\xrSdkControls.csproj">
103+
<Project>{e9dc16a3-d0fa-4924-af6e-f6fdf3ea0661}</Project>
104+
</ProjectReference>
105+
</ItemGroup>
106+
<ItemGroup>
107+
<Reference Include="System" />
108+
<Reference Include="System.Data" />
109+
<Reference Include="System.Drawing" />
110+
<Reference Include="System.Windows.Forms" />
111+
<Reference Include="System.Xml" />
112+
<Reference Include="WindowsBase" />
113+
</ItemGroup>
114+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
115+
<ImportGroup Label="ExtensionTargets">
116+
</ImportGroup>
117+
</Project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<ClInclude Include="pch.hpp" />
5+
</ItemGroup>
6+
<ItemGroup>
7+
<ClCompile Include="pch.cpp" />
8+
<ClCompile Include="entry_point.cpp" />
9+
</ItemGroup>
10+
</Project>

src/engine.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xr_3da", "xr_3da\xr_3da.vcx
260260
EndProject
261261
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrECore", "editors\xrECore\xrECore.vcxproj", "{87D068EC-1789-4F09-A9EC-54CF276955E0}"
262262
EndProject
263+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrEditor", "editors\xrEditor\xrEditor.vcxproj", "{BE4B23E7-2CA8-4607-A473-116C4242F23D}"
264+
EndProject
263265
Global
264266
GlobalSection(SolutionConfigurationPlatforms) = preSolution
265267
Debug|x64 = Debug|x64
@@ -1197,6 +1199,18 @@ Global
11971199
{87D068EC-1789-4F09-A9EC-54CF276955E0}.Release|x64.Build.0 = Release|x64
11981200
{87D068EC-1789-4F09-A9EC-54CF276955E0}.Release|x86.ActiveCfg = Release|Win32
11991201
{87D068EC-1789-4F09-A9EC-54CF276955E0}.Release|x86.Build.0 = Release|Win32
1202+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Debug|x64.ActiveCfg = Debug|x64
1203+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Debug|x64.Build.0 = Debug|x64
1204+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Debug|x86.ActiveCfg = Debug|Win32
1205+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Debug|x86.Build.0 = Debug|Win32
1206+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Mixed|x64.ActiveCfg = Mixed|x64
1207+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Mixed|x64.Build.0 = Mixed|x64
1208+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Mixed|x86.ActiveCfg = Mixed|Win32
1209+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Mixed|x86.Build.0 = Mixed|Win32
1210+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x64.ActiveCfg = Release|x64
1211+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x64.Build.0 = Release|x64
1212+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x86.ActiveCfg = Release|Win32
1213+
{BE4B23E7-2CA8-4607-A473-116C4242F23D}.Release|x86.Build.0 = Release|Win32
12001214
EndGlobalSection
12011215
GlobalSection(SolutionProperties) = preSolution
12021216
HideSolutionNode = FALSE
@@ -1274,6 +1288,7 @@ Global
12741288
{0165B392-9E93-3AA3-89F3-20ACB545095D} = {8F5855A5-9F00-40E5-8B2A-EBDB4A31077D}
12751289
{3AF44175-2EED-3C67-B324-93B1572B7EDD} = {8F5855A5-9F00-40E5-8B2A-EBDB4A31077D}
12761290
{87D068EC-1789-4F09-A9EC-54CF276955E0} = {CB0C814D-FB4E-453B-B7A0-716F4A1EACA4}
1291+
{BE4B23E7-2CA8-4607-A473-116C4242F23D} = {CB0C814D-FB4E-453B-B7A0-716F4A1EACA4}
12771292
EndGlobalSection
12781293
GlobalSection(ExtensibilityGlobals) = postSolution
12791294
SolutionGuid = {C5A32302-94F5-41B8-9606-017BB6BA69A6}

0 commit comments

Comments
 (0)