all wine settings added to CLI
This commit is contained in:
@@ -2065,13 +2065,13 @@ stop_portwine () {
|
|||||||
create_name_desktop
|
create_name_desktop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
if [[ $PW_CLI != "1" ]] ; then
|
||||||
--restart)
|
case "$1" in
|
||||||
restart_pp ;;
|
--restart) restart_pp ;;
|
||||||
*)
|
*) unset SKIP_CHECK_UPDATES ;;
|
||||||
unset SKIP_CHECK_UPDATES
|
esac
|
||||||
exit 0 ;;
|
fi
|
||||||
esac
|
exit 0
|
||||||
}
|
}
|
||||||
export -f stop_portwine
|
export -f stop_portwine
|
||||||
|
|
||||||
@@ -7479,7 +7479,7 @@ pw_create_prefix_backup () {
|
|||||||
restart_pp
|
restart_pp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if pw_create_prefix_backup_cli "$PW_PREFIX_NAME" "$PW_PREFIX_TO_BACKUP" ; then
|
if pw_create_prefix_backup "$PW_PREFIX_NAME" "$PW_PREFIX_TO_BACKUP" ; then
|
||||||
yad_info "${translations[Backup has been successfully created for prefix:]} $PW_PREFIX_NAME"
|
yad_info "${translations[Backup has been successfully created for prefix:]} $PW_PREFIX_NAME"
|
||||||
if [[ ! -f "${PORT_WINE_TMP_PATH}/pfx_backup_info" ]] ; then
|
if [[ ! -f "${PORT_WINE_TMP_PATH}/pfx_backup_info" ]] ; then
|
||||||
yad_info "${translations[Attention! Do not pass the resev copy to third parties, there is a risk of losing accounts!]}"
|
yad_info "${translations[Attention! Do not pass the resev copy to third parties, there is a risk of losing accounts!]}"
|
||||||
@@ -7491,7 +7491,7 @@ pw_create_prefix_backup () {
|
|||||||
restart_pp
|
restart_pp
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_create_prefix_backup_cli () {
|
pw_create_prefix_backup () {
|
||||||
PW_PREFIX_NAME="$1"
|
PW_PREFIX_NAME="$1"
|
||||||
PW_PREFIX_TO_BACKUP="$2"
|
PW_PREFIX_TO_BACKUP="$2"
|
||||||
|
|
||||||
@@ -7532,7 +7532,7 @@ pw_create_prefix_backup_cli () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_unpack_prefix_cli () {
|
pw_unpack_prefix () {
|
||||||
PW_BACKUP_FILE="$1"
|
PW_BACKUP_FILE="$1"
|
||||||
|
|
||||||
unset PW_SANDBOX_HOME_PATH
|
unset PW_SANDBOX_HOME_PATH
|
||||||
@@ -7685,12 +7685,12 @@ open_game_folder () {
|
|||||||
}
|
}
|
||||||
export -f open_game_folder
|
export -f open_game_folder
|
||||||
|
|
||||||
gui_wine_uninstaller () {
|
wine_uninstaller () {
|
||||||
start_portwine
|
start_portwine
|
||||||
pw_run uninstaller
|
pw_run uninstaller
|
||||||
stop_portwine --restart
|
stop_portwine --restart
|
||||||
}
|
}
|
||||||
export -f gui_wine_uninstaller
|
export -f wine_uninstaller
|
||||||
|
|
||||||
gui_open_user_conf () {
|
gui_open_user_conf () {
|
||||||
PW_USERCONF_GUI="$("${pw_yad}" --title="${translations[EDIT USER CONFIG]}" \
|
PW_USERCONF_GUI="$("${pw_yad}" --title="${translations[EDIT USER CONFIG]}" \
|
||||||
|
@@ -390,7 +390,7 @@ export SKIP_CHECK_UPDATES="1"
|
|||||||
[[ "$MISSING_DESKTOP_FILE" == "1" ]] && portwine_missing_shortcut
|
[[ "$MISSING_DESKTOP_FILE" == "1" ]] && portwine_missing_shortcut
|
||||||
|
|
||||||
if [[ $(basename "${portwine_exe,,}") =~ .ppack$ ]] ; then
|
if [[ $(basename "${portwine_exe,,}") =~ .ppack$ ]] ; then
|
||||||
if ! pw_unpack_prefix_cli "$portwine_exe" ; then
|
if ! pw_unpack_prefix "$portwine_exe" ; then
|
||||||
yad_error "${translations[Unpack has FAILED for prefix:]} <b>\"${PW_PREFIX_NAME}\"</b>."
|
yad_error "${translations[Unpack has FAILED for prefix:]} <b>\"${PW_PREFIX_NAME}\"</b>."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
@@ -403,6 +403,16 @@ fi
|
|||||||
|
|
||||||
### CLI ###
|
### CLI ###
|
||||||
|
|
||||||
|
if [[ ${1,,} == "cli" ]] ; then
|
||||||
|
export PW_CLI="1"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
get_wine_and_pfx () {
|
||||||
|
[[ -n $1 ]] && export PW_WINE_USE="$1"
|
||||||
|
[[ -n $2 ]] && export PW_PREFIX_NAME="$2"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--help)
|
--help)
|
||||||
help_info () {
|
help_info () {
|
||||||
@@ -446,13 +456,6 @@ $(echo $files_from_autoinstall | awk '{for (i = 1; i <= NF; i++) {if (i % 10 ==
|
|||||||
/usr/bin/env bash -c "${pw_full_command_line[@]}" 2>&1 | tee "$PORT_WINE_PATH/scripts-debug.log" &
|
/usr/bin/env bash -c "${pw_full_command_line[@]}" 2>&1 | tee "$PORT_WINE_PATH/scripts-debug.log" &
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--server-file-access)
|
|
||||||
echo
|
|
||||||
curl -s --list-only "https://cloud.linux-gaming.ru/log/$(date +20%y_%m)_file_access.log" | sort -V -k 2,2 \
|
|
||||||
| sed 's/count=//g' | awk '{a=$1; $1=$2; $2=a} 1' | awk 'BEGIN {print "Count: Name:"} {print}' | column -t
|
|
||||||
echo
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
--update)
|
--update)
|
||||||
gui_pw_update
|
gui_pw_update
|
||||||
;;
|
;;
|
||||||
@@ -468,14 +471,47 @@ $(echo $files_from_autoinstall | awk '{for (i = 1; i <= NF; i++) {if (i % 10 ==
|
|||||||
;;
|
;;
|
||||||
--backup-prefix)
|
--backup-prefix)
|
||||||
# portproton --backup-prefix <PREFIX_NAME> <BACKUP_DIR>
|
# portproton --backup-prefix <PREFIX_NAME> <BACKUP_DIR>
|
||||||
pw_create_prefix_backup_cli "$2" "$3"
|
pw_create_prefix_backup "$2" "$3"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
--restore-prefix)
|
--restore-prefix)
|
||||||
# portproton --restore-prefix <PREFIX_BACKUP_FILE.ppack>
|
# portproton --restore-prefix <PREFIX_BACKUP_FILE.ppack>
|
||||||
pw_unpack_prefix_cli "$2"
|
pw_unpack_prefix "$2"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
|
--winefile)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
pw_winefile
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--winecfg)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
pw_winecfg
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--winecmd)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
pw_winecmd
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--winereg)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
pw_winereg
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--wine_uninstaller)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
wine_uninstaller
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--clear_pfx)
|
||||||
|
get_wine_and_pfx "$2" "$3"
|
||||||
|
clear_pfx
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--initial)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
### GUI ###
|
### GUI ###
|
||||||
@@ -820,7 +856,7 @@ else
|
|||||||
--field=" Winetricks!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run winetricks to install additional libraries to the selected prefix]}":"FBTN" '@bash -c "button_click --normal WINETRICKS"' \
|
--field=" Winetricks!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run winetricks to install additional libraries to the selected prefix]}":"FBTN" '@bash -c "button_click --normal WINETRICKS"' \
|
||||||
--field=" ${translations[Clear prefix]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Clear the prefix to fix problems]}":"FBTN" '@bash -c "button_click --normal gui_clear_pfx"' \
|
--field=" ${translations[Clear prefix]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Clear the prefix to fix problems]}":"FBTN" '@bash -c "button_click --normal gui_clear_pfx"' \
|
||||||
--field=" ${translations[Get other Wine]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Open the menu to download other versions of WINE or PROTON]}":"FBTN" '@bash -c "button_click --normal gui_proton_downloader"' \
|
--field=" ${translations[Get other Wine]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Open the menu to download other versions of WINE or PROTON]}":"FBTN" '@bash -c "button_click --normal gui_proton_downloader"' \
|
||||||
--field=" ${translations[Uninstaller]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run the program uninstaller built into wine]}":"FBTN" '@bash -c "button_click --normal gui_wine_uninstaller"' \
|
--field=" ${translations[Uninstaller]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run the program uninstaller built into wine]}":"FBTN" '@bash -c "button_click --normal wine_uninstaller"' \
|
||||||
--field=" ${translations[Prefix Manager]} !$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run winecfg to edit the settings of the selected prefix]}":"FBTN" '@bash -c "button_click --normal WINECFG"' \
|
--field=" ${translations[Prefix Manager]} !$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run winecfg to edit the settings of the selected prefix]}":"FBTN" '@bash -c "button_click --normal WINECFG"' \
|
||||||
--field=" ${translations[File Manager]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run wine file manager]}":"FBTN" '@bash -c "button_click --normal WINEFILE"' \
|
--field=" ${translations[File Manager]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run wine file manager]}":"FBTN" '@bash -c "button_click --normal WINEFILE"' \
|
||||||
--field=" ${translations[Command line]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run wine cmd]}":"FBTN" '@bash -c "button_click --normal WINECMD"' \
|
--field=" ${translations[Command line]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png!${translations[Run wine cmd]}":"FBTN" '@bash -c "button_click --normal WINECMD"' \
|
||||||
@@ -959,7 +995,7 @@ case "$PW_YAD_SET" in
|
|||||||
gui_proton_downloader|WINETRICKS|\
|
gui_proton_downloader|WINETRICKS|\
|
||||||
116|pw_create_prefix_backup|\
|
116|pw_create_prefix_backup|\
|
||||||
gui_clear_pfx|WINEREG|WINECMD|\
|
gui_clear_pfx|WINEREG|WINECMD|\
|
||||||
WINEFILE|WINECFG|gui_wine_uninstaller)
|
WINEFILE|WINECFG|wine_uninstaller)
|
||||||
if [[ -z $PW_DESKTOP_FILES ]] ; then
|
if [[ -z $PW_DESKTOP_FILES ]] ; then
|
||||||
export TAB_MAIN_MENU="3"
|
export TAB_MAIN_MENU="3"
|
||||||
else
|
else
|
||||||
@@ -988,7 +1024,7 @@ case "$PW_YAD_SET" in
|
|||||||
WINETRICKS|116) pw_prefix_manager ;;
|
WINETRICKS|116) pw_prefix_manager ;;
|
||||||
gui_clear_pfx) gui_clear_pfx ;;
|
gui_clear_pfx) gui_clear_pfx ;;
|
||||||
gui_open_user_conf) gui_open_user_conf ;;
|
gui_open_user_conf) gui_open_user_conf ;;
|
||||||
gui_wine_uninstaller) gui_wine_uninstaller ;;
|
wine_uninstaller) wine_uninstaller ;;
|
||||||
gui_rm_portproton) gui_rm_portproton ;;
|
gui_rm_portproton) gui_rm_portproton ;;
|
||||||
gui_pw_reinstall_pp) pw_reinstall_pp ;;
|
gui_pw_reinstall_pp) pw_reinstall_pp ;;
|
||||||
gui_pw_update) gui_pw_update ;;
|
gui_pw_update) gui_pw_update ;;
|
||||||
|
Reference in New Issue
Block a user