Skip to content

Commit

Permalink
Fix build: Logger.h:DumpLog() returns; don't use '..' in includes; fi…
Browse files Browse the repository at this point in the history
…x vcxproj(.filters)
  • Loading branch information
Dyddye committed May 3, 2022
1 parent af047d4 commit 02ad171
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ExampleMod/ExampleMod.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;EXAMPLEMOD_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)\MinHook\;$(SolutionDir)\UE4;$(SolutionDir)\UnrealEngineModLoader;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory)\;$(MSBuildProjectDirectory)\..\UnrealEngineModLoader;$(MSBuildProjectDirectory)\..\UnrealEngineModLoader\UnrealEngineModLoader;$(MSBuildProjectDirectory)\..\UnrealEngineModLoader\MinHook;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
Expand Down
2 changes: 1 addition & 1 deletion LoaderAutoInjector/Loader/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <windows.h>
#include <process.h>
#include <string>
#include "../../UnrealEngineModLoader/INI/INI.h"
#include "INI/INI.h"

std::string GetModuleFilePath(HMODULE hModule)
{
Expand Down
1 change: 1 addition & 0 deletions LoaderAutoInjector/LoaderAutoInjector.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<ConformanceMode>true</ConformanceMode>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory)\;$(MSBuildProjectDirectory)\..\UnrealEngineModLoader;$(MSBuildProjectDirectory)\..\UnrealEngineModLoader\UnrealEngineModLoader</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion LoaderAutoInjector/xinput1_3/xinput1_3.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//#include <stdafx.h>
#include <windows.h>
#include <stdio.h>
#include "../Loader/Loader.h"
#include "Loader/Loader.h"
HINSTANCE mHinst = 0, mHinstDLL = 0;
extern "C" UINT_PTR mProcs[12] = { 0 };

Expand Down
1 change: 1 addition & 0 deletions UnrealEngineModLauncher/UnrealEngineModLauncher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory)\</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion UnrealEngineModLoader/ImGui/imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Index of this file:
#include <stdarg.h> // va_list, va_start, va_end
#include <stddef.h> // ptrdiff_t, NULL
#include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp
#include "../UMLDefs.h"
#include "UMLDefs.h"

// Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
Expand Down
4 changes: 3 additions & 1 deletion UnrealEngineModLoader/UnrealEngineModLoader.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<ClInclude Include="ImGui\imstb_rectpack.h" />
<ClInclude Include="ImGui\imstb_textedit.h" />
<ClInclude Include="ImGui\imstb_truetype.h" />
<ClInclude Include="INI\INI.h" />
<ClInclude Include="LoaderUI.h" />
<ClInclude Include="PakLoader.h" />
<ClInclude Include="UE4\CoreUObject_classes.hpp" />
Expand Down Expand Up @@ -191,7 +192,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;UNREALENGINEMODLOADER_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory)\UnrealEngineModLoader\;$(MSBuildProjectDirectory)\MinHook\;$(MSBuildProjectDirectory)\packages\minhook.1.3\lib\native\lib;$(MSBuildProjectDirectory)\INI\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory)\;$(MSBuildProjectDirectory)\UnrealEngineModLoader\;$(MSBuildProjectDirectory)\MinHook\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
Expand All @@ -201,6 +202,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>$(MSBuildProjectDirectory)\MinHook\lib\libMinHook-x64-v141-mtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
6 changes: 6 additions & 0 deletions UnrealEngineModLoader/UnrealEngineModLoader.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<Filter Include="UnrealModLoader\Mod">
<UniqueIdentifier>{31c4735e-1d2d-4355-95df-b9c75892f6af}</UniqueIdentifier>
</Filter>
<Filter Include="INI">
<UniqueIdentifier>{cdb593e4-f03a-4910-a0c7-67c554f563a2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="UnrealEngineModLoader\dllmain.cpp">
Expand Down Expand Up @@ -145,5 +148,8 @@
<Filter>UnrealModLoader\Utilities</Filter>
</ClInclude>
<ClInclude Include="UMLDefs.h" />
<ClInclude Include="INI\INI.h">
<Filter>INI</Filter>
</ClInclude>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include "Utilities/Logger.h"
#include <string>
#include <filesystem>
#include "INI.h"
#include "INI/INI.h"
#include "Utilities/Pattern.h"
#include "Utilities/Version.h"
#include "../Hooks.h"
#include "../UE4/Ue4.hpp"
#include "Hooks.h"
#include "UE4/Ue4.hpp"
GameProfile GameProfile::SelectedGameProfile;

DWORD StringToDWord(std::string str)
Expand Down
2 changes: 1 addition & 1 deletion UnrealEngineModLoader/UnrealEngineModLoader/Memory/mem.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "../UMLDefs.h"
#include "UMLDefs.h"
#include <windows.h>
#include <cstdio>
#include <cinttypes>
Expand Down
4 changes: 2 additions & 2 deletions UnrealEngineModLoader/UnrealEngineModLoader/Mod/Mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "Utilities/Logger.h"
#include "GameInfo/GameInfo.h"
#include "Utilities/Globals.h"
#include "../LoaderUI.h"
#include "Ue4.hpp"
#include "LoaderUI.h"
#include "UE4/Ue4.hpp"

class LOADER_API Mod
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Dumper.h"
#include <windows.h>
#include "../UE4/Ue4.hpp"
#include "UE4/Ue4.hpp"
#include "Globals.h"

Dumper* Dumper::DumpRef;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../UE4/Ue4.hpp"
#include "UE4/Ue4.hpp"
#include "Utilities/Logger.h"
namespace ClassDefFinder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "GameInfo/GameInfo.h"
#include "../UE4/CoreUObject_classes.hpp"
#include "UE4/CoreUObject_classes.hpp"
namespace ClassDefFinder
{
bool FindUObjectDefs(UE4::UObject* CoreUObject, UE4::UObject* UEObject);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once
#include "UE4.hpp"
#include "UE4/Ue4.hpp"
#include <map>
#include <iostream>
#include <string>
#include "../UMLDefs.h"
#include "../Mod/Mod.h"
#include "../EventSystem.h"
#include "UMLDefs.h"
#include "Mod/Mod.h"
#include "EventSystem.h"
struct ModInfo
{
std::wstring ModName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <vector>
#include <string>

#include "../UMLDefs.h"
#include "UMLDefs.h"

#define APP_NAME "UnrealModLoader"
#define LOG_STREAM stdout
Expand Down Expand Up @@ -99,13 +99,16 @@ class LOADER_API Log
static bool DumpLog()
{
FILE* Log = NULL;
fopen_s(&Log, "UML-Log.txt", "w+");
if (fopen_s(&Log, "UML-Log.txt", "w+"))
return false;

for (size_t i = 0; i < LogArray.size(); i++)
{
auto currentstring = LogArray[i];
fprintf(Log, "%s\n", currentstring.c_str());
}
fclose(Log);
return true;
}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#include "Logger.h"
#include "include/MinHook.h"
#include "Globals.h"
#ifdef UNREALENGINEMODLOADER_EXPORTS //Stops dumb errors from the ExampleMod shit
#pragma comment(lib,"../../Minhook/lib/libMinHook-x64-v141-mtd.lib")
#endif

namespace MinHook
{
Expand Down

0 comments on commit 02ad171

Please sign in to comment.