diff --git a/03-UnrealEngine/Gameplay/PuerTS/Puerts(一)——学习资料归纳.md b/03-UnrealEngine/Gameplay/PuerTS/Puerts(一)——学习资料归纳.md index d1859a5..92f4ac5 100644 --- a/03-UnrealEngine/Gameplay/PuerTS/Puerts(一)——学习资料归纳.md +++ b/03-UnrealEngine/Gameplay/PuerTS/Puerts(一)——学习资料归纳.md @@ -23,8 +23,11 @@ https://github.com/Tencent/puerts - UE5 PuerTS学习与实践:https://zhuanlan.zhihu.com/p/632862773 - UE4下基于V8实现的代码热刷新:https://zhuanlan.zhihu.com/p/364505146 - PuerTS:js调用ue的过程:https://zhuanlan.zhihu.com/p/396751427 - - UE4:PuerTS的js调试相关:https://zhuanlan.zhihu.com/p/406387721 - 基于Puerts的编辑器UI开发-Mixin的非最佳实践:https://zhuanlan.zhihu.com/p/551338775 + - 调试 + - UE4:PuerTS的js调试相关:https://zhuanlan.zhihu.com/p/406387721 + - Puerts Inspector指南(一)在UE4和Unity里调试Javascript:https://zhuanlan.zhihu.com/p/359598262 + ## TypeScript - http://www.patrickzhong.com/TypeScript/zh/tutorials/typescript-in-5-minutes.html - https://ts.xcatliu.com/ diff --git a/03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md b/03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md index c9d88d9..e390b4f 100644 --- a/03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md +++ b/03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md @@ -79,6 +79,71 @@ docker run -d \ sourcegraph/helix-p4d:2020.2 ``` +### 启用SSL +首先生成自签名证书: +```shell +mkdir ssl +pushd ssl +openssl genrsa -out privatekey.txt 2048 +openssl req -new -key privatekey.txt -out certrequest.csr +openssl x509 -req -days 365 -in certrequest.csr -signkey privatekey.txt -out certificate.txt +rm certrequest.csr +popd +``` +接下来设置SSL文件映射目录也就是`P4SSLDIR`的值,并且设置`P4PORT`使用SSL。 +```shell +docker run --rm \ + --publish 1666:1666 \ + --env P4PORT=ssl:1666 \ + --env P4SSLDIR=/ssl \ + --volume ./ssl:/ssl \ + sourcegraph/helix-p4d:2023.1 +``` + +### 时间显示问题 +1. 修改容器内系统时区。 +2. 修改P4V时间显示,Edit - Preferences - Display - Show date andtime as,Server time => Local time。 + +##### Docker容器修改时间 +方法一:配置Dockerfile镜像时修改,这样打包出来的镜像文件是需要的时区的。 +操作方式:Dockerfile中添加代码 +```bash +# 在安装tzdata之前最好先update和upgrade,以防apt-get获取不到tzdata +RUN apt-get update -y && apt-get upgrade -y +# 安装,中国用户填写[Asia/Shanghai] ,表示亚洲/上海 ,东八区 +RUN apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +``` +缺点:由于构建时需要更新ubuntu,所以需要需要网络支持,网络不好的时候拖累构建镜像的速度。亲测,在中国白天速度快,晚上慢。 + +**建议通过env进行指定**: +```bash +ENV TZ=Asia/Shanghai +RUN In -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +``` + +方法二(强烈不推荐):在运行的容器中,进行修改 +操作方式:docker attach 登录到运行的容器中执行如下代码 +```bash +# 在安装tzdata之前最好先update和upgrade,以防apt-get获取不到tzdata +apt-get update -y && apt-get upgrade -y +# 安装 +apt-get install -y tzdata +# 配置 +echo "Asia/Shanghai" > /etc/timezone +# dpkg-reconfigure -f noninteractive tzdata 或者这个。 +dpkg-reconfigure tzdata +``` + +方法三:启动容器的时候进行设置 +操作方式:启动命令中添加 挂载目录,例如: +```bash +# 启动容器时挂载宿主机目录 +docker run -v /etc/localtime:/etc/localtime:ro +# 其中 -v 参数中ro代表只读模式(read only) +# 如果您的项目中已经使用了-v 没有关系,启动时挂载多个目录只要写多个-v就可以 +``` +缺点:依赖于宿主机,一般生产环境宿主机都是linux,如果你也是Linux内核,推荐使用 + ### 推送镜像到Dockerhub 登录 ```bash @@ -97,6 +162,17 @@ docker push blueroses/perforce-helix-p4d:2024.5 docker push ghcr.io/blueroses/perforce-helix-p4d:2024.5 ``` +## helix-proxy Docker +Package: helix-proxy +Priority: optional +Section: non-free/vcs +Installed-Size: 30 +Maintainer: Perforce Software, Inc. +Architecture: amd64 +Source: perforce +Version: 2024.1-2596294~focal + + # IDE设置 - VSCode - Settings - Extensions - Perforce - Client:工作区名称 @@ -584,8 +660,12 @@ Samples\**\Saved\* DockerFile搞起来太麻烦…… -# -https://www.perforce.com/manuals/p4dist/Content/P4Dist/chapter.proxy.html +# Perforce Proxy +- 官方文档 + - https://www.perforce.com/manuals/p4dist/Content/P4Dist/chapter.proxy.html + +一种用于同步主Perforce服务器数据的远程服务器。适合远程的分布式协作。 + # 其他 ## 注册源码引擎到EpicGames 经过上面的步骤,源码引擎已经构建成功,但是在对项目就行选择引擎版本的时候,发现并没有这个版本 。这是因为,构建的引擎没有注册到EpicGames中,找到EpicGames安装目录下的注册器。复制到源码工程并且运行即可。