mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-03 21:57:18 +02:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
11d124cd0f
commit
deec2641b7
@ -71,20 +71,20 @@ function inqMenu() {
|
|||||||
# Each option is enclosed in double quotes within the output string.
|
# Each option is enclosed in double quotes within the output string.
|
||||||
# For example: '"Option 1 " "The Second Option " " Option Number 3 "'
|
# For example: '"Option 1 " "The Second Option " " Option Number 3 "'
|
||||||
SELECTED_OPTIONS_STRING=$(dialog \
|
SELECTED_OPTIONS_STRING=$(dialog \
|
||||||
--keep-tite \
|
--keep-tite \
|
||||||
--clear \
|
--clear \
|
||||||
--no-shadow \
|
--no-shadow \
|
||||||
--menu \
|
--menu \
|
||||||
"$DIALOG_TEXT" \
|
"$DIALOG_TEXT" \
|
||||||
"$DIALOG_HEIGHT" \
|
"$DIALOG_HEIGHT" \
|
||||||
"$DIALOG_WIDTH" \
|
"$DIALOG_WIDTH" \
|
||||||
"$OPTION_NUMBER" \
|
"$OPTION_NUMBER" \
|
||||||
"${DIALOG_OPTIONS[@]}" \
|
"${DIALOG_OPTIONS[@]}" \
|
||||||
2>&1 >/dev/tty) || exit 0
|
2>&1 >/dev/tty) || exit 0
|
||||||
|
|
||||||
# Remove white space added previously.
|
# Remove white space added previously.
|
||||||
RETURN_STRING=$(echo "$SELECTED_OPTIONS_STRING" | \
|
RETURN_STRING=$(echo "$SELECTED_OPTIONS_STRING" | \
|
||||||
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
||||||
|
|
||||||
# Remove escapes (introduced by 'dialog' if options have parentheses).
|
# Remove escapes (introduced by 'dialog' if options have parentheses).
|
||||||
RETURN_STRING="${RETURN_STRING//\\/}" # ${variable//search/replace}
|
RETURN_STRING="${RETURN_STRING//\\/}" # ${variable//search/replace}
|
||||||
@ -154,16 +154,16 @@ function inqChkBx() {
|
|||||||
# Each option is enclosed in double quotes within the output string.
|
# Each option is enclosed in double quotes within the output string.
|
||||||
# For example: '"Option 1 " "The Second Option " " Option Number 3 "'
|
# For example: '"Option 1 " "The Second Option " " Option Number 3 "'
|
||||||
SELECTED_OPTIONS_STRING=$(dialog \
|
SELECTED_OPTIONS_STRING=$(dialog \
|
||||||
--keep-tite \
|
--keep-tite \
|
||||||
--clear \
|
--clear \
|
||||||
--no-shadow \
|
--no-shadow \
|
||||||
--checklist \
|
--checklist \
|
||||||
"$DIALOG_TEXT" \
|
"$DIALOG_TEXT" \
|
||||||
"$DIALOG_HEIGHT" \
|
"$DIALOG_HEIGHT" \
|
||||||
"$DIALOG_WIDTH" \
|
"$DIALOG_WIDTH" \
|
||||||
"$OPTION_NUMBER" \
|
"$OPTION_NUMBER" \
|
||||||
"${DIALOG_OPTIONS[@]}" \
|
"${DIALOG_OPTIONS[@]}" \
|
||||||
2>&1 >/dev/tty) || exit 0
|
2>&1 >/dev/tty) || exit 0
|
||||||
|
|
||||||
# Convert the output string into an array.
|
# Convert the output string into an array.
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
@ -178,7 +178,7 @@ function inqChkBx() {
|
|||||||
# Remove white space added previously.
|
# Remove white space added previously.
|
||||||
# shellcheck disable=SC2001
|
# shellcheck disable=SC2001
|
||||||
RETURN_ARRAY[i]=$(echo "${RETURN_ARRAY[i]}" | \
|
RETURN_ARRAY[i]=$(echo "${RETURN_ARRAY[i]}" | \
|
||||||
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
||||||
|
|
||||||
# Remove escapes (introduced by 'dialog' if options have parentheses).
|
# Remove escapes (introduced by 'dialog' if options have parentheses).
|
||||||
RETURN_ARRAY[i]=${RETURN_ARRAY[i]//\\/} # ${variable//search/replace}
|
RETURN_ARRAY[i]=${RETURN_ARRAY[i]//\\/} # ${variable//search/replace}
|
||||||
|
66
installer.sh
66
installer.sh
@ -69,7 +69,7 @@ readonly INQUIRER_PATH="./install/inquirer.sh"
|
|||||||
readonly VM_NAME="RDPWindows" # Name of the Windows VM.
|
readonly VM_NAME="RDPWindows" # Name of the Windows VM.
|
||||||
readonly RDP_PORT=3389 # Port used for RDP on the Windows VM.
|
readonly RDP_PORT=3389 # Port used for RDP on the Windows VM.
|
||||||
readonly WINAPPS_CONFIG="\
|
readonly WINAPPS_CONFIG="\
|
||||||
RDP_USER=\"MyWindowsUser\"
|
RDP_USER=\"MyWindowsUser\"
|
||||||
RDP_PASS=\"MyWindowsPassword\"
|
RDP_PASS=\"MyWindowsPassword\"
|
||||||
#RDP_DOMAIN=\"MYDOMAIN\"
|
#RDP_DOMAIN=\"MYDOMAIN\"
|
||||||
#RDP_IP=\"192.168.123.111\"
|
#RDP_IP=\"192.168.123.111\"
|
||||||
@ -919,16 +919,16 @@ function waConfigureWindows() {
|
|||||||
# Populate variables.
|
# Populate variables.
|
||||||
WIN_BASH="\
|
WIN_BASH="\
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
${BIN_PATH}/winapps windows"
|
${BIN_PATH}/winapps windows"
|
||||||
WIN_DESKTOP="\
|
WIN_DESKTOP="\
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Windows
|
Name=Windows
|
||||||
Exec=${BIN_PATH}/winapps windows %F
|
Exec=${BIN_PATH}/winapps windows %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=${APPDATA_PATH}/icons/windows.svg
|
Icon=${APPDATA_PATH}/icons/windows.svg
|
||||||
StartupWMClass=Microsoft Windows
|
StartupWMClass=Microsoft Windows
|
||||||
Comment=Microsoft Windows VM"
|
Comment=Microsoft Windows VM"
|
||||||
|
|
||||||
# Copy the 'Windows' icon.
|
# Copy the 'Windows' icon.
|
||||||
$SUDO cp "./icons/windows.svg" "${APPDATA_PATH}/icons/windows.svg"
|
$SUDO cp "./icons/windows.svg" "${APPDATA_PATH}/icons/windows.svg"
|
||||||
@ -969,21 +969,21 @@ function waConfigureApp() {
|
|||||||
|
|
||||||
# Determine the content of the bash script for the application.
|
# Determine the content of the bash script for the application.
|
||||||
APP_BASH="\
|
APP_BASH="\
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
${BIN_PATH}/winapps ${1}"
|
${BIN_PATH}/winapps ${1}"
|
||||||
|
|
||||||
# Determine the content of the '.desktop' file for the application.
|
# Determine the content of the '.desktop' file for the application.
|
||||||
APP_DESKTOP_FILE="\
|
APP_DESKTOP_FILE="\
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=${NAME}
|
Name=${NAME}
|
||||||
Exec=${BIN_PATH}/winapps ${1} %F
|
Exec=${BIN_PATH}/winapps ${1} %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=${APP_ICON}
|
Icon=${APP_ICON}
|
||||||
StartupWMClass=${FULL_NAME}
|
StartupWMClass=${FULL_NAME}
|
||||||
Comment=${FULL_NAME}
|
Comment=${FULL_NAME}
|
||||||
Categories=${CATEGORIES}
|
Categories=${CATEGORIES}
|
||||||
MimeType=${MIME_TYPES}"
|
MimeType=${MIME_TYPES}"
|
||||||
|
|
||||||
# Store the '.desktop' file for the application.
|
# Store the '.desktop' file for the application.
|
||||||
echo "$APP_DESKTOP_FILE" | $SUDO tee "${APP_PATH}/${1}.desktop" &>/dev/null
|
echo "$APP_DESKTOP_FILE" | $SUDO tee "${APP_PATH}/${1}.desktop" &>/dev/null
|
||||||
@ -1193,16 +1193,16 @@ function waConfigureDetectedApps() {
|
|||||||
|
|
||||||
# Determine the content of the '.desktop' file for the application.
|
# Determine the content of the '.desktop' file for the application.
|
||||||
APP_DESKTOP_FILE="\
|
APP_DESKTOP_FILE="\
|
||||||
# GNOME Shortcut Name
|
# GNOME Shortcut Name
|
||||||
NAME=\"${PROGRAM_NAME}\"
|
NAME=\"${PROGRAM_NAME}\"
|
||||||
# Used for Descriptions and Window Class
|
# Used for Descriptions and Window Class
|
||||||
FULL_NAME=\"${PROGRAM_NAME}\"
|
FULL_NAME=\"${PROGRAM_NAME}\"
|
||||||
# Executable within Windows VM
|
# Executable within Windows VM
|
||||||
WIN_EXECUTABLE=\"${EXES[$INDEX]}\"
|
WIN_EXECUTABLE=\"${EXES[$INDEX]}\"
|
||||||
# GNOME Categories
|
# GNOME Categories
|
||||||
CATEGORIES=\"WinApps\"
|
CATEGORIES=\"WinApps\"
|
||||||
# GNOME MIME Types
|
# GNOME MIME Types
|
||||||
MIME_TYPES=\"\""
|
MIME_TYPES=\"\""
|
||||||
|
|
||||||
# Store the '.desktop' file for the application.
|
# Store the '.desktop' file for the application.
|
||||||
echo "$APP_DESKTOP_FILE" | $SUDO tee "${APPDATA_PATH}/apps/${EXE_FILENAME_NOEXT}/info" &>/dev/null
|
echo "$APP_DESKTOP_FILE" | $SUDO tee "${APPDATA_PATH}/apps/${EXE_FILENAME_NOEXT}/info" &>/dev/null
|
||||||
@ -1366,7 +1366,7 @@ function waUninstall() {
|
|||||||
### SEQUENTIAL LOGIC ###
|
### SEQUENTIAL LOGIC ###
|
||||||
# Welcome the user.
|
# Welcome the user.
|
||||||
echo -e "${BOLD_TEXT}\
|
echo -e "${BOLD_TEXT}\
|
||||||
################################################################################
|
################################################################################
|
||||||
# #
|
# #
|
||||||
# WinApps Install Wizard #
|
# WinApps Install Wizard #
|
||||||
# #
|
# #
|
||||||
|
Loading…
x
Reference in New Issue
Block a user