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 のビルド前に chm ファイルを削除する #774

Merged

Conversation

m-tmatma
Copy link
Member

chm のビルド前に chm ファイルを削除する

作業しやすいように最初の commit でリファクリタングしてから、対応を入れています。

Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とくに問題ないと思います。

今後の課題ですが、リファクタリングは「何をどうした」のか書いておくと後で悩まなくて済むと思います。

@@ -8,34 +8,29 @@ set HHP_MACRO=help\macro\macro.HHP
set HHP_PLUGIN=help\plugin\plugin.hhp
set HHP_SAKURA=help\sakura\sakura.hhp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント) パスは空白を含まない・・・

)
set CHM_MACRO=help\macro\macro.chm
set CHM_PLUGIN=help\plugin\plugin.chm
set CHM_SAKURA=help\sakura\sakura.chm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント) パスは空白を含まない・・・

)
call :BuildChm %HHP_MACRO% %CHM_MACRO% || (echo error && exit /b 1)
call :BuildChm %HHP_PLUGIN% %CHM_PLUGIN% || (echo error && exit /b 1)
call :BuildChm %HHP_SAKURA% %CHM_SAKURA% || (echo error && exit /b 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント) 構造は call :BuildChm( str, str )
引数1と引数2は "%Variable%" とするのがベター。
利用シーンで空白を含まないことが分かっているので対応は不要。

@@ -23,14 +23,19 @@ exit /b 0
:BuildChm
set PROJECT_HHP=%1
set PROJECT_CHM=%2

if exist "%PROJECT_CHM%" del /F "%PROJECT_CHM%"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント) 削除が成功したとき(通常は削除が行われない)に「1個のファイルを削除しました(英語」が出ますね。ファイル名が出ないので、ハマるときはこういうのでもハマりそう。問題ないと思いますが。

@rem hhc.exe returns 1 on success, and returns 0 on failure
"%CMD_HHC%" %PROJECT_HHP%
if not errorlevel 1 (
echo error %PROJECT_HHP% errorlevel %errorlevel%

del /F "%PROJECT_CHM%"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント) ファイル削除後のエラーチェックはしないんですね 😄

@m-tmatma
Copy link
Member Author

マージしちゃいます

@m-tmatma m-tmatma merged commit c670c2d into sakura-editor:master Jan 20, 2019
@berryzplus
Copy link
Contributor

コメント全スルーかいっ!w(いいけど。

@m-tmatma
Copy link
Member Author

approve されたし、ま、いいかと

@m-tmatma m-tmatma added this to the next release milestone Feb 3, 2019
HoppingTappy pushed a commit to HoppingTappy/sakura that referenced this pull request Jun 11, 2019
…handling-chm

 chm のビルド前に chm ファイルを削除する
@m-tmatma m-tmatma deleted the feature/fix-error-handling-chm branch July 5, 2019 21:53
This pull request was closed.
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.

2 participants