1
onlyxuyang 2015-10-05 07:17:35 +08:00 via Android
…… wog 啊啊啊 感谢楼主找到了这个 project …… 啊啊啊啊啊 赞 英雄无敌③ 赞
|
2
zjwzszh 2015-10-05 08:57:58 +08:00
挖哈哈哈哈,居然有 mac 版的啊!!!!!!
|
3
kevinyoung 2015-10-05 10:38:11 +08:00
楼主升 El Capitan 没? 新系统的根目录权限给改了,有可能这些依赖的库就装不上了,如果是这个原因导致的,要么等官方出来修改安装脚本,要么用 home brew 试试
|
4
squid157 2015-10-05 10:46:29 +08:00 via iPhone
话说……新的 HD 版 数据格式一样么 老版都是盗版不好找了
|
5
wohenyingyu01 OP @kevinyoung 升级了,然后 home-brew 就用不了了,我得重新去获取 brew 目录的权限 chown = =
但是这个依赖库是倒数第四行的 download_dependencies.sh 脚本自动下载的,放在根目录的 lib 文件夹下面,不知道为什么 cmake 找不到。 |
6
wohenyingyu01 OP @squid157 官方要求貌似要死亡阴影或者 wog 的版本, hd 只有埃莱西亚的光复吧?不过官方提供了个老版的购买地址就几美元
|
7
wohenyingyu01 OP 附上 output 吧:
Stevens-MacBook-Air:build Steven$ cmake -G Xcode .. -DENABLE_LAUNCHER=OFF -- The C compiler identification is AppleClang 7.0.0.7000072 -- The CXX compiler identification is AppleClang 7.0.0.7000072 -- Check for working C compiler using: Xcode -- Check for working C compiler using: Xcode -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Xcode -- Check for working CXX compiler using: Xcode -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for shm_open in rt -- Looking for shm_open in rt - not found CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindBoost.cmake:1245 (message): Unable to find the requested Boost libraries. Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers. Call Stack (most recent call first): CMakeLists.txt:118 (find_package) -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") -- checking for module 'libavcodec' -- package 'libavcodec' not found -- checking for module 'libavformat' -- package 'libavformat' not found -- checking for module 'libavdevice' -- package 'libavdevice' not found -- checking for module 'libavutil' -- package 'libavutil' not found -- checking for module 'libswscale' -- package 'libswscale' not found -- checking for module 'libpostproc' -- package 'libpostproc' not found CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find FFmpeg (missing: FFMPEG_INCLUDE_DIRS AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIRS AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIRS AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake_modules/FindFFmpeg.cmake:163 (find_package_handle_standard_args) CMakeLists.txt:120 (find_package) -- Configuring incomplete, errors occurred! See also "/Users/Steven/Xcode/vcmi-develop/build/CMakeFiles/CMakeOutput.log". See also "/Users/Steven/Xcode/vcmi-develop/build/CMakeFiles/CMakeError.log". Stevens-MacBook-Air:build Steven$ ls CMakeCache.txt CMakeFiles Stevens-MacBook-Air:build Steven$ rm CMakeCache.txt Stevens-MacBook-Air:build Steven$ rm -rf CMakeFiles/ Stevens-MacBook-Air:build Steven$ sudo cmake -G Xcode .. -DENABLE_LAUNCHER=OFF Password: -- The C compiler identification is AppleClang 7.0.0.7000072 -- The CXX compiler identification is AppleClang 7.0.0.7000072 -- Check for working C compiler using: Xcode -- Check for working C compiler using: Xcode -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Xcode -- Check for working CXX compiler using: Xcode -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for shm_open in rt -- Looking for shm_open in rt - not found CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindBoost.cmake:1245 (message): Unable to find the requested Boost libraries. Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers. Call Stack (most recent call first): CMakeLists.txt:118 (find_package) -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") -- checking for module 'libavcodec' -- package 'libavcodec' not found -- checking for module 'libavformat' -- package 'libavformat' not found -- checking for module 'libavdevice' -- package 'libavdevice' not found -- checking for module 'libavutil' -- package 'libavutil' not found -- checking for module 'libswscale' -- package 'libswscale' not found -- checking for module 'libpostproc' -- package 'libpostproc' not found CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find FFmpeg (missing: FFMPEG_INCLUDE_DIRS AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIRS AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIRS AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake_modules/FindFFmpeg.cmake:163 (find_package_handle_standard_args) CMakeLists.txt:120 (find_package) -- Configuring incomplete, errors occurred! See also "/Users/Steven/Xcode/vcmi-develop/build/CMakeFiles/CMakeOutput.log". See also "/Users/Steven/Xcode/vcmi-develop/build/CMakeFiles/CMakeError.log". |
9
zhonghua 2015-10-05 11:56:53 +08:00 via Android
我前段时间也搞了一阵。。。
|
10
wohenyingyu01 OP @zhonghua 弄出来了么
|
11
secondwtq 2015-10-05 13:50:53 +08:00
在我这 Boost 是正常可以找到的( unlink 掉了 brew 装的那份,确认了 Cache 里面的路径)。
FFmpeg 如果要用它下载的包里面那份的话,最好把 cmake_modules/FindFFmpeg.cmake 里面关于 pkgconfig 那几行注释掉,不然它会在 pkgconfig 里面找,自然找不到。 |
12
huangji 2015-10-05 15:53:02 +08:00
加油!
|
13
tracyone 2015-10-05 16:43:14 +08:00
@wohenyingyu01 error 里面提示缺少 ffmpeg 相关的东西,我现在还不熟悉 osx ,不过你可以谷歌下如何在 osx 装 ffmpge 还有其库,应该就可以解决这个问题了。
|
14
MCVector 2015-10-05 20:54:16 +08:00 via Android
在 ubuntu 上试了一下顺利编译通过, mac 上还没来得及试
|
15
beyondsoft 2015-10-05 21:15:16 +08:00
@wohenyingyu01 我发现似乎是这个文件里面指定的
cmake_modules/FindFFmpeg.cmake # Once done this will define # FFMPEG_FOUND - System has the all required components. # FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers. # FFMPEG_LIBRARIES - Link these to use the required ffmpeg components. # FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components. |
16
wohenyingyu01 OP @secondwtq
我的 brew 除了 pkg-config 和 cmake 之外没有装其他的,我发现最顶层的 CMakeLists.txt 就有问题,库的路径根本就不对,似乎 cmake 就是由这个配置文件来检查环境并生成 makefile 的: if (APPLE) # Default location for thirdparty libs set(CMAKE_INCLUDE_PATH "../include" "${CMAKE_OSX_SYSROOT}/usr/include") set(CMAKE_LIBRARY_PATH "../lib") set(CMAKE_FRAMEWORK_PATH "../Frameworks") set(BOOST_ROOT "../") 将其改为: if (APPLE) # Default location for thirdparty libs set(CMAKE_INCLUDE_PATH "./include" "${CMAKE_OSX_SYSROOT}/usr/include") set(CMAKE_LIBRARY_PATH "./lib") set(CMAKE_FRAMEWORK_PATH "./Frameworks") set(BOOST_ROOT "./lib") set(MINIZIP_LIBRARY "./lib/minizip") 可以顺利识别 boost , minizip 和 FFmpeg ,不明白你的为啥就没问题。。。但是这样改后依然还有好多库没识别,待研究。 |
17
wohenyingyu01 OP @tracyone 嗯嗯谢谢,我已经解决 ffmpeg 了,还有其他一些依赖库,再研究看看
|
18
wohenyingyu01 OP @beyondsoft 嗯是的,但是这个东西只要在最上层的 CMakeLists.txt 配置文件里面包含进去就好, vcmi 包里面都有的,现在还有一个库没解决:
CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find SDL2 (missing: SDL2_LIBRARY) (found version "1.2.15") Call Stack (most recent call first): /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake_modules/FindSDL2.cmake:214 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:126 (find_package) |
19
zhonghua 2015-10-05 23:13:22 +08:00 via Android
@wohenyingyu01 有别的事耽误了
|
20
secondwtq 2015-10-06 00:34:48 +08:00
@wohenyingyu01 大概是因为他寻找的文件名是 SDL2 ,然而他 bundle 的 framework 里面并没有。
SDL 这东西不是很熟悉,不过好像下下来的 framework 怎么看都不像 SDL2. |
21
MrYELiex 2015-10-06 05:09:25 +08:00
编译不需要手动下载依赖的吖 都会有个脚本处理依赖的
|
22
edwardaa 2015-10-06 09:09:03 +08:00
强烈支持
|
23
kyrre 2016-01-04 13:28:12 +08:00
@wohenyingyu01 , 后来编出来了吗?
我照着 http://wiki.vcmi.eu/index.php?title=How_to_build_VCMI_(OS_X)做可以成功编译。但是它的上面没有提其实还是需要 ffmpeg 这个依赖的,用 homebrew 装一下就可以了。 但是玩的话需要原来的 iso 或安装文件,这个就不好找了。几天下班了回去翻翻看。 |
24
wohenyingyu01 OP @kyrre 是不需要自己装 ffmpeg 这个依赖的,仔细看看就会发现在 download_dependencies.sh 的脚本里面已经下载好了,当然自己装 ffmpeg 也是可以的,就是小概率会有版本问题
|
25
kyrre 2016-01-07 13:24:48 +08:00
@wohenyingyu01 这个我倒是没去看。你后来玩上了吗?准备周末折腾一下。
|
26
wohenyingyu01 OP @kyrre 工作了年纪大了没心力折腾了……成功了记得来分享下成果~
|
27
kyrre 2016-01-07 16:22:19 +08:00
@wohenyingyu01 没问题!我还看到个帝国时代 2 的开源版的,叫 openage , github 上有源码。等我折腾完这个再去折腾它。
|
28
kyrre 2016-01-11 08:17:04 +08:00
@wohenyingyu01 启动时报错, google 了一下好像是那个自动更新框架的问题。😢
|
29
meizhile 2016-06-20 17:55:37 +08:00
@kyrre
我也是照 wiki 说明编译成功了,但是在加载 iso 时遇到了和下面这个链接一样的错误,不知道你解决了吗?错误信息: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection 链接: http://bugs.vcmi.eu/view.php?id=2432#bugnotes |
31
wohenyingyu01 OP @meizhile 这个不是没有强制使用 https 的报错么
|
32
meizhile 2016-06-21 10:41:17 +08:00
@wohenyingyu01 不清楚为什么,只是读取本地磁盘的 ISO 文件就报这个错误,你看下面的 bug 链接里也是相同的情况,猜想代码里可能有和服务器通信内容吧
|
33
meizhile 2016-06-21 10:43:23 +08:00
那个 bug 也没官方回复,并不知道怎么修改,能搜到的也都是 iOS 相关报错的资料,是有关 https 的
|