交叉编译壁炉靶向窗户



由于NPAPI使用编译的二进制文件几乎100%,因此希望同时构建包含所有平台代码的插件,因此,交叉汇编成为构建系统的优先级是有意义的NPAPI框架。但是,当我尝试跨越Mac OS X的窗户越过Firebreath Targether时,我会得到:

$ bash firebreath/prepmake.sh Codebendercc/ build.win  -DCMAKE_TOOLCHAIN_FILE=$HOME/Toolchain-mingw32.cmake
Using projects in: /path/to/project/root/Codebendercc
Generating build files in: /path/to/project/root/build.win
NOTE: The build files in /path/to/project/root/build.win should *NEVER* be modified directly. Make changes in cmake and re-run this script.
/path/to/root/build.win /path/to/root
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/local/mingw/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/local/mingw/bin/i686-w64-mingw32-gcc -- 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: /usr/local/mingw/bin/i686-w64-mingw32-g++
-- Check for working CXX compiler: /usr/local/mingw/bin/i686-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
!! Could not find VS DIR!
-- Visual Studio dir: 
CMake Error at cmake/Win.cmake:126 (message):
  FireBreath on windows requires ATL/MFC libs to be installed.  Please
  download the Microsoft DDK and install the build environments in WinDDK
Call Stack (most recent call first):
  cmake/common.cmake:31 (include)
  CMakeLists.txt:41 (include)

-- Configuring incomplete, errors occurred!
See also "/path/to/project/root/build.win/CMakeFiles/CMakeOutput.log".

$HOME/Toolchain-mingw32.cmake文件包含:

# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER /usr/local/mingw/bin/i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER /usr/local/mingw/bin/i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER /usr/local/mingw/bin/i686-w64-mingw32-windres)
SET(CMAKE_AR /usr/local/mingw/bin/i686-w64-mingw32-ar CACHE FILEPATH "Archiver")
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH  /usr/local/mingw)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

有没有办法绕过?

无法跨编译Windows libs,因为ActiveX代码当前需要ATL的简单原因,这只能通过Visual Studio构建(据我所知)。我建议您为Windows Builds设有构建机器运行窗口并使用Visual Studio(理想情况下是专业的,但可能与Express可行)。

问题可能是可以解决的,但这将是一项巨大的工作 - 到目前为止,没有人花时间去做这项工作。

交叉兼容会很好,但这肯定不是Firebreath团队(我是主要开发人员)的优先事项,因为在Windows上构建这是一个简单的事情。就我个人而言,我使用詹金斯(Jenkins)在所有平台上同时建立作业并收集工件。从成本角度来看,这比消除ATL依赖性所需的便宜得多。

也就

作为旁注,我从未添加过仅在Windows上构建NPAPI版本的功能,从理论上讲,该版本不需要ATL,因为仍然有几个部分,例如DllRegisterserver功能,它们依靠ATL。不过,补充功能会更容易,并且只需要您提出一个不错的抽象来替换所有功能,然后有条件地排除文件的ActiveX部分;这不是一个简单的任务,而是比没有ATL的整个COM堆栈更容易的数量级。

相关内容

  • 没有找到相关文章

最新更新