编译 Unicode 版本
在 nsi 文件开头加上宏配置:
1 | Unicode true |
注意
unicode 版本的 nsi 和 nsh 文件,需要将编码设置成 utf8 with BOM。不然编译器会仍然以 ACP 方式读取文件。
1 | struct sockaddr { |
sockaddr_in 继承 sockaddr 并添加了一些 INET 的数据属性。
1 |
|
sockaddr 转换为 sockaddr_in:
1 |
|
1 | // General socket address holding structure, big enough to hold either |
1 |
|
cpp-netlib 旨在用最新的 C++ 标准,提供易用的网络接口库。
1 | bootstrap.bat |
runtime-link=shared
是使用动态库方式编译,对应 VS 设置值 runtime = MD
runtime-link=static
是使用静态库方式编译,对应 VS 设置值 runtime = MT
1 | mkdir cpp-netlib-build |
其它的设置选项还有:
cpp-netlib-build/CPP-NETLIB.sln
编译可以全部编译,也可以根据需要单独编译某个模块。比如,单独编译 cppnetlib-uri
项目。编译好的文件输出在 cpp-netlib-build/libs/network/src/Release
检查 -DBOOST_ROOT=
后面的路径分隔符是不是反斜扛。
1 | bootstrap.bat |
当编译成功,会得到提示
1 |
|
1 | ./b2 install --prefix=PREFIX |
1 | .\b2 install --prefix=C:\Users\jon\Desktop\builds\boost --toolset=msvc --without-python link=static runtime-link=shared debug release |
将下载的 boost 目录添加到项目的 include 路径即可
除了将 boost 目录添加到 include,还要将上面编译出来的 stage/lib
目录添加到 library 路径
在环境变量中添加一个变量
1 | SSLKEYLOGFILE C:\Users\Jonathan\Documents\SSLKEYLOGFILE.txt |
Chromium Development Calendar and Release Info
查看 这里
查看 这里
Google Chrome Older Versions Download
/Users/{user-name}/Library/Application Support/Google/Chrome
C:/Users/{user-name}/App Data/Local/Google/Chrome
/home/{user-name}/.config/google-chrome
Windows 命令行设置
1 | set http_proxy=127.0.0.1:1080 |
Git 设置
1 | git config --global http.proxy 127.0.0.1:1080 |
如果不添加 buildtype=Official
可能会遇到下面问题:
在添加了该编译参数情况下,也会遇到某些奇怪问题:
gclient runhooks 会做二件事:一是检查编译环境,二是生成编译脚本。我们也可以跳过检查编译环境,直接生成编译脚本:
生成全部脚本
1 | python src\build\gyp_chromium |
生成某个工程
1 | # chrome 工程 |
Goutput_dir
1 | ninja -C src/out/Debug chrome | findstr error |
VS2015 编译时会遇到一些错误,通过以下设置解决
1 | 4334, # |
1 |
|
解决办法:
1 | gclient sync --with_branch_heads |
1 | > Cannot rebase:You have unstaged changes. |
解决办法:
忽略行结尾的不一致:
1 | git config --global core.autocrlf true |
1 | > The file contains a character that cannot berepresented in the current code page. |
解决办法:
依次打开:Region and Language > Administrative > Langeuage for non-Unicode programs
点击 Change system locale…,切换为 English (United State)
1 | The server's host key is not cached in the registry. You |
手动连接一次 git 服务器,比如 GitLab,StackOverflow
1 | "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe" gitlab.com |