windows 编译 breadpad

原文链接:https://gist.githubusercontent.com/vnl/f317840bfa9c638a60f2c4110872056a/raw/07185c8e86fc2faf08e3410ed3950a5c4d2e8b32/Breakpad%2520on%2520Windows
##### Building Google breakpadBuilding Google breakpad on Windows is a very painful experience because the process is not really well documented and, furthermore, building the project on Windows is maintained surprisingly poorly by Google. But don't lose hope, it is still possible to build this thing and here are the instructions:
```
git clone https://chromium.googlesource.com/breakpad/breakpad
cd breakpad
git checkout chrome_64
cd src
git clone https://github.com/google/googletest.git testing
cd ..\..
git clone https://chromium.googlesource.com/external/gyp
cd gyp
python setup.py install
cd ..\breakpad
md installdir
md installdir\include\breakpad\client\windows
md installdir\include\breakpad\common\windows
md installdir\lib
md installdir\bin
xcopy src installdir\include\breakpad /e
```
The last line from the above copies almost entire sources of breakpad into the installation prefix's include folder. That might be overkill but hand picking the headers which really need to be present there is too much trouble so this simple hack works.At this point you need to patch the gyp project file to make breakpad buildable on Windows. You can either do it by hand using any text editor or using `sed` from `msys64`: within "breakpad/src/build" folder there's a file called `common.gypi`. Inside this file you need to replace all occurrences of `'WarnAsError': 'true'` with `'WarnAsError': 'false'`. This setting controls whether the compiler would treat warnings as build errors or not. Some warnings do exist when building on Windows so in the default configuration the build can't succeed. Here's how this setting can be changed with the help of sed editor:
```
C:\msys64\usr\bin\bash -lc "cd /c/dev/breakpad/src/build && sed -i -e \"s/'WarnAsError': 'true'/'WarnAsError': 'false'/g\" common.gypi"
```
Replace the path to breakpad dir with your actual one in the above command.
Now can proceed building the breakpad. Will start from the client libraries and will do two builds, in release and debug configurations:
```
..\gyp\gyp.bat src\client\windows\breakpad_client.gyp --no-circular-check -Dwin_release_RuntimeLibrary=2 -Dwin_debug_RuntimeLibrary=3
cd src\client\windows
msbuild breakpad_client.sln /p:Configuration="Release" /p:Platform="Win32"
msbuild breakpad_client.sln /p:Configuration="Debug" /p:Platform="Win32"
```
For 64 bit build set the "Platform" parameter to "x64". The built release binaries can be found within Release/lib folder and debug ones within Debug/lib one. Copy them to the installation dir while adding the `\_d` suffix for debug libraries:
```
copy Release\lib\common.lib ..\..\..\installdir\lib
copy Release\lib\crash_generation_client.lib ..\..\..\installdir\lib
copy Release\lib\crash_generation_server.lib ..\..\..\installdir\lib
copy Release\lib\exception_handler.lib ..\..\..\installdir\lib
copy Debug\lib\common.lib ..\..\..\installdir\lib\common_d.lib
copy Debug\lib\crash_generation_client.lib ..\..\..\installdir\lib\crash_generation_client_d.lib
copy Debug\lib\crash_generation_server.lib ..\..\..\installdir\lib\crash_generation_server_d.lib
copy Debug\lib\exception_handler.lib ..\..\..\installdir\lib\exception_handler_d.lib
```
Now need to build `dump_syms` utility which would then be used during the build of Quentier for the extraction of symbols from Quentier executable and libquentier library - these symbols would then be used to produce stack traces during crash handling. The end users would then be able to provide the stack traces while reporting crashes - these can be used as minimal hints to the reason of the crash. Without crash handling every single crash is like a shot in the dark - you can't say who did it or why. 
```
cd ..\..\..
..\gyp\gyp.bat src\tools\windows\tools_windows.gyp --no-circular-check -Dwin_release_RuntimeLibrary=2 -Dwin_debug_RuntimeLibrary=3
cd src\tools\windows
msbuild tools_windows.sln /p:Configuration="Release" /p:Platform="Win32"
```
After it's built copy it to the installation prefix's bin directory:
```
copy Release\dump_syms.exe ..\..\..\installdir\bin
```
The final touch: need one other executable, `minidump_stackwalk`. It is the executable which parses the minidump produced by the crashing app using the symbols created by `dump_syms`. It seems Google has never planned for this executable to be used - or even built - on Windows because currently the only way to build this tool on Windows is using Cygwin (thus depending on its dlls). Thankfully, guys from Mozilla have already done that so this tool can just be downloaded from Mozilla servers:
```
curl -fsSL http://hg.mozilla.org/build/tools/raw-file/755e58ebc9d4/breakpad/win32/minidump_stackwalk.exe -o minidump_stackwalk.exe
curl -fsSL http://hg.mozilla.org/build/tools/raw-file/755e58ebc9d4/breakpad/win32/cygwin1.dll -o cygwin1.dll
curl -fsSL http://hg.mozilla.org/build/tools/raw-file/755e58ebc9d4/breakpad/win32/cygstdc++-6.dll -o cygstdc++-6.dll
curl -fsSL http://hg.mozilla.org/build/tools/raw-file/755e58ebc9d4/breakpad/win32/cyggcc_s-1.dll -o cyggcc_s-1.dll
```
If you feel inclined, in [this thread](https://groups.google.com/forum/#!topic/google-breakpad-discuss/B4xza0jGdlY) some guy describes what to change in breakpad sources to make `minidump_stackwalk` utility buildable on Windows with Visual C++. You can follow this description to try and build `minidump_stackwalk` on Windows with Visual C++. That was the last dependency so the guide for building Quentier and/or libquentier dependencies on Windows using Visual Studio is finished now!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/58280.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

搭建海外云服务器需要什么费用?

搭建海外云服务器需要什么费用?搭建海外云服务器的费用涉及多个方面,包括服务器实例费用、公网带宽费用、磁盘存储费用、操作系统费用和其他费用。具体费用取决于所选的云服务提供商、服务器配置、计费模式等因素。以下是UU云小编整理的一些主要的费用构…

Python 基础语法 - 赋值运算符

运算符说明简单赋值运算符、-、*、/、%、//、**等复合赋值运算符 1. 赋值运算符的功能 所有的赋值运算符都是用来给变量赋值的(都是完成将数据保存到一个变量中)重要结论:所有的赋值运算符表达式都没有结果 -> 无法提供数据 2. 简单赋值…

IDEA->EasyCode(mapper.xml) 字段无逗号分隔和修改全局变量问题

1.mapperxml字段无逗号分隔 在easycode的设置里找到: 1、Template下的 mapper.xml.vm脚本 2、Global Config下的 mybatisSupport.vm脚本 将脚本里的 $velocityHasNext 替换成 $foreach.hasNext,然后保存。Mybatis-Plus框架操作一样 github->issue连…

C# 将时间转换为毫秒

作者:逍遥Sean 简介:一个主修Java的Web网站\游戏服务器后端开发者 主页:https://blog.csdn.net/Ureliable 觉得博主文章不错的话,可以三连支持一下~ 如有疑问和建议,请私信或评论留言! C# 将时间转换为毫秒…

PHP的 CSRF、XSS 攻击和防范

CSRF攻击 CSRF(Cross-Site Request Forgery)攻击,也称为跨站请求伪造,是一种常见的网络安全威胁。在这种攻击中,攻击者利用已认证的用户身份,在用户不知情的情况下伪造请求,冒充用户的操作向目…

Elastic Stack - FileBeat 入门浅体验

Filebeat 是 Elastic Stack 中的一个轻量级日志转发器,主要用于收集和转发日志数据。Filebeat 作为代理安装在您的服务器上,可以监控您指定的日志文件或位置,收集日志事件,并将其转发到 Elasticsearch 或 Logstash 进行索引。 一…

GitHub Actions的 CI/CD

GitHub Actions 是一个强大的 CI/CD 工具,适用于自动化各种开发任务。GitHub Actions 的原理是基于事件驱动的自动化流水线工具,通过定义触发条件和执行步骤,可以让项目在特定条件下自动运行一系列操作,比如构建、测试、部署等。 …

STM32--基于STM32F103C8T6的OV7670摄像头显示

本文介绍基于STM32F103C8T6实现的OV7670摄像头显示设计(完整资源及代码见文末链接) 一、简介 本文实现的功能:基于STM32F103C8T6实现的OV7670摄像头模组实时在2.2寸TFT彩屏上显示出来 所需硬件: STM32F103C8T6最小系统板、OV76…

基于行业分类的目标检测与跟踪系统

针对题目“目标检测跟踪”,我们可以根据行业类别、子类别、细分类别以及应用场景选择合适的图表进行可视化分析。以下是一些可能的图表选择及其对应的SQL示例(假设有一个数据库包含相关字段): 1. 散点图 (Scatter Plot) 应用场景…

C#与C++交互开发系列(十一):委托和函数指针传递

前言 在C#与C的互操作中,委托(delegate)和函数指针的传递是一个复杂但非常强大的功能。这可以实现从C回调C#方法,或者在C#中调用C函数指针的能力。无论是跨语言调用回调函数,还是在多线程、异步任务中使用委托&#x…

在Ubuntu上配置python环境

apt install python3.11-venv 是一个命令,用于在基于 Debian 的 Linux 系统(如 Ubuntu)上安装 Python 3.11 的虚拟环境模块。 解释: apt: 这是一个包管理工具,用于安装、更新、删除软件包。install: 这是一个命令&am…

CloudStack云平台搭建:XenServer服务器系统安装

1.打开VMware虚拟机,点击“创建新的虚拟机” 2. 点击“自定义(高级)” → “下一步” 3. 点击“下一步” 4. 点击“稍后安装操作系统” → “下一步” 5. 选择“其他” → “其他64位” → “下一步” 6. 修改“虚拟机名称” 、“位置”&…

[linux]和windows间传输命令scp 执行WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!错误解决

[linux]和windows间传输命令scp 执行WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!错误解决. 现象: 原因: 接收方服务器系统做了某些更改,导致登录时会报错。主要因为接收方服务器对登录过它的主机都会把该主机登录标识证书记录下来&a…

.NET代码打包加密工具

下载地址: dotNet代码打包加密工具资源-CSDN文库

Flink CDC系列之:理解学习YARN模式

Flink CDC系列之:理解学习YARN模式 准备会话模式在 YARN 上启动 Flink 会话设置 Flink CDC提交 Flink CDC Job Apache Hadoop YARN 是许多数据处理框架中流行的资源提供者。Flink 服务提交给 YARN 的 ResourceManager,后者在由 YARN NodeManagers 管理的…

使用Node.js与Express构建RESTful API

💖 博客主页:瑕疵的CSDN主页 💻 Gitee主页:瑕疵的gitee主页 🚀 文章专栏:《热点资讯》 使用Node.js与Express构建RESTful API 1 引言 2 Node.js与Express简介 3 安装Node.js与Express 4 创建Express项目 5…

Server - 配置 HuggingFace 工程数据 Transformers-CLI 格式与 Huggingface-CLI 格式的差别

欢迎关注我的CSDN:https://spike.blog.csdn.net/ 本文地址:https://spike.blog.csdn.net/article/details/141140498 免责声明:本文来源于个人知识与公开资料,仅用于学术交流,欢迎讨论,不支持转载。 Huggin…

【机器学习(十九)】零代码开发之随机森林(Random Forest,RF)算法-Sentosa_DSML社区版

文章目录 一、算法概念二、算法原理(一)定义(二)袋外数据 三、随机森林的优缺点(一)优点(二)缺点 四、随机森林分类任务实现(一)数据加载(二&…

天地图实现海量聚合marker--uniapp后端详细实现

本文章详细的讲解了前后端代码来 实现uniapp天地图功能的实现 以及 后端海量数据的聚合查询 和网格算法实现思路。 并对当数据量增加和用户频繁请求接口时可能导致服务器负载过高做了前后端优化。 前端uniapp: 实现了天地图的行政区划边界/地图切换/比例尺/海量数…

数据结构预备知识---Java集合框架、List接口、包装类、装箱拆箱和泛型

文章目录 Java集合框架List接口包装类 和 装箱、拆箱泛型 Java集合框架 Java 集合框架 Java Collection Framework ,又被称为容器 container ,是定义在 java.util 包下的一组接口 interfaces和其实现类 classes .其主要表现为将多个元素 element 置于一个…