mirror of https://gitee.com/openkylin/docs.git
Pre Merge pull request !428 from 王小ww/master
This commit is contained in:
commit
677b7698b0
|
@ -0,0 +1,150 @@
|
|||
在 OpenKylin 系统上安装 Epic 商城及配置虚幻引擎(Unreal Engine)
|
||||
OpenKylin 是中国首个基于 Linux 的自主可控桌面操作系统社区,支持多种开发环境和图形应用。Epic Games 提供的 Epic 商城 和 Unreal Engine(虚幻引擎) 主要面向 Windows 和 macOS 平台,但通过兼容层如 Wine 或 Proton(Steam Play),我们可以在 Linux 上运行部分 Windows 应用程序。本文将介绍如何在 OpenKylin 操作系统 上安装 Epic 商城,并尝试下载和配置 Unreal Engine。
|
||||
|
||||
一、安装 Epic 商城
|
||||
目前 Epic 商城官方尚未提供原生 Linux 客户端,但可以通过 Wine 来运行 Windows 版本。
|
||||
|
||||
步骤 1:安装 Wine
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install wine-stable
|
||||
```
|
||||
|
||||
建议使用最新稳定版,也可以选择 winehq-stable(需添加 WineHQ 源):
|
||||
|
||||
|
||||
```
|
||||
sudo dpkg --add-architecture i386
|
||||
wget -nc https://dl.winehq.org/wine-builds/Release.key
|
||||
sudo apt-key add Release.key
|
||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
|
||||
sudo apt update
|
||||
sudo apt install --install-recommends winehq-stable
|
||||
```
|
||||
|
||||
注意:根据你的 Ubuntu/Debian 版本替换 focal(20.04)为对应的代号。
|
||||
|
||||
步骤 2:下载 Epic 商城安装包
|
||||
访问 Epic Games 官网 下载 Windows 版本的安装器(EpicInstallerSetup.exe)。
|
||||
|
||||
步骤 3:使用 Wine 运行安装器
|
||||
|
||||
```
|
||||
wine EpicInstallerSetup.exe
|
||||
```
|
||||
|
||||
按照提示完成安装。安装完成后,Epic 商城会被安装到 Wine 的虚拟 C 盘中,路径通常是:
|
||||
|
||||
|
||||
```
|
||||
~/.wine/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/EpicGamesLauncher.exe
|
||||
```
|
||||
|
||||
你可以创建一个启动脚本来方便打开:
|
||||
|
||||
|
||||
```
|
||||
nano ~/epic-launcher.sh
|
||||
```
|
||||
|
||||
内容如下:
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
cd ~/.wine/drive_c/Program\ Files\ $x86$/Epic\ Games/Launcher/Portal/
|
||||
wine EpicGamesLauncher.exe
|
||||
```
|
||||
|
||||
保存并赋予执行权限:
|
||||
|
||||
|
||||
```
|
||||
chmod +x ~/epic-launcher.sh
|
||||
```
|
||||
|
||||
运行脚本:
|
||||
|
||||
|
||||
```
|
||||
~/epic-launcher.sh
|
||||
```
|
||||
|
||||
登录你的 Epic 账号即可浏览商城并下载游戏。
|
||||
|
||||
二、下载与配置 Unreal Engine
|
||||
Unreal Engine 官方也未提供原生 Linux 构建工具,但你可以在 Linux 上使用其编辑器进行项目开发,前提是通过 Wine 或远程连接 Windows 机器。
|
||||
|
||||
方法一:使用 Wine 运行 Unreal Engine 编辑器
|
||||
步骤 1:在 Epic 商城中下载 Unreal Engine
|
||||
在 Epic 商城中找到 Unreal Engine,点击“获取”安装到本地。
|
||||
|
||||
步骤 2:运行 Unreal Engine 安装程序
|
||||
通常会生成一个 .msi 或 .exe 文件,使用 Wine 安装:
|
||||
|
||||
|
||||
```
|
||||
wine YourUnrealEngineInstaller.exe
|
||||
```
|
||||
|
||||
步骤 3:运行 Unreal Editor
|
||||
安装完成后,进入安装目录并运行:
|
||||
|
||||
|
||||
```
|
||||
cd ~/.wine/drive_c/Program\ Files\ $x86$/Epic\ Games/UE_5.x/Engine/Binaries/Win64
|
||||
wine UE5Editor.exe
|
||||
```
|
||||
|
||||
注意:某些版本可能无法正常运行,取决于 Wine 对 DirectX 的支持情况。
|
||||
|
||||
方法二:Linux 原生开发环境搭建(仅限代码开发)
|
||||
如果你只是想进行 Unreal Engine 的 C++ 开发,可以使用 Linux 工具链配合远程编译。
|
||||
|
||||
步骤 1:安装依赖库
|
||||
|
||||
```
|
||||
sudo apt install build-essential clang cmake git libgl1 libglu1-mesa libgles2-mesa-dev xorg-dev libx11-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev
|
||||
```
|
||||
|
||||
步骤 2:克隆 Unreal Engine 源码(GitHub)
|
||||
|
||||
```
|
||||
git clone https://github.com/EpicGames/UnrealEngine.git
|
||||
cd UnrealEngine
|
||||
git checkout release
|
||||
```
|
||||
|
||||
步骤 3:构建引擎(适用于服务器或非图形化环境)
|
||||
|
||||
```
|
||||
./Setup.sh
|
||||
./GenerateProjectFiles.sh
|
||||
make
|
||||
```
|
||||
|
||||
注意:此方式主要用于无头服务器或自动化构建,不适合图形界面编辑器开发。
|
||||
|
||||
三、推荐方案:双系统或远程开发
|
||||
由于 Wine 兼容性限制,建议采用以下方案:
|
||||
|
||||
方案 A:双系统(Windows + OpenKylin)
|
||||
日常开发使用 OpenKylin。
|
||||
需要使用 Unreal Engine 编辑器时切换至 Windows。
|
||||
方案 B:远程桌面或虚拟机
|
||||
使用 VirtualBox 或 VMware 安装 Windows 子系统。
|
||||
在其中运行 Epic 商城和 Unreal Engine。
|
||||
方案 C:使用 Steam Play / Proton(高级)
|
||||
如果你通过 Steam 安装 Unreal Engine,可以尝试使用 Proton(Valve 提供的 Wine 分支)运行,兼容性更好。
|
||||
|
||||
四、常见问题
|
||||
Q: Epic 商城在 Wine 中运行卡顿?
|
||||
A: 可尝试使用 winetricks 安装额外组件如 vcrun2019, dxvk 等提升性能:
|
||||
|
||||
|
||||
```
|
||||
winetricks vcrun2019 dxvk
|
||||
```
|
||||
|
||||
Q: 如何更新 Unreal Engine?
|
||||
A: 通过 Epic 商城自动更新或重新运行安装程序。
|
Loading…
Reference in New Issue