64 bit update

64 bit update with a few addition logging output
This commit is contained in:
Matthew McConnell 2017-02-21 13:49:23 +00:00
parent 33a584b2e9
commit 6729e5eadd
7 changed files with 129 additions and 22 deletions

View File

@ -4,11 +4,14 @@ set MAKEPBO="C:\Program Files (x86)\Mikero\DePboTools\bin\MakePbo.exe"
rd /s /q @ExileLootDrop
mkdir @ExileLootDrop\addons
%MSBUILD% src\ExileLootDrop.sln /property:Configuration=release /target:Rebuild /verbosity:normal /nologo
copy src\ExileLootDrop\bin\Release\ExileLootDrop.dll @ExileLootDrop
copy src\ExileLootDrop\bin\Release\ExileLootDrop.cfg @ExileLootDrop
copy src\ExileLootDrop\bin\Release\ExileLootDrop.ini @ExileLootDrop
copy src\ExileLootDropTester\bin\Release\ExileLootDropTester.exe @ExileLootDrop
%MSBUILD% src\ExileLootDrop.sln /property:Configuration=release /property:Platform=x86 /target:Rebuild /verbosity:normal /nologo
copy src\ExileLootDrop\bin\x86\Release\ExileLootDrop.dll @ExileLootDrop\ExileLootDrop.dll
copy src\ExileLootDropTester\bin\x86\Release\ExileLootDropTester.exe @ExileLootDrop
%MSBUILD% src\ExileLootDrop.sln /property:Configuration=release /property:Platform=x64 /target:Rebuild /verbosity:normal /nologo
copy src\ExileLootDrop\bin\x64\Release\ExileLootDrop.dll @ExileLootDrop\ExileLootDrop_x64.dll
copy src\ExileLootDrop\bin\x64\Release\ExileLootDrop.cfg @ExileLootDrop
copy src\ExileLootDrop\bin\x64\Release\ExileLootDrop.ini @ExileLootDrop
copy LICENSE.txt @ExileLootDrop
copy README.md @ExileLootDrop

View File

@ -27,8 +27,8 @@ _input params [
];
private _packet = format['%1|%2', _table, _amount];
private _response = 'ExileLootDrop' callExtension _packet;
if (_response == 'ERROR') exitWith {
diag_log format['ExileLootDrop: Extension return error. Check logs! - %1', _packet];
if ((_response select [0, 5]) == 'ERROR') exitWith {
diag_log format['ExileLootDrop: Extension return error. Check logs! - %1 - %2', _packet, _response];
""
};
private _return = if (_amount > 1) then {

View File

@ -9,18 +9,28 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExileLootDropTester", "Exil
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|Any CPU.Build.0 = Release|Any CPU
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|Any CPU.Build.0 = Release|Any CPU
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|x64.ActiveCfg = Release|x86
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|x64.Build.0 = Release|x86
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|x86.ActiveCfg = Debug|x86
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Debug|x86.Build.0 = Debug|x86
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|x64.ActiveCfg = Release|x64
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|x64.Build.0 = Release|x64
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|x86.ActiveCfg = Release|x86
{F3DEC0AD-F490-4761-84A5-E51240FA3D91}.Release|x86.Build.0 = Release|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|x64.ActiveCfg = Release|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|x64.Build.0 = Release|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|x86.ActiveCfg = Debug|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Debug|x86.Build.0 = Debug|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|x64.ActiveCfg = Release|x64
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|x64.Build.0 = Release|x64
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|x86.ActiveCfg = Release|x86
{D4C0452C-055B-4773-920B-D9C7A70EB9D6}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -11,10 +11,10 @@ namespace ExileLootDrop
public class DllEntry
{
/// <summary>
/// Entry point method for ARMA
/// Entry point method for ARMA 32 bit
/// </summary>
[DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]
public static void RvExtension(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string function)
public static void RvExtension32(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string function)
{
try
{
@ -24,8 +24,25 @@ namespace ExileLootDrop
{
Logger.Log(Logger.Level.Error, "Uncaught Exception!");
Logger.Log(ex);
output.Append("ERROR");
}
output.Append($"ERROR - {function} - {ex.Message}");
}
}
/// <summary>
/// Entry point method for ARMA 64 bit
/// </summary>
[DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
public static void RvExtension64(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string function)
{
try
{
output.Append(Loot.Invoke(function));
}
catch (Exception ex)
{
Logger.Log(Logger.Level.Error, "Uncaught Exception!");
Logger.Log(ex);
output.Append($"ERROR - {function} - {ex.Message}");
}
}
}
}

View File

@ -31,6 +31,42 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="RGiesecke.DllExport.Metadata, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8f52d83c1a22df51, processorArchitecture=MSIL">
<HintPath>..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll</HintPath>

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
namespace ExileLootDrop
{
@ -64,7 +65,7 @@ namespace ExileLootDrop
{
var assembly = Assembly.GetExecutingAssembly();
var assemblyName = Path.GetFileNameWithoutExtension(assembly.Location);
var iniPath = Path.Combine(BasePath, $"{assemblyName}.ini");
var iniPath = Path.Combine(BasePath, $"{Regex.Replace(assemblyName, @"_x64$", string.Empty)}.ini");
if (!File.Exists(iniPath))
throw new LootException($"{assemblyName}.ini was not found");

View File

@ -32,6 +32,46 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />