cmake

魔兽世界私服Trinity,从源码开始

为君一笑 提交于 2021-01-22 14:37:02
缘起因由 在一个无所事事的周末下午,突然想起魔兽世界,官方的账号很久没有上了,里面的大小号现在连满级都不是。以前曾经搭过传奇和星际争霸战网的私服自娱自乐,也听说过魔兽世界有开源的服务端模拟,既然兴致来了就小小的研究一下。 目前魔兽世界的私服比较流行的是MaNGOS和Trinity,二者都是模拟魔兽世界服务端。MaNGOS“号称”是一个研究型项目,目的是为了学习大规模的C++项目开发,有道理,不过我不信。Trinity是基于MaNGOS的代码开发的,以前主要是为了合并用户提交的补丁代码而设立的一个项目,不过现在已经单独独立出来了,主要开发成员包括以前MaNGOS的一些老人,现在的主要工作包括清理代码、优化、提供一个更好的服务端内核。 二者现在的代码提交和更新都很频繁,但是具体是否会合并对方的代码就不清楚了。总而言之,也就是说,我感觉Trinity大概也许应该是目前最好的一个魔兽世界服务端模拟了。作为一个程序员来说,玩游戏还在其次,看看代码才是件有意思的事情。整个过程记录在案 http://log4think.com/setup_wow_private_server ,以便事后查询。 现在尝试一下从源码开始搭个魔兽世界的服务器,从源码开始主要还是想顺便看看代码的情况,基于Trinity来做。至于客户端的情况,截止到2011年6月12日,中国国服魔兽世界最新的版本是3.3.5 13930

How to define UNICODE for mingw, if use CMAKE as building system

北城以北 提交于 2021-01-22 12:04:04
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

六月ゝ 毕业季﹏ 提交于 2021-01-22 12:01:37
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

…衆ロ難τιáo~ 提交于 2021-01-22 12:00:27
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

How to define UNICODE for mingw, if use CMAKE as building system

╄→尐↘猪︶ㄣ 提交于 2021-01-22 11:57:50
问题 Good day, i build my Qt project with Cmake build system on windows platform, but if i add line in cmake file: add_definitions("-DUNICODE -D_UNICODE") definition of UNICODE not working(MINGW), this work properly only if i build my project with MSVC compiler. After some times i found workaround How do I define a variable when I call CMake, so that qtcreator knows it is defined?, this solution work but if i use native WINAPI functions such as CreateFile i get the compile error, because compiler

树莓派驱动 1.44inch LCD HAT

限于喜欢 提交于 2021-01-21 22:24:00
自 1.44inch LCD HAT 这个迷你的屏幕上架后深受很多创客门喜爱,同时也有多客户反 应我们提供的资料不够完善。特此写一篇教程讲解树莓派如何通过移植 fbtft 显示. Framebuffer 是用一个视频输出设备从包含完整的帧数据的一个内存缓冲区中来驱动一 个视频显示设备。简单的来说,就是使用一个内存区来存储显示内容,改变内存的数据就可 以改变显示的内容。 在 github 上有一个开源工程:https://github.com/notro/fbtft,完整的实现了 framebuffer 驱动,让树莓派完美支持 tft 液晶。下面来介绍一下如何使用 fbtft 驱动 1.44inch LCD HAT. 打开编辑配置文件,启用一些模块。 sudo nano /etc/modules 在文件后面添加如下两个语句,第一行是确保屏幕的 SPI 已经启动并正在运行,第二个 命令实际是启动 fbtft 模块。 spi-bcm2835 fbtft_device 新建另外一个配置文件,配置 fbtft sudo nano /etc/modprobe.d/fbtft.conf 将下面语句添加到新建的空白文件中, 树莓派驱动手册 (代码要在一行,不能换行) options fbtft_device name=adafruit18_green gpios=reset:27, dc :25

Correctly set Visual Studio linker flag /SUBSYSTEM in CMAKE

不问归期 提交于 2021-01-21 12:36:12
问题 I am trying to set up an old project using cmake and I would like to keep all flags the same as before. The old project generator has the linker flag /SUBSYSTEM with minimum subystem version number 5.01 set like this: /SUBSYSTEM:WINDOWS,"5.01" I tried the same in cmake by adding this: set_target_properties(mytarget PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,\"5.01\"") However the result is wrong. Cmake seems to remove the (escaped) double quotes and places the linker flag to "Addition

Materialize MySQL引擎:MySQL到Click House的高速公路

霸气de小男生 提交于 2021-01-21 12:35:32
摘要: MySQL到ClickHouse数据同步原理及实践 引言 熟悉MySQL的朋友应该都知道,MySQL集群主从间数据同步机制十分完善。令人惊喜的是,ClickHouse作为近年来炙手可热的大数据分析引擎也可以挂载为MySQL的从库,作为MySQL的 "协处理器" 面向OLAP场景提供高效数据分析能力。早先的方案比较直截了当,通过第三方插件将所有MySQL上执行的操作进行转化,然后在ClickHouse端逐一回放达到数据同步。终于在2020年下半年,Yandex 公司在 ClickHouse 社区发布了MaterializeMySQL引擎,支持从MySQL全量及增量实时数据同步。MaterializeMySQL引擎目前支持 MySQL 5.6/5.7/8.0 版本,兼容 Delete/Update 语句,及大部分常用的 DDL 操作。 基础概念 MySQL & ClickHouse MySQL一般特指完整的MySQL RDBMS,是开源的关系型数据库管理系统,目前属于Oracle公司。MySQL凭借不断完善的功能以及活跃的开源社区,吸引了越来越多的企业和个人用户。 ClickHouse是由Yandex公司开源的面向OLAP场景的分布式列式数据库。ClickHouse具有实时查询,完整的DBMS及高效数据压缩,支持批量更新及高可用。此外

What does “Performing Test CMAKE_HAVE_LIBC_PTHREAD” failed actually mean?

情到浓时终转凉″ 提交于 2021-01-21 04:49:08
问题 The cmake partial output looks like this: -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed 回答1: The lines -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found are

What does “$<$<CONFIG:Debug>:Release>” mean in cmake?

六眼飞鱼酱① 提交于 2021-01-20 18:04:03
问题 In buildem_cmake_recipe.cmake, I saw an expression: externalproject_add_step(${_name} BuildOtherConfig COMMAND ${CMAKE_COMMAND} --build ${BINARY_DIR} --config "$<$<CONFIG:Debug>:Release>$<$<CONFIG:Release>:Debug>" --target INSTALL DEPENDEES install ) What does the $<$<CONFIG:Debug>:Release>$<$<CONFIG:Release>:Debug> mean here? 回答1: That's a CMake generator expression. You can follow the link for a full discussion of what these are and what they can do. In short, it's a piece of text which