Replaced CommonMark.Net with MarkdownSharp. Smaller and a single file, so there are no Nuget dependencies.
This commit is contained in:
@ -69,14 +69,11 @@ namespace KattekerCreator
|
||||
//Start makensis.exe
|
||||
var setupFilePath = CompileSetupScript(templateFile);
|
||||
//Copy to Output-Folder
|
||||
if (CopyToOutputFolder(setupFilePath))
|
||||
{
|
||||
//Create/Modify RELEASE File
|
||||
var releaseEntry = AddPackageToReleaseFile(setupFilePath);
|
||||
//Copy installer as setup.exe
|
||||
CopyAsSetup(setupFilePath, releaseEntry);
|
||||
}
|
||||
|
||||
CopyToOutputFolder(setupFilePath);
|
||||
//Create/Modify RELEASE File
|
||||
var releaseEntry = AddPackageToReleaseFile(setupFilePath);
|
||||
//Copy installer as setup.exe
|
||||
CopyAsSetup(setupFilePath, releaseEntry);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -103,31 +100,20 @@ namespace KattekerCreator
|
||||
}
|
||||
}
|
||||
|
||||
private bool CopyToOutputFolder(string setupFilePath)
|
||||
private void CopyToOutputFolder(string setupFilePath)
|
||||
{
|
||||
try
|
||||
if (setupFilePath == null) throw new ArgumentNullException(nameof(setupFilePath));
|
||||
var setupFile = Path.GetFileName(setupFilePath);
|
||||
if (string.IsNullOrEmpty(setupFile)) throw new ArgumentException();
|
||||
if (!File.Exists(setupFilePath)) throw new FileNotFoundException(setupFile);
|
||||
if (!Directory.Exists(_appArguments.OutputDir)) Directory.CreateDirectory(_appArguments.OutputDir);
|
||||
if (!string.IsNullOrEmpty(_appArguments.ChangeLog))
|
||||
{
|
||||
if (setupFilePath == null) throw new ArgumentNullException(nameof(setupFilePath));
|
||||
var setupFile = Path.GetFileName(setupFilePath);
|
||||
if (string.IsNullOrEmpty(setupFile)) throw new ArgumentException();
|
||||
if (!File.Exists(setupFilePath)) throw new FileNotFoundException(setupFile);
|
||||
if (!string.IsNullOrEmpty(_appArguments.ChangeLog))
|
||||
{
|
||||
|
||||
var changeLogPath = Path.Combine(Path.GetDirectoryName(_appArguments.ProgramFile), _appArguments.ChangeLog);
|
||||
if (!File.Exists(changeLogPath)) throw new FileNotFoundException(changeLogPath);
|
||||
File.Copy(changeLogPath, Path.Combine(_appArguments.OutputDir, Path.GetFileName(_appArguments.ChangeLog) ?? throw new InvalidOperationException()), true);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(_appArguments.OutputDir)) Directory.CreateDirectory(_appArguments.OutputDir);
|
||||
File.Copy(setupFilePath, Path.Combine(_appArguments.OutputDir, setupFile), true);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.WriteErrorLine(e.Message);
|
||||
return false;
|
||||
var changeLogPath = Path.Combine(Path.GetDirectoryName(_appArguments.ProgramFile), _appArguments.ChangeLog);
|
||||
if (!File.Exists(changeLogPath)) throw new FileNotFoundException(changeLogPath);
|
||||
File.Copy(changeLogPath, Path.Combine(_appArguments.OutputDir, _appArguments.ChangeLog), true);
|
||||
}
|
||||
File.Copy(setupFilePath, Path.Combine(_appArguments.OutputDir, setupFile), true);
|
||||
}
|
||||
|
||||
private static string CompileSetupScript(string templateFile)
|
||||
|
Reference in New Issue
Block a user