Skip to content

Instantly share code, notes, and snippets.

@brodock
Created August 13, 2023 15:03
Show Gist options
  • Save brodock/be28cd5f7e92387d188a2b429b2ad743 to your computer and use it in GitHub Desktop.
Save brodock/be28cd5f7e92387d188a2b429b2ad743 to your computer and use it in GitHub Desktop.
Capture Age on Linux
#!/bin/bash
set -x
PROTON="GE-Proton8-4"
APPID=813780
CAPTURE_AGE_VERSION=1.6.1
STEAM_PATH="${HOME}/.steam"
STEAMAPPS="${STEAM_PATH}/root/steamapps"
COMPATIBILITY_TOOLS="${STEAM_PATH}/root/compatibilitytools.d"
PROTON_BIN="${COMPATIBILITY_TOOLS}/${PROTON}/proton"
# Proton Experimental
PROTON_BIN="${STEAMAPPS}/common/Proton - Experimental/proton"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="${STEAM_PATH}"
export STEAM_COMPAT_DATA_PATH="${STEAMAPPS}/compatdata/${APPID}"
export WINEPREFIX="${STEAM_COMPAT_DATA_PATH}/pfx"
download() {
# Donwload both:
# https://captureage.com/api/cade/download/prod/latest-setup
# https://captureage.com/api/cade/download/prod/latest
#
# Move to ${WINEPREFIX}/drive_c
wget https://captureage.com/api/cade/download/prod/latest-setup -o "${WINEPREFIX}/drive_c/CaptureAge ${CAPTURE_AGE_VERSION} Setup.exe"
wget https://captureage.com/api/cade/download/prod/latest -o "${WINEPREFIX}/drive_c/CaptureAge-${CAPTURE_AGE_VERSION}-x64.nsis.7z"
}
setup() {
"${PROTON_BIN}" run "${WINEPREFIX}/drive_c/CaptureAge ${CAPTURE_AGE_VERSION} Setup.exe"
}
proton_run() {
"${PROTON_BIN}" run ${WINEPREFIX}/drive_c/users/steamuser/AppData/Local/Programs/CaptureAge/CaptureAge.exe
}
wine_run() {
wine run ${WINEPREFIX}/drive_c/users/steamuser/AppData/Local/Programs/CaptureAge/CaptureAge.exe
}
download
setup
proton_run
@luisvalenzuelar
Copy link

Hi there, so does it work?

@luisvalenzuelar
Copy link

It get this twice, stopping later:

wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

@brodock
Copy link
Author

brodock commented Nov 11, 2023

@luisvalenzuelar you will get better results with latest/unstable proton or latest/unstable wine. The majority of the application works, with the exception of the main feature which is loading a replay. I've got it to display the replay a few random times, but it seems the culprit is the old version of node/electron and old versions of the SSL library they are using. Something around that is preventing the authentication between CaptureAge and the windows IPC interface it connects to in Aoe2.exe.

@RelevantWorm
Copy link

For the directory variables, if you're using the Flatpak version of Steam you'll want to change lines 8-10.

STEAM_PATH="${HOME}/.var/app/com.valvesoftware.Steam/data/Steam"
STEAMAPPS="${STEAM_PATH}/steamapps"
COMPATIBILITY_TOOLS="${STEAM_PATH}/compatibilitytools.d"

@SmallJoker
Copy link

SmallJoker commented May 23, 2024

With CaptureAge 1.10.0 I face the following error after setup via Proton 8.0-5:

ERR: ProgramExecutableD3D.cpp:1351 (getVertexExecutableForCachedInputLayout): Error compiling dynamic vertex executabl
e:
C:\fakepath:5:1: E5000: syntax error, unexpected NEW_IDENTIFIER

After upgrading to Proton 9.0 (Beta), there is no longer a terminal output from Capture Age (regression?) but PROTON_LOG=1 reveals the following:

vkd3d:07ac:fixme:hlsl_yylex Unsupported preprocessor #pragma directive at line 6.
vkd3d:07ac:fixme:hlsl_yylex Unsupported preprocessor #pragma directive at line 6.
vkd3d:07ac:fixme:hlsl_yylex Unsupported preprocessor #pragma directive at line 6.
vkd3d:07ac:fixme:hlsl_yylex Unsupported preprocessor #pragma directive at line 6.

#pragma is found in the DLLs d3dcompiler_47.dll and libGLESv2.dll. Renaming/moving/deleting both made CaptureAge start up successfully.

EDIT: If CA is started first, it can make AoE 2 DE to load the record, but then somehow fails with the error "Age 2 connection lost" and tries to start the game (again, which fails).
Doing the opposite - CA button in the AoE 2 DE replay mode - results in the popup "Failed to open CaptureAge to spectate the current game." Wonderful.

@luisvalenzuelar
Copy link

luisvalenzuelar commented May 23, 2024

@SmallJoker Cool. But I imagine the two apps still cannot communicate?

@SmallJoker
Copy link

SmallJoker commented May 23, 2024

@luisvalenzuelar Interestingly, CA does find the game process and can in fact tell it to load and play back the record. That's as far as I could get because connection is afterwards lost for no obvious reason. My CA is currently not in a usable state beyond having access to its main screen and a list of saved games.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment