-
Notifications
You must be signed in to change notification settings - Fork 0
/
dalamud-linux-inject
executable file
·39 lines (30 loc) · 1.43 KB
/
dalamud-linux-inject
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
set -euo pipefail
# Debugging variaables
#export WINEDEBUG=warn+all
#export COREHOST_TRACE=1 # Useful for debugging .NET CoreCLR issues
# Log path should be relative to users working directory, not the scripts.
LOGPATH="$(pwd)/dalamud-logs"
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
cd "${SCRIPT_FOLDER}" || exit
source "${SCRIPT_FOLDER}/dalamud-linux-paths"
export WINEDEBUG=-all # Prevent wine from spamming fixmes.
export WINEESYNC=1
export WINEPREFIX=$XLCORE_WINEPREFIX
# Make sure we're using the same wine as XIVLauncher.Core
export WINECMDPREFIX="" # Replaced when using nix
export WINESERVER="${XLCORE_WINE}/bin/wineserver"
export WINELOADER="${XLCORE_WINE}/bin/wine"
export WINEPATH="${XLCORE_WINE}/bin/winepath"
XLCORE_ROOT_WINE=$($WINECMDPREFIX $WINEPATH -w ${XLCORE_ROOT})
DALAMUD_DEV_INSTALL_PATH_WINE=$($WINECMDPREFIX $WINEPATH -w "${DALAMUD_DEV_INSTALL_PATH}" 2>/dev/null)
echo "Injecting Dalamud..."
export DALAMUD_RUNTIME=${XLCORE_ROOT_WINE}\\runtime
$WINECMDPREFIX $WINELOADER $DALAMUD_DEV_INSTALL_PATH/Dalamud.Injector.exe inject \
--all \
--dalamud-configuration-path="${XLCORE_ROOT_WINE}\\dalamudConfig.json" \
--dalamud-working-directory="${DALAMUD_DEV_INSTALL_PATH_WINE}" \
--dalamud-plugin-directory="${XLCORE_ROOT_WINE}\\installedPlugins" \
--dalamud-asset-directory="${XLCORE_ROOT_WINE}\\dalamudAssets\\dev" \
--dalamud-delay-initialize=1000 \
--logpath="${DALAMUD_DEV_LOGPATH}"