-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test and patch for short-name-app-config bug
Fixes #241 When R executes AP.exe it uses the `Sys.which` function to resolve the executable name. This function uses the Windows 8.3 short-name functionality by defualt which launches the application as ANALYS~1.exe. Since the application is no longer named correctly, the AnalysisPrograms.exe.config file cannot be loaded and all of our application binding redirects are ignored. Subsequently the fusion assembly loader throws errors like: ``` System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. - Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` In addition to the stack overflow post that should how to update the current domain's App.Config file and settings, I also had to force Fusion to redo it's setup. This method, is to say the least, fragile, and we can expect it to fail in the port to .NET Core. Additionally added a AP_DEFAULT_LOG_VERBOSITY flag that set the log level verbosity before the command line is parsed. Additionally added a few extension method helpers and associated tests
- Loading branch information
Showing
15 changed files
with
320 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
See [Contributing](https://github.com/QutEcoacoustics/audio-analysis/blob/master/CONTRIBUTING.md) | ||
See [Contributing](https://github.com/QutEcoacoustics/audio-analysis/blob/master/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// <copyright file="EnumExtensions.cs" company="QutEcoacoustics"> | ||
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group). | ||
// </copyright> | ||
|
||
namespace System | ||
{ | ||
using Acoustics.Shared; | ||
|
||
public static class EnumExtensions | ||
{ | ||
public static ImageChrome ToImageChrome(this bool chromeOrNot) => chromeOrNot ? ImageChrome.With : ImageChrome.Without; | ||
|
||
public static string PrintEnumOptions(this Type @enum) | ||
{ | ||
if (@enum == null || !@enum.IsEnum) | ||
{ | ||
throw new ArgumentException($"{nameof(PrintEnumOptions)} must only be used on an enum type", nameof(@enum)); | ||
} | ||
|
||
return Enum.GetValues(@enum).Join("|"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.