Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chmのビルドにPowershellを使う #1905

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dep5
Copy link
Contributor

@dep5 dep5 commented Jan 30, 2023

PR対象

  • ドキュメント(md、ヘルプファイル等)

カテゴリ

  • 不具合修正

PR の背景

chmのビルドの大半をPowershellで処理します。
Powershellにすることにより、

  • ヘルプの編集だけしたい人はHTML Help Workshopを持っていればVisual Studio無しでもコンパイルできるようになります。
  • batよりは複雑なコードを書けるようになります。

ヘルプファイルで意図しないフォントが使用されるので対処します。
-> #1896 で解消しました。
#1894 はローカルでしか動かなかったので、CIでもコンパイル可能にしました。

仕様・動作説明

  • シフトJISに無い文字を数値文字参照に変換することも可能です
  • HTMLヘルプの文字コードを変換する簡易ツールを導入する #996 で作られたEncoderEscapingFallbackクラスから借用しています
  • add-typeの制限のためラムダ式、後半のusing句を削除しています
  • 変換ツールのビルドに必要だったTargeting Packが必要なくなります
  • build-chm.batの処理を/help/build-chm.ps1に移動しています
  • ヘルプのキーワードタブを開いたときにできる*.chw.gitignoreに追加しています
  • help以下にある.gitattributes.gitignoreをルートにまとめています
  • *.chmコンパイル中のログだけ表示されて、成功のログが表示されていないので対応しています

PR の影響範囲

テスト内容

ローカルでシフトJISに無い文字をソースに書き込んでコンパイル後に数値文字参照に変換されているのを確認しました

関連 issue, PR

#1894
#1896
#996

参考資料

@AppVeyorBot
Copy link

Build sakura 1.0.4271 completed (commit f36451aedb by @dep5)

@sonarcloud
Copy link

sonarcloud bot commented Jan 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dep5 dep5 marked this pull request as ready for review January 30, 2023 14:19
@dep5 dep5 changed the title chmで日本語フォント名が使用できない問題の修正 3 chmのビルドにPowershellを使う Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants