Map Wine Program Files into local games
This commit is contained in:
@@ -147,6 +147,41 @@ install_with_progress() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepare_wine_game_dirs() {
|
||||||
|
local driveC="${WINEPREFIX}/drive_c"
|
||||||
|
local gamesWineRoot="${HOME}/.local/games/Wine"
|
||||||
|
local programName
|
||||||
|
local sourceDir
|
||||||
|
local targetDir
|
||||||
|
local item
|
||||||
|
|
||||||
|
[[ -d "$driveC" ]] || return 0
|
||||||
|
|
||||||
|
for programName in "Program Files" "Program Files (x86)"; do
|
||||||
|
sourceDir="${driveC}/${programName}"
|
||||||
|
targetDir="${gamesWineRoot}/${programName}"
|
||||||
|
|
||||||
|
mkdir -p "$targetDir"
|
||||||
|
|
||||||
|
if [[ -L "$sourceDir" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$sourceDir" ]]; then
|
||||||
|
shopt -s dotglob nullglob
|
||||||
|
for item in "$sourceDir"/*; do
|
||||||
|
mv -n "$item" "$targetDir/"
|
||||||
|
done
|
||||||
|
shopt -u dotglob nullglob
|
||||||
|
rmdir "$sourceDir" 2> /dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e "$sourceDir" ]]; then
|
||||||
|
ln -s "$targetDir" "$sourceDir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
install_wine_bottle() {
|
install_wine_bottle() {
|
||||||
local dep
|
local dep
|
||||||
local depsToInstall=()
|
local depsToInstall=()
|
||||||
@@ -170,6 +205,7 @@ install_wine_bottle() {
|
|||||||
ui_progressbox "Wine Setup" "Initializing Wine bottle" < /dev/null
|
ui_progressbox "Wine Setup" "Initializing Wine bottle" < /dev/null
|
||||||
DISPLAY="${DISPLAY:-}" wine wineboot -u
|
DISPLAY="${DISPLAY:-}" wine wineboot -u
|
||||||
fi
|
fi
|
||||||
|
prepare_wine_game_dirs
|
||||||
|
|
||||||
for dep in "$@"; do
|
for dep in "$@"; do
|
||||||
case "$dep" in
|
case "$dep" in
|
||||||
|
|||||||
Reference in New Issue
Block a user