Skip to content

Commit

Permalink
All plugins compile and tidily export their files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendly0Fire committed Feb 7, 2020
1 parent cf5bd7b commit 7daa197
Show file tree
Hide file tree
Showing 23 changed files with 72 additions and 929 deletions.
2 changes: 1 addition & 1 deletion FLHookSDK
20 changes: 16 additions & 4 deletions plugins/Plugin Common.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup />
<PropertyGroup>
<OutDir>$(SolutionDir)..\bin\$(Configuration)\plugins\$(ProjectName)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>FLHook.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CustomBuildStep />
<PostBuildEvent>
<Command>xcopy /y "$(OutDir)$(TargetName).dll" "$(DistDir)flhook_plugins\"
xcopy /y "$(OutDir)$(TargetName).pdb" "$(DistDir)flhook_plugins\"
xcopy /y "$(OutDir)*.ini" "$(DistDir)flhook_plugins\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
</Project>
87 changes: 2 additions & 85 deletions plugins/base_plugin/Base Plugin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,97 +44,16 @@
<Import Project="..\..\project\Common.props" />
<Import Project="..\Plugin Common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
<LinkIncremental>true</LinkIncremental>
<TargetName>base</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)..\plugins\flhookplugin_sdk\headers;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<TargetName>base</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Command>copy /Y $(OutDir)$(TargetName).dll ..\..\bin-vc14\flhook_plugins\$(TargetName).dll
copy /Y $(OutDir)$(TargetName).dll C:\Discovery\FreelancerSDK\EXE\flhook_plugins\$(TargetName).dll
</Command>
<Outputs>..\..\bin-vc14\flhook_plugins\$(TargetName).dll;%(Outputs)</Outputs>
<Inputs>$(OutDir)$(TargetName).dll</Inputs>
</CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>..\hookext_plugin\Release\ahookext.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)base.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command />
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Command>copy /Y $(OutDir)$(TargetName).dll ..\..\bin-vc14\flhook_plugins\
copy /Y $(OutDir)$(TargetName).pdb ..\..\bin-vc14\flhook_plugins\
</Command>
<Outputs>..\..\bin-vc14\flhook_plugins\$(TargetName).dll;..\..\bin-vc14\flhook_plugins\$(TargetName).pdb;%(Outputs)</Outputs>
<Inputs>$(OutDir)$(TargetName).dll</Inputs>
</CustomBuildStep>
<ClCompile>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>..\hookext_plugin\Release\ahookext.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command />
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BuildModule.cpp" />
Expand All @@ -151,13 +70,11 @@ copy /Y $(OutDir)$(TargetName).pdb ..\..\bin-vc14\flhook_plugins\
<ClCompile Include="StorageModule.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\project-vc14\FLHook.vcxproj">
<ProjectReference Include="..\..\project\FLHook.vcxproj">
<Project>{fe6eb3c9-da22-4492-aec3-068c9553a623}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\hookext_plugin\HookExt Plugin.vcxproj">
<Project>{81d33b95-1ddd-4f58-a24c-e2ec4a143dd0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion plugins/base_plugin/CoreModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void SpawnSolar(unsigned int & spaceID, pub::SpaceObj::SolarInfo const &
// for every player in the same system, send solar creation packet
struct SOLAR_STRUCT
{
byte dunno[0x100];
uchar dunno[0x100];
};

SOLAR_STRUCT packetSolar;
Expand Down
2 changes: 1 addition & 1 deletion plugins/base_plugin/DefenseModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void SpawnSolar(unsigned int & spaceID, pub::SpaceObj::SolarInfo const &
// for every player in the same system, send solar creation packet
struct SOLAR_STRUCT
{
byte dunno[0x100];
uchar dunno[0x100];
};

SOLAR_STRUCT packetSolar;
Expand Down
10 changes: 5 additions & 5 deletions plugins/base_plugin/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,22 +579,22 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{

// Call our function on landing
byte patch[] = { 0xe9 }; // jmpr
uchar patch[] = { 0xe9 }; // jmpr
WriteProcMem((char*)hModServer + 0x2c24c, patch, sizeof(patch));
PatchCallAddr((char*)hModServer, 0x2c24c, (char*)HkCb_LandNaked);
}

hModCommon = GetModuleHandleA("common.dll");
{
// Suppress "is dockable " error message
byte patch[] = { 0xe9 }; // jmpr
uchar patch[] = { 0xe9 }; // jmpr
WriteProcMem((char*)hModCommon + 0x576cb, patch, sizeof(patch));
PatchCallAddr((char*)hModCommon, 0x576cb, (char*)HkCb_IsDockableErrorNaked);
}

{
// Suppress GetArch() error on max hit points call
byte patch[] = { 0x90, 0x90 }; // nop nop
uchar patch[] = { 0x90, 0x90 }; // nop nop
WriteProcMem((char*)hModCommon + 0x995b6, patch, sizeof(patch));
WriteProcMem((char*)hModCommon + 0x995fc, patch, sizeof(patch));
}
Expand All @@ -608,13 +608,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
{
// Unpatch the landing hook
byte patch[] = { 0x8A, 0x43, 0x1C, 0x84, 0xC0 };
uchar patch[] = { 0x8A, 0x43, 0x1C, 0x84, 0xC0 };
WriteProcMem((char*)hModServer + 0x2c24c, patch, sizeof(patch));
}

{
// Unpatch the Suppress "is dockable " error message
byte patch[] = { 0x85, 0x86, 0xb4, 0x01, 0x00 };
uchar patch[] = { 0x85, 0x86, 0xb4, 0x01, 0x00 };
WriteProcMem((char*)hModCommon + 0x576cb, patch, sizeof(patch));
}
}
Expand Down
91 changes: 2 additions & 89 deletions plugins/cloak_plugin/Cloak Plugin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
Expand All @@ -44,109 +42,24 @@
<Import Project="..\..\project\Common.props" />
<Import Project="..\Plugin Common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
<LinkIncremental>true</LinkIncremental>
<TargetName>cloak</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)..\plugins\flhookplugin_sdk\headers;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<TargetName>cloak</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Message>Get Latest SDK</Message>
<Command>copy /Y C:\Development\flhookplugin\trunk\plugins\flhookplugin_sdk\libs\*.lib libs\
copy /Y C:\Development\flhookplugin\trunk\plugins\flhookplugin_sdk\headers\*.h headers\
</Command>
</PreBuildEvent>
<CustomBuildStep>
<Command>copy /Y $(OutDir)$(TargetName).dll ..\..\..\bin-vc14\flhook_plugins\$(TargetName).dll
copy /Y $(OutDir)$(TargetName).dll C:\Discovery\FreelancerSDK\EXE\flhook_plugins\$(TargetName).dll
</Command>
<Outputs>..\..\bin-vc14\flhook_plugins\$(TargetName).dll;%(Outputs)</Outputs>
<Inputs>$(OutDir)$(TargetName).dll</Inputs>
</CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\flhookplugin_sdk\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Async</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>./libs/FLHook.lib;./libs/FLCoreDACom.lib;./libs/FLCoreDALib.lib;./libs/FLCoreCommon.lib;./libs/FLCoreServer.lib;./libs/FLCoreRemoteClient.lib;shlwapi.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)cloak.dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command />
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Message />
<Command />
</PreBuildEvent>
<CustomBuildStep>
<Command>copy /Y $(OutDir)$(TargetName).dll ..\..\bin-vc14\flhook_plugins\
copy /Y $(OutDir)$(TargetName).pdb ..\..\bin-vc14\flhook_plugins\
</Command>
<Outputs>..\..\bin-vc14\flhook_plugins\$(TargetName).dll;..\..\bin-vc14\flhook_plugins\$(TargetName).pdb;%(Outputs)</Outputs>
<Inputs>$(OutDir)$(TargetName).dll</Inputs>
</CustomBuildStep>
<ClCompile>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Async</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention />
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command />
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Cloak.cpp" />
<ClCompile Include="PluginUtilities.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\project-vc14\FLHook.vcxproj">
<ProjectReference Include="..\..\project\FLHook.vcxproj">
<Project>{fe6eb3c9-da22-4492-aec3-068c9553a623}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
Loading

0 comments on commit 7daa197

Please sign in to comment.