-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc57908
commit c17c456
Showing
6 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#include "pch.hpp" | ||
#include "editors/xrECore/Core/ELog.h" | ||
|
||
using namespace XRay; | ||
|
||
int entry_point(pcstr commandLine) | ||
{ | ||
System::Windows::Forms::Application::EnableVisualStyles(); | ||
auto splash = gcnew ECore::Props::WindowSplash(); | ||
splash->Show(); | ||
|
||
splash->SetStatus("Loading xrDebug..."); | ||
xrDebug::Initialize(false); | ||
|
||
splash->SetStatus("Loading Core..."); | ||
Core.Initialize("OpenXRayEditor", nullptr, true); | ||
|
||
splash->SetStatus("Loading finished."); | ||
splash->Close(); | ||
|
||
auto windowMain = gcnew ECore::Props::WindowIDE(); | ||
System::Windows::Forms::Application::Run(windowMain); | ||
Core._destroy(); | ||
return 0; | ||
} | ||
|
||
int StackoverflowFilter(const int exceptionCode) | ||
{ | ||
if (exceptionCode == EXCEPTION_STACK_OVERFLOW) | ||
return EXCEPTION_EXECUTE_HANDLER; | ||
return EXCEPTION_CONTINUE_SEARCH; | ||
} | ||
|
||
[System::STAThread] | ||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int) | ||
{ | ||
int result = 0; | ||
// BugTrap can't handle stack overflow exception, so handle it here | ||
__try | ||
{ | ||
result = entry_point(lpCmdLine); | ||
} | ||
__except (StackoverflowFilter(GetExceptionCode())) | ||
{ | ||
_resetstkoflw(); | ||
FATAL("stack overflow"); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "pch.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include "Common/Common.hpp" | ||
#include "Common/FSMacros.hpp" | ||
#include "xrCore/xrCore.h" | ||
#include "xrCommon/xr_vector.h" | ||
#include "xrCommon/xr_string.h" | ||
|
||
#include <msclr/marshal.h> | ||
|
||
inline System::String^ BackSlashToSlash(pcstr originalString) | ||
{ | ||
System::String^ newString = gcnew System::String(originalString); | ||
return newString->Replace('\\', '/'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Mixed|Win32"> | ||
<Configuration>Mixed</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Mixed|x64"> | ||
<Configuration>Mixed</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<VCProjectVersion>15.0</VCProjectVersion> | ||
<ProjectGuid>{BE4B23E7-2CA8-4607-A473-116C4242F23D}</ProjectGuid> | ||
<RootNamespace>xrEditor</RootNamespace> | ||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<PlatformToolset>v141</PlatformToolset> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
<CLRSupport>true</CLRSupport> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
<Import Project="..\..\Common.props" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup /> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<ConformanceMode>true</ConformanceMode> | ||
<PrecompiledHeaderFile>pch.hpp</PrecompiledHeaderFile> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Windows</SubSystem> | ||
</Link> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">Windows</SubSystem> | ||
</Link> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Windows</SubSystem> | ||
</Link> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Windows</SubSystem> | ||
</Link> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">Windows</SubSystem> | ||
</Link> | ||
<Link> | ||
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Windows</SubSystem> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClInclude Include="pch.hpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="entry_point.cpp" /> | ||
<ClCompile Include="pch.cpp"> | ||
<PrecompiledHeader>Create</PrecompiledHeader> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\xrCore\xrCore.vcxproj"> | ||
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project> | ||
</ProjectReference> | ||
<ProjectReference Include="..\xrECore\xrECore.vcxproj"> | ||
<Project>{87d068ec-1789-4f09-a9ec-54cf276955e0}</Project> | ||
</ProjectReference> | ||
<ProjectReference Include="..\xrSdkControls\xrSdkControls.csproj"> | ||
<Project>{e9dc16a3-d0fa-4924-af6e-f6fdf3ea0661}</Project> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<ClInclude Include="pch.hpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="pch.cpp" /> | ||
<ClCompile Include="entry_point.cpp" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters