跳到正文
Skillpedia
其他6.9k · #13728

install-ra2

它能做什么

指导你将自己在 Steam 上的 Command & Conquer Red Alert 2 副本制作成适用于 Mac、iPhone 或 iPad 的应用。它适合拥有该游戏并希望在苹果设备上游玩的玩家。

适用场景

  • ✓当你希望在 Mac 上使用自己的 Steam 副本安装 Red Alert 2 或 Yuri's Revenge 时。
  • ✓当你希望使用自己的 Xcode 为 iPhone 或 iPad 设置该游戏时。
  • ✓当 Red Alert 2 的设置过程中出现构建错误的时候。

技能链接

https://github.com/ly05010419/MacNativeGames/blob/main/.claude/skills/install-ra2/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ly05010419/MacNativeGames/blob/main/.claude/skills/install-ra2/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我用我自己的 Steam 安装文件构建 Red Alert 2,以便我在 Mac 上游玩。”

每周 5 个新技能,1 分钟读完。

工作原理

你的智能体会检查 Mac 的工具,使用你自己的 Steam 账户获取游戏,然后构建原生程序。结果保存在你的电脑上,仅供你本人使用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Install Red Alert 2 / Yuri's Revenge

You are helping a player turn their own Red Alert 2 install into native programs: the x86 executables are statically recompiled to arm64 (x86recomp), DirectDraw is drawn with Metal. Everything happens in windows_games/ra2; windows_games/ra2/install.md has the same steps for the player to read.

Rules

  • Only the player's own game. Never search the internet for, download, or ask anyone for game files. The Steam release comes with the player's own Steam account (steamcmd below); the player types their own login.
  • Never weaken a check. Do not edit config/symbols/sha256.txt or the lists beside it to get past an error: another version needs its own lists (step 6).
  • What the build makes (the recompiled code, the apps, the compact movies, the language files) is made from the player's files and is for this player only: never commit, upload or share it.
  • Speak the player's language. Find what you can yourself; ask only for what you cannot find.

1. Check the Mac

sw_vers -productVersion; uname -m; xcode-select -p
brew install cmake ninja llvm sdl3 ffmpeg opencc
python3 -c 'import PIL' || brew install pillow
git log -1 --oneline; df -h .

Apple silicon and macOS 26 or later. iPhone / iPad also need the full Xcode 26+ with the iOS platform, the player's Apple ID in Xcode › Settings › Accounts (a free one works) and the device on iOS / iPadOS 26 with Developer Mode on.

2. The game files

The Steam release (app 2229850): Red Alert 2 1.006 (GAME.EXE) and Yuri's Revenge 1.001 (gamemd.exe). If the player has it on Windows, copy the folder; otherwise steamcmd, logged in to their own account (the player runs it: it asks for the password and Steam Guard):

cd windows_games/ra2
steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir "$PWD/game/install" +login <their account> +app_update 2229850 validate +quit

game/ is git-ignored. Another folder works too: pass it to build.sh.

Chinese (optional): the official Traditional Chinese language pack (depot 2229855), then the language files (lang/zh-Hant, lang/zh-Hans; Simplified is converted with OpenCC, its added glyphs drawn from Noto Sans CJK, downloaded and checked by the script):

steamcmd +@sSteamCmdForcePlatformType windows +login <their account> +download_depot 2229850 2229855 +quit
python3 -I scripts/languages.py game/install "<the depot folder steamcmd printed>"

3. Build for the Mac (about 7 minutes)

cd windows_games/ra2
BUILD_DIR="<folder outside the repository>/build" GENERATED_DIR="<same place>/generated" scripts/build.sh game/install

Without BUILD_DIR / GENERATED_DIR it builds in build/main and game/generated (git-ignored). It checks the executables' SHA-256, recompiles them (several hundred MB of C++) and compiles ra2 and, when gamemd.exe is there, yr. Run it with a long timeout; running it again rebuilds only what changed. JOBS (default 6, for 16 GB of memory) sets the parallel compilers.

4. Play on the Mac

"$BUILD_DIR/ra2" or "$BUILD_DIR/yr" (the install it was built from is the default; --game <folder> picks another). A resizable window; the green button for full screen. --language en|zh-Hant|zh-Hans (default: the system's language among those made in step 2). Saves and settings: ~/Library/Application Support/ra2/ (yr). Options: windows_games/ra2/install.md ("Run").

5. iPhone / iPad

After step 3 (the recompiled code is shared):

IOS_BUILD_DIR="<folder outside the repository>/ios" GENERATED_DIR="<as in step 3>" scripts/ios/build_app.sh
IOS_BUILD_DIR="<as above>" BUILD_DIR="<as in step 3>" python3 -I scripts/ios/install_device.py --device "<device name>" --game game/install
  • The first build_app.sh also builds SDL3, glslang, SPIRV-Cross and a decoders-only ffmpeg for iOS (some minutes).
  • --game puts the install into the app, so it plays once installed; the movie archives go in as compact copies (the first time about 10 minutes on the Mac, then cached): about 1.3 GB in all. The device must be on the cable.
  • First start on the device: trust the developer in Settings › General › VPN & Device Management. The first dialog asks for Red Alert 2 or Yuri's Revenge; its 🌐 button changes the language (kept).
  • A free Apple ID signs for 7 days: run install_device.py again; saves (in the app's Documents) are kept.

6. When it stops

The error says Cause and fix
常见问题

我需要拥有这款游戏吗?

需要。该技能只处理你自己的安装,不提供任何游戏文件。

我可以分享构建好的应用吗?

不可以。该技能说明,构建好的应用包含游戏内容,仅供你本人使用。

Mac 需要什么配置?

需要 Apple 芯片和 macOS 26 或更高版本。若要用于 iPhone 或 iPad,还需要带有 Apple ID 的完整版 Xcode。

详情

作者的原始描述

Build and install Command & Conquer Red Alert 2 and Yuri's Revenge (windows_games/ra2) from the player's own Steam install, for Mac, iPhone or iPad, with English, Traditional or Simplified Chinese. Use when a player asks to install, build or set up Red Alert 2 / Yuri's Revenge, or pastes one of its build errors.

repo: ly05010419/MacNativeGames

热度

GitHub 星标
6.9k
排名
#13728
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能