Add X-backed Wine install wrapper
This commit is contained in:
@@ -119,6 +119,34 @@ open_url() {
|
|||||||
env GAME="$targetUrl" startx
|
env GAME="$targetUrl" startx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_install_x_command() {
|
||||||
|
local quotedCommand=""
|
||||||
|
|
||||||
|
check_dependencies startx
|
||||||
|
printf -v quotedCommand '%q ' "$@"
|
||||||
|
quotedCommand="${quotedCommand% }"
|
||||||
|
|
||||||
|
env DISPLAY="${DISPLAY:-:0}" \
|
||||||
|
STORMUX_X_SESSION_MODE=install \
|
||||||
|
STORMUX_INSTALL_COMMAND="$quotedCommand" \
|
||||||
|
startx
|
||||||
|
}
|
||||||
|
|
||||||
|
run_wine_headless() {
|
||||||
|
local commandName="$1"
|
||||||
|
|
||||||
|
shift
|
||||||
|
command "$commandName" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
wine() {
|
||||||
|
run_install_x_command command wine "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
winetricks() {
|
||||||
|
run_install_x_command command winetricks "$@"
|
||||||
|
}
|
||||||
|
|
||||||
wait_for_enter() {
|
wait_for_enter() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,9 @@ launchRoot="${launchRoot:-${HOME}/.local/.launch}"
|
|||||||
redownload="${redownload:-false}"
|
redownload="${redownload:-false}"
|
||||||
ipfsGateway="${ipfsGateway:-https://ipfs.stormux.org}"
|
ipfsGateway="${ipfsGateway:-https://ipfs.stormux.org}"
|
||||||
fex="${fex:-}"
|
fex="${fex:-}"
|
||||||
|
DISPLAY="${DISPLAY:-:0}"
|
||||||
|
|
||||||
export installPath cache launchRoot redownload ipfsGateway fex gameName game
|
export installPath cache launchRoot redownload ipfsGateway fex gameName game DISPLAY
|
||||||
|
|
||||||
safe_log_name() {
|
safe_log_name() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
|
|||||||
@@ -35,6 +35,18 @@ start_screen_reader() {
|
|||||||
cthulhu &
|
cthulhu &
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_install_session_command() {
|
||||||
|
local installCommand="${STORMUX_INSTALL_COMMAND:-}"
|
||||||
|
|
||||||
|
if [[ -z "$installCommand" ]]; then
|
||||||
|
printf 'Missing STORMUX_INSTALL_COMMAND\n' >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export DISPLAY="${DISPLAY:-:0}"
|
||||||
|
/bin/bash -lc "$installCommand"
|
||||||
|
}
|
||||||
|
|
||||||
check_architecture() {
|
check_architecture() {
|
||||||
local architecture
|
local architecture
|
||||||
local supportedArch
|
local supportedArch
|
||||||
|
|||||||
@@ -30,6 +30,13 @@ export MESA_GL_VERSION_OVERRIDE=3.2
|
|||||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||||
export DBUS_SESSION_BUS_PID
|
export DBUS_SESSION_BUS_PID
|
||||||
|
|
||||||
|
if [[ "${STORMUX_X_SESSION_MODE:-}" == "install" ]]; then
|
||||||
|
run_install_session_command
|
||||||
|
launchStatus=$?
|
||||||
|
pkill -15 Xorg
|
||||||
|
exit "$launchStatus"
|
||||||
|
fi
|
||||||
|
|
||||||
dwm &
|
dwm &
|
||||||
xbindkeys
|
xbindkeys
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user