hiroshi hatake
cosmo****@gmail*****
2014年 6月 1日 (日) 19:58:22 JST
畑ケです。 Rubyでのビルド後に走らせるスクリプトにはまだ手を付けられてないです、すい ません。 その前にzipだけでも作ってしまおうとWindowsで http://packages.groonga.org/source/mroonga/mariadb-10.0.11-with-mroonga-4.03-for-windows.zip を https://github.com/mroonga/mroonga/tree/master/packages/windows にあ るバッチを使ってビルドを回してみたのですが、zipを作るところでエラーに なってしまいます。。。 エラーの抜粋です。 --- 62> CPack: Create package using ZIP 62> CPack: Install projects 62> CPack: - Install project: MySQL 62> CMake Error at C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/lib/cmake_install.cmake:50 (FILE): 62> file INSTALL cannot find 62> "C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/lib/RelWithDebInfo/groonga.dll". 62> Call Stack (most recent call first): 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/cmake_install.cmake:37 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/cmake_install.cmake:59 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/cmake_install.cmake:70 (INCLUDE) 62> 62> 62> CMake Error at C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/suggest/cmake_install.cmake:38 (FILE): 62> file INSTALL cannot find 62> "C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/suggest/RelWithDebInfo/suggest.dll". 62> Call Stack (most recent call first): 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/cmake_install.cmake:32 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/cmake_install.cmake:39 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/cmake_install.cmake:59 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/cmake_install.cmake:70 (INCLUDE) 62> 62> 62> CMake Error at C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/query_expanders/cmake_install.cmake:38 (FILE): 62> file INSTALL cannot find 62> "C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/query_expanders/RelWithDebInfo/tsv.dll". 62> Call Stack (most recent call first): 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/plugins/cmake_install.cmake:35 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/vendor/groonga/cmake_install.cmake:39 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/storage/mroonga/cmake_install.cmake:59 (INCLUDE) 62> C:/Code/source/build-vc2010-zip-32/cmake_install.cmake:70 (INCLUDE) 62> 62> 62>EXEC : CPack error : Error when generating package: MySQL 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: コマンド "setlocal 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: cd C:\Code\source\build-vc2010-zip-32 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: C: 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: C:\Cmake\bin\cpack.exe -C RelWithDebInfo --config ./CPackConfig.cmake 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmEnd 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmErrorLevel 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: exit /b %1 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :cmDone 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd 62>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" はコード 1 で終了しました。 ========== ビルド: 58 正常終了、4 失敗、122 更新不要、0 スキップ ========== --- 完全なログはDropBoxに置きました。 https://dl.dropboxusercontent.com/u/36753409/MrnBuildWindows/mroonga4.03-windows-zip.log >>>> もし、このバッチファイルを使っているなら、勘でこんな感じで動 >>>> くんじゃね?みたいな変更を入れておこうと思います。動作確認で >>>> きないので、動かないバッチファイルになるかもしれませんが。。。 >>> わかりました。バッチファイルが動かなくなっていたらできる限り早く報告しま >>> すね! >> ありがとうございます! >> では、それっぽいものを作ったらまた連絡します! > すみません! > それっぽいものを作れませんでした! > > Windowsってバッチファイルからzipの圧縮・展開できないんですね。。。 > > > rundll32.exe zipfldr.dll,RouteTheCall > > はExplorerが開いてしまいますし。。。 > > Rubyで書けばいけるんですけど、ビルドする人が環境を用意する手 > 間が1つ増えるのでやっちゃっていいのかなぁと悩んでいます。 > > やろうとしていたことは、ビルドが終わった後に > > * zipを展開 > * 中のmysqldを起動 > * mysqlで中にあるshare/mroonga/install.sqlを実行 > * mysqldを終了 > * zipで圧縮 > (欲を言うと、ここで、zipのファイル名と展開したときにで > きるディレクトリー名を同じにしたい) > > というものです。 > > Rubyにはarchive-zipというzipを操作するgemがあって、Rroongaで > も使っているので、zipの圧縮・展開はいけると思うんですよねぇ。 > zipの展開くらいはPowerShellで頑張れないかなぁとやってみました。 参考までに、 PowerShellでMroonga-with-MariaDBのWindows向けのzipを解凍する時の PowerShellがこんな感じ です: --- # Windowsではそのままだと展開した時のファイルパスが長すぎるので、 source.zipにリネームしてある $file = "C:\Code\source.zip" $shell = New-Object -ComObject shell.application $zip = $shell.NameSpace($file) $dest = $shell.NameSpace((Split-Path $file -Parent)) $dest.CopyHere($zip.Items()) move mariadb-*-for-windows source # ビルドを始める準備がここまでで整う --- これくらいなら特に手間が掛からないと思うんですが、 如何せんPowerShellにはセキュリティ機構が備わっていて、 ローカルにあるPowerShellスクリプトは無条件で実行できる状態(RemoteSigned) にセキュリティレベルを下げないと 自分の書いたものですら実行できないのがどことなくもんにょりしますね。。。