太阳神三国杀源代码 HOW TO BUILD

2023-11-19

HOW TO BUILD

Tips: "~" stands for the folder where the repo is in.

VS2013(Windows)

  1. Download the following packages: (1) QT libraries for Windows (Visual Studio 2013, 5.3.2) http://download.qt-project.org/official_releases/qt/5.3/5.3.2/q

  2. Open Qsanguosha.sln right under ~/builds/vs2013, change the Configuration to Release Qt5|Win32.

  3. Right click project "QSanguosha" in your Solution Explorer, select "Properties", go to "Debugging" tab, set "Working Directory" to "$(ProjectDir)....\" (do not enter the quote marks). Then select "OK".

4.1. [optional] Right click "sanguosha.ts" in the folder "Translaton Files" in project "QSanguosha", select "lrelease".

  1. You are now able to build the solution. When compilation succeeded, the QSanguosha.exe is in ~/Bin folder. You should move this file to ~ folder.

  2. Copy 6 files from Qt libraries to ~, they are listed below: Qt5Core.dll Qt5Gui.dll Qt5Network.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll

    Copy 2 files from VS redist to ~, they are listed below: msvcp120.dll msvcr120.dll

  3. Double-click the QSanguosha.exe and have fun!

Mac OS X

  1. Install XCode from App Store and enable the command tool

  2. Download and install the libraries and Qt Creator from http://download.qt-project.org/official_releases/qt/5.3/5.3.2/qt-opensource-mac-x64-clang-5.3.2.dmg

  3. Download the source code and install swig from http://sourceforge.net/projects/swig/files/swig/ and make sure the version of swig is 3.0.1 or later. Tips: unzip the source code tarball and open a terminal, type: ./configure --without-pcre make sudo make install

  4. Open a terminal here, type: cd swig swig -c++ -lua sanguosha.i

  5. Open QSanguosha.pro with Qt Creator, configure the project and make sure the project is compiled with clang. Change the configuration to Release.

  6. You are now able to build the solution. When compilation succeeded, the QSanguosha.app folder is in ~/../Build-QSanguosha-**/ folder. I highly recommend you move this folder to ~.

  7. This step is the most important and difficult one. Please pay a lot of attention to read this step. Open a terminal here, type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha

You'll see something like this: QSanguosha.app/Contents/MacOS/QSanguosha: ./libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) libfreetype.1.dylib (compatibility version 1.0.0, current version 1.0.0) (QtDir)/5.3/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Pay attention to the 2 lines contains libfmodex.dylib or libfreetype.1.dylib. using install_name_tool to change the path of the 2 library files to their absolute paths, like this: install_name_tool -change ./libfmodex.dylib ~/lib/mac/lib/libfmodex.dylib QSanguosha.app/Contents/MacOS/QSanguosha install_name_tool -change libfreetype.1.dylib ~/lib/mac/lib/libfreetype.dylib QSanguosha.app/Contents/MacOS/QSanguosha

Type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha

if you see all the directories is absolute path, it should succeed. (~ stands for the project dir) QSanguosha.app/Contents/MacOS/QSanguosha: ~/lib/mac/lib/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) ~/lib/mac/lib/libfreetype.dylib (compatibility version 1.0.0, current version 1.0.0) (QtDir)/5.3/clang_64/lib/QtDeclarative.framework/Versions/5/QtDeclarative (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtXmlPatterns.framework/Versions/5/QtXmlPatterns (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.3.2, current version 5.3.2) (QtDir)/5.3/clang_64/lib/QtScript.framework/Versions/5/QtScript (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Type: macdeployqt QSanguosha.app/

Some times the macdeployqt is not in the system directories, in this case you should go to the Qt Install Dir and find this file.

Type: otool -L QSanguosha.app/Contents/MacOS/QSanguosha

if you see all the non-system libraries is in @executable_path, it should succeed. QSanguosha.app/Contents/MacOS/QSanguosha: @executable_path/../Frameworks/libfmodex.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/libfreetype.dylib (compatibility version 1.0.0, current version 1.0.0) @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.3.2, current version 5.3.2) @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.3.2, current version 5.3.2) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

8.copy the following folders and files to QSanguosha.app/Contents/MacOS/, they are listed below: ai-selector/ audio/ developers/ diy/ font/ image/ lang/ lua/ rule/ skins/ ui-script/ qt_zh_CN.qm sanguosha.qss

