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

bregonig.dll のファイル内容とタイムスタンプを比較する #335

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
Next Next commit
bregonig.dll のファイル内容の比較に対応
  • Loading branch information
m-tmatma committed Aug 13, 2018
commit 5540caf2033b51b4ce39f5b407ce82947d60fb0f
40 changes: 38 additions & 2 deletions build-installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ copy %INSTALLER_RESOURCES_SINT%\sakura.exe.manifest.v %INSTALLER_WORK%\
copy %INSTALLER_RESOURCES_SINT%\sakura.exe.ini %INSTALLER_WORK%\
copy %INSTALLER_RESOURCES_SINT%\keyword\*.* %INSTALLER_WORK%\keyword\

set DLL_BREGONIG_NAME=bregonig.dll
if "%platform%" == "x64" (
copy %INSTALLER_RESOURCES_BRON%\x64\*.dll %INSTALLER_WORK%\
set INSTALLER_RESOURCES_BRON_DLL=%INSTALLER_RESOURCES_BRON%\x64
) else (
copy %INSTALLER_RESOURCES_BRON%\*.dll %INSTALLER_WORK%\
set INSTALLER_RESOURCES_BRON_DLL=%INSTALLER_RESOURCES_BRON%
)
copy %INSTALLER_RESOURCES_BRON_DLL%\*.dll %INSTALLER_WORK%\
Copy link
Contributor

Choose a reason for hiding this comment

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

横展ってわけではないですが /B バイナリモード指定をしたほうがよさそうです。

Copy link
Member Author

Choose a reason for hiding this comment

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

全体的に抜けているので、他のバッチファイルも含めて一括で対応します。

copy %INSTALLER_RESOURCES_BRON%\*.txt %INSTALLER_WORK%\

copy help\sakura\sakura.chm %INSTALLER_WORK%\
Expand All @@ -37,5 +39,39 @@ copy help\macro\macro.chm %INSTALLER_WORK%\
copy %platform%\%configuration%\*.exe %INSTALLER_WORK%\
copy %platform%\%configuration%\sakura_lang_en_US.dll %INSTALLER_WORK%\

set DLL_BREGONIG_0=%INSTALLER_RESOURCES_BRON_DLL%\%DLL_BREGONIG_NAME%
set DLL_BREGONIG_1=%INSTALLER_WORK%\%DLL_BREGONIG_NAME%
set DLL_BREGONIG_2=installer\externals\bregonig\%platform%\%DLL_BREGONIG_NAME%
set DLL_BREGONIG_3=%platform%\%configuration%\%DLL_BREGONIG_NAME%

set COMPARE_RESULT=0
fc %DLL_BREGONIG_0% %DLL_BREGONIG_1% 1>nul 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

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

fc /B path1 path2 な気がします。 →詳しくはコマンドプロンプトで help fc

if "%ERRORLEVEL%" == "0" (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_1% for %platform%: matched
) else (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_1% for %platform%: unmatched
set COMPARE_RESULT=1
)

fc %DLL_BREGONIG_0% %DLL_BREGONIG_2% 1>nul 2>&1
if "%ERRORLEVEL%" == "0" (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_2% for %platform%: matched
) else (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_2% for %platform%: unmatched
set COMPARE_RESULT=1
)

fc %DLL_BREGONIG_0% %DLL_BREGONIG_3% 1>nul 2>&1
if "%ERRORLEVEL%" == "0" (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_3% for %platform%: matched
) else (
@echo %DLL_BREGONIG_0% and %DLL_BREGONIG_3% for %platform%: unmatched
set COMPARE_RESULT=1
)
if "%COMPARE_RESULT%" == "1" (
echo unmatch
exit /b 1
)

set SAKURA_ISS=installer\sakura-%platform%.iss
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" %SAKURA_ISS% || (echo error && exit /b 1)