-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·180 lines (153 loc) · 7.61 KB
/
Copy pathsetup
File metadata and controls
executable file
·180 lines (153 loc) · 7.61 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#!/bin/bash
###############################################################################
# wine-gaming — setup (entrypoint)
# Sources lib/ modules and routes CLI commands.
# Do NOT add business logic here — put it in the appropriate lib/*.sh file.
###############################################################################
# Note: We do NOT use 'set -e' to allow batch operations to continue on errors.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SETUP_SCRIPT_PATH="$SCRIPT_DIR/setup"
# Source library modules in dependency order
for _lib in config utils registry installer shortcuts apps launch prefix profile user_registry aliases; do
# shellcheck source=/dev/null
source "$SCRIPT_DIR/lib/${_lib}.sh"
done
unset _lib
# ── Help text ─────────────────────────────────────────────────────────────────
show_help() {
cat <<'HELP_EOF'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
wine-gaming — Wine Proton Multi-Launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USAGE:
./setup <command> [options]
WINE PREFIX MANAGEMENT:
purge Delete Wine prefix and start fresh
backup Backup essential DLLs and packages
restore Restore from backup
init Initialize Wine prefix with dependencies
full Complete setup: purge + init + install all
quick Reinit deps + install any missing launchers
install-proton Download and install Proton-GE
fix-z-drive Permanently remove Z: drive mount
unmount-z Temporarily hide Z: (stops /mnt disk warnings)
mount-z Restore Z: drive
suppress-z-warnings Suppress Z: drive log warnings
configure-drives [D] [/path] Configure Wine drive mappings
APP MANAGEMENT:
list Show all launchers and install status
list-installers Show available installers in ./installers/
install <app-key> Install a launcher
install <app-key> <path> Install with a custom local installer
install-all Install all registered launchers
uninstall <app-key> Remove a launcher from the prefix
launch <key> Launch any registered app (launcher or user)
launch <key> --profile <p> Launch with a specific profile (also: --profile <p> <key>)
launch-exe <path> Launch any external .exe/.msi in managed prefix
prefix-info Show managed prefix paths and env vars
USER APP REGISTRY (games, standalone .exes):
add <key> <exe> [name] [--launcher <launcher-key>]
Register an exe under a short key (grouped by launcher for display only)
remove <key> Remove a user entry
SHORTCUT MANAGEMENT:
install-shortcut <key|all> Create .desktop launcher shortcut (or all installed)
install-shortcut --profile <p> <key> Create profile-specific shortcut (key-p.desktop)
remove-shortcut <key|all> Remove desktop shortcut (or all)
PROFILE MANAGEMENT (per-app Proton/DXVK tuning):
profile menu [app-key] Interactive knob editor (FPS cap, HUD, FSR, …)
profile show [app-key] Show effective settings (default + overrides)
profile list List all profiles
profile set [app] K=V … Set values (defaults to global if no app)
profile unset [app] KEY … Remove keys
profile edit [app-key] Open raw profile file in $EDITOR
profile reset [app-key] Delete the profile file
ALIAS MANAGEMENT:
install-aliases Write wig-* aliases → ~/.bashrc (run once)
remove-aliases Remove wig-* aliases and ~/.bashrc entry
show-aliases List installed wig-* aliases
AVAILABLE LAUNCHERS:
ea-desktop EA Desktop (Origin)
gog-galaxy GOG Galaxy
epic-games Epic Games Launcher
ubisoft-connect Ubisoft Connect
amazon-games Amazon Games
legacy-games Legacy Games
EXAMPLES:
./setup install-proton
./setup full
./setup install gog-galaxy
./setup launch gog-galaxy
./setup launch-exe /path/to/Game.exe
./setup install-aliases # then: source ~/.bashrc
wig-launch gog-galaxy # after aliases are active
CONFIGURATION:
Add/edit launchers in lib/config.sh → APP_REGISTRY array.
Format: [key]="Name|ExePath|URL|UninstallPath1|..."
ENV OVERRIDES:
WINE_GAMING_HOME=<path> Override Wine prefix root (default: ~/.wine-gaming)
WINE_GAMING_CACHE=<path> Override installer cache directory
WINE_GAMING_APPS_DIR=<path> Override .desktop shortcut directory
DIRECTORIES:
Wine prefix: $WINEPREFIX
Proton: $PROTON_DIR
Cache: $CACHE_DIR
Backups: $BACKUP_DIR
Shortcuts: $APPS_DIR
Aliases: $ALIAS_FILE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HELP_EOF
}
# ── Command router ────────────────────────────────────────────────────────────
main() {
local command="${1:-help}"
case "$command" in
# Prefix management
purge) purge ;;
backup) backup ;;
restore) restore ;;
init) init ;;
full) full_setup ;;
quick) quick_setup ;;
install-proton) install_proton ;;
fix-z-drive) fix_z_drive ;;
unmount-z) unmount_z ;;
mount-z) mount_z ;;
suppress-z-warnings) suppress_z_warnings ;;
configure-drives) configure_wine_drives "$2" "$3" ;;
# App management
list) list_apps ;;
list-installers) list_installers ;;
install) install_app "$2" "$3" ;;
install-all) install_all_launchers ;;
uninstall) uninstall_app "$2" ;;
launch) shift; launch_app "$@" ;;
launch-exe) launch_external_exe "$2" ;;
prefix-info) prefix_info ;;
# User app registry (games, standalone exes)
add) shift; add_user_app "$@" ;;
remove) remove_user_app "$2" ;;
# Shortcut management
install-shortcut)
shift
if [ "$1" = "all" ]; then create_all_shortcuts
else create_shortcut "$@"; fi ;;
remove-shortcut)
if [ "$2" = "all" ]; then remove_all_shortcuts
else remove_shortcut "$2"; fi ;;
# Profiles
profile) shift; profile_dispatch "$@" ;;
# Alias management
install-aliases) install_aliases ;;
remove-aliases) remove_aliases ;;
show-aliases) show_aliases ;;
# Help
help|-h|--help) show_help ;;
*)
print_error "Unknown command: $command"
echo ""
show_help
exit 1
;;
esac
}
main "$@"