8.1 [optional] select Tools/External/QtLinguist/lrelease, copy ~/Builds/vs2013/sanguosha.qm to QSanguosha.app/Contents/MacOS.

  1. Double-click QSanguosha.app folder and have fun!

Linux or MinGW(Windows)

  1. Download and install the libraries and Qt Creator from Qt offical website or software sources, make sure the version of Qt libraries is 5.3.x. (I strongly recommand you download the libraries and Qt Creator from software sources in Linux, because the compliation causes a lot of time) (If you are using MinGW, make sure the version of MinGW is compatible with Qt Libraries)

  2. Install SWIG (Linux)Download and install the swig from http://sourceforge.net/projects/swig/files/swig/ or software sources, make sure the version of swig is 3.0.1 or later.

(MinGW)Download the swigwin (swig for Windows, 3.0.2) http://sourceforge.net/projects/swig/files/swigwin/ Create a ~/tools/swig folder under your source directory. Unzip swigwin and copy all unzipped files to ~/tools/swig.

  1. Open a terminal here, type: (Linux) cd swig swig -c++ -lua sanguosha.i cd ../lib/linux (x86)cd x86 (or) (x64)cd x64 sudo cp libfmodex*.so /usr/lib (root password required) sudo ldconfig

(MinGW) cd swig ..\tools\swig\swig.exe -c++ -lua sanguosha.i

  1. Open QSanguosha.pro, configure the project and make sure the project is compiled with g++. Change the configuration to Release.

4.1 [optional] select Tools/External/QtLinguist/lrelease, copy ~/Builds/vs2013/sanguosha.qm to ~.

  1. You are now able to build the solution. When compilation succeeded, the (MinGW)QSanguosha.exe or (Linux)QSanguosha is in ~/../Build-QSanguosha-**/ folder. You should move this file to ~ folder.

  2. (MinGW only)Copy 8 files from Qt libraries to ~, they are listed below: Qt5Core.dll Qt5Gui.dll Qt5Network.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll

    (MinGW only)Copy 3 files from MinGW bin folder to ~, they are listed below: libgcc_s_dw2-1.dll libstdc++-6.dll libwinpthread-1.dll


【注】 三国杀的版本分支很多,只有这个版本的编译教程解释的比较清晰,但是实际还待测试


FROM:  https://github.com/Mogara/QSanguosha

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

