Merge pull request #395 from Tichau/integration

File Converter release v2.0.1
This commit is contained in:
Adrien Allard authored and GitHub committed 2024-03-10 23:58:53 +01:00
commit 80f0b3daab
28 files changed
+1474 -367

No files matched your search

+39 -35
View File
@@ -19,6 +19,7 @@ namespace FileConverter
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Threading;
using System.Windows;
@@ -38,7 +39,7 @@ namespace FileConverter
{
Major = 2,
Minor = 0,
Patch = 0,
Patch = 1,
};
private bool needToRunConversionThread;
@@ -47,7 +48,12 @@ namespace FileConverter
private bool verbose;
private bool showSettings;
private bool showHelp;
[DllImport("kernel32.dll")]
static extern bool AttachConsole(uint dwProcessId);
const uint ATTACH_PARENT_PROCESS = 0x0ffffffff;
public event EventHandler<ApplicationTerminateArgs> OnApplicationTerminate;
public static Version ApplicationVersion => Application.Version;
@@ -70,10 +76,18 @@ namespace FileConverter
}
}
public static void AskForShutdown()
{
Application.Current.Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown(Debug.FirstErrorCode)));
}
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Redirect standard output to the parent process in case the application is launch from command line.
AttachConsole(ATTACH_PARENT_PROCESS);
this.RegisterServices();
this.Initialize();
@@ -117,7 +131,7 @@ namespace FileConverter
if (!this.isSessionEnding && upgradeService.UpgradeVersionDescription != null && upgradeService.UpgradeVersionDescription.NeedToUpgrade)
{
Debug.Log("A new version of file converter has been found: {0}.", upgradeService.UpgradeVersionDescription.LatestVersion);
Debug.Log($"A new version of file converter has been found: {upgradeService.UpgradeVersionDescription.LatestVersion}.");
if (string.IsNullOrEmpty(upgradeService.UpgradeVersionDescription.InstallerPath))
{
@@ -134,16 +148,16 @@ namespace FileConverter
string installerPath = upgradeService.UpgradeVersionDescription.InstallerPath;
if (!System.IO.File.Exists(installerPath))
{
Debug.LogError("Can't find upgrade installer ({0}). Try to restart the application.", installerPath);
Debug.LogError($"Can't find upgrade installer ({installerPath}). Try to restart the application.");
return;
}
// Start process.
Debug.Log("Start file converter upgrade from version {0} to {1}.", ApplicationVersion, upgradeService.UpgradeVersionDescription.LatestVersion);
Debug.Log($"Start file converter upgrade from version {ApplicationVersion} to {upgradeService.UpgradeVersionDescription.LatestVersion}.");
ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(installerPath) { UseShellExecute = true, };
Debug.Log("Start upgrade process: {0}{1}.", System.IO.Path.GetFileName(startInfo.FileName), startInfo.Arguments);
Debug.Log($"Start upgrade process: {System.IO.Path.GetFileName(startInfo.FileName)}{startInfo.Arguments}.");
Process process = new System.Diagnostics.Process { StartInfo = startInfo };
process.Start();
@@ -172,7 +186,7 @@ namespace FileConverter
else
{
Debug.LogError("Can't retrieve view model locator.");
this.Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
Application.AskForShutdown();
}
if (this.TryFindResource("Upgrade") is UpgradeService upgradeService)
@@ -182,7 +196,7 @@ namespace FileConverter
else
{
Debug.LogError("Can't retrieve Upgrade service.");
this.Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
Application.AskForShutdown();
}
services
@@ -217,7 +231,7 @@ namespace FileConverter
for (int index = 0; index < args.Length; index++)
{
string argument = args[index];
Debug.Log("Arg{0}: {1}", index, argument);
Debug.Log($"Arg{index}: {argument}");
}
Debug.Log(string.Empty);
@@ -233,7 +247,6 @@ namespace FileConverter
// Parse arguments.
bool quitAfterStartup = false;
int quitExitCode = 0;
List<string> filePaths = new List<string>();
string conversionPresetName = null;
for (int index = 1; index < args.Length; index++)
@@ -254,8 +267,7 @@ namespace FileConverter
case "post-install-init":
if (!settingsService.PostInstallationInitialization())
{
quitExitCode = 0x0F;
Debug.LogError(quitExitCode, $"Failed to execute post install initialization.");
Debug.LogError(errorCode: 0x0F, $"Failed to execute post install initialization.");
}
quitAfterStartup = true;
@@ -267,8 +279,7 @@ namespace FileConverter
if (index >= args.Length - 1)
{
quitExitCode = 0x0B;
Debug.LogError(quitExitCode, $"Invalid format.");
Debug.LogError(errorCode: 0x0B, $"Invalid format.");
break;
}
@@ -277,8 +288,7 @@ namespace FileConverter
if (!Helpers.RegisterShellExtension(shellExtensionPath))
{
quitExitCode = 0x0C;
Debug.LogError(quitExitCode, $"Failed to register shell extension {shellExtensionPath}.");
Debug.LogError(errorCode: 0x0C, $"Failed to register shell extension {shellExtensionPath}.");
}
break;
@@ -290,8 +300,7 @@ namespace FileConverter
if (index >= args.Length - 1)
{
quitExitCode = 0x0D;
Debug.LogError(quitExitCode, $"Invalid format.");
Debug.LogError(errorCode: 0x0D, $"Invalid format.");
break;
}
@@ -300,8 +309,7 @@ namespace FileConverter
if (!Helpers.UnregisterExtension(shellExtensionPath))
{
quitExitCode = 0x0E;
Debug.LogError(quitExitCode, $"Failed to unregister shell extension {shellExtensionPath}.");
Debug.LogError(errorCode: 0x0E, $"Failed to unregister shell extension {shellExtensionPath}.");
}
break;
@@ -320,8 +328,7 @@ namespace FileConverter
if (index >= args.Length - 1)
{
quitAfterStartup = true;
quitExitCode = 0x01;
Debug.LogError(quitExitCode, $"Invalid format.");
Debug.LogError(errorCode: 0x01, $"Invalid format.");
break;
}
@@ -333,8 +340,7 @@ namespace FileConverter
if (index >= args.Length - 1)
{
quitAfterStartup = true;
quitExitCode = 0x02;
Debug.LogError(quitExitCode, $"Invalid format.");
Debug.LogError(errorCode: 0x02, $"Invalid format.");
break;
}
@@ -353,8 +359,7 @@ namespace FileConverter
catch (Exception exception)
{
quitAfterStartup = true;
quitExitCode = 0x03;
Debug.LogError(quitExitCode, $"Can't read input files list: {exception}");
Debug.LogError(errorCode: 0x03, $"Can't read input files list: {exception}");
}
index++;
@@ -368,7 +373,7 @@ namespace FileConverter
break;
default:
Debug.LogError("Unknown application argument: '--{0}'.", parameterTitle);
Debug.LogError($"Unknown application argument: '--{parameterTitle}'.");
return;
}
}
@@ -380,18 +385,17 @@ namespace FileConverter
if (settingsService.Settings == null)
{
Debug.LogError("Can't load File Converter settings. The application will now shutdown, if you want to fix the problem yourself please edit or delete the file: C:\\Users\\UserName\\AppData\\Local\\FileConverter\\Settings.user.xml.");
Debug.LogError(errorCode: 0x04, "Can't load File Converter settings. The application will now shutdown, if you want to fix the problem yourself please edit or delete the file: C:\\Users\\UserName\\AppData\\Local\\FileConverter\\Settings.user.xml.");
quitAfterStartup = true;
quitExitCode = 13;
}
if (quitAfterStartup)
{
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown(quitExitCode)));
Application.AskForShutdown();
return;
}
Debug.Assert(quitExitCode == 0, "An error happened during the initialization.");
Debug.Assert(Debug.FirstErrorCode == 0, "An error happened during the initialization.");
// Check for upgrade.
if (settingsService.Settings.CheckUpgradeAtStartup)
@@ -407,8 +411,8 @@ namespace FileConverter
conversionPreset = settingsService.Settings.GetPresetFromName(conversionPresetName);
if (conversionPreset == null)
{
Debug.LogError("Invalid conversion preset '{0}'. (code 0x02)", conversionPresetName);
Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
Debug.LogError(errorCode: 0x02, $"Invalid conversion preset '{conversionPresetName}'.");
Application.AskForShutdown();
return;
}
}
@@ -418,7 +422,7 @@ namespace FileConverter
IConversionService conversionService = Ioc.Default.GetRequiredService<IConversionService>();
// Create conversion jobs.
Debug.Log("Create jobs for conversion preset: '{0}'", conversionPreset.FullName);
Debug.Log($"Create jobs for conversion preset: '{conversionPreset.FullName}'");
try
{
for (int index = 0; index < filePaths.Count; index++)
@@ -488,7 +492,7 @@ namespace FileConverter
this.OnApplicationTerminate.Invoke(this, new ApplicationTerminateArgs(remainingTime));
}
this.Dispatcher.BeginInvoke((Action)(() => Application.Current.Shutdown()));
Application.AskForShutdown();
}
}
}
@@ -312,7 +312,7 @@ namespace FileConverter.ConversionJobs
this.State = ConversionState.Ready;
}
Debug.Log("Job initialized: Preset: '{0}' Input: {1} Output: {2}", this.ConversionPreset.FullName, this.InputFilePath, this.OutputFilePath);
Debug.Log($"Job initialized: Preset: '{this.ConversionPreset.FullName}' Input: {this.InputFilePath} Output: {this.OutputFilePath}");
if (this.State != ConversionState.Failed)
{
@@ -332,7 +332,7 @@ namespace FileConverter.ConversionJobs
throw new Exception("Invalid conversion state.");
}
Debug.Log("Convert file {0} to {1}.", this.InputFilePath, this.OutputFilePath);
Debug.Log($"Convert file {this.InputFilePath} to {this.OutputFilePath}.");
this.StartTime = DateTime.Now;
this.State = ConversionState.InProgress;
@@ -407,8 +407,8 @@ namespace FileConverter.ConversionJobs
}
catch (Exception exception)
{
Debug.Log("Can't delete file '{0}' after conversion job failure.", outputFilePath);
Debug.Log("An exception as been thrown: {0}.", exception.ToString());
Debug.Log($"Can't delete file '{outputFilePath}' after conversion job failure.");
Debug.Log($"An exception as been thrown: {exception}.");
}
}
}
@@ -436,12 +436,12 @@ namespace FileConverter.ConversionJobs
string newPath = PathHelpers.GenerateUniquePath(archivePath + "\\" + inputFilename);
System.IO.File.Move(this.InputFilePath, newPath);
Debug.Log("Input file moved in archive folder: '{0}'", newPath);
Debug.Log($"Input file moved in archive folder: '{newPath}'");
break;
case InputPostConversionAction.Delete:
System.IO.File.Delete(this.InputFilePath);
Debug.Log("Input file deleted: '{0}'", this.initialInputPath);
Debug.Log($"Input file deleted: '{this.initialInputPath}'");
break;
}
@@ -455,7 +455,7 @@ namespace FileConverter.ConversionJobs
protected void ConversionFailed(string exitingMessage)
{
Debug.Log("Fail: {0}", exitingMessage);
Debug.Log($"Fail: {exitingMessage}");
if (this.State == ConversionState.Failed)
{
@@ -483,7 +483,7 @@ namespace FileConverter.ConversionJobs
var originalFileCreationTime = System.IO.File.GetCreationTimeUtc(this.InputFilePath);
var originalFileLastAccesTime = System.IO.File.GetLastAccessTimeUtc(this.InputFilePath);
var originalFileLastWriteTime = System.IO.File.GetLastWriteTimeUtc(this.InputFilePath);
Debug.Log(" original timestamp: {0}, {1}, {2}", originalFileCreationTime, originalFileLastAccesTime, originalFileLastWriteTime);
Debug.Log($" original timestamp: {originalFileCreationTime}, {originalFileLastAccesTime}, {originalFileLastWriteTime}");
for (int index = 0; index < this.OutputFilePaths.Length; index++)
{
@@ -493,12 +493,12 @@ namespace FileConverter.ConversionJobs
System.IO.File.SetCreationTimeUtc(outputFilePath, originalFileCreationTime);
System.IO.File.SetLastAccessTimeUtc(outputFilePath, originalFileLastAccesTime);
System.IO.File.SetLastWriteTimeUtc(outputFilePath, originalFileLastWriteTime);
Debug.Log(" output file '{0}' timestamp changed", outputFilePath);
Debug.Log($" output file '{outputFilePath}' timestamp changed");
}
catch (Exception exception)
{
Debug.Log("Can't change timestamp from file '{0}'", outputFilePath);
Debug.Log("An exception as been thrown: {0}.", exception.ToString());
Debug.Log($"Can't change timestamp from file '{outputFilePath}'");
Debug.Log($"An exception as been thrown: {exception}.");
}
}
@@ -107,10 +107,10 @@ namespace FileConverter.ConversionJobs
this.UserState = Properties.Resources.ConversionStateConversion;
Diagnostics.Debug.Log("Convert excel document to pdf.");
Debug.Log("Convert excel document to pdf.");
this.document.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, this.intermediateFilePath);
Diagnostics.Debug.Log("Close excel document '{0}'.", this.InputFilePath);
Debug.Log($"Close excel document '{this.InputFilePath}'.");
this.document.Close(false);
this.document = null;
@@ -126,7 +126,7 @@ namespace FileConverter.ConversionJobs
Task updateProgress = this.UpdateProgress();
Diagnostics.Debug.Log("Convert pdf to images.");
Debug.Log("Convert pdf to images.");
this.pdf2ImageConversionJob.StartConversion();
@@ -138,7 +138,7 @@ namespace FileConverter.ConversionJobs
if (!string.IsNullOrEmpty(this.intermediateFilePath))
{
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -213,7 +213,7 @@ namespace FileConverter.ConversionJobs
if (this.document == null)
{
Diagnostics.Debug.Log("Load excel document '{0}'.", this.InputFilePath);
Debug.Log($"Load excel document '{this.InputFilePath}'.");
this.document = this.application.Workbooks.Open(this.InputFilePath, System.Reflection.Missing.Value, true);
}
@@ -167,7 +167,7 @@ namespace FileConverter.ConversionJobs
return;
}
Debug.Log("CDA extracted to {0}.", this.intermediateFilePath);
Debug.Log($"CDA extracted to {this.intermediateFilePath}.");
Debug.Log(string.Empty);
Debug.Log("Start compression.");
@@ -188,7 +188,7 @@ namespace FileConverter.ConversionJobs
}
Debug.Log(string.Empty);
Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -75,7 +75,7 @@ namespace FileConverter.ConversionJobs
}
else
{
Diagnostics.Debug.LogError("Unsupported rotation: {0}°", rotationAngleInDegrees);
Diagnostics.Debug.LogError($"Unsupported rotation: {rotationAngleInDegrees}°");
}
}
@@ -68,7 +68,7 @@ namespace FileConverter.ConversionJobs
if (!System.IO.File.Exists(ffmpegPath))
{
this.ConversionFailed(Properties.Resources.ErrorCantFindFFMPEG);
Diagnostics.Debug.Log("Can't find ffmpeg executable ({0}). Try to reinstall the application.", ffmpegPath);
Diagnostics.Debug.Log($"Can't find ffmpeg executable ({ffmpegPath}). Try to reinstall the application.");
return;
}
@@ -419,7 +419,7 @@ namespace FileConverter.ConversionJobs
this.UserState = currentPass.Name;
this.ffmpegProcessStartInfo.Arguments = currentPass.Arguments;
Diagnostics.Debug.Log("Execute command: {0} {1}.", this.ffmpegProcessStartInfo.FileName, this.ffmpegProcessStartInfo.Arguments);
Diagnostics.Debug.Log($"Execute command: {this.ffmpegProcessStartInfo.FileName} {this.ffmpegProcessStartInfo.Arguments}.");
Diagnostics.Debug.Log(string.Empty);
try
@@ -439,7 +439,7 @@ namespace FileConverter.ConversionJobs
this.ParseFFMPEGOutput(result);
Diagnostics.Debug.Log("ffmpeg output: {0}", result);
Diagnostics.Debug.Log($"ffmpeg output: {result}");
}
}
@@ -465,7 +465,7 @@ namespace FileConverter.ConversionJobs
continue;
}
Diagnostics.Debug.Log("Delete intermediate file {0}.", currentPass.FileToDelete);
Diagnostics.Debug.Log($"Delete intermediate file {currentPass.FileToDelete}.");
File.Delete(currentPass.FileToDelete);
}
@@ -99,7 +99,7 @@ namespace FileConverter.ConversionJobs
if (!string.IsNullOrEmpty(this.intermediateFilePath))
{
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Diagnostics.Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -76,7 +76,7 @@ namespace FileConverter.ConversionJobs
return;
}
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Diagnostics.Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -92,7 +92,7 @@ namespace FileConverter.ConversionJobs
using (MagickImage image = new MagickImage(this.InputFilePath, readSettings))
{
Debug.Log("Load image {0} succeed.", this.InputFilePath);
Debug.Log($"Load image {this.InputFilePath} succeed.");
this.ConvertImage(image);
}
}
@@ -106,12 +106,12 @@ namespace FileConverter.ConversionJobs
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageScale);
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
Debug.Log("Apply scale factor: {0}%.", scaleFactor * 100);
Debug.Log($"Apply scale factor: {scaleFactor * 100}%.");
dpi *= scaleFactor;
}
Debug.Log("Density: {0}dpi.", dpi);
Debug.Log($"Density: {dpi}dpi.");
settings.Density = new Density(dpi * PdfSuperSamplingRatio);
this.UserState = Properties.Resources.ConversionStateReadDocument;
@@ -120,7 +120,7 @@ namespace FileConverter.ConversionJobs
{
// Add all the pages of the pdf file to the collection
images.Read(this.InputFilePath, settings);
Debug.Log("Load pdf {0} succeed.", this.InputFilePath);
Debug.Log($"Load pdf {this.InputFilePath} succeed.");
this.pageCount = images.Count;
@@ -128,7 +128,7 @@ namespace FileConverter.ConversionJobs
foreach (MagickImage image in images)
{
Debug.Log("Write page {0}/{1}.", this.CurrentOutputFilePathIndex + 1, this.pageCount);
Debug.Log($"Write page {this.CurrentOutputFilePathIndex + 1}/{this.pageCount}.");
if (PdfSuperSamplingRatio > 1)
{
@@ -153,7 +153,7 @@ namespace FileConverter.ConversionJobs
float scaleFactor = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageScale);
if (Math.Abs(scaleFactor - 1f) >= 0.005f)
{
Debug.Log("Apply scale factor: {0}%.", scaleFactor * 100);
Debug.Log($"Apply scale factor: {scaleFactor * 100}%.");
image.Scale(new Percentage(scaleFactor * 100f));
}
@@ -164,7 +164,7 @@ namespace FileConverter.ConversionJobs
float rotateAngleInDegrees = this.ConversionPreset.GetSettingsValue<float>(ConversionPreset.ConversionSettingKeys.ImageRotation);
if (Math.Abs(rotateAngleInDegrees - 0f) >= 0.05f)
{
Debug.Log("Apply rotation: {0}°.", rotateAngleInDegrees);
Debug.Log($"Apply rotation: {rotateAngleInDegrees}°.");
image.Rotate(rotateAngleInDegrees);
}
@@ -182,7 +182,7 @@ namespace FileConverter.ConversionJobs
size *= 2;
}
Debug.Log("Clamp size to the nearest power of 2 size (from {0}x{1} to {2}x{2}).", image.Width, image.Height, size);
Debug.Log($"Clamp size to the nearest power of 2 size (from {image.Width}x{image.Height} to {size}x{size}).");
image.Scale(size, size);
}
@@ -196,13 +196,13 @@ namespace FileConverter.ConversionJobs
int width = System.Math.Min(image.Width, maximumSize);
int height = System.Math.Min(image.Height, maximumSize);
Debug.Log("Clamp size to maximum size of {2}x{2} (from {0}x{1} to {2}x{3}).", image.Width, image.Height, width, height);
Debug.Log($"Clamp size to maximum size of {width}x{width} (from {image.Width}x{image.Height} to {width}x{height}).");
image.Scale(width, height);
}
}
Debug.Log("Convert image (output: {0}).", this.OutputFilePath);
Debug.Log($"Convert image (output: {this.OutputFilePath}).");
switch (this.ConversionPreset.OutputType)
{
case OutputType.Png:
@@ -215,7 +215,7 @@ namespace FileConverter.ConversionJobs
break;
case OutputType.Pdf:
Debug.Log("Density: {0}dpi.", BaseDpiForPdfConversion);
Debug.Log($"Density: {BaseDpiForPdfConversion}dpi.");
image.Density = new Density(BaseDpiForPdfConversion);
break;
@@ -96,10 +96,10 @@ namespace FileConverter.ConversionJobs
this.UserState = Properties.Resources.ConversionStateConversion;
Diagnostics.Debug.Log("Convert PowerPoint document to pdf.");
Debug.Log("Convert PowerPoint document to pdf.");
this.document.ExportAsFixedFormat(this.intermediateFilePath, PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF);
Diagnostics.Debug.Log("Close PowerPoint document '{0}'.", this.InputFilePath);
Debug.Log($"Close PowerPoint document '{this.InputFilePath}'.");
this.document.Close();
this.document = null;
@@ -115,7 +115,7 @@ namespace FileConverter.ConversionJobs
Task updateProgress = this.UpdateProgress();
Diagnostics.Debug.Log("Convert pdf to images.");
Debug.Log("Convert pdf to images.");
this.pdf2ImageConversionJob.StartConversion();
@@ -127,7 +127,7 @@ namespace FileConverter.ConversionJobs
if (!string.IsNullOrEmpty(this.intermediateFilePath))
{
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -144,7 +144,7 @@ namespace FileConverter.ConversionJobs
}
// Initialize PowerPoint application.
Diagnostics.Debug.Log("Instantiate PowerPoint application via interop.");
Debug.Log("Instantiate PowerPoint application via interop.");
this.application = new PowerPoint.Application();
}
@@ -199,7 +199,7 @@ namespace FileConverter.ConversionJobs
if (this.document == null)
{
Diagnostics.Debug.Log("Load PowerPoint document '{0}'.", this.InputFilePath);
Debug.Log($"Load PowerPoint document '{this.InputFilePath}'.");
this.document = this.application.Presentations.Open(this.InputFilePath, ReadOnly: MsoTriState.msoTrue, WithWindow: MsoTriState.msoFalse);
}
@@ -99,7 +99,7 @@ namespace FileConverter.ConversionJobs
this.UserState = Properties.Resources.ConversionStateConversion;
Diagnostics.Debug.Log("Convert word document to pdf.");
Debug.Log("Convert word document to pdf.");
// this.document.ExportAsFixedFormat(this.intermediateFilePath, Word.WdExportFormat.wdExportFormatPDF);
this.document.ExportAsFixedFormat(this.intermediateFilePath,
Word.WdExportFormat.wdExportFormatPDF,
@@ -113,7 +113,7 @@ namespace FileConverter.ConversionJobs
Word.WdExportCreateBookmarks.wdExportCreateHeadingBookmarks,
true);
Diagnostics.Debug.Log("Close word document '{0}'.", this.InputFilePath);
Debug.Log($"Close word document '{this.InputFilePath}'.");
this.document.Close(Word.WdSaveOptions.wdDoNotSaveChanges);
this.document = null;
@@ -129,7 +129,7 @@ namespace FileConverter.ConversionJobs
Task updateProgress = this.UpdateProgress();
Diagnostics.Debug.Log("Convert pdf to images.");
Debug.Log("Convert pdf to images.");
this.pdf2ImageConversionJob.StartConversion();
@@ -141,7 +141,7 @@ namespace FileConverter.ConversionJobs
if (!string.IsNullOrEmpty(this.intermediateFilePath))
{
Diagnostics.Debug.Log("Delete intermediate file {0}.", this.intermediateFilePath);
Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
File.Delete(this.intermediateFilePath);
}
@@ -158,7 +158,7 @@ namespace FileConverter.ConversionJobs
}
// Initialize word application.
Diagnostics.Debug.Log("Instantiate word application via interop.");
Debug.Log("Instantiate word application via interop.");
this.application = new Microsoft.Office.Interop.Word.Application
{
Visible = false
@@ -216,7 +216,7 @@ namespace FileConverter.ConversionJobs
if (this.document == null)
{
Diagnostics.Debug.Log("Load word document '{0}'.", this.InputFilePath);
Debug.Log($"Load word document '{this.InputFilePath}'.");
this.document = this.application.Documents.Open(this.InputFilePath, System.Reflection.Missing.Value, true);
}
+66 -52
View File
@@ -5,6 +5,7 @@ namespace FileConverter.Diagnostics
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
@@ -41,27 +42,74 @@ namespace FileConverter.Diagnostics
Debug.diagnosticsFolderPath = Path.Combine(path, diagnosticsFolderName);
Debug.diagnosticsFolderPath = PathHelpers.GenerateUniquePath(Debug.diagnosticsFolderPath);
Directory.CreateDirectory(Debug.diagnosticsFolderPath);
Debug.Log($"Diagnostics stored at path '{Debug.diagnosticsFolderPath}'");
}
public static int FirstErrorCode
{
get;
private set;
}
public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
public static DiagnosticsData[] Data => Debug.diagnosticsDataById.Values.ToArray();
public static void Log(string message, params object[] arguments)
{
string log = arguments.Length > 0 ? string.Format(message, arguments) : message;
Debug.Log(log, ConsoleColor.White);
}
public static void Log(string message)
{
Debug.Log(message, ConsoleColor.White);
Debug.LogInternal(error: false, message, ConsoleColor.White);
}
public static void Log(string log, ConsoleColor color)
public static void Assert(bool condition)
{
if (!condition)
{
LogError("Assertion failed");
}
}
public static void Assert(bool condition, string message)
{
if (!condition)
{
LogError(message);
}
}
public static void LogError(string message)
{
MessageBox.Show(message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
Debug.LogInternal(error: true, $"Error: {message}", ConsoleColor.Red);
}
public static void LogError(int errorCode, string message)
{
if (Debug.FirstErrorCode == 0)
{
Debug.FirstErrorCode = errorCode;
}
Debug.LogError($"{message} (code 0x{errorCode:X})");
}
public static void Release()
{
Debug.Log("Diagnostics manager released correctly.");
foreach (KeyValuePair<int, DiagnosticsData> kvp in Debug.diagnosticsDataById)
{
kvp.Value.Release();
}
Debug.diagnosticsDataById.Clear();
}
private static void LogInternal(bool error, string log, ConsoleColor color)
{
DiagnosticsData diagnosticsData;
Thread currentThread = Thread.CurrentThread;
int threadId = currentThread.ManagedThreadId;
@@ -69,7 +117,15 @@ namespace FileConverter.Diagnostics
if (threadId == Debug.mainThreadId)
{
Console.ForegroundColor = color;
Console.WriteLine(log);
if (error)
{
Console.Error.WriteLine(log);
}
else
{
Console.WriteLine(log);
}
Console.ResetColor();
}
@@ -89,47 +145,5 @@ namespace FileConverter.Diagnostics
diagnosticsData.Log(log);
}
public static void Assert(bool condition)
{
if (!condition)
{
LogError("Assertion failed");
}
}
public static void Assert(bool condition, string message)
{
if (!condition)
{
LogError(message);
}
}
public static void LogError(string message, params object[] arguments)
{
string log = string.Format(message, arguments);
MessageBox.Show(log, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
Debug.Log($"Error: {log}", ConsoleColor.Red);
}
public static void LogError(int errorCode, string message)
{
Debug.LogError($"{message} (code 0x{errorCode:X})");
}
public static void Release()
{
Debug.Log("Diagnostics manager released correctly.");
foreach (KeyValuePair<int, DiagnosticsData> kvp in Debug.diagnosticsDataById)
{
kvp.Value.Release();
}
Debug.diagnosticsDataById.Clear();
}
}
}
@@ -357,6 +357,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.ru-RU.resx" />
<EmbeddedResource Include="Properties\Resources.tr-TR.resx" />
<EmbeddedResource Include="Properties\Resources.zh-CN.resx" />
<EmbeddedResource Include="Properties\Resources.el-GR.resx" />
+19 -40
View File
@@ -8,13 +8,11 @@ namespace FileConverter
using System.IO;
using System.Reflection;
using System.Threading;
using System.ComponentModel.Composition.Hosting;
using FileConverter.ConversionJobs;
using FileConverter.Services;
using SharpShell;
using SharpShell.ServerRegistration;
using SharpShell.Helpers;
using Microsoft.Win32;
using CommunityToolkit.Mvvm.DependencyInjection;
@@ -124,30 +122,20 @@ namespace FileConverter
Diagnostics.Debug.Log($"Install and register shell extension: {shellExtensionPath}.");
try
var regasm = new RegAsm();
var success = regasm.Register64(shellExtensionPath, true);
if (success)
{
var catalog = new AssemblyCatalog(shellExtensionPath);
var container = new CompositionContainer(catalog);
var server = container.GetExport<ISharpShellServer>().Value;
RegistrationType registrationType = RegistrationType.OS64Bit;
#if BUILD32
registrationType = RegistrationType.OS32Bit;
#endif
ServerRegistrationManager.InstallServer(server, registrationType, true);
Diagnostics.Debug.Log($"Shell extension has been installed correctly.");
ServerRegistrationManager.RegisterServer(server, registrationType);
Diagnostics.Debug.Log($"Shell extension has been registered correctly.");
Diagnostics.Debug.Log($"{shellExtensionPath} installed and registered.");
Diagnostics.Debug.Log(regasm.StandardOutput);
return true;
}
catch (Exception exception)
else
{
Diagnostics.Debug.LogError($"An exception has been thrown during shell extension {shellExtensionPath} registration.\n{exception}");
Diagnostics.Debug.LogError(errorCode: 0x05, $"{shellExtensionPath} failed to register.");
Diagnostics.Debug.LogError(regasm.StandardError);
return false;
}
return true;
}
public static bool UnregisterExtension(string shellExtensionPath)
@@ -166,29 +154,20 @@ namespace FileConverter
Diagnostics.Debug.Log($"Unregister and uninstall shell extension: {shellExtensionPath}.");
try
var regasm = new RegAsm();
var success = regasm.Unregister64(shellExtensionPath);
if (success)
{
var catalog = new AssemblyCatalog(shellExtensionPath);
var container = new CompositionContainer(catalog);
var server = container.GetExport<ISharpShellServer>().Value;
RegistrationType registrationType = RegistrationType.OS64Bit;
#if BUILD32
registrationType = RegistrationType.OS32Bit;
#endif
ServerRegistrationManager.UnregisterServer(server, registrationType);
Diagnostics.Debug.Log($"Shell extension has been successfully unregistered.");
ServerRegistrationManager.UninstallServer(server, registrationType);
Diagnostics.Debug.Log($"Shell extension has been successfully uninstalled.");
Diagnostics.Debug.Log($"{shellExtensionPath} uninstalled.");
Diagnostics.Debug.Log(regasm.StandardOutput);
return true;
}
catch (Exception exception)
else
{
Diagnostics.Debug.LogError($"An exception has been thrown during shell extension {shellExtensionPath} unregistration.\n{exception}");
Diagnostics.Debug.LogError(errorCode: 0x05, $"{shellExtensionPath} failed to uninstall.");
Diagnostics.Debug.LogError(regasm.StandardError);
return false;
}
return true;
}
public static IEnumerable<CultureInfo> GetSupportedCultures()
@@ -0,0 +1,595 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About" xml:space="preserve">
<value>О программе</value>
</data>
<data name="ActionWhenConversionSucceedDescription" xml:space="preserve">
<value>Разрешить выбор действий с входными файлами после успешного преобразования</value>
</data>
<data name="ActionWhenConversionSucceedTitle" xml:space="preserve">
<value>Действие при успешном преобразовании</value>
</data>
<data name="AddNewPreset" xml:space="preserve">
<value>Новый пресет</value>
</data>
<data name="Application" xml:space="preserve">
<value>Приложение</value>
</data>
<data name="AudioTitle" xml:space="preserve">
<value>Аудио</value>
</data>
<data name="AutomaticallyCheckForUpdates" xml:space="preserve">
<value>Автоматически проверять наличие обновлений при запуске программы</value>
</data>
<data name="AutomaticallyExitWhenAllConversionsFinished" xml:space="preserve">
<value>Автоматический выход после завершения всех преобразований</value>
</data>
<data name="ClampToLowestPowerOfTwoSize" xml:space="preserve">
<value>Зажим с наименьшей мощностью 2 размера</value>
</data>
<data name="Close" xml:space="preserve">
<value>Закрыть</value>
</data>
<data name="ConversionPresets" xml:space="preserve">
<value>Пресеты преобразования</value>
</data>
<data name="ConversionQueueTitle" xml:space="preserve">
<value>Файлы для конвертации</value>
</data>
<data name="ConvertedFrom" xml:space="preserve">
<value>Конвертировано из</value>
</data>
<data name="Diagnostics" xml:space="preserve">
<value>Журнал</value>
</data>
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Журнал</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
<value>Открыть документацию</value>
</data>
<data name="DonateButtonTitle" xml:space="preserve">
<value>Пожертвовать</value>
</data>
<data name="DonateDescription" xml:space="preserve">
<value>Не забудьте вознаградить мою работу, если она вам понравится :)</value>
</data>
<data name="DownloadAndInstallButtonDescription" xml:space="preserve">
<value>Обновление будет загружено в фоновом режиме и установлено после выхода из программы.</value>
</data>
<data name="DownloadAndInstallButtonTitle" xml:space="preserve">
<value>Установить при выходе из программы</value>
</data>
<data name="Encoding" xml:space="preserve">
<value>Кодирование :</value>
</data>
<data name="EncodingSpeed" xml:space="preserve">
<value>Скорость кодирования :</value>
</data>
<data name="FileConverterStartHelp1" xml:space="preserve">
<value>File Converter — это расширение оболочки.</value>
</data>
<data name="FileConverterStartHelp2" xml:space="preserve">
<value>Это означает, что он интегрирован в проводник Windows.</value>
</data>
<data name="FileConverterStartHelp3" xml:space="preserve">
<value>Чтобы использовать File Converter, откройте проводник и щелкните правой кнопкой мыши любой файл, который вам нравится, чтобы открыть контекстное меню, в котором вы найдете доступные команды (см. файл readme, чтобы увидеть список совместимых форматов).</value>
</data>
<data name="FileNameTemplate" xml:space="preserve">
<value>Шаблон имени файла</value>
</data>
<data name="FramesPerSecond" xml:space="preserve">
<value>Кадров в секунду :</value>
</data>
<data name="GitHubButtonDescription" xml:space="preserve">
<value>Открыть страницу проекта GitHub</value>
</data>
<data name="Help" xml:space="preserve">
<value>справка ?</value>
</data>
<data name="InputExample" xml:space="preserve">
<value>Пример исходного файла</value>
</data>
<data name="InputFormats" xml:space="preserve">
<value>Исходные форматы</value>
</data>
<data name="InputPostConversionActionDeleteName" xml:space="preserve">
<value>Удалить</value>
</data>
<data name="InputPostConversionActionMoveInArchiveFolderName" xml:space="preserve">
<value>Переместить в папку архива</value>
</data>
<data name="InputPostConversionActionNoneName" xml:space="preserve">
<value>Нет</value>
</data>
<data name="InstallButtonDescription" xml:space="preserve">
<value>Обновление загружено. Выйдите из конвертера файлов, чтобы установить обновление.</value>
</data>
<data name="InstallButtonTitle" xml:space="preserve">
<value>Установить при выходе из программы</value>
</data>
<data name="IssueButtonDescription" xml:space="preserve">
<value>Сообщить о проблеме</value>
</data>
<data name="MoveDownSelectedPreset" xml:space="preserve">
<value>Переместить вниз выбранный пресет</value>
</data>
<data name="MoveUpSelectedPreset" xml:space="preserve">
<value>Переместить вверх выбранный пресет</value>
</data>
<data name="Mp3CbrDescription" xml:space="preserve">
<value>Кодирование с постоянным битрейтом</value>
</data>
<data name="Mp3VbrDescription" xml:space="preserve">
<value>Кодирование с переменным битрейтом</value>
</data>
<data name="NinetyDegreesRotationTitle" xml:space="preserve">
<value>90°</value>
</data>
<data name="NinetyDegreesRotationTooltip" xml:space="preserve">
<value>Вращение на 90° против часовой стрелки</value>
</data>
<data name="Ok" xml:space="preserve">
<value>Ok</value>
</data>
<data name="OneEightyDegreesRotationTitle" xml:space="preserve">
<value>180°</value>
</data>
<data name="OneEightyDegreesRotationTooltip" xml:space="preserve">
<value>Вращение на 180°</value>
</data>
<data name="OutputFileNameTemplateSample" xml:space="preserve">
<value>C:\Music\Artist\Album\Song.wav</value>
</data>
<data name="OutputExample" xml:space="preserve">
<value>Выходной файл</value>
</data>
<data name="OutputFilePathTemplateHelp" xml:space="preserve">
<value>(p): путь к исходному файлу
(f): имя исходного файла
(o): расширение выходного файла
(i): расширение исходного файла
(d0): родительская папка исходного файла
(d1): вложенная папка исходного файла
...
(n:i): указатель номера страницы
(n:c): общее количество страниц
Особые пути:
(p:d): путь к папке «Мои документы»
(p:m): путь к папке «Музыка»
(p:v): путь к папке «Видео»
(p:p): путь к папке «Изображения»
используйте maj для версии в верхнем регистре</value>
</data>
<data name="OutputFormat" xml:space="preserve">
<value>Выходной формат</value>
</data>
<data name="Preset" xml:space="preserve">
<value>Пресет</value>
</data>
<data name="PresetName" xml:space="preserve">
<value>Название пресета</value>
</data>
<data name="Quality" xml:space="preserve">
<value>Качество :</value>
</data>
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>Рекомендуемый диапазон битрейта выделен синим цветом.</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
<value>Удалить</value>
</data>
<data name="Rotate" xml:space="preserve">
<value>Повернуть :</value>
</data>
<data name="Save" xml:space="preserve">
<value>Сохранить</value>
</data>
<data name="Scale" xml:space="preserve">
<value>Масштаб :</value>
</data>
<data name="SeeChangeLog" xml:space="preserve">
<value>Посмотреть лог изменений...</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
<value>270°</value>
</data>
<data name="TwoSeventyDegreesRotationTooltip" xml:space="preserve">
<value>Вращение на 90° по часовой стрелке</value>
</data>
<data name="UpgradeAvailable" xml:space="preserve">
<value>Доступно обновление. Настоятельно рекомендуется установить его как можно скорее!</value>
</data>
<data name="UpgradeDownloadInProgress" xml:space="preserve">
<value>Идёт загрузка обновления...</value>
</data>
<data name="UpgradeWindowTitle" xml:space="preserve">
<value>Обновления программы</value>
</data>
<data name="VideoEncodingQualityTooltip" xml:space="preserve">
<value>Определите соотношение «размер файла» и «качество видео». Меньшее значение даст вам файл меньшего размера, большее значение обеспечит лучшее качество видео.</value>
</data>
<data name="VideoEncodingSpeedFasterName" xml:space="preserve">
<value>Побыстрее</value>
</data>
<data name="VideoEncodingSpeedFastName" xml:space="preserve">
<value>Быстрая</value>
</data>
<data name="VideoEncodingSpeedMediumName" xml:space="preserve">
<value>Средняя</value>
</data>
<data name="VideoEncodingSpeedSlowerName" xml:space="preserve">
<value>Помедленнее</value>
</data>
<data name="VideoEncodingSpeedSlowName" xml:space="preserve">
<value>Медленная</value>
</data>
<data name="VideoEncodingSpeedSuperFastName" xml:space="preserve">
<value>Очень быстрая</value>
</data>
<data name="VideoEncodingSpeedTooltip" xml:space="preserve">
<value>Определите соотношение «размер файла» и «продолжительность сжатия». Медленное сжатие позволит получить файл меньшего размера (при том же качестве видео), чем более быстрое сжатие.</value>
</data>
<data name="VideoEncodingSpeedUltraFastName" xml:space="preserve">
<value>Ультра быстрая</value>
</data>
<data name="VideoEncodingSpeedVeryFastName" xml:space="preserve">
<value>Очень быстрая</value>
</data>
<data name="VideoEncodingSpeedVerySlowName" xml:space="preserve">
<value>Очень медленная</value>
</data>
<data name="VideoTitle" xml:space="preserve">
<value>Видео</value>
</data>
<data name="Wav16bitsDescription" xml:space="preserve">
<value>PCM signed 16-bit little-endian</value>
</data>
<data name="Wav24bitsDescription" xml:space="preserve">
<value>PCM signed 24-bit little-endian</value>
</data>
<data name="Wav32bitsDescription" xml:space="preserve">
<value>PCM signed 32-bit little-endian</value>
</data>
<data name="Wav8bitsDescription" xml:space="preserve">
<value>PCM signed 8-bit little-endian</value>
</data>
<data name="ZeroDegreesRotationTitle" xml:space="preserve">
<value>Нет</value>
</data>
<data name="ZeroDegreesRotationTooltip" xml:space="preserve">
<value>Без вращения</value>
</data>
<data name="ConversionStateConversion" xml:space="preserve">
<value>Конверсия</value>
</data>
<data name="ConversionStateDone" xml:space="preserve">
<value>Готово</value>
</data>
<data name="ConversionStateExtraction" xml:space="preserve">
<value>Извлечение</value>
</data>
<data name="ConversionStateFailed" xml:space="preserve">
<value>Неудачно</value>
</data>
<data name="ConversionStateInQueue" xml:space="preserve">
<value>В очереди</value>
</data>
<data name="ConversionStateReadIntputImage" xml:space="preserve">
<value>Чтение исходного изображения</value>
</data>
<data name="ConversionStateReadDocument" xml:space="preserve">
<value>Чтение документа</value>
</data>
<data name="StringAnimatedImageName" xml:space="preserve">
<value>Анимированное изображение</value>
</data>
<data name="StringAudioName" xml:space="preserve">
<value>Аудио</value>
</data>
<data name="StringDocumentName" xml:space="preserve">
<value>Документ</value>
</data>
<data name="StringImageName" xml:space="preserve">
<value>Изображение</value>
</data>
<data name="StringVideoName" xml:space="preserve">
<value>Видео</value>
</data>
<data name="ExitWaitingDuration" xml:space="preserve">
<value>Длительность ожидания перед выходом из приложения</value>
</data>
<data name="Language" xml:space="preserve">
<value>Язык</value>
</data>
<data name="MaximumNumberOfSimultaneousConversions" xml:space="preserve">
<value>Максимальное количество одновременных преобразований</value>
</data>
<data name="DefaultPresetName" xml:space="preserve">
<value>Новый пресет</value>
</data>
<data name="DownloadingChangeLog" xml:space="preserve">
<value>###Загрузка журнала изменений ...</value>
</data>
<data name="ConversionArchives" xml:space="preserve">
<value>Архивы конверсий</value>
</data>
<data name="ErrorCanceled" xml:space="preserve">
<value>Отменено.</value>
</data>
<data name="ErrorCantFindFFMPEG" xml:space="preserve">
<value>Не удалось найти исполняемый файл ffmpeg. Вам следует попробовать переустановить приложение.</value>
</data>
<data name="ErrorCDAExtractionFailed" xml:space="preserve">
<value>Не удалось извлечь дорожку аудио-CD.</value>
</data>
<data name="ErrorCDDriveNotReady" xml:space="preserve">
<value>CD-привод не готов.</value>
</data>
<data name="ErrorFailedToLaunchFFMPEG" xml:space="preserve">
<value>Не удалось запустить ffmpeg.</value>
</data>
<data name="ErrorFailToCreateOutputPathFolders" xml:space="preserve">
<value>Не удалось создать папки выходного пути.</value>
</data>
<data name="ErrorFailToGenerateUniqueOutputPath" xml:space="preserve">
<value>Не удалось создать уникальный путь к выходному файлу.</value>
</data>
<data name="ErrorFailToReadCDDrive" xml:space="preserve">
<value>Не могу прочитать компакт-диск «{0}».</value>
</data>
<data name="ErrorFailToRetrieveInputPathDriveLetter" xml:space="preserve">
<value>Не удалось получить букву диска входного пути.</value>
</data>
<data name="ErrorFailToRetrieveTrackNumber" xml:space="preserve">
<value>Не удалось получить номер дорожки из входного пути cda.</value>
</data>
<data name="ErrorFailToUseCDDriveOpen" xml:space="preserve">
<value>Не удалось использовать привод компакт-дисков, поскольку он открыт.</value>
</data>
<data name="ErrorInputTypeIncompatibleWithOutputType" xml:space="preserve">
<value>Тип входного файла несовместим с выбранным типом выходного файла.</value>
</data>
<data name="ErrorInvalidOutputPath" xml:space="preserve">
<value>Неверный выходной путь, созданный шаблоном пути к выходному файлу.</value>
</data>
<data name="ErrorUnsupportedOutputFormat" xml:space="preserve">
<value>Неподдерживаемый формат вывода «{0}».</value>
</data>
<data name="ChannelCountTitle" xml:space="preserve">
<value>Количество каналов :</value>
</data>
<data name="ChannelCountTooltip" xml:space="preserve">
<value>Измените количество каналов входного файла.</value>
</data>
<data name="MonoOption" xml:space="preserve">
<value>Моно</value>
</data>
<data name="SameChannelCountOption" xml:space="preserve">
<value>Как у исходного файла</value>
</data>
<data name="StereoOption" xml:space="preserve">
<value>Стерео</value>
</data>
<data name="LicenceHeader1" xml:space="preserve">
<value>**Эта программа является бесплатным программным обеспечением**.</value>
</data>
<data name="LicenceHeader2" xml:space="preserve">
<value>Вы можете распространять его и/или изменять в соответствии с условиями Стандартной общественной лицензии GNU.</value>
</data>
<data name="LicenceHeader3" xml:space="preserve">
<value>Данная программа распространяется в надежде, что она будет полезна, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ. Дополнительную информацию см. в Стандартной общественной лицензии GNU (доступна в папке установки: `LICENSE.md`).</value>
</data>
<data name="ApplicationIsTerminating" xml:space="preserve">
<value>Приложение завершается.</value>
</data>
<data name="ApplicationWillTerminateInMultipleSeconds" xml:space="preserve">
<value>Приложение автоматически завершится через {0} секунд.</value>
</data>
<data name="ApplicationWillTerminateInOneSecond" xml:space="preserve">
<value>Приложение автоматически завершится через 1 секунду.</value>
</data>
<data name="StringMiscName" xml:space="preserve">
<value>Разное</value>
</data>
<data name="ErrorCantFindOutputFiles" xml:space="preserve">
<value>Не могу найти выходной(ые) файл(ы).</value>
</data>
<data name="ErrorConversionFailedWithOutput" xml:space="preserve">
<value>Задание преобразования не выполнено, но выходной файл существует.</value>
</data>
<data name="ConversionStatePrepareConversion" xml:space="preserve">
<value>Подготовить преобразование</value>
</data>
<data name="ErrorMicrosoftOfficeIsNotAvailable" xml:space="preserve">
<value>Для преобразования документов Office необходимо установить Microsoft Office.</value>
</data>
<data name="ErrorUnableToUseMicrosoftOffice" xml:space="preserve">
<value>Не удалось открыть документ с помощью Microsoft Office (проверьте, действительна ли ваша лицензия/установка).</value>
</data>
<data name="ErrorMicrosoftExcelIsNotAvailable" xml:space="preserve">
<value>Для преобразования документов Excel необходимо установить Microsoft Excel.</value>
</data>
<data name="ErrorMicrosoftPowerPointIsNotAvailable" xml:space="preserve">
<value>Для преобразования документов PowerPoint необходимо установить Microsoft PowerPoint.</value>
</data>
<data name="ErrorMicrosoftWordIsNotAvailable" xml:space="preserve">
<value>Для преобразования документов Word необходимо установить Microsoft Word.</value>
</data>
<data name="WebsiteButtonDescription" xml:space="preserve">
<value>Открыть веб-сайт конвертера файлов</value>
</data>
<data name="ErrorDuringJobInitialization" xml:space="preserve">
<value>Ошибка во время инициализации задания преобразования.</value>
</data>
<data name="CreateANewFolder" xml:space="preserve">
<value>Новая папка</value>
</data>
<data name="DefaultFolderName" xml:space="preserve">
<value>Новая папка</value>
</data>
<data name="PresetFolder" xml:space="preserve">
<value>Папка</value>
</data>
<data name="PresetFolderName" xml:space="preserve">
<value>Имя папки</value>
</data>
<data name="AdvancedMode" xml:space="preserve">
<value>Расширенный режим</value>
</data>
<data name="FFMPEGCustomArguments" xml:space="preserve">
<value>Пользовательские аргументы</value>
</data>
<data name="FFMPEGCustomArgumentsTooltip" xml:space="preserve">
<value>Пользовательские аргументы командной строки FFMPEG</value>
</data>
<data name="NoPresetSelected" xml:space="preserve">
<value>Не выбран пресет</value>
</data>
<data name="ExportSelectedPresets" xml:space="preserve">
<value>Экспорт</value>
</data>
<data name="ImportPresets" xml:space="preserve">
<value>Импорт</value>
</data>
<data name="DuplicatePreset" xml:space="preserve">
<value>Дублировать пресет</value>
</data>
<data name="CancelJobTooltip" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="Error" xml:space="preserve">
<value>Ошибка</value>
</data>
<data name="ErrorCantLoadSettings" xml:space="preserve">
<value>Невозможно загрузить пользовательские настройки конвертера файлов. Вы хотите вернуться к настройкам по умолчанию?</value>
</data>
<data name="CopyFilesInClipboardAfterConversion" xml:space="preserve">
<value>Копирование файлов в буфер обмена после конвертации</value>
</data>
</root>
+6 -6
View File
@@ -58,7 +58,7 @@ namespace FileConverter
if (this.registryEntries.ContainsKey(entry.Key))
{
Diagnostics.Debug.Log("Ignore registry entry {0}.", entry.Key);
Diagnostics.Debug.Log($"Ignore registry entry {entry.Key}.");
continue;
}
@@ -106,7 +106,7 @@ namespace FileConverter
}
catch (Exception exception)
{
Diagnostics.Debug.LogError("Can't convert registry value: {0}.", exception.Message);
Diagnostics.Debug.LogError($"Can't convert registry value: {exception.Message}.");
}
return defaultValue;
@@ -128,7 +128,7 @@ namespace FileConverter
}
catch (Exception exception)
{
Diagnostics.Debug.LogError("Can't convert registry value: {0}.", exception.Message);
Diagnostics.Debug.LogError($"Can't convert registry value: {exception.Message}.");
}
}
@@ -143,7 +143,7 @@ namespace FileConverter
}
catch (Exception exception)
{
Diagnostics.Debug.LogError("Fail to save registry. {0}", exception.Message);
Diagnostics.Debug.LogError($"Fail to save registry. {exception.Message}");
}
}
@@ -164,11 +164,11 @@ namespace FileConverter
catch (Exception exception)
{
Registry.instance = new Registry();
Diagnostics.Debug.LogError("Fail to load registry. {0}", exception.Message);
Diagnostics.Debug.LogError($"Fail to load registry. {exception.Message}");
while (exception.InnerException != null)
{
exception = exception.InnerException;
Diagnostics.Debug.LogError("Inner exception: {0}", exception.Message);
Diagnostics.Debug.LogError($"Inner exception: {exception.Message}");
}
}
}
@@ -33,12 +33,12 @@ namespace FileConverter.Services
this.ConversionJobs = this.conversionJobs.AsReadOnly();
this.numberOfConversionThread = this.settingsService.Settings.MaximumNumberOfSimultaneousConversions;
Diagnostics.Debug.Log("Maximum number of conversion threads: {0}", this.numberOfConversionThread);
Debug.Log($"Maximum number of conversion threads: {this.numberOfConversionThread}");
if (this.numberOfConversionThread <= 0)
{
this.numberOfConversionThread = System.Math.Max(1, Environment.ProcessorCount / 2);
Diagnostics.Debug.Log("The number of processors on this computer is {0}. Set the default number of conversion threads to {0}", settingsService.Settings.MaximumNumberOfSimultaneousConversions);
Debug.Log($"The number of processors on this computer is {settingsService.Settings.MaximumNumberOfSimultaneousConversions}. Set the default number of conversion threads to {settingsService.Settings.MaximumNumberOfSimultaneousConversions}");
}
}
@@ -176,7 +176,7 @@ namespace FileConverter.Services
}
catch (Exception exception)
{
Debug.LogError("Failure during conversion: {0}", exception.ToString());
Debug.LogError($"Failure during conversion: {exception}");
}
}
@@ -189,13 +189,13 @@ namespace FileConverter.Services
Debug.Log("Output files copied to the clipboard:");
for (int index = 0; index < FilePaths.Count; index++)
{
Debug.Log(" {0}", FilePaths[index]);
Debug.Log($" {FilePaths[index]}");
}
}
catch (Exception exception)
{
Debug.Log("Can't copy files to the clipboard.");
Debug.Log("An exception has been thrown: {0}.", exception.ToString());
Debug.Log($"An exception has been thrown: {exception}.");
}
}
}
@@ -112,7 +112,7 @@ namespace FileConverter.Services
if (pageKey == Pages.Upgrade)
{
upgradeService.CancelUpgrade();
Application.Current.Shutdown();
Application.AskForShutdown();
}
else
{
@@ -123,7 +123,7 @@ namespace FileConverter.Services
}
else
{
Application.Current.Shutdown();
Application.AskForShutdown();
}
}
}
@@ -59,7 +59,7 @@ namespace FileConverter.Services
}
else
{
Debug.LogError("Default settings not found at path {0}. You should try to reinstall the application.", FileConverterExtension.PathHelpers.DefaultSettingsFilePath);
Debug.LogError($"Default settings not found at path {FileConverterExtension.PathHelpers.DefaultSettingsFilePath}. You should try to reinstall the application.");
return false;
}
@@ -82,7 +82,7 @@ namespace FileConverter.Services
{
this.MigrateSettingsToCurrentVersion(userSettings);
Debug.Log("File converter settings have been imported from version {0} to version {1}.", userSettings.SerializationVersion, Settings.Version);
Debug.Log($"File converter settings have been imported from version {userSettings.SerializationVersion} to version {Settings.Version}.");
userSettings.SerializationVersion = Settings.Version;
}
@@ -154,7 +154,7 @@ namespace FileConverter.Services
{
this.MigrateSettingsToCurrentVersion(userSettings);
Diagnostics.Debug.Log("File converter settings has been imported from version {0} to version {1}.", userSettings.SerializationVersion, Settings.Version);
Debug.Log($"File converter settings has been imported from version {userSettings.SerializationVersion} to version {Settings.Version}.");
userSettings.SerializationVersion = Settings.Version;
this.Save(userSettings);
}
@@ -171,12 +171,12 @@ namespace FileConverter.Services
}
catch (Exception exception)
{
Debug.LogError("Fail to load file converter default settings. {0}", exception.Message);
Debug.LogError($"Fail to load file converter default settings. {exception.Message}");
}
}
else
{
Debug.LogError("Default settings not found at path {0}. You should try to reinstall the application.", FileConverterExtension.PathHelpers.DefaultSettingsFilePath);
Debug.LogError($"Default settings not found at path {FileConverterExtension.PathHelpers.DefaultSettingsFilePath}. You should try to reinstall the application.");
}
}
+1 -1
View File
@@ -254,7 +254,7 @@ namespace FileConverter
}
else
{
Diagnostics.Debug.Log("Can't find supported culture info for culture {0}. Fallback to default culture.", currentUICulture);
Diagnostics.Debug.Log($"Can't find supported culture info for culture {currentUICulture}. Fallback to default culture.");
this.ApplicationLanguage = CultureInfo.GetCultureInfo("en");
}
}
File diff suppressed because it is too large. Load diff
+8
View File
@@ -1,5 +1,13 @@
# Change Log
## Version 2.0.1
- New: Tempo and pitch conversion presets in default settings (github issue #18).
- New: Russian translation (thanks to dragomano).
- Fixes: Issue where File Converter was not appearing in Windows explorer after a successful install (issue #389).
- Fixes: Issue where newly supported input types (ts, heic, ...) were not used in presets (github issue #388).
- Fixes: Issue where standard output was not activated when started from command line.
## Version 2.0
- New: Possibility to create custom command line preset for types converted with FFMPEG (video and audio) (github issue #19 #18 #41 #61 #73 #128 #140 #153 #177 #182 #225 #255 #310 #314 #316 #325).
+1 -1
View File
@@ -1,7 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.3" />
<PropertyGroup>
<ProductVersion>3.9</ProductVersion>
<ProductVersion>2.0.1</ProductVersion>
<OutputName>FileConverter-setup</OutputName>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
+5 -5
View File
@@ -1,6 +1,6 @@
<!-- Upgrade documentation: http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html -->
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="File Converter" Language="1033" Version="2.0" Manufacturer="Adrien Allard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b" InstallerVersion="200">
<Package Name="File Converter" Language="1033" Version="2.0.1" Manufacturer="Adrien Allard" UpgradeCode="e3ca717b-a897-418a-bbef-5c7e35c76e4b" InstallerVersion="500">
<Icon Id="icon.ico" SourceFile="..\Resources\Icons\ApplicationIcon.ico" />
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
<SetProperty Id="ARPINSTALLLOCATION" Value="[ApplicationFolder]" After="CostFinalize" />
@@ -14,8 +14,8 @@
<ComponentGroupRef Id="Languages" />
</Feature>
<CustomAction Id="InstallShell" ExeCommand="--register-shell-extension &quot;[INSTALLFOLDER]FileConverterExtension.dll&quot;" Execute="deferred" Impersonate="no" FileRef="FileConverter.exe" />
<CustomAction Id="UninstallShell" ExeCommand="--unregister-shell-extension &quot;[INSTALLFOLDER]FileConverterExtension.dll&quot;" Execute="deferred" Impersonate="no" FileRef="FileConverter.exe" />
<CustomAction Id="InstallShell" ExeCommand="--register-shell-extension &quot;[INSTALLFOLDER]FileConverterExtension.dll&quot;" Execute="deferred" Return="check" Impersonate="no" FileRef="FileConverter.exe" />
<CustomAction Id="UninstallShell" ExeCommand="--unregister-shell-extension &quot;[INSTALLFOLDER]FileConverterExtension.dll&quot;" Execute="deferred" Return="check" Impersonate="no" FileRef="FileConverter.exe" />
<CustomAction Id="PostInstallInit" ExeCommand="--post-install-init" Execute="immediate" FileRef="FileConverter.exe" />
<UI>
@@ -29,7 +29,7 @@
<Launch Condition="Installed OR WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED" Message="This application requires .NET Framework 4.8. Please install the .NET Framework then run this installer again." />
<InstallExecuteSequence>
<Custom Action="UninstallShell" Before="RemoveFiles" Condition="(NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UninstallShell" Before="RemoveFiles" Condition="(NOT UPGRADINGPRODUCTCODE) AND (REMOVE~=&quot;ALL&quot;)" />
<Custom Action="InstallShell" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="PostInstallInit" After="InstallFinalize" Condition="NOT Installed" />
</InstallExecuteSequence>
@@ -37,7 +37,7 @@
<ui:WixUI Id="WixUI_InstallDir" />
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" /> <!-- This avoid an issue where the installer detect the utilization of the extension dll in explorer and then, ask to the user to restart these applications. The restart fails. -->
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" Secure="yes" /> <!-- This avoid an issue where the installer detect the utilization of the extension dll in explorer and then, ask to the user to restart these applications. The restart fails. -->
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="..\Resources\Installer\Banner.bmp" />
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Presets xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ConversionPreset OutputType="Mp4" Name="To Mp4 (24fps)" IsDefaultSettings="false">
<OutputFileNameTemplate>(p)(f) (24fps)</OutputFileNameTemplate>
<InputPostConversionAction>None</InputPostConversionAction>
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>3gp</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputTypes>mpeg</InputTypes>
<InputTypes>ogv</InputTypes>
<InputTypes>gif</InputTypes>
<Settings Key="EnableAudio" Value="True" />
<Settings Key="VideoQuality" Value="30" />
<Settings Key="VideoEncodingSpeed" Value="Medium" />
<Settings Key="VideoScale" Value="1" />
<Settings Key="VideoRotation" Value="0" />
<Settings Key="AudioBitrate" Value="155" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-c:v libx264 -preset medium -crf 21 -c:a aac -qscale:a 1.3 -vf &quot;scale=trunc(iw*1/2)*2:trunc(ih*1/2)*2,format=yuv420p&quot; -r 24" />
</ConversionPreset>
</Presets>
+41
View File
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Presets xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ConversionPreset OutputType="Wav" Name="To 48k sample rate Wav" IsDefaultSettings="false">
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
<InputPostConversionAction>None</InputPostConversionAction>
<InputTypes>3gp</InputTypes>
<InputTypes>3gpp</InputTypes>
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>mpg</InputTypes>
<InputTypes>mpeg</InputTypes>
<InputTypes>ogv</InputTypes>
<InputTypes>rm</InputTypes>
<InputTypes>ts</InputTypes>
<InputTypes>vob</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>aac</InputTypes>
<InputTypes>aiff</InputTypes>
<InputTypes>ape</InputTypes>
<InputTypes>cda</InputTypes>
<InputTypes>flac</InputTypes>
<InputTypes>m4a</InputTypes>
<InputTypes>m4b</InputTypes>
<InputTypes>mp3</InputTypes>
<InputTypes>oga</InputTypes>
<InputTypes>ogg</InputTypes>
<InputTypes>opus</InputTypes>
<InputTypes>wav</InputTypes>
<InputTypes>wma</InputTypes>
<Settings Key="AudioEncodingMode" Value="Wav16" />
<Settings Key="AudioChannelCount" Value="0" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-vn -ar 48000" />
</ConversionPreset>
</Presets>
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Presets xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ConversionPreset Name="To low bitrate Mp3" OutputType="Mp3" IsDefaultSettings="false">
<InputTypes>3gp</InputTypes>
<InputTypes>3gpp</InputTypes>
<InputTypes>avi</InputTypes>
<InputTypes>bik</InputTypes>
<InputTypes>flv</InputTypes>
<InputTypes>m4v</InputTypes>
<InputTypes>mkv</InputTypes>
<InputTypes>mov</InputTypes>
<InputTypes>mp4</InputTypes>
<InputTypes>mpg</InputTypes>
<InputTypes>mpeg</InputTypes>
<InputTypes>ogv</InputTypes>
<InputTypes>rm</InputTypes>
<InputTypes>ts</InputTypes>
<InputTypes>vob</InputTypes>
<InputTypes>webm</InputTypes>
<InputTypes>wmv</InputTypes>
<InputTypes>aac</InputTypes>
<InputTypes>aiff</InputTypes>
<InputTypes>ape</InputTypes>
<InputTypes>cda</InputTypes>
<InputTypes>flac</InputTypes>
<InputTypes>m4a</InputTypes>
<InputTypes>m4b</InputTypes>
<InputTypes>mp3</InputTypes>
<InputTypes>oga</InputTypes>
<InputTypes>ogg</InputTypes>
<InputTypes>opus</InputTypes>
<InputTypes>wav</InputTypes>
<InputTypes>wma</InputTypes>
<InputPostConversionAction>None</InputPostConversionAction>
<Settings Key="AudioEncodingMode" Value="Mp3VBR" />
<Settings Key="AudioBitrate" Value="175" />
<Settings Key="AudioChannelCount" Value="0" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-vn -ar 44100 -ac 2 -b:a 32k" />
<OutputFileNameTemplate>(p)(f)</OutputFileNameTemplate>
</ConversionPreset>
</Presets>
+12 -21
View File
@@ -23,15 +23,6 @@ If you encounter any problem with File Converter, you can:
* See the already known problems in the [troubleshooting section of the documentation](https://github.com/Tichau/FileConverter/wiki/Troubleshooting).
* Or report an issue on the [bug tracker](https://github.com/Tichau/FileConverter/issues).
When you report an issue, please join the following informations:
* Registry.xml
* Settings.user.xml
* The Diagnostics folder of the session that encountered the issue.
* A screenshot (if possible) and a description that shows/explain the issue.
You will find the xml files and diagnostics folder in `c:\Users\[UserName]\AppData\Local\FileConverter\`.
## Setup development environment
### Requirements
@@ -52,17 +43,17 @@ Thanks to all the contributors of File Converter project.
### Localization
Thanks to **Khidreal** and **hugok79** for the Portuguese localization.
Thanks to **Marhc** for the Brazilian localization.
Thanks to **Chachak** for the Spanish localization.
Thanks to **Davide** for the Italian localization.
Thanks to **nikotschierske** for the German localization.
Thanks to **Snoopy1866** for the Simplified Chinese localization.
Thanks to **MayaC0re** for the Turkish localization.
Thanks to **vishveshjain** for the Hindi localization.
Thanks to **Mahmoud0Sultan** for the Arabic localization.
Thanks to **Sedimentary-Rock** for the Traditional Chinese localization.
Thanks to **CrisBalGreece** for the Greek localization.
* Thanks to **Khidreal** and **hugok79** for the Portuguese localization.
* Thanks to **Marhc** for the Brazilian localization.
* Thanks to **Chachak** for the Spanish localization.
* Thanks to **Davide** for the Italian localization.
* Thanks to **nikotschierske** for the German localization.
* Thanks to **Snoopy1866** for the Simplified Chinese localization.
* Thanks to **MayaC0re** for the Turkish localization.
* Thanks to **vishveshjain** for the Hindi localization.
* Thanks to **Mahmoud0Sultan** for the Arabic localization.
* Thanks to **Sedimentary-Rock** for the Traditional Chinese localization.
* Thanks to **CrisBalGreece** for the Greek localization.
## Middlewares
@@ -79,7 +70,7 @@ And thanks to dlemstra for the C# wrapper of this software. [Github link](https:
Thanks to ghostscript devs. [Download link](https://www.ghostscript.com/download/gsdnld.html)
**SharpShell** to easily create windows context menu extensions.
Thanks to Dave Kerr for his work on SharpShell. [CodePlex link](https://sharpshell.codeplex.com)
Thanks to Dave Kerr for his work on SharpShell. [GitHub link](https://github.com/dwmkerr/sharpshell)
**Ripper** and **yeti.mmedia** for CD Audio extraction.
Thanks to Idael Cardoso for his work on CD Audio ripper. [Code project link](https://www.codeproject.com/Articles/5458/C-Sharp-Ripper)