Skip to content

Commit

Permalink
Merge pull request #97 from MerlinCooper/91-video-encoding-fails-afte…
Browse files Browse the repository at this point in the history
…r-compiled-in-Azure-DevOps

Mitigation to enable transcoding when compiled using Azure DevOps
  • Loading branch information
MerlinCooper authored Feb 5, 2023
2 parents 7941392 + 1f37dca commit fe7c363
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
4 changes: 4 additions & 0 deletions AssemblyToSign.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(build.artifactstagingdirectory)\bin\Release\iRacingReplayDirector.exe
$(build.artifactstagingdirectory)\bin\Release\Plugins\NoReplay\NoReplay.dll
$(build.artifactstagingdirectory)\bin\Release\Plugins\JockeOverlays\JockeOverlays.dll
$(build.artifactstagingdirectory)\bin\Release\Plugins\StandardOverlays\StandardOverlays.dll
47 changes: 25 additions & 22 deletions Support/PluginProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,31 @@ public PluginProxy(string pluginName)
{
if (!pluginName.ToLower().EndsWith(".dll"))
pluginName = Path.Combine(PluginPath, pluginName, pluginName + ".dll");
/* previous code handling StandardOverlay different than other plugins - likely not necessary - currently in testing
if (pluginName == StandardOverlaysName)
pluginName = Path.Combine(PluginPath, StandardOverlayDirectory, StandardOverlayDirectory + ".dll");
else
pluginName = Path.Combine(PluginPath, pluginName, pluginName + ".dll");*/
TraceInfo.WriteLine("Trying to load overlay plugin:{0}", pluginName);
var an = AssemblyName.GetAssemblyName(pluginName);
var assembly = Assembly.Load(an);
TraceInfo.WriteLine("Plugin {0} successfully loaded", pluginName);

pluginType = assembly.GetTypes()
.Where(t => !t.IsInterface)
.Where(t => !t.IsAbstract)
.FirstOrDefault(t => t.FullName.EndsWith(".MyPlugin"));

plugin = Activator.CreateInstance(pluginType);

var x = assembly.GetTypes();

pluginSettingsType = assembly.GetTypes()
.Where(t => !t.IsInterface)
.FirstOrDefault(t => t.FullName.EndsWith(".Settings"));

try
{
TraceInfo.WriteLine("Trying to load overlay plugin:{0}", pluginName);
var an = AssemblyName.GetAssemblyName(pluginName);
var assembly = Assembly.Load(an);
TraceInfo.WriteLine("Plugin {0} successfully loaded", pluginName);

pluginType = assembly.GetTypes()
.Where(t => !t.IsInterface)
.Where(t => !t.IsAbstract)
.FirstOrDefault(t => t.FullName.EndsWith(".MyPlugin"));

plugin = Activator.CreateInstance(pluginType);

var x = assembly.GetTypes();

pluginSettingsType = assembly.GetTypes()
.Where(t => !t.IsInterface)
.FirstOrDefault(t => t.FullName.EndsWith(".Settings"));
}catch (Exception ex)
{
TraceDebug.WriteLine(ex.ToString());
}

}

public void DrawIntroFlashCard(long duration)
Expand Down
3 changes: 3 additions & 0 deletions iRacingReplayDirector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,7 @@
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<Content Include="AssemblyToSign.txt" />
</ItemGroup>
</Project>

0 comments on commit fe7c363

Please sign in to comment.