This commit is contained in:
STAM 2023-01-12 00:16:26 +03:00
parent 000000009d
commit 4624416027
Signed by: stam
GPG Key ID: 4F57E51F9C45F8CD
9 changed files with 1921 additions and 61 deletions

View File

View File

@ -7,7 +7,7 @@ internal record Command(string InputFile, string OutputFile, bool Clean, bool Sa
{
private string ExecutablePath =>
Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location!)!,
Path.GetDirectoryName(System.AppContext.BaseDirectory!)!,
@"Tools\x64\retime_phoneme.exe"
);
@ -42,7 +42,7 @@ internal record Command(string InputFile, string OutputFile, bool Clean, bool Sa
}
if (SaveLog)
{
yield return "-o";
yield return "-l";
}
}
}

14
src/kru.gui/build.bat Normal file
View File

@ -0,0 +1,14 @@
SET DOTNET_CLI_TELEMETRY_OPTOUT=true
SET DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet.exe publish -r win7-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r win7-x86 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r win81-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r win81-x86 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r win10-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r win10-x86 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r linux-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r rhel-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r tizen --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r linux-musl-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet.exe publish -r osx-x64 --self-contained true --framework net7.0-windows --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRun=true

BIN
src/kru.gui/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
src/kru.gui/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -28,10 +28,9 @@ partial class frmMain
/// </summary>
private void InitializeComponent()
{
this.lblInput = new System.Windows.Forms.Label();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
this.txtInput = new System.Windows.Forms.TextBox();
this.txtOutput = new System.Windows.Forms.TextBox();
this.lblOutput = new System.Windows.Forms.Label();
this.btnBrowseInput = new System.Windows.Forms.Button();
this.btnBrowseOutput = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
@ -43,48 +42,42 @@ partial class frmMain
this.rdClean = new System.Windows.Forms.RadioButton();
this.rdFixed = new System.Windows.Forms.RadioButton();
this.chkSaveLogs = new System.Windows.Forms.CheckBox();
this.groupBoxInput = new System.Windows.Forms.GroupBox();
this.groupBoxOutput = new System.Windows.Forms.GroupBox();
this.grpClean.SuspendLayout();
this.groupBoxInput.SuspendLayout();
this.groupBoxOutput.SuspendLayout();
this.SuspendLayout();
//
// lblInput
//
this.lblInput.AutoSize = true;
this.lblInput.Location = new System.Drawing.Point(12, 20);
this.lblInput.Name = "lblInput";
this.lblInput.Size = new System.Drawing.Size(58, 25);
this.lblInput.TabIndex = 0;
this.lblInput.Text = "Input:";
//
// txtInput
//
this.txtInput.Location = new System.Drawing.Point(12, 68);
this.txtInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtInput.Location = new System.Drawing.Point(5, 21);
this.txtInput.Margin = new System.Windows.Forms.Padding(2);
this.txtInput.Name = "txtInput";
this.txtInput.Size = new System.Drawing.Size(521, 31);
this.txtInput.Size = new System.Drawing.Size(235, 23);
this.txtInput.TabIndex = 1;
this.txtInput.TextChanged += new System.EventHandler(this.TxtInputTextChanged);
//
// txtOutput
//
this.txtOutput.Location = new System.Drawing.Point(12, 173);
this.txtOutput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtOutput.Location = new System.Drawing.Point(5, 21);
this.txtOutput.Margin = new System.Windows.Forms.Padding(2);
this.txtOutput.Name = "txtOutput";
this.txtOutput.Size = new System.Drawing.Size(521, 31);
this.txtOutput.Size = new System.Drawing.Size(234, 23);
this.txtOutput.TabIndex = 3;
this.txtOutput.TextChanged += new System.EventHandler(this.TxtOutputTextChanged);
//
// lblOutput
//
this.lblOutput.AutoSize = true;
this.lblOutput.Location = new System.Drawing.Point(12, 125);
this.lblOutput.Name = "lblOutput";
this.lblOutput.Size = new System.Drawing.Size(73, 25);
this.lblOutput.TabIndex = 2;
this.lblOutput.Text = "Output:";
//
// btnBrowseInput
//
this.btnBrowseInput.Location = new System.Drawing.Point(555, 67);
this.btnBrowseInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrowseInput.Location = new System.Drawing.Point(244, 21);
this.btnBrowseInput.Margin = new System.Windows.Forms.Padding(2);
this.btnBrowseInput.Name = "btnBrowseInput";
this.btnBrowseInput.Size = new System.Drawing.Size(112, 34);
this.btnBrowseInput.Size = new System.Drawing.Size(75, 23);
this.btnBrowseInput.TabIndex = 4;
this.btnBrowseInput.Text = "Browse";
this.btnBrowseInput.UseVisualStyleBackColor = true;
@ -92,9 +85,11 @@ partial class frmMain
//
// btnBrowseOutput
//
this.btnBrowseOutput.Location = new System.Drawing.Point(555, 171);
this.btnBrowseOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnBrowseOutput.Location = new System.Drawing.Point(243, 21);
this.btnBrowseOutput.Margin = new System.Windows.Forms.Padding(2);
this.btnBrowseOutput.Name = "btnBrowseOutput";
this.btnBrowseOutput.Size = new System.Drawing.Size(112, 34);
this.btnBrowseOutput.Size = new System.Drawing.Size(75, 23);
this.btnBrowseOutput.TabIndex = 5;
this.btnBrowseOutput.Text = "Browse";
this.btnBrowseOutput.UseVisualStyleBackColor = true;
@ -102,10 +97,12 @@ partial class frmMain
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnSave.Enabled = false;
this.btnSave.Location = new System.Drawing.Point(12, 373);
this.btnSave.Location = new System.Drawing.Point(11, 210);
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(112, 34);
this.btnSave.Size = new System.Drawing.Size(75, 23);
this.btnSave.TabIndex = 6;
this.btnSave.Text = "Save batch";
this.btnSave.UseVisualStyleBackColor = true;
@ -113,32 +110,44 @@ partial class frmMain
//
// btnStart
//
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnStart.Enabled = false;
this.btnStart.Location = new System.Drawing.Point(552, 373);
this.btnStart.Location = new System.Drawing.Point(261, 210);
this.btnStart.Margin = new System.Windows.Forms.Padding(2);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(112, 34);
this.btnStart.Size = new System.Drawing.Size(75, 23);
this.btnStart.TabIndex = 7;
this.btnStart.Text = "Start";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// sfdOutput
//
this.sfdOutput.Filter = "\"Batch File|*.bat|All files|*.*\"";
this.sfdOutput.FileOk += new System.ComponentModel.CancelEventHandler(this.sfdOutput_FileOk);
//
// grpClean
//
this.grpClean.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.grpClean.Controls.Add(this.rdClean);
this.grpClean.Controls.Add(this.rdFixed);
this.grpClean.Location = new System.Drawing.Point(12, 226);
this.grpClean.Location = new System.Drawing.Point(5, 48);
this.grpClean.Margin = new System.Windows.Forms.Padding(2);
this.grpClean.Name = "grpClean";
this.grpClean.Size = new System.Drawing.Size(320, 119);
this.grpClean.Padding = new System.Windows.Forms.Padding(2);
this.grpClean.Size = new System.Drawing.Size(224, 69);
this.grpClean.TabIndex = 8;
this.grpClean.TabStop = false;
this.grpClean.Text = "Mode";
this.grpClean.Text = "Mode:";
//
// rdClean
//
this.rdClean.AutoSize = true;
this.rdClean.Location = new System.Drawing.Point(18, 75);
this.rdClean.Location = new System.Drawing.Point(4, 43);
this.rdClean.Margin = new System.Windows.Forms.Padding(2);
this.rdClean.Name = "rdClean";
this.rdClean.Size = new System.Drawing.Size(80, 29);
this.rdClean.Size = new System.Drawing.Size(55, 19);
this.rdClean.TabIndex = 1;
this.rdClean.Text = "Clean";
this.rdClean.UseVisualStyleBackColor = true;
@ -147,9 +156,10 @@ partial class frmMain
//
this.rdFixed.AutoSize = true;
this.rdFixed.Checked = true;
this.rdFixed.Location = new System.Drawing.Point(18, 30);
this.rdFixed.Location = new System.Drawing.Point(4, 20);
this.rdFixed.Margin = new System.Windows.Forms.Padding(2);
this.rdFixed.Name = "rdFixed";
this.rdFixed.Size = new System.Drawing.Size(143, 29);
this.rdFixed.Size = new System.Drawing.Size(98, 19);
this.rdFixed.TabIndex = 0;
this.rdFixed.TabStop = true;
this.rdFixed.Text = "Fixed(default)";
@ -157,46 +167,75 @@ partial class frmMain
//
// chkSaveLogs
//
this.chkSaveLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkSaveLogs.AutoSize = true;
this.chkSaveLogs.Checked = true;
this.chkSaveLogs.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkSaveLogs.Location = new System.Drawing.Point(375, 243);
this.chkSaveLogs.Location = new System.Drawing.Point(243, 98);
this.chkSaveLogs.Margin = new System.Windows.Forms.Padding(2);
this.chkSaveLogs.Name = "chkSaveLogs";
this.chkSaveLogs.Size = new System.Drawing.Size(114, 29);
this.chkSaveLogs.Size = new System.Drawing.Size(75, 19);
this.chkSaveLogs.TabIndex = 9;
this.chkSaveLogs.Text = "Save logs";
this.chkSaveLogs.UseVisualStyleBackColor = true;
//
// groupBoxInput
//
this.groupBoxInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxInput.Controls.Add(this.txtInput);
this.groupBoxInput.Controls.Add(this.btnBrowseInput);
this.groupBoxInput.Location = new System.Drawing.Point(12, 12);
this.groupBoxInput.Name = "groupBoxInput";
this.groupBoxInput.Size = new System.Drawing.Size(324, 63);
this.groupBoxInput.TabIndex = 10;
this.groupBoxInput.TabStop = false;
this.groupBoxInput.Text = "Input folder:";
//
// groupBoxOutput
//
this.groupBoxOutput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxOutput.Controls.Add(this.txtOutput);
this.groupBoxOutput.Controls.Add(this.btnBrowseOutput);
this.groupBoxOutput.Controls.Add(this.chkSaveLogs);
this.groupBoxOutput.Controls.Add(this.grpClean);
this.groupBoxOutput.Location = new System.Drawing.Point(12, 81);
this.groupBoxOutput.Name = "groupBoxOutput";
this.groupBoxOutput.Size = new System.Drawing.Size(323, 122);
this.groupBoxOutput.TabIndex = 11;
this.groupBoxOutput.TabStop = false;
this.groupBoxOutput.Text = "Output folder:";
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(690, 416);
this.Controls.Add(this.chkSaveLogs);
this.Controls.Add(this.grpClean);
this.ClientSize = new System.Drawing.Size(347, 244);
this.Controls.Add(this.groupBoxOutput);
this.Controls.Add(this.groupBoxInput);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.btnBrowseOutput);
this.Controls.Add(this.btnBrowseInput);
this.Controls.Add(this.txtOutput);
this.Controls.Add(this.lblOutput);
this.Controls.Add(this.txtInput);
this.Controls.Add(this.lblInput);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.MinimumSize = new System.Drawing.Size(363, 283);
this.Name = "frmMain";
this.Text = "Converter";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Retime Phoneme Util GUI 1.0.0.0";
this.Load += new System.EventHandler(this.frmMain_Load);
this.grpClean.ResumeLayout(false);
this.grpClean.PerformLayout();
this.groupBoxInput.ResumeLayout(false);
this.groupBoxInput.PerformLayout();
this.groupBoxOutput.ResumeLayout(false);
this.groupBoxOutput.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Label lblInput;
private TextBox txtInput;
private TextBox txtOutput;
private Label lblOutput;
private Button btnBrowseInput;
private Button btnBrowseOutput;
private Button btnSave;
@ -208,4 +247,6 @@ partial class frmMain
private RadioButton rdClean;
private RadioButton rdFixed;
private CheckBox chkSaveLogs;
private GroupBox groupBoxInput;
private GroupBox groupBoxOutput;
}

View File

@ -50,7 +50,7 @@ public partial class frmMain : Form
SaveLog = chkSaveLogs.Checked,
};
var commands = Directory
.GetFiles(options.Input)
.GetFiles(options.Input, "*.wav")
.Select(inputFile => new Command(inputFile, Path.Combine(options.Output, Path.GetFileName(inputFile)), options.Clean, options.SaveLog))
.ToArray();
@ -70,4 +70,14 @@ public partial class frmMain : Form
this.Enabled = true;
MessageBox.Show("Done!");
}
private void frmMain_Load(object sender, EventArgs e)
{
}
private void sfdOutput_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
}
}

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,31 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Nullable>enable</Nullable>
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
<TargetFramework>net7.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<PackageId>AntinomyCollective.kru.gui</PackageId>
<Authors>Antinomy Collective, EpicMorg, kasthack, stam</Authors>
<Description>Retime Phoneme Util GUI by EpicMorg</Description>
<PackageProjectUrl>https://github.com/AntinomyCollective/Retime-Phoneme-Uti-GUI</PackageProjectUrl>
<PackageIcon>favicon.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/AntinomyCollective/Retime-Phoneme-Uti-GUI</RepositoryUrl>
<PackageTags>epicmorg, retime, Phoneme, Util, GUI, Antinomy, Collective</PackageTags>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Version>1.0.0.0</Version>
<Copyright>EpicMorg 2023</Copyright>
<Product>Retime Phoneme Util GUI</Product>
<IsPackable>true</IsPackable>
<Company>EpicMorg</Company>
<PackageReadmeFile>README.md</PackageReadmeFile>
<UseWindowsForms>True</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>