From eb7134da81ec2b3b198e9ea074eda6400313c4af Mon Sep 17 00:00:00 2001 From: otomad Date: Wed, 29 Mar 2023 22:54:35 +0800 Subject: [PATCH] Update script, UTF-8 with **no** BOM --- otomad_helper/Otomad Helper.cs | 2 +- pack.ps1 | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/otomad_helper/Otomad Helper.cs b/otomad_helper/Otomad Helper.cs index 0aaf3c24..8afdf677 100644 --- a/otomad_helper/Otomad Helper.cs +++ b/otomad_helper/Otomad Helper.cs @@ -1,5 +1,5 @@ /** - * 音 MAD 助手 Vegas,旨在使 Vegas 接受 MIDI 序列文件作为输入,自动生成音 MAD / YTPMV 的轨道。 + * 音 MAD 助手,旨在使 Vegas 接受 MIDI 序列文件作为输入,自动生成音 MAD / YTPMV 的轨道。 * Vegas 16 及以上的版本支持所有功能,Vegas 13 及以上的版本可以兼容运行。 * 将本脚本及其它所有附属文件放置在您 Vegas 安装目录下的 Script Menu 文件夹中。 * 具体说明请参见下方的说明文档链接。 diff --git a/pack.ps1 b/pack.ps1 index a29bb32b..083ef61e 100644 --- a/pack.ps1 +++ b/pack.ps1 @@ -36,7 +36,9 @@ function Update-ToReplaceTextFileOnce { $content = [Regex]::New($sourceTexts[$i]).Replace($content, $targetTexts[$i], 1) } - Set-Content -Path $file -Value $content -Encoding UTF8 + # Set-Content -Path $file -Value $content -Encoding UTF8 + $utf8NoBomEncoding = New-Object Text.UTF8Encoding $False + [IO.File]::WriteAllLines($file, $content, $utf8NoBomEncoding) } function Update-UndefinedSymbols { @@ -74,3 +76,4 @@ for ($i = 0; $i -lt $infos.Count; $i++) { Rename-Item -Path "release_package_template.zip" -NewName ([String]$i + "_otomad_helper_v" + $version + "_vegas" + [string]$info.VegasVersions + ".zip") Remove-Item "Otomad Helper.cs" } +Remove-Item "..\Otomad Helper.cs"