使用 build-appveyor 构建 C++ 项目
Building C++ project using build-appveyor
我不知道 C++
,但我需要构建 C++ 应用程序 - Osmium tool。我不知道构建 C++ 程序真的很难。我想要的只是创建 .exe
文件来合并地图。这是我的简单目标。
On Windows you can compile with the Visual Studio C++ compiler and nmake. The necessary dependencies can be installed with conda. See appveyor.yml for the necessary commands to compile osmium-tool.
appveyor.yml 文档说:
environment: matrix:
- config: Debug
- config: Release
shallow_clone: true
Operating system (build VM template) os: Visual Studio 2015
platform: x64
scripts that are called at very beginning, before repo cloning init:
clone directory clone_folder: c:\projects\osmium-tool
install:
- cd c:\projects
- git clone --depth 1 https://github.com/osmcode/libosmium
- git clone --depth 1 https://github.com/mapbox/protozero
build_script:
- cd c:\projects/osmium-tool
- build-appveyor.bat
我已经完成了上述所有步骤,现在我正在尝试 运行 in Windows 10:
build-appveyor.bat
但是,我看到错误:
System cannot find the path specified
一张图片:
伙计们,我做错了什么?请帮我!任何帮助将不胜感激。
经过一些错误试验和研究(我开始时对 c++ 不是很熟悉),我刚得到 osmium 来为 Windows 编译。这是我的笔记 -
下载并安装预构建的 64 位 boost
https://downloads.sourceforge.net/project/boost/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-64.exe
在 C:\projects
git clone --depth 1 https://github.com/osmcode/libosmium
git clone --depth 1 https://github.com/mapbox/protozero
git clone https://github.com/osmcode/osmium-tool
- Checkout latest osmium-tool tag
VS2019
- Install desktop development with c++
- Install MSVC v140 - VS 2015 C++ build tools (v14.00)
build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\Auxiliary\Build\vcvarsall.bat)
- Changed cmake_cmd "Visual Studio 14 Win64" to "Visual Studio 16"
- Changed toolsversion from 14.0 to Current
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g. C:/local/boost_1_63_0
VS2015社区版
Download cmake, add to path e.g. C:\Program Files\CMake\bin
build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\vcvarsall.bat)
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g. C:/local/boost_1_63_0
下载最新的 nuget.exe 并放在路径中(不适用于 system32)
- 确保配置了 nuget 源:nuget.exe sources Add -Name nuget.org -Source https://api.nuget.org/v3/index.json
运行 build-local.bat
将 64 位发行版 DLL 从 bzip2、libexpat nuget 包复制到与 osmium.exe
相同的目录
我不知道 C++
,但我需要构建 C++ 应用程序 - Osmium tool。我不知道构建 C++ 程序真的很难。我想要的只是创建 .exe
文件来合并地图。这是我的简单目标。
On Windows you can compile with the Visual Studio C++ compiler and nmake. The necessary dependencies can be installed with conda. See appveyor.yml for the necessary commands to compile osmium-tool.
appveyor.yml 文档说:
environment: matrix: - config: Debug - config: Release
shallow_clone: true
Operating system (build VM template) os: Visual Studio 2015
platform: x64
scripts that are called at very beginning, before repo cloning init:
clone directory clone_folder: c:\projects\osmium-tool
install: - cd c:\projects - git clone --depth 1 https://github.com/osmcode/libosmium - git clone --depth 1 https://github.com/mapbox/protozero
build_script: - cd c:\projects/osmium-tool - build-appveyor.bat
我已经完成了上述所有步骤,现在我正在尝试 运行 in Windows 10:
build-appveyor.bat
但是,我看到错误:
System cannot find the path specified
一张图片:
伙计们,我做错了什么?请帮我!任何帮助将不胜感激。
经过一些错误试验和研究(我开始时对 c++ 不是很熟悉),我刚得到 osmium 来为 Windows 编译。这是我的笔记 -
下载并安装预构建的 64 位 boost
https://downloads.sourceforge.net/project/boost/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-64.exe
在 C:\projects
git clone --depth 1 https://github.com/osmcode/libosmium
git clone --depth 1 https://github.com/mapbox/protozero
git clone https://github.com/osmcode/osmium-tool
- Checkout latest osmium-tool tag
VS2019
- Install desktop development with c++
- Install MSVC v140 - VS 2015 C++ build tools (v14.00)
build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\Auxiliary\Build\vcvarsall.bat)
- Changed cmake_cmd "Visual Studio 14 Win64" to "Visual Studio 16"
- Changed toolsversion from 14.0 to Current
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g. C:/local/boost_1_63_0
VS2015社区版
Download cmake, add to path e.g. C:\Program Files\CMake\bin
build-appveyor.bat
- Update vcvarsall.bat location for VS2019 install location (VC\vcvarsall.bat)
- ensure DBOOST_ROOT path matches installed path of DBOOST e.g. C:/local/boost_1_63_0
下载最新的 nuget.exe 并放在路径中(不适用于 system32)
- 确保配置了 nuget 源:nuget.exe sources Add -Name nuget.org -Source https://api.nuget.org/v3/index.json
运行 build-local.bat
将 64 位发行版 DLL 从 bzip2、libexpat nuget 包复制到与 osmium.exe
相同的目录