太阳神三国杀源代码 HOW TO BUILD 的相关文章

  • LeetCode707.设计链表

    题目描述 707 设计链表 力扣 LeetCode 这道题用单向链表和双向链表都能写 因为对双向链表不是很熟 所以就用双向链表来写了 由于初始化的链表并没有放入任何元素 所以这个结点就当成哑结点来处理 而且这样对之后的增删操作也更便利 C语
  • 通配符的使用

    通配符是一种特殊语句 主要有星号 和问号 用来模糊搜索文件 当查找文件夹时 可以使用它来代替一个或多个真正字符 当不知道真正字符或者懒得输入完整名字时 常常使用通配符代替一个或多个真正的字符 SQL 通配符 在搜索数据库中的数据时 SQL
  • java最大线程数

    Xms 初始堆大小 如 Xms256m Xmx 最大堆大小 如 Xmx512m Xmn 新生代大小 通常为 Xmx 的 1 3 或 1 4 新生代 Eden 2 个 Survivor 空间 实际可用空间为 Eden 1 个 Survivor
  • 华为OD机试 - 经典屏保(Java)

    题目描述 DVD机在视频输出时 为了保护电视显像管 在待机状态会显示 屏保动画 如下图所示 DVD Logo在屏幕内来回运动 碰到边缘会反弹 请根据如下要求 实现屏保Logo坐标的计算算法 屏幕是一个800 600像素的矩形 规定屏幕的左上
  • PermissionError: [WinError 5] 拒绝访问。解决办法

    PermissionError WinError 5 拒绝访问 问题描述 解决办法 一 找到programdata下anaconda3的python 二 进入Users的权限 将除了特殊权限外 全部挂上 三 在返回到anaconda3的目录
  • Nginx-简介

    用Python语言开发的站点使用的Web服务器主要有Nginx Apache以及淘宝的Tengine Nginx是由Igor Sysoev在2004年发布的一个开源 高性能的HTTP服务器和反向代理 它还可以用来作为IMAP POP3的代理
  • K8s基础6——应用配置管理方案、调度策略、污点和污点容忍

    文章目录 一 应用配置管理方案 1 1 ConfigMap 1 1 1 注入变量 1 1 2 挂载数据卷 1 2 Secret 1 2 1 数据卷挂载 1 2 2 变量注入 二 调度策略 2 1 nodeSelector定向调度 2 1 1
  • Github上 10 个开源免费且优秀的后台控制面板

    Web 开发中几乎的平台都需要一个后台管理 但是从零开发一套后台控制面板并不容易 幸运的是有很多开源免费的后台控制面板可以给开发者使用 那么有哪些优秀的开源免费的控制面板呢 我在 Github 上收集了一些优秀的后台控制面板 并总结得出 T
  • HTTP协议(下)

    前面我介绍了什么是HTTP协议 以及HTTP的协议格式 接下来我介绍一下如何使用代码构造出HTTP请求 以及在介绍一下HTTPS 目录 一 通过代码构造HTTP请求 1 基于HTML JS 1 1 基于form表单 1 2 基于ajax 2
  • vue + threejs 给3D模型添加label标签(dom的方式)

    webGL js封装的代码 const THREE window THREE webGL对象配置 export const webglOBJ renderDom null Scene null 场景 camera null 摄像头 rend
  • java OpenOffice把word转html(Convert word to html )

    1 下载安装OpenOffice 网址http download openoffice org index html 2 下载第三方工具包JODConverter http www artofsolving com opensource j
  • 天梯赛字符串替换题 “ 6翻了” Python 正则表达式替换

    输入格式 输入在一行中给出一句话 即一个非空字符串 由不超过 1000 个英文字母 数字和空格组成 以回车结束 输出格式 从左到右扫描输入的句子 如果句子中有超过 3 个连续的 6 则将这串连续的 6 替换成 9 但如果有超过 9 个连续的
  • selenium之 chromedriver与chrome版本映射表(更新至v2.46)

    更多关于python selenium的文章 请关注我的专栏 Python Selenium自动化测试详解 看到网上基本没有最新的chromedriver与chrome的对应关系表 便兴起整理了一份如下 希望对大家有用 chromedriv
  • 包里替换class文件_为了让Tomcat支持热替换,我直接修改了他的源码

    前言 又是一个周日 贫穷的我依然使用电源适配器来暖手 所以 这章来我们聊聊 热 这个问题 啊啊啊啊啊啊 不知道各位网友是怎么解决修改代码后 不重启 立即生效对的 如果在Spring Boot项目中 可能有部分人会加入spring boot
  • DES加密算法详解——看这一篇就够了!

    目录 一 DES简介 二 DES算法入参 三 DES加密算法步骤解析 1 IP置换 M gt M0 2 密钥K控制的16轮运算 M0 K1 K16 gt M16 2 1 子密钥Kn的计算 2 1 1 PC 1置换 2 1 2 循环左移运算

随机推荐

  • 配置OBS存储功能、新搭建obs

    通过应用开发环境与OBS Object based Storage Service 对接 实现对象或者Widget资产存储功能 背景信息 对象存储服务 Object based Storage Service OBS 是一个基于对象的海量存
  • [LeetCode-03]-Longest Substring Without Repeating Characters

    文章目录 题目相关 Solution 每周完成一个ARTS Algorithm Review Tip Share ARTS Algorithm 每周至少做一个 leetcode 的算法题 Review 阅读并点评至少一篇英文技术文章 Tip
  • ChatGPT追祖寻宗:GPT-2论文要点解读

    论文地址 Language Models are Unsupervised Multitask Learners 上篇 GPT 1论文要点解读 在上篇 GPT 1论文要点解读中我们介绍了GPT1论文中的相关要点内容 其实自GPT模型诞生以来
  • jsp 九大内置对象和其作用以及四大域对象

    感谢作者 Fangcf 链接 https blog csdn net qq 39320833 article details 80818442 一 jsp 九大内置对象 方法简单介绍 https blog csdn net pan junb
  • 1480. Running Sum of 1d Array

    class Solution public vector
  • pytorch argmax代码示例以及图解,很容易理解

    官网例子 gt gt gt a torch randn 4 4 gt gt gt a tensor 1 3398 0 2663 0 2686 0 2450 0 7401 0 8805 0 3402 1 1936 0 4907 1 3948
  • 服务器设置运行游戏,森林正式版服务器怎么设置 森林游戏专用服务器设置教程-游侠网...

    serverAutoSaveInterval15 Gamedifficulty mode Must be set to Peaceful Normal or Hard 游戏难度 必须设置成和平 Peaceful 一般 Normal或困难 H
  • 浅析『链上数据分析』 : 区块链 + 数据分析

    什么是链上数据分析 01 区块链 02 链上数据 03 为什么要分析链上数据 04 数据分析思维 05 数据分析技能 06 数据分析工具 07 业务逻辑理解 什么是链上数据分析 链上数据分析 顾名思义 就是对区块链上的数据进行分析 其实就是
  • StringBuilder类解析

    StringBuilder 构建字符串 有时候我们需要来不断拼接小的字符串来满足我们的需求 如果用字符串拼接的方法 效率会比较低 此时StringBuilder类为我们提供了便捷 下面是一些它的常用方法 StringBuilder stri
  • anaconda,cuda,torch,lightning的安装

    本博客仅作为初学者参考使用 汇总了多位大牛的博客 如有侵权请联系我删除 anaconda cuda torch lightning的安装 1 Anaconda 2 cuda 3 pytorch 4 lightning 5 解决pip执行后导
  • COCO数据集格式(详解)及COCO标注可视化。json转COCO等代码

    coco数据集JSON文件格式分为一下几个字段 info info dict licenses license list 内部是dict images image list 内部是dict annotations annotation li
  • Qt之QGraphicsView入门篇

    作者 billy 版权声明 著作权归作者所有 商业转载请联系作者获得授权 非商业转载请注明出处 简介 在Qt界面库中 对于图形的绘制 可以使用 QPainter 实现普通二维图形的绘制 该方法在 paintEvent 事件里编写绘图程序 其
  • 对人工智能芯片的一些看法

    人工智能芯片 2016年 随着阿尔法狗击败专业人类围棋棋手 已 深度学习 为基础的人工智能技术被大众所熟知 其实 深度学习 技术已经发展了有近30年的历史了 现在的 深度学习 的实现以神经网络技术为主 神经网络通过模拟大脑生物神经网络的连接
  • [OpenGL ES 06]使用VBO:顶点缓存

    OpenGL ES 06 使用VBO 顶点缓存 罗朝辉 http www cnblogs com kesalin 本文遵循 署名 非商业用途 保持一致 创作公用协议 这是 OpenGL ES 教程 的第六篇 前五篇请参考如下链接 OpenG
  • 数据库中连接(join)运算

    摘自 数据库原理与应用 第2版 宋金玉 陈萍 陈刚编著
  • Java学习前言—JDK、JRE、IntelliJ IDEA

    一 jdk java developer kit 与 jre java runtime environment 1 jdk是Java开发工具包 安装后可以编写Java程序 2 jre是Java运行环境 安装后可以运行Java程序 二 Ubu
  • Python爬虫工程师都需要掌握那些知识

    Python爬虫工程师都需要掌握那些知识 今天老师跟大家聊聊Python爬虫工程师需要掌握的知识 Python语言无论是在学术上还是就业上现在都非常受欢迎 很多都在学习Python 因为Python不仅能够做大数据分析 爬虫 云计算 还能做
  • SpringBoot 打 jar包和打war 包配置

    文章目录 1 前言 2 SpringBoot 打 jar 包 3 SpringBoot 打 war 包 4 小结 1 前言 目前我们熟知的SpringBoot 打包方式 一共分为两种 一种是打jar 包 内置tomcat 方式 yml 里的
  • 因果关系基本概念:后门标准

    阅读David Salazar的文章Causality To adjust or not to adjust后的笔记 文章目录 动机 实例 动机 在前面的文章中 我们知道就算控制再多的变量 也不一定能准确估计 采用后门标准 backdoor
  • 太阳神三国杀源代码 HOW TO BUILD

    HOW TO BUILD Tips stands for the folder where the repo is in VS2013 Windows Download the following packages 1 QT librari