diff --git a/.obsidian/plugins/various-complements/data.json b/.obsidian/plugins/various-complements/data.json index f117fd6..99f171a 100644 --- a/.obsidian/plugins/various-complements/data.json +++ b/.obsidian/plugins/various-complements/data.json @@ -82,8 +82,8 @@ "Booter": { "Booter": { "currentFile": { - "count": 2, - "lastUpdated": 1688358593255 + "count": 3, + "lastUpdated": 1688901177535 } } }, @@ -94,6 +94,30 @@ "lastUpdated": 1688359005627 } } + }, + "需要以下文件并将其放入": { + "需要以下文件并将其放入": { + "currentFile": { + "count": 1, + "lastUpdated": 1688899315006 + } + } + }, + "offload": { + "offload": { + "currentFile": { + "count": 1, + "lastUpdated": 1688901173925 + } + } + }, + "DVMT-Prealloc": { + "DVMT-Prealloc": { + "currentFile": { + "count": 1, + "lastUpdated": 1688901186226 + } + } } } } \ No newline at end of file diff --git a/03-UnrealEngine/Mobile/IOS&Android Engine Package.md b/03-UnrealEngine/Mobile/IOS&Android Engine Package.md index c5ea1db..dcb0207 100644 --- a/03-UnrealEngine/Mobile/IOS&Android Engine Package.md +++ b/03-UnrealEngine/Mobile/IOS&Android Engine Package.md @@ -119,8 +119,6 @@ SigningCertificate=iPhone Developer: xiangtian luo (RD2564LPA4) ## MAC ![[安装Mac UE开发环境]] -**如果证书里面不包含TVOS还需要将BuildGraphe里的对应的TVOS设置成false。** - # Android UE5.1为准的安装环境: - Android Studio 4.0 diff --git a/07-Other/MAC/安装Mac UE开发环境.md b/07-Other/MAC/安装Mac UE开发环境.md index 6f5cd89..72fb920 100644 --- a/07-Other/MAC/安装Mac UE开发环境.md +++ b/07-Other/MAC/安装Mac UE开发环境.md @@ -34,6 +34,11 @@ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles source ~/.zshrc ``` +## git +之后就可以输入命令安装git +```bash +brew install git +``` ## macOS开发环境 https://ue5wiki.com/wiki/2329190d/ @@ -56,39 +61,46 @@ https://github.com/trulyspinach/SMCAMDProcessor/releases/tag/0.7.1 找到 `machdep.cpu.core_count` 字段,其中的数值就是 Mac 的核心数。然后可以给 xcode 开启多线程,数量数为核心数 *2,如我的是 8 核,就可以开启 16 线程: > defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 16 +# 证书 +需要以下文件 +- .cer +- .p12 +- .mobileprovision + +并将其放入 +`/Users/你的用户名/Library/Mobiledevice/provisioning Profiles`,最后双击导入。p12建议设置一个密码,mac里不支持无密码的p12证书。 + +运行GenerateProjectFiles.command生成解决方案,***此时可以检查证书是否有效***。 + # 编译流程 - 先编译ShaderCompileWork - 后编译UE5 +***一定要注意虚拟机的CPU以及内存的关系,CPU线程数 * 2 < 内存GB 数。所以给的CPU数目一定不能多。*** 即使是黑苹果下,如果内存不够多,开了比较占用内存的APP会比较容易死机。比如我使用的是7950x 16核心 32线程 与 64GB内存,基本就处于一个平衡状态。如果开了XCode的情况打包引擎会出现死机情况。 + +# 疑难问题解 +## UE5.1 Setup.bat 提示unsupported compression method问题 +问题为: +>Checking dependencies... +>Updating dependencies: 0% (0/97340)... +> Failed to download 'https://cdn.unrealengine.com/dependencies/UnrealEngine-11447123-52802068b7db445d94de6cd13d574a02/00ba053f58ab8d00cf41519fd27d8059d397a4fb': InvalidDataException: The archive entry was compressed using an unsupported compression method. + +此文问题普遍发生在5.0~5.1以及UE4版本,解决方法: +去 https://github.com/EpicGames/UnrealEngine/releases 的各个版本标签下,下载**Commit.gitdeps.xml**文件,并替换`\Engine\Build`下同名文件即可。 + +## ExternalBuildToolExecution failed with a nonzero exit code +问题表现为编译到一半提示 `ExternalBuildToolExecution failed with a nonzero exit code`。这主要是因为XCode代码检索会占用非常多的内存,使得CPU线程数 * 2 > 内存GB,从而导致编译失败。 + +解决方法: +>在CMD中输入 `defaults write com.apple.dt.XCode IDEIndexDisable 1`,禁用XCode代码检索即可。 + ## ATOMIC_VAR_INIT错误 https://forums.unrealengine.com/t/cannot-build-ue-5-1-1-from-source-on-macos-ventura-13-3-1-xcode-14-3/885545 macOS 13.4 Xcode 14.3编译UE5.1会报错,其原因是: >So it seems the error is related to the deprecation of `ATOMIC_VAR_INIT` [since C++20 2](https://en.cppreference.com/w/cpp/atomic/ATOMIC_VAR_INIT). I gather [from this table 3](https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2) that Xcode 14.3 includes a clang patch version bump from 14.0.0 to 14.0.3, and a llvm major version bump from 14.0.0 to 15.0.0. With my limited understanding of clang and llvm, I would guess that llvm 15 compiles at C++20, and therefore throws the build error, whereas the build is successful with Xcode 14.2. 解决方法是: -- ShaderCompileWorker.target.cs添加下面的代码。 -- UnrealEditor.Target.cs添加下面的代码(去掉bOverrideBuildEnvironment那一行)。 - -```c++ -using UnrealBuildTool; -using System.Collections.Generic; - -public class YourGameTarget : TargetRules -{ - public YourGameTarget(TargetInfo Target) : base(Target) - { - if(Target.Platform == UnrealTargetPlatform.Mac) - { - bOverrideBuildEnvironment = true; - AdditionalCompilerArguments = "-Wno-deprecated-pragma"; // you can add more separated with spaces here - } - - ... - } -} -``` - -我对文件做了一些修改`Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs`,错误消失了。 +在`Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs`中添加判断语句,对高版本XCode添加`-Wno-deprecated-pragma`编译变量。 ```c++ if (CompilerVersionGreaterOrEqual(14, 0, 0)) { @@ -96,7 +108,7 @@ if (CompilerVersionGreaterOrEqual(14, 0, 0)) } ``` -功能齐全: +最后修改结果: ```csharp protected override void GetCompileArguments_Global(CppCompileEnvironment CompileEnvironment, List Arguments) { @@ -124,11 +136,23 @@ protected override void GetCompileArguments_Global(CppCompileEnvironment Compile FrameworksSearchPaths.Add(FrameworkPath.Directory.FullName); } } - + //添加的代码在这里 if (CompilerVersionGreaterOrEqual(14, 0, 0)) { Arguments.Add("-Wno-deprecated-pragma"); } } -``` \ No newline at end of file +``` + +## std::ref问题 +添加头文件即可。 +```c++ +#include +``` + +## 清理引擎构建历史&缓存 +XCode的构建历史: +>~/Library/Developer/Xcode/DerivedData + +本人采用删除Engine、LocalBuild文件夹中所有文件与UE5 XCode解决方案文件,再使用git恢复。最后再运行Setup.command、GenerateProjectFiles.command。 \ No newline at end of file diff --git a/07-Other/MAC/安装UE开发环境.md b/07-Other/MAC/安装UE开发环境.md deleted file mode 100644 index b7c9ca6..0000000 --- a/07-Other/MAC/安装UE开发环境.md +++ /dev/null @@ -1,17 +0,0 @@ -## 安装homebrew -参考: -- https://www.jianshu.com/p/e0471aa6672d - -国内镜像安装命令: -```c++ -/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)" -``` - -## 编译注意事项 -一定要注意虚拟机的CPU以及内存的关系,CPU线程数 * 2 > 内存GB 数。所以给的CPU数目一定不能多。 - -## 编译命令 -```bash -cd ./Desktop/UnrealEngine/Engine/Build/BatchFiles -./RunUAT.sh BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -set:WithDDC=true -set:SignExecutables=false -set:EmbedSrcSrvInfo=false -set:GameConfigurations=Development;Shipping -set:WithFullDebugInfo=false -set:HostPlatformEditorOnly=false -set:AnalyticsTypeOverride=false -set:HostPlatformDDCOnly=true -set:WithWin64=false -set:WithMac=true -set:WithAndroid=false -set:WithIOS=true -set:WithTVOS=false -set:WithLinux=false -set:WithLumin=false -set:WithLinuxArm64=false -set:CompileDatasmithPlugins=false -set:WithServer=false -set:WithClient=false -set:WithHoloLens=false -``` diff --git a/07-Other/MAC/黑苹果配置笔记.md b/07-Other/MAC/黑苹果配置笔记.md index 04e76c4..29e6b98 100644 --- a/07-Other/MAC/黑苹果配置笔记.md +++ b/07-Other/MAC/黑苹果配置笔记.md @@ -68,11 +68,13 @@ SSDT&DSDT: 1. sudo nvram myvar=test 2. nvram -p | grep -i myvar -# Asus X670E Gene EFI -- Adaptable to Other X670, X670E, B650 and B650E Boards -https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/ +# AMD OS X 作业 +- https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/ +- https://forum.amd-osx.com/threads/asus-x670e-proart-ryzen-9-7950x-radeon-rx-6950-xt-macos-ventura.4530/ -为了使此EFI适应**其他板**,必须进行以下更改: +很可惜,**第一个无法进入安装界面**。而第二个只需要修改显卡型号就可以进入。 +以下为第一个作业的EFI流程笔记,为了使此EFI适应**其他板**,必须进行以下更改: - [x] _通过暂时使用OpenCore.efi_的调试版本并设置_Misc -> Target -> 67_以启用 OpenCore 日志文件,找到您的主板的 MMIO 白名单。引导系统直到出现 OpenCore Picker。这应该足以在 EFI 分区的根文件夹中生成 OpenCore 日志文件。在该日志中搜索“MMIO”,您将找到所需的条目(请参阅[此 MMIO 白名单指南](https://am5hackintosh.github.io/OpenCore-Install-Guide/extras/devirtualizemmio.html)) - [ ] 创建您自己的USB端口映射;该 EFI 文件夹使用 (a) SSDT 和 (b) kext 的组合来创建 USB 端口映射;如果您愿意的话,我还包含了 USBToolBox 的输出;**但您仍然必须为您的特定主板创建 USB 端口映射**;您可以尝试使用此 EFI 文件夹中的 USB 端口映射,但它可能适合您,也可能不适合您 - [ ] 要启用从睡眠状态一键唤醒,`SSDT-USBW.aml`必须使用系统中所有活动 USB (XHC) 控制器的 ACPI 路径进行修改 @@ -107,27 +109,49 @@ https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x6 1. [x] 为了EXPO关闭雷电4接口。(**Bios中操作,可能需要禁用**) 2. [ ] USBToolBox 定制 -# 额外操作 -debug 3 -> 67 -开启Sysreport -启动项添加-v +## Debug操作 +- debug 3 -> 67,MISC - Debug -Target 设置成67,之后就可以输出Log到安装U盘根目录。 +- 开启Sysreport +- 添加跑码模式,找到NVRAM---7C436110-AB2A-4BBB-A880-FE41995C9F82 ,给boot-args 添加上 -v选项。 +![](https://i0.hdslb.com/bfs/article/2a9a049b26a80f2148d1a2fd5618f1d354643e2b.png@1256w_700h_!web-article-pic.avif) +# 显卡型号查询与替换 +型号可以在GPU-Z中查询,前几位厂商型号,后面4位就是显卡型号。 +找到之后在 https://devicehunt.com/search/type/pci/vendor/1002/device/any 查询确认即可。 +找到型号后将型号头尾调换后填入OpenCore中即可。 +# BIOS问题 +参考 https://github.com/dortania/oc-laptop-guide-legacy/blob/master/before-you-start/bios-configuration.md + +- Turn off Secure Booter + - Disable it, or you won't be able to access OpenCore to boot macOS or the macOS installation media. +- Turn the TPM offload + - If your computer has a TPM chip, you'll want to turn it off. macOS can't use it anyway. +- Disable VT-D /SVM + - VT-D is Intel's hardware based IO and device offload technology. It's incompatible with macOS and can cause boot issues, and kernel panics. If you have the option, you should turn it off. +- Graphics DVMT-Prealloc + - This is the initial memory used for your Intel GPU. By default it's usually 32MB, but for macOS it should be set to 64MB. If you don't have this option in your BIOS it can be patched later. +- SATA/AHCI/RAID + - You always want your Hard Disks and SSDs to operate in AHCI mode. In any of the other modes, macOS won't see them for installation. +- Disable that dGPU! + - If you can, if not you can disable it with a patch later. You may need to boot the installation media with an extra argument (-x) to use safe mode though. This setting can also be left on if you want to use the dGPU within Windows or other operating systems. +- Enable Legacy USB support + - This is sometimes needed for your keyboard to work in OpenCore. It's always safe to set if it's available. +- Enable XHCI Handoff + - This parameter tells the computer to hand control of the XHCI (USB 3) bus to macOS, if you have it make sure it's enabled. +- Disable Fast Boot + - Fast Boot establishes a cache to boot into Windows more quickly, but that can be problematic when booting into macOS. If you have the parameter, you'll want to turn it off. +- Disable Wake on Lan + - Wake on Lan is one of the leading causes of sleep wakeups, if you have the option in your BIOS to disable it, it's recommended that you do. +- Disable Unsupported Devices + - That fingerprint and some SDCard reader won't work anyway, so turn off the ports if you can and save power! (if possible) -# 其他可能的Bios问题 -需要关闭: 1. SVM(虚拟机) 2. CSM 3. 快速启动 4. 安全启动 5. 为了EXPO关闭雷电4接口 -# OpenCore Debug -添加跑码模式,找到NVRAM---7C436110-AB2A-4BBB-A880-FE41995C9F82 ,给boot-args 添加上 -v选项。 -![](https://i0.hdslb.com/bfs/article/2a9a049b26a80f2148d1a2fd5618f1d354643e2b.png@1256w_700h_!web-article-pic.avif) - -MISC - Debug -Target 设置成67,之后就可以输出Log到安装U盘根目录。 - # CaseySJ & ovenlite1 EFI ovenlite1相比CaseySJ - ACPI