diff --git a/GZ.cs b/GZ.cs index bed7136..de5bbbe 100644 --- a/GZ.cs +++ b/GZ.cs @@ -1,9 +1,11 @@ я╗┐using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO.Compression; using System.Linq; using System.Text; using System.Threading.Tasks; +using static TaikoSoundEditor.TJA; namespace TaikoSoundEditor { @@ -40,14 +42,41 @@ namespace TaikoSoundEditor return ostream.ToArray(); } - public static void CompressToFile(string fileName, string content) + public static string CompressToFile(string fileName, string content) { - using var stream = new MemoryStream(); - using var writer = new StreamWriter(stream); - writer.Write(content); - using FileStream compressedFileStream = File.Create(fileName); - using var compressor = new GZipStream(compressedFileStream, CompressionMode.Compress); - new MemoryStream(stream.ToArray()).CopyTo(compressor); + var tmp = "~ztmp"; + if (!Directory.Exists(tmp)) + Directory.CreateDirectory(tmp); + + var fn = Path.GetFileNameWithoutExtension(fileName); + fn = Path.Combine(tmp, fn); + File.WriteAllText(fn, content); + + fileName = Path.GetFullPath(fileName); + + var p = new Process(); + p.StartInfo.FileName = Path.GetFullPath(@"Tools\7z\7za.exe"); + p.StartInfo.ArgumentList.Add("a"); + p.StartInfo.ArgumentList.Add("-tgzip"); + p.StartInfo.ArgumentList.Add(fileName); + p.StartInfo.ArgumentList.Add(Path.GetFullPath(fn)); + p.StartInfo.UseShellExecute = false; + p.StartInfo.RedirectStandardError = true; + p.StartInfo.RedirectStandardOutput = true; + + foreach (var a in p.StartInfo.ArgumentList) + Debug.WriteLine(a); + + p.Start(); + p.WaitForExit(); + int exitCode = p.ExitCode; + string stderr = p.StandardError.ReadToEnd(); + string stdout = p.StandardError.ReadToEnd(); + + if (exitCode != 0) + throw new Exception($"Process 7za failed with exit code {exitCode}:\n" + stderr); + + return stdout; } } } diff --git a/MainForm.cs b/MainForm.cs index 7e6b5ea..2c297c4 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -1,5 +1,6 @@ using System.ComponentModel; using System.Diagnostics; +using System.Text.RegularExpressions; using System.Threading.Tasks.Dataflow; using TaikoSoundEditor.Data; @@ -125,14 +126,14 @@ namespace TaikoSoundEditor public static void RunGuard(Action action) { - //try + try { action(); } - /*catch (Exception ex) + catch (Exception ex) { Error(ex); - }*/ + } } public static void Error(Exception e) @@ -214,6 +215,17 @@ namespace TaikoSoundEditor FeedbackBox.AppendText("Creating temp dir\r\n"); CreateTmpDir(); + + FeedbackBox.AppendText("Parsing TJA\r\n"); + var tja = new TJA(File.ReadAllLines(tjaPath)); + File.WriteAllText("tja.txt", tja.ToString()); + + + var seconds = Math.Ceiling(tja.Headers.Offset + 3); + if (seconds < 0) seconds = 0; + + + FeedbackBox.AppendText("Converting to wav\r\n"); WAV.ConvertToWav(audioFilePath, $@".-tmp\{songName}.wav"); FeedbackBox.AppendText("Running tja2fumen\r\n"); @@ -247,11 +259,7 @@ namespace TaikoSoundEditor ma.Id = songName; ma.UniqueId = id; ma.New = true; - ns.MusicAttribute = ma; - - FeedbackBox.AppendText("Parsing TJA\r\n"); - var tja = new TJA(File.ReadAllLines(tjaPath)); - File.WriteAllText("tja.txt", tja.ToString()); + ns.MusicAttribute = ma; ns.Word = new Word { Key = $"song_{songName}", JapaneseText = tja.Headers.Title }; ns.WordSub = new Word { Key = $"song_sub_{songName}", JapaneseText = tja.Headers.Subtitle }; @@ -348,6 +356,15 @@ namespace TaikoSoundEditor Directory.CreateDirectory(".-tmp"); } + private string JsonFix(string json) + { + return json + .Replace("\r\n ", "\r\n\t\t") + .Replace("{\r\n \"items\": [", "{\"items\":[") + .Replace(" }", "\t}") + .Replace(" ]\r\n}", "\t]\r\n}"); + } + private void ExportDatatable(string path) { var mi = new MusicInfos(); @@ -378,10 +395,10 @@ namespace TaikoSoundEditor wl.Items.AddRange(WordList.Items); wl.Items.AddRange(AddedMusic.Select(_ => new List() { _.Word, _.WordSub, _.WordDetail }).SelectMany(_ => _)); - var jmi = Json.Serialize(mi); - var jma = Json.Serialize(ma); - var jmo = Json.Serialize(mo); - var jwl = Json.Serialize(wl); + var jmi = JsonFix(Json.Serialize(mi)); + var jma = JsonFix(Json.Serialize(ma)); + var jmo = JsonFix(Json.Serialize(mo)); + var jwl = JsonFix(Json.Serialize(wl)); jma = jma.Replace("\"new\": true,", "\"new\":true,"); jma = jma.Replace("\"new\": false,", "\"new\":false,"); diff --git a/Tools/7z/7za.dll b/Tools/7z/7za.dll new file mode 100644 index 0000000..5cd2ace Binary files /dev/null and b/Tools/7z/7za.dll differ diff --git a/Tools/7z/7za.exe b/Tools/7z/7za.exe new file mode 100644 index 0000000..dcc0622 Binary files /dev/null and b/Tools/7z/7za.exe differ diff --git a/Tools/7z/7zxa.dll b/Tools/7z/7zxa.dll new file mode 100644 index 0000000..084610b Binary files /dev/null and b/Tools/7z/7zxa.dll differ diff --git a/Tools/7z/Far/7-ZipEng.hlf b/Tools/7z/Far/7-ZipEng.hlf new file mode 100644 index 0000000..9105fc7 --- /dev/null +++ b/Tools/7z/Far/7-ZipEng.hlf @@ -0,0 +1,85 @@ +.Language=English,English +.PluginContents=7-Zip Plugin + +@Contents +$^#7-Zip Plugin 23.01# +$^#Copyright (c) 1999-2023 Igor Pavlov# + This FAR module performs transparent #archive# processing. +Files in the archive are handled in the same manner as if they +were in a folder. + + ~Extracting from the archive~@Extract@ + + ~Add files to the archive~@Update@ + + ~7-Zip Plugin configuration~@Config@ + + + Web site: #www.7-zip.org# + +@Extract +$ #Extracting from the archive# + +In this dialog you may enter extracting mode. + + Path mode + + #Full pathnames# Extract files with full pathnames. + + #Current pathnames# Extract files with all relative paths. + + #No pathnames# Extract files without folder paths. + + + Overwrite mode + + #Ask before overwrite# Ask before overwriting existing files. + + #Overwrite without prompt# Overwrite existing files without prompt. + + #Skip existing files# Skip extracting of existing files. + + + Files + + #Selected files# Extract only selected files. + + #All files# Extract all files from archive. + +@Update +$ #Add files to the archive# + +This dialog allows you to specify options for process of updating archive. + + + Compression method + + #Store# Files will be copied to archive without compression. + + #Normal# Files will be compressed. + + #Maximum# Files will be compressed with method that gives + maximum compression ratio. + + + Update mode + + #Add and replace files# Add all specified files to the archive. + + #Update and add files# Update older files in the archive and add + files that are new to the archive. + + #Freshen existing files# Update specified files in the archive that + are older than the selected disk files. + + #Synchronize files# Replace specified files only if + added files are newer. Always add those + files, which are not present in the + archive. Delete from archive those files, + which are not present on the disk. + +@Config +$ #7-Zip Plugin configuration# + In this dialog you may change following parameters: + + #Plugin is used by default# Plugin is used by default. diff --git a/Tools/7z/Far/7-ZipEng.lng b/Tools/7z/Far/7-ZipEng.lng new file mode 100644 index 0000000..457a29a --- /dev/null +++ b/Tools/7z/Far/7-ZipEng.lng @@ -0,0 +1,220 @@ +.Language=English,English + +"Ok" +"&Cancel" + +"Warning" +"Error" + +"Format" + +"Properties" + +"Yes" +"No" + +"Get password" +"Enter password" + +"Extract" +"&Extract to" + +"Path mode" +"&Full pathnames" +"C&urrent pathnames" +"&No pathnames" + +"Overwrite mode" +"As&k before overwrite" +"&Overwrite without prompt" +"Sk&ip existing files" +"A&uto rename" +"A&uto rename existing files" + +"Extract" +"&Selected files" +"A&ll files" + +"&Password" + +"Extr&act" +"&Cancel" + +"Can not open output file '%s'." + +"Unsupported compression method for '%s'." +"CRC failed in '%s'." +"Data error in '%s'." +"CRC failed in encrypted file '%s'. Wrong password?" +"Data error in encrypted file '%s'. Wrong password?" + +"Confirm File Replace" +"Destination folder already contains processed file." +"Would you like to replace the existing file" +"with this one" + +"bytes" +"modified on" + + +"&Yes" +"Yes to &All" +"&No" +"No to A&ll" +"A&uto rename" +"&Cancel" + + +"Update operations are not supported for this archive." + + +"Delete from archive" +"Delete \"%.40s\" from the archive" +"Delete selected files from the archive" +"Delete %d files from the archive" +"Delete" +"Cancel" + +"Add files to archive" + +"Add to %s a&rchive:" + +"Compression method" +"&Store" +"Fas&test" +"&Fast" +"&Normal" +"&Maximum" +"&Ultra" + +"Update mode" +"A&dd and replace files" +"&Update and add files" +"&Freshen existing files" +"S&ynchronize files" + +"&Add" +"Se&lect archiver" + +"Select archive format" + +"Wait" +"Reading the archive" +"Extracting from the archive" +"Deleting from the archive" +"Updating the archive" + +"Move operation is not supported" + +"7-Zip" +"7-Zip (add to archive)" + +"7-Zip" + +"Plugin is used by default" + +"0" +"1" +"2" +"Path" +"Name" +"Extension" +"Is Folder" +"Size" +"Packed Size" +"Attributes" +"Created" +"Accessed" +"Modified" +"Solid" +"Commented" +"Encrypted" +"Splited Before" +"Splited After" +"Dictionary Size" +"CRC" +"Type" +"Anti" +"Method" +"Host OS" +"File System" +"User" +"Group" +"Block" +"Comment" +"Position" +"Path Prefix" +"Folders" +"Files" +"Version" +"Volume" +"Multivolume" +"Offset" +"Links" +"Blocks" +"Volumes" +"Time Type" +"64-bit" +"Big-endian" +"CPU" +"Physical Size" +"Headers Size" +"Checksum" +"Characteristics" +"Virtual Address" +"ID" +"Short Name" +"Creator Application" +"Sector Size" +"Mode" +"Symbolic Link" +"Error" +"Total Size" +"Free Space" +"Cluster Size" +"Label" +"Local Name" +"Provider" +"NT Security" +"Alternate Stream" +"Aux" +"Deleted" +"Tree" +"SHA-1" +"SHA-256" +"Error Type" +"Errors" +"Errors" +"Warnings" +"Warning" +"Streams" +"Alternate Streams" +"Alternate Streams Size" +"Virtual Size" +"Unpack Size" +"Total Physical Size" +"Volume Index" +"SubType" +"Short Comment" +"Code Page" +"Is not archive type" +"Physical Size can't be detected" +"Zeros Tail Is Allowed" +"Tail Size" +"Embedded Stub Size" +"Link" +"Hard Link" +"iNode" +"Stream ID" +"Read-only" +"Out Name" +"Copy Link" +"Arc File Name" +"Is Hash" +"Metadata Changed" +"User ID" +"Group ID" +"Device Major" +"Device Minor" +"Dev Major" +"Dev Minor" diff --git a/Tools/7z/Far/7-ZipFar.dll b/Tools/7z/Far/7-ZipFar.dll new file mode 100644 index 0000000..c82efbf Binary files /dev/null and b/Tools/7z/Far/7-ZipFar.dll differ diff --git a/Tools/7z/Far/7-ZipFar64.dll b/Tools/7z/Far/7-ZipFar64.dll new file mode 100644 index 0000000..1db6a0e Binary files /dev/null and b/Tools/7z/Far/7-ZipFar64.dll differ diff --git a/Tools/7z/Far/7-ZipRus.hlf b/Tools/7z/Far/7-ZipRus.hlf new file mode 100644 index 0000000..0441fcc --- /dev/null +++ b/Tools/7z/Far/7-ZipRus.hlf @@ -0,0 +1,84 @@ +.Language=Russian,Russian (Русский) +.PluginContents=Плагин 7-Zip + +@Contents +$^#7-Zip Plugin 23.01# +$^#Copyright (c) 1999-2023 Igor Pavlov# + Этот модуль FAR позволяет работать с #архивами#. Для пользователя +файлы в архивах не отличаются от файлов в папках. + + + ~Распаковка файлов из архива~@Extract@ + + ~Добавление файлов к архиву~@Update@ + + ~Параметры работы с архивами~@Config@ + + + Web site: #www.7-zip.org# + +@Extract +$ #Распаковка файлов из архива# + В этом диалоге вы можете ввести путь для распаковки файлов и задать +режим распаковки. + + Пути + + #Полные пути# Распаковать файлы с полными путями. + + #Относительные пути# Распаковать с относительными путями. + + #Без путей# Распаковать без путей. + + + Перезапись + + #Спрашивать подтверждение# Спрашивать подтверждение на + перезапись существующего файла. + + #Без подтверждения# Замещать существующий файл + без подтверждения. + + #Пропускать# Пропускать существующие файлы. + + + Распаковать + + #Выбранные файлы# Распаковать только выделенные файлы из архива. + + #Все файлы# Распаковать все файлы из архива. + +@Update +$ #Добавление файлов к архиву# + + В этом диалоге вы можете задать режим упаковки. + + + Метод сжатия: + + #Без сжатия# Файлы будут скопированы без сжатия. + + #Нормальное сжатие# Файлы будут сжаты. + + #Максимальное сжатие# Файлы будут сжаты с максимальной + степенью сжатия. + + + Режим изменения: + + #Добавить и заменить# Добавить все выбранные файлы в архив. + + #Обновить и добавить# Обновить устаревшие файлы в архиве и + добавить файлы, которых нет в архиве. + + #Обновить# Обновить устаревшие файлы в архиве. + + #Синхронизировать# Синхронизировать содержимое архива + с выбранными файлами. + + +@Config +$ #Параметры работы с плагином 7-Zip# + В этом диалоге вы можете изменить следующие параметры: + + #Плагин используется по умолчанию# Плагин используется по умолчанию diff --git a/Tools/7z/Far/7-ZipRus.lng b/Tools/7z/Far/7-ZipRus.lng new file mode 100644 index 0000000..756233c --- /dev/null +++ b/Tools/7z/Far/7-ZipRus.lng @@ -0,0 +1,220 @@ +.Language=Russian,Russian (Русский) + +"Продолжить" +"&Отменить" + +"Предупреждение" +"Ошибка" + +"Формат" + +"Свойства" + +"Да" +"Нет" + +"Ввод пароля" +"Введите пароль" + +"Распаковка" +"&Распаковать в" + +"Пути" +"По&лные пути" +"О&тносительные пути" +"&Без путей" + +"Перезапись" +"&Спрашивать подтверждение" +"Б&ез подтверждения" +"Проп&ускать" +"Переименовать автом." +"Переим. автом. существ." + +"Распаковать" +"В&ыбранные файлы" +"Все &файлы" + +"&Пароль" + +"Р&аспаковать" +"&Отменить" + +"Невозможно открыть файл '%s'." + +"Неподдерживаемый метод сжатия для файла '%s'." +"Ошибка CRC в '%s'." +"Ошибка в данных в '%s'." +"Ошибка CRC для зашифрованного файла '%s'. Неверный пароль?" +"Ошибка в данных зашифрованного файла '%s'. Неверный пароль?" + +"Подтвердите замену файла" +"Папка уже содержит обрабатываемый файл." +"Заменить существующий файл" +"следующим файлом" + +"байт" +"изменен" + + +"&Да" +"Да для &всех" +"&Нет" +"Нет для в&сех" +"Переименовать автоматически" +"&Отменить" + + +"Для этого архива операции изменения не поддерживаются." + + +"Удаление из архива" +"Удалить \"%.40s\" из архива" +"Удалить выбранные файлы из архива" +"Удалить %d файлов из архива" +"Удаление" +"Отмена" + +"Добавить файлы к архиву" + +"Добавить к %s &архиву" + +"Метод сжатия" +"Без сжатия" +"Скоростной" +"Быстрый" +"Нормальный" +"Максимальный" +"Ультра" + +"Режим изменения" +"Добавить и заменить" +"Обновить и добавить" +"Обновить" +"Синхронизировать" + +"&Добавить" +"А&рхиватор" + +"Выбор архивного формата" + +"Подождите" +"Чтение архива" +"Распаковка" +"Удаление" +"Изменение" + +"Перемещение файлов не поддерживается" + +"7-Zip" +"7-Zip (добавить в архив)" + +"7-Zip configuration" + +"Плагин используется по умолчанию" + +"0" +"1" +"2" +"Путь" +"Имя" +"Расширение" +"Папка" +"Размер" +"Сжатый" +"Атрибуты" +"Создан" +"Открыт" +"Изменен" +"Непрерывный" +"Комментарий" +"Зашифрован" +"Разбит До" +"Разбит После" +"Словарь" +"CRC" +"Тип" +"Анти" +"Метод" +"Система" +"Файловая Система" +"Пользователь" +"Группа" +"Блок" +"Комментарий" +"Позиция" +"Путь" +"Папок" +"Файлов" +"Версия" +"Том" +"Многотомный" +"Смещение" +"Ссылок" +"Блоков" +"Томов" +"Time Type" +"64-bit" +"Big-endian" +"Процессор" +"Физический Размер" +"Размер Заголовков" +"Контр. Сумма" +"Характеристики" +"Виртуальный Адрес" +"ID" +"Короткое имя" +"Программа" +"Размер сектора" +"Режим" +"Символьная Ссылка" +"Ошибка" +"Емкость" +"Свободно" +"Размер кластера" +"Метка" +"Локальное имя" +"Провайдер" +"NT Безопасность" +"Альтернативный Поток" +"Aux" +"Удаленный" +"Дерево" +"SHA-1" +"SHA-256" +"Тип Ошибки" +"Ошибки" +"Ошибки" +"Предупреждения" +"Предупреждение" +"Потоки" +"Альтернативные Потоки" +"Размер Альтернативных потоков" +"Виртуальный Размер" +"Распакованный Размер" +"Общий Физический Размер" +"Номер Тома" +"Подтип" +"Короткий Комментарий" +"Кодовая Страница" +"Is not archive type" +"Physical Size can't be detected" +"Zeros Tail Is Allowed" +"Размер Остатка" +"Размер Встроенного Блока" +"Ссылка" +"Жесткая Ссылка" +"iNode" +"ID Потока" +"Только для чтения" +"Out Name" +"Ссылка копирования" +"Arc File Name" +"Is Hash" +"Изменены метаданные" +"User ID" +"Group ID" +"Device Major" +"Device Minor" +"Dev Major" +"Dev Minor" diff --git a/Tools/7z/Far/7zToFar.ini b/Tools/7z/Far/7zToFar.ini new file mode 100644 index 0000000..684976e --- /dev/null +++ b/Tools/7z/Far/7zToFar.ini @@ -0,0 +1,67 @@ +; 7z supporting for MutiArc in Far +; Append the following strings to file +; ..\Program Files\Far\Plugins\MultiArc\Formats\Custom.ini + +[7z] +TypeName=7z +ID=37 7A BC AF 27 1C +IDPos= +IDOnly=1 +Extension=7z +List=7z l -- %%AQ +Start="^-----" +End="^-----" +Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A +Delete=7z d {-p%%P} -r0 -ms=off -scsDOS -i@%%LQMN -- %%A +Add=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -i@%%LQMN -- %%A +AddRecurse=7z a {-p%%P} -r0 -t7z {%%S} -scsDOS -i@%%LQMN -- %%A +AllFilesMask="*" + +[rpm] +TypeName=rpm +ID=ED AB EE DB +IDPos= +IDOnly=1 +Extension=rpm +List=7z l -- %%AQ +Start="^-----" +End="^-----" +Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A +AllFilesMask="*" + +[cpio] +TypeName=cpio +ID= +IDPos= +IDOnly=0 +Extension=cpio +List=7z l -- %%AQ +Start="^-----" +End="^-----" +Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A +AllFilesMask="*" + +[deb] +TypeName=deb +ID= +IDPos= +IDOnly=0 +Extension=deb +List=7z l -- %%AQ +Start="^-----" +End="^-----" +Format0="yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" +Extract=7z x {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +ExtractWithoutPath=7z e {-p%%P} -r0 -y -scsDOS -i@%%LQMN -- %%A +Test=7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A +AllFilesMask="*" + diff --git a/Tools/7z/Far/far7z.reg b/Tools/7z/Far/far7z.reg new file mode 100644 index 0000000..105e8f6 --- /dev/null +++ b/Tools/7z/Far/far7z.reg @@ -0,0 +1,67 @@ +REGEDIT4 + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ZIP] +"Extract"="7z x {-p%%P} -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e {-p%%P} -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t {-p%%P} -r0 -scsDOS -i@%%LQMN -- %%A" +"Delete"="7z d {-p%%P} -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Add"="7z a {-p%%P} -r0 -tzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AddRecurse"="7z a {-p%%P} -r0 -tzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\TAR] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Add"="7z a -r0 -y -ttar {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AddRecurse"="7z a -r0 -y -ttar {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\GZIP] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Add"="7z a -r0 -tgzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AddRecurse"="7z a -r0 -tgzip {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\BZIP] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"Delete"="7z d -r0 {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Add"="7z a -r0 -tbzip2 {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AddRecurse"="7z a -r0 -tbzip2 {-w%%W} {%%S} -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ARJ] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\CAB] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\LZH] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\RAR] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\Z(Unix)] +"Extract"="7z x -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"ExtractWithoutPath"="7z e -r0 -y {-w%%W} -scsDOS -i@%%LQMN -- %%A" +"Test"="7z t -r0 -scsDOS -i@%%LQMN -- %%A" +"AllFilesMask"="*" diff --git a/Tools/7z/Far/far7z.txt b/Tools/7z/Far/far7z.txt new file mode 100644 index 0000000..e2fb293 --- /dev/null +++ b/Tools/7z/Far/far7z.txt @@ -0,0 +1,73 @@ +7-Zip Plugin for FAR Manager +---------------------------- + +FAR Manager is a file manager working in text mode. +You can download "FAR Manager" from site: +http://www.farmanager.com + +Files: + +far7z.txt - This file +far7z.reg - Regisrty file for MultiArc Plugin +7zToFar.ini - Supporting 7z for MultiArc Plugin +7-ZipFar.dll - 7-Zip Plugin for FAR Manager +7-ZipEng.hlf - Help file in English for FAR Manager +7-ZipRus.hlf - Help file in Russian for FAR Manager +7-ZipEng.lng - Plugin message strings in English for FAR Manager +7-ZipRus.lng - Plugin message strings in Russian for FAR Manager + +There are two ways to use 7-Zip with FAR Manager: + + 1) Via 7-Zip FAR Plugin (it's recommended way). + 2) Via standard MultiArc Plugin. + + +7-Zip FAR Plugin +~~~~~~~~~~~~~~~~ + +7-Zip FAR Plugin is first level plugin for FAR Manager, like MultiArc plugin. +It very fast extracts and updates files in archive, since it doesn't use +external programs. It supports all formats supported by 7-Zip: +7z, ZIP, RAR, CAB, ARJ, GZIP, BZIP2, Z, TAR, CPIO, RPM and DEB. + +To install 7-Zip FAR Plugin: + 1) Create "7-Zip" folder in ...\Program Files\Far\Plugins folder. + 2) Copy all files from "FAR" folder of this package to created folder. + 3) Install 7-Zip, or copy 7z.dll from 7-Zip to Program Files\Far\Plugins\7-Zip\ + 4) Restart FAR. + +Also you must enable "OEM plugin support" option in FAR Manager: + + 1) F9 / Options / Plugins manager settings / check on "OEM plugin support". + 2) F9 / Options / Save setup. + 4) Restart FAR + +You can open archives with one of the following ways: + * Pressing Enter. + * Pressing Ctrl-PgDown. + * Pressing F11 and selecting 7-Zip item. + + +You can create new archives with 7-Zip by pressing F11 and +selecting 7-Zip (add to archive) item. + +If you think that some operations with archives is better to do with MultiArc Plugin, +you can disable 7-Zip plugin via Options / Pligin configuration / 7-Zip. In such mode +opening archives by pressing Enter and Ctrl-PgDown will start MultiArc Plugin. And +if you want to open archive with 7-Zip, press F11 and select 7-Zip item. + + +Using command line 7-Zip via MultiArc Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you want to use 7-Zip via MultiArc Plugin, you must +register file far7z.reg. + +If you want to use 7z archives via MultiArc Plugin, you must +append contents of file Far\7zToFar.ini to file +..\Program Files\Far\Plugins\MultiArc\Formats\Custom.ini. + + +If you want to cancel using 7-Zip by MultiArc, just remove lines that contain +7-Zip (7z) program name from HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ZIP +registry key. diff --git a/Tools/7z/License.txt b/Tools/7z/License.txt new file mode 100644 index 0000000..dcdce48 --- /dev/null +++ b/Tools/7z/License.txt @@ -0,0 +1,34 @@ + 7-Zip Extra + ~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Copyright (C) 1999-2023 Igor Pavlov. + + 7-Zip Extra files are under the GNU LGPL license. + + + Notes: + You can use 7-Zip Extra on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip. + + It is allowed to digitally sign DLL files included into this package + with arbitrary signatures of third parties." + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You can receive a copy of the GNU Lesser General Public License from + http://www.gnu.org/ + diff --git a/Tools/7z/history.txt b/Tools/7z/history.txt new file mode 100644 index 0000000..01a67eb --- /dev/null +++ b/Tools/7z/history.txt @@ -0,0 +1,249 @@ +7-Zip Extra history +------------------- + +This file contains only information about changes related to that package exclusively. +The full history of changes is listed in history.txt in main 7-Zip program. + + +23.01 2023-06-20 +------------------------- +- Some bugs were fixed. + + +23.00 2023-05-07 +------------------------- +- 7-Zip now can use new ARM64 filter for compression to 7z and xz archives. + ARM64 filter can increase compression ratio for data containing executable + files compiled for ARM64 (AArch64) architecture. + Also 7-Zip now parses executable files (that have exe and dll filename extensions) + before compressing, and it selects appropriate filter for each parsed file: + - BCJ or BCJ2 filter for x86 executable files, + - ARM64 filter for ARM64 executable files. + Previous versions by default used x86 filter BCJ or BCJ2 for all exe/dll files. +- Default section size for BCJ2 filter was changed from 64 MiB to 240 MiB. + It can increase compression ratio for executable files larger than 64 MiB. +- When new 7-Zip creates multivolume archive, 7-Zip keeps in open state + only volumes that still can be changed. Previous versions kept all volumes + in open state until the end of the archive creation. +- 7-Zip for Linux and macOS now can reduce the number of simultaneously open files, + when 7-Zip opens, extracts or creates multivolume archive. It allows to avoid + the failures for cases with big number of volumes, bacause there is a limitation + for number of open files allowed for a single program in Linux and macOS. +- The bugs were fixed: + - ZIP archives: if multithreaded zip compression was performed with more than one + file to stdout stream (-so switch), 7-zip didn't write "data descriptor" for some files. + - Some another bugs were fixed. + + +22.00 2022-06-16 +------------------------- +- 7-Zip now can create TAR archives in POSIX (pax) tar format with the switches + -ttar -mm=pax or -ttar -mm=posix +- 7-Zip now can store additional file timestamps with high precision (1 ns in Linux) + in tar/pax archives with the following switches: + -ttar -mm=pax -mtp=3 -mtc -mta + + +21.07 2021-12-26 +------------------------- +- New switches: -spm and -im!{file_path} to exclude directories from processing + for specified paths that don't contain path separator character at the end of path. +- The sorting order of files in archives was slightly changed to be more consistent + for cases where the name of some directory is the same as the prefix part of the name + of another directory or file. +- TAR archives created by 7-Zip now are more consistent with archives created by GNU TAR program. + + +21.06 2021-11-24 +------------------------- +- New switch -mmemuse={N}g / -mmemuse=p{N} to set a limit on memory usage (RAM) + for compressing and decompressing. +- Bug in versions 21.00-21.05 was fixed: + 7-Zip didn't set attributes of directories during archive extracting. +- Some bugs were fixed. + + +21.04 beta 2021-11-02 +------------------------- +- 7-Zip now reduces the number of working CPU threads for compression, + if RAM size is not enough for compression with big LZMA2 dictionary. +- 7-Zip now can create and check "file.sha256" text files that contain the list + of file names and SHA-256 checksums in format compatible with sha256sum program. + 7-Zip can work with such checksum files as with archives, + but these files don't contain real file data. + The context menu commands for command line version:: + 7z a -thash file.sha256 *.txt + 7z t -thash file.sha256 + 7z t -thash -shd. file.sha256 + New -shd{dir_path} switch to set the directory that is used to check files + referenced by "file.sha256" file for "Test" operation. + If -shd{dir_path} is not specified, 7-Zip uses the directory where "file.sha256" is stored. +- New -xtd switch to exclude directory metadata records from processing. + + +21.03 beta 2021-07-20 +------------------------- +- The maximum dictionary size for LZMA/LZMA2 compressing was increased to 4 GB (3840 MiB). +- Minor speed optimizations in LZMA/LZMA2 compressing. + + +21.02 alpha 2021-05-06 +------------------------- +- 7-Zip now writes additional field for filename in UTF-8 encoding to zip archives. + It allows to extract correct file name from zip archives on different systems. +- Some changes and improvements in ZIP and TAR code. + + +21.01 alpha 2021-03-09 +------------------------- +- The improvements for speed of ARM64 version using hardware CPU instructions + for AES, CRC-32, SHA-1 and SHA-256. +- The bug in versions 18.02 - 21.00 was fixed: + 7-Zip could not correctly extract some ZIP archives created with xz compression method. +- Some bugs were fixed. + + +20.02 alpha 2020-08-08 +------------------------- +- The default number of LZMA2 chunks per solid block in 7z archive was increased to 64. + It allows to increase the compression speed for big 7z archives, if there is a big number + of CPU cores and threads. +- The speed of PPMd compressing/decompressing was increased for 7z/ZIP archives. +- The new -ssp switch. If the switch -ssp is specified, 7-Zip doesn't allow the system + to modify "Last Access Time" property of source files for archiving and hashing operations. +- Some bugs were fixed. + + +20.00 alpha 2020-02-06 +------------------------- +- 7-Zip now supports new optional match finders for LZMA/LZMA2 compression: bt5 and hc5, + that can work faster than bt4 and hc4 match finders for the data with big redundancy. +- The compression ratio was improved for Fast and Fastest compression levels with the + following default settings: + - Fastest level (-mx1) : hc5 match finder with 256 KB dictionary. + - Fast level (-mx3) : hc5 match finder with 4 MB dictionary. +- Minor speed optimizations in multithreaded LZMA/LZMA2 compression for Normal/Maximum/Ultra + compression levels. +- bzip2 decoding code was updated to support bzip2 archives, created by lbzip2 program. + + +19.02 alpha 2019-09-05 +------------------------- +- 7-Zip now can use new x86/x64 hardware instructions for SHA-1 and SHA-256, supported + by AMD Ryzen and latest Intel CPUs: Ice Lake and Goldmont. + It increases + - the speed of SHA-1/SHA-256 hash value calculation, + - the speed of encryption/decryption in zip AES, + - the speed of key derivation for encryption/decryption in 7z/zip/rar archives. +- The speed of zip AES encryption and 7z/zip/rar AES decryption was increased with + the following improvements: + - 7-Zip now can use new x86/x64 VAES (AVX Vector AES) instructions, supported by + Intel Ice Lake CPU. + - The existing code of x86/x64 AES-NI was improved also. +- Some bugs were fixed. + + +19.00 2019-02-21 +------------------------- +- Encryption strength for 7z archives was increased: + the size of random initialization vector was increased from 64-bit to 128-bit, + and the pseudo-random number generator was improved. +- Some bugs were fixed. + + +18.06 2018-12-30 +------------------------- +- The speed for LZMA/LZMA2 compressing was increased by 3-10%, + and there are minor changes in compression ratio. +- Some bugs were fixed. + + +18.05 2018-04-30 +------------------------- +- The speed for LZMA/LZMA2 compressing was increased + by 8% for fastest/fast compression levels and + by 3% for normal/maximum compression levels. + + +18.03 beta 2018-03-04 +------------------------- +- The speed for single-thread LZMA/LZMA2 decoding + was increased by 30% in x64 version and by 3% in x86 version. +- 7-Zip now can use multi-threading for 7z/LZMA2 decoding, + if there are multiple independent data chunks in LZMA2 stream. + + +9.35 beta 2014-12-07 +------------------------------ + - SFX modules were moved to LZMA SDK package. + + +9.34 alpha 2014-06-22 +------------------------------ + - Minimum supported system now is Windows 2000 for EXE and DLL files. + - all EXE and DLL files use msvcrt.dll. + - 7zr.exe now support AES encryption. + + +9.18 2010-11-02 +------------------------------ + - New small SFX module for installers. + + +9.17 2010-10-04 +------------------------------ + - New 7-Zip plugin for FAR Manager x64. + + +9.10 2009-12-30 +------------------------------ + - 7-Zip for installers now supports LZMA2. + + +9.09 2009-12-12 +------------------------------ + - LZMA2 compression method support. + - Some bugs were fixed. + + +4.65 2009-02-03 +------------------------------ + - Some bugs were fixed. + + +4.38 beta 2006-04-13 +------------------------------ + - SFX for installers now supports new properties in config file: + Progress, Directory, ExecuteFile, ExecuteParameters. + + +4.34 beta 2006-02-27 +------------------------------ + - ISetProperties::SetProperties: + it's possible to specify desirable number of CPU threads: + PROPVARIANT: name=L"mt", vt = VT_UI4, ulVal = NumberOfThreads + If "mt" is not defined, 7za.dll will check number of processors in system to set + number of desirable threads. + Now 7za.dll can use: + 2 threads for LZMA compressing + N threads for BZip2 compressing + 4 threads for BZip2 decompressing + Other codecs use only one thread. + Note: 7za.dll can use additional "small" threads with low CPU load. + - It's possible to call ISetProperties::SetProperties to specify "mt" property for decoder. + + +4.33 beta 2006-02-05 +------------------------------ + - Compressing speed and Memory requirements were increased. + Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB, + Normal: 4 MB, Max: 16 MB, Ultra: 64 MB. + - 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4 + + +4.27 2005-09-21 +------------------------------ + - Some GUIDs/interfaces were changed. + IStream.h: + ISequentialInStream::Read now works as old ReadPart + ISequentialOutStream::Write now works as old WritePart diff --git a/Tools/7z/readme.txt b/Tools/7z/readme.txt new file mode 100644 index 0000000..212c914 --- /dev/null +++ b/Tools/7z/readme.txt @@ -0,0 +1,124 @@ +7-Zip Extra 23.01 +----------------- + +7-Zip Extra is package of extra modules of 7-Zip. + +7-Zip Copyright (C) 1999-2023 Igor Pavlov. + +7-Zip is free software. Read License.txt for more information about license. + +Source code of binaries can be found at: + http://www.7-zip.org/ + +This package contains the following files: + +7za.exe - standalone console version of 7-Zip with reduced formats support. +7za.dll - library for working with 7z archives +7zxa.dll - library for extracting from 7z archives +License.txt - license information +readme.txt - this file + +Far\ - plugin for Far Manager +x64\ - binaries for x64 + + +All 32-bit binaries can work in: + Windows 2000 / 2003 / 2008 / XP / Vista / 7 / 8 / 10 + and in any Windows x64 version with WoW64 support. +All x64 binaries can work in any Windows x64 version. + +All binaries use msvcrt.dll. + +7za.exe +------- + +7za.exe - is a standalone console version of 7-Zip with reduced formats support. + + Extra: 7za.exe : support for only some formats of 7-Zip. + 7-Zip: 7z.exe with 7z.dll : support for all formats of 7-Zip. + +7za.exe and 7z.exe from 7-Zip have same command line interface. +7za.exe doesn't use external DLL files. + +You can read Help File (7-zip.chm) from 7-Zip package for description +of all commands and switches for 7za.exe and 7z.exe. + +7za.exe features: + + - High compression ratio in 7z format + - Supported formats: + - Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR + - Unpacking only: Z, lzma, CAB. + - Highest compression ratio for ZIP and GZIP formats. + - Fast compression and decompression + - Strong AES-256 encryption in 7z and ZIP formats. + +Note: LZMA SDK contains 7zr.exe - more reduced version of 7za.exe. +But you can use 7zr.exe as "public domain" code. + + + +DLL files +--------- + +7za.dll and 7zxa.dll are reduced versions of 7z.dll from 7-Zip. +7za.dll and 7zxa.dll support only 7z format. +Note: 7z.dll is main DLL file that works with all archive types in 7-Zip. + +7za.dll and 7zxa.dll support the following decoding methods: + - LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES, BZip2, Deflate. + +7za.dll also supports 7z encoding with the following encoding methods: + - LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES. + +7za.dll and 7zxa.dll work via COM interfaces. +But these DLLs don't use standard COM interfaces for objects creating. + +Look also example code that calls DLL functions (in source code of 7-Zip): + + 7zip\UI\Client7z + +Another example of binary that uses these interface is 7-Zip itself. +The following binaries from 7-Zip use 7z.dll: + - 7z.exe (console version) + - 7zG.exe (GUI version) + - 7zFM.exe (7-Zip File Manager) + +Note: The source code of LZMA SDK also contains the code for similar DLLs +(DLLs without BZip2, Deflate support). And these files from LZMA SDK can be +used as "public domain" code. If you use LZMA SDK files, you don't need to +follow GNU LGPL rules, if you want to change the code. + + + + +License FAQ +----------- + +Can I use the EXE or DLL files from 7-Zip in a commercial application? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Yes, but you are required to specify in documentation for your application: + (1) that you used parts of the 7-Zip program, + (2) that 7-Zip is licensed under the GNU LGPL license and + (3) you must give a link to www.7-zip.org, where the source code can be found. + + +Can I use the source code of 7-Zip in a commercial application? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Since 7-Zip is licensed under the GNU LGPL you must follow the rules of that license. +In brief, it means that any LGPL'ed code must remain licensed under the LGPL. +For instance, you can change the code from 7-Zip or write a wrapper for some +code from 7-Zip and compile it into a DLL; but, the source code of that DLL +(including your modifications / additions / wrapper) must be licensed under +the LGPL or GPL. +Any other code in your application can be licensed as you wish. This scheme allows +users and developers to change LGPL'ed code and recompile that DLL. That is the +idea of free software. Read more here: http://www.gnu.org/. + + + +Note: You can look also LZMA SDK, which is available under a more liberal license. + + +--- +End of document diff --git a/Tools/7z/x64/7za.dll b/Tools/7z/x64/7za.dll new file mode 100644 index 0000000..d080653 Binary files /dev/null and b/Tools/7z/x64/7za.dll differ diff --git a/Tools/7z/x64/7za.exe b/Tools/7z/x64/7za.exe new file mode 100644 index 0000000..18342b3 Binary files /dev/null and b/Tools/7z/x64/7za.exe differ diff --git a/Tools/7z/x64/7zxa.dll b/Tools/7z/x64/7zxa.dll new file mode 100644 index 0000000..979af37 Binary files /dev/null and b/Tools/7z/x64/7zxa.dll differ diff --git a/Tools/sox/Lycoris.ogg b/Tools/sox/Lycoris.ogg new file mode 100644 index 0000000..3350ea0 Binary files /dev/null and b/Tools/sox/Lycoris.ogg differ diff --git a/Tools/sox/wav.wav b/Tools/sox/wav.wav new file mode 100644 index 0000000..953c6a5 Binary files /dev/null and b/Tools/sox/wav.wav differ diff --git a/Tools/sox/wav2.wav b/Tools/sox/wav2.wav new file mode 100644 index 0000000..a3a518a Binary files /dev/null and b/Tools/sox/wav2.wav differ diff --git a/WAV.cs b/WAV.cs index 61f6abd..b484a58 100644 --- a/WAV.cs +++ b/WAV.cs @@ -10,7 +10,7 @@ namespace TaikoSoundEditor internal static class WAV { - public static void ConvertToWav(string sourcePath, string destPath) + public static void ConvertToWav(string sourcePath, string destPath, int seconds_before = 0) { sourcePath = Path.GetFullPath(sourcePath); destPath = Path.GetFullPath(destPath); @@ -19,6 +19,9 @@ namespace TaikoSoundEditor p.StartInfo.FileName = Path.GetFullPath(@"Tools\sox\sox.exe"); p.StartInfo.ArgumentList.Add(sourcePath); p.StartInfo.ArgumentList.Add(destPath); + /*p.StartInfo.ArgumentList.Add("pad"); + p.StartInfo.ArgumentList.Add(seconds_before.ToString()); + p.StartInfo.ArgumentList.Add("0");*/ p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardError = true; p.StartInfo.RedirectStandardOutput = true;