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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions build-chm.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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


@rem hhc.exe returns 1 on success, and returns 0 on failure
"%CMD_HHC%" %HHP_MACRO%
if not errorlevel 1 (
echo error %HHP_MACRO% errorlevel %errorlevel%
"%CMD_HHC%" %HHP_MACRO%
)
if not errorlevel 1 (
echo error %HHP_MACRO% errorlevel %errorlevel%
exit /b 1
)
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.

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


"%CMD_HHC%" %HHP_PLUGIN%
if not errorlevel 1 (
echo error %HHP_PLUGIN% errorlevel %errorlevel%
"%CMD_HHC%" %HHP_PLUGIN%
)
if not errorlevel 1 (
echo error %HHP_PLUGIN% errorlevel %errorlevel%
exit /b 1
)
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%" とするのがベター。
利用シーンで空白を含まないことが分かっているので対応は不要。

exit /b 0

"%CMD_HHC%" %HHP_SAKURA%
@rem ------------------------------------------------------------------------------
@rem BuildChm
@rem ------------------------------------------------------------------------------
:BuildChm
set PROJECT_HHP=%1
set PROJECT_CHM=%2
@rem hhc.exe returns 1 on success, and returns 0 on failure
"%CMD_HHC%" %PROJECT_HHP%
if not errorlevel 1 (
echo error %HHP_SAKURA% errorlevel %errorlevel%
"%CMD_HHC%" %HHP_SAKURA%
echo error %PROJECT_HHP% errorlevel %errorlevel%
"%CMD_HHC%" %PROJECT_HHP%
)
if not errorlevel 1 (
echo error %HHP_SAKURA% errorlevel %errorlevel%
echo error %PROJECT_HHP% errorlevel %errorlevel%
exit /b 1
)
exit /b 0