Skip to content

Commit

Permalink
Minor Config Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Slep-wt committed Jan 22, 2020
1 parent fe698d3 commit 4e13215
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.dll
*.exe
src/packages
src/aex/bin
src/aex/obj

.vs/
29 changes: 13 additions & 16 deletions src/aex/Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Threading.Tasks;
using System.Collections.Generic;


/*
* File: Entry.cs
* Author: Slep.
Expand All @@ -18,7 +17,7 @@

#if !A3COMPAT
using System.Text.RegularExpressions;
class main
class DebugMain
{
static Regex cr = new Regex(@"(\[.*?\])|(\"".*?\"")|(\d)");
static bool Loaded = false;
Expand All @@ -35,6 +34,8 @@ static void Main()
Loaded = true;
}

Console.WriteLine("Syntax: {[command], \"<params>\", ...}");

while (!exit)
{
try
Expand All @@ -43,16 +44,12 @@ static void Main()
MatchCollection cm = cr.Matches(cmd);
List<string> parameters = new List<string>();
string command = "";

parameters.Add(sid);

foreach (Match x in cm)
{
string y = x.ToString();
Console.WriteLine(y);
if (y.StartsWith("[")) {
command = y.Trim(new char[] { '[', ']' });
Console.WriteLine(command);
} else if (y.StartsWith("\""))
parameters.Add(y.Trim(new char[] { '"', '"' }));
else
Expand All @@ -67,7 +64,7 @@ static void Main()
else
aex.EntryPoint.RvExtension(ref output, 1024, command);

Console.Write(output.ToString());
Console.WriteLine(output.ToString());
output.Clear();
}
catch (Exception e)
Expand All @@ -90,9 +87,9 @@ public class EntryPoint
internal static readonly string version = "1.0.10";
#if A3COMPAT
#if is64
[DllExport("RVExtensionVersion", CallingConvention = CallingConvention.Winapi)]
[DllExport("RVExtensionVersion", CallingConvention = CallingConvention.StdCall)]
#else
[DllExport("_RVExtensionVersion@8", CallingConvention = CallingConvention.Winapi)]
[DllExport("_RVExtensionVersion@8", CallingConvention = CallingConvention.StdCall)]
#endif
#endif
public static void RvExtensionVersion(ref StringBuilder output, int outputSize)
Expand All @@ -103,9 +100,9 @@ public static void RvExtensionVersion(ref StringBuilder output, int outputSize)

#if A3COMPAT
#if is64
[DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
[DllExport("RVExtension", CallingConvention = CallingConvention.StdCall)]
#else
[DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]
[DllExport("_RVExtension@12", CallingConvention = CallingConvention.StdCall)]
#endif
public static void RvExtension(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string function)
#else
Expand Down Expand Up @@ -142,11 +139,11 @@ public static void RvExtension(ref StringBuilder output, int outputSize, string
}

#if A3COMPAT
#if is64
[DllExport("RVExtensionArgs", CallingConvention = CallingConvention.Winapi)]
#else
[DllExport("_RVExtensionArgs@20", CallingConvention = CallingConvention.Winapi)]
#endif
#if is64
[DllExport("RVExtensionArgs", CallingConvention = CallingConvention.StdCall)]
#else
[DllExport("_RVExtensionArgs@20", CallingConvention = CallingConvention.StdCall)]
#endif
public static int RvExtensionArgs(StringBuilder output, int outputSize,
[MarshalAs(UnmanagedType.LPStr)] string function,
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr, SizeParamIndex = 4)] string[] args, int argCount)
Expand Down
6 changes: 3 additions & 3 deletions src/aex/aex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;is64;A3COMPAT</DefineConstants>
<DefineConstants>TRACE;A3COMPAT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -47,7 +47,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;A3COMPAT;is64</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
Expand All @@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;A3COMPAT</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
Expand Down

0 comments on commit 4e13215

Please sign in to comment.