add many fixes based on precommit
0
apps/acrobat-x-pro/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
apps/adobe-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 329 B |
0
apps/aftereffects-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 917 B |
0
apps/audition-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 329 B |
0
apps/bridge-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
apps/bridge-cs6-x86/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
apps/bridge-cs6/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
apps/illustrator-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 682 B |
0
apps/indesign-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 812 B |
0
apps/lightroom-cc/icon.svg
Executable file → Normal file
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 628 B |
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
||||||
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 587 B |
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
||||||
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 587 B |
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
||||||
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 587 B |
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
||||||
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
<path d="M496 819q49 0 78 19t29 72q0 23-10 37t-27 24-36 12-38 4h-92V819h96zm1552-482v1374q0 33-24 57t-57 24h-175v41q0 36-25 61t-62 26H599q-36 0-61-25t-26-62v-297H85q-35 0-60-25t-25-60V597q0-35 25-60t60-25h427V215q0-36 25-61t62-26h1106q36 0 61 25t26 62v41h175q33 0 57 24t24 57zM767 905q0-58-19-99t-54-68-80-38-100-12H243v671h157v-234h106q49 0 95-14t84-42 59-69 23-95zm897 887v-256H640v256h1024zm0-384v-320h-640v320h640zm0-448V256H640v256h299q35 0 60 25t25 60v363h640zm256 704V384h-128v1280h128z" fill="#37C6D0" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 587 B |
142
bin/winapps
@ -1,75 +1,75 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ ! -f "${HOME}/.config/winapps/winapps.conf" ] && [ ! -f "${HOME}/.winapps" ]; then
|
if [ ! -f "${HOME}/.config/winapps/winapps.conf" ] && [ ! -f "${HOME}/.winapps" ]; then
|
||||||
echo "You need to create a ~/.config/winapps/winapps.conf configuration. Exiting..."
|
echo "You need to create a ~/.config/winapps/winapps.conf configuration. Exiting..."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
DIR="$(dirname "$(readlink -f "$0")")"
|
DIR="$(dirname "$(readlink -f "$0")")"
|
||||||
RUN="$(date)-${RANDOM}"
|
RUN="$(date)-${RANDOM}"
|
||||||
|
|
||||||
if [ ! -d "${HOME}/.local/share/winapps" ]; then
|
if [ ! -d "${HOME}/.local/share/winapps" ]; then
|
||||||
mkdir -p "${HOME}/.local/share/winapps"
|
mkdir -p "${HOME}/.local/share/winapps"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RDP_SCALE=100
|
RDP_SCALE=100
|
||||||
|
|
||||||
if [ -f "${HOME}/.config/winapps/winapps.conf" ]; then
|
if [ -f "${HOME}/.config/winapps/winapps.conf" ]; then
|
||||||
. "${HOME}/.config/winapps/winapps.conf"
|
. "${HOME}/.config/winapps/winapps.conf"
|
||||||
else
|
else
|
||||||
. "${HOME}/.winapps"
|
. "${HOME}/.winapps"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function dprint() {
|
function dprint() {
|
||||||
if [ "${DEBUG}" = "true" ]; then
|
if [ "${DEBUG}" = "true" ]; then
|
||||||
echo "[${RUN}] ${1}" >>"${HOME}/.local/share/winapps/winapps.log"
|
echo "[${RUN}] ${1}" >>"${HOME}/.local/share/winapps/winapps.log"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
dprint "START"
|
dprint "START"
|
||||||
|
|
||||||
if [ -f "${HOME}/.local/share/winapps/run" ]; then
|
if [ -f "${HOME}/.local/share/winapps/run" ]; then
|
||||||
LAST_RAN=$(stat -t -c %Y "${HOME}/.local/share/winapps/run")
|
LAST_RAN=$(stat -t -c %Y "${HOME}/.local/share/winapps/run")
|
||||||
dprint "LAST_RAN:${LAST_RAN}"
|
dprint "LAST_RAN:${LAST_RAN}"
|
||||||
touch "${HOME}/.local/share/winapps/run"
|
touch "${HOME}/.local/share/winapps/run"
|
||||||
THIS_RUN=$(stat -t -c %Y "${HOME}/.local/share/winapps/run")
|
THIS_RUN=$(stat -t -c %Y "${HOME}/.local/share/winapps/run")
|
||||||
dprint "THIS_RUN:${THIS_RUN}"
|
dprint "THIS_RUN:${THIS_RUN}"
|
||||||
if ((THIS_RUN - LAST_RAN < 2)); then
|
if ((THIS_RUN - LAST_RAN < 2)); then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
touch "${HOME}/.local/share/winapps/run"
|
touch "${HOME}/.local/share/winapps/run"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${FREERDP_COMMAND}" ]; then
|
if [ -z "${FREERDP_COMMAND}" ]; then
|
||||||
if command -v xfreerdp &> /dev/null
|
if command -v xfreerdp &> /dev/null
|
||||||
then
|
then
|
||||||
FREERDP_COMMAND="xfreerdp"
|
FREERDP_COMMAND="xfreerdp"
|
||||||
elif command -v xfreerdp3 &> /dev/null
|
elif command -v xfreerdp3 &> /dev/null
|
||||||
then
|
then
|
||||||
FREERDP_COMMAND="xfreerdp3"
|
FREERDP_COMMAND="xfreerdp3"
|
||||||
fi
|
fi
|
||||||
elif command -v $FREERDP_COMMAND &> /dev/null
|
elif command -v $FREERDP_COMMAND &> /dev/null
|
||||||
then
|
then
|
||||||
dprint "Using custom freerdp command ${FREERDP_COMMAND}"
|
dprint "Using custom freerdp command ${FREERDP_COMMAND}"
|
||||||
else
|
else
|
||||||
echo "You have supplied a custom FreeRDP command, but the command is not available."
|
echo "You have supplied a custom FreeRDP command, but the command is not available."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${RDP_IP}" ]; then
|
if [ -z "${RDP_IP}" ]; then
|
||||||
if [ ! "$(groups | grep -v libvirt)" ]; then
|
if [ ! "$(groups | grep -v libvirt)" ]; then
|
||||||
echo "You are not a member of the libvirt group. Run the below then reboot."
|
echo "You are not a member of the libvirt group. Run the below then reboot."
|
||||||
echo ' sudo usermod -a -G libvirt $(whoami)'
|
echo ' sudo usermod -a -G libvirt $(whoami)'
|
||||||
echo ' sudo usermod -a -G kvm $(whoami)'
|
echo ' sudo usermod -a -G kvm $(whoami)'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ ! "$(virsh list | grep -v RDPWindows)" ]; then
|
if [ ! "$(virsh list | grep -v RDPWindows)" ]; then
|
||||||
echo "RDPWindows is not running, run:"
|
echo "RDPWindows is not running, run:"
|
||||||
echo " virsh start RDPWindows"
|
echo " virsh start RDPWindows"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RDP_IP=$(virsh net-dhcp-leases default | grep RDPWindows | awk '{print $5}')
|
RDP_IP=$(virsh net-dhcp-leases default | grep RDPWindows | awk '{print $5}')
|
||||||
RDP_IP=${RDP_IP%%\/*}
|
RDP_IP=${RDP_IP%%\/*}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -81,43 +81,43 @@ dprint "@:${@}"
|
|||||||
|
|
||||||
MULTI_FLAG="+span"
|
MULTI_FLAG="+span"
|
||||||
if [ "${MULTIMON}" = "true" ]; then
|
if [ "${MULTIMON}" = "true" ]; then
|
||||||
MULTI_FLAG="/multimon"
|
MULTI_FLAG="/multimon"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${1}" = "windows" ]; then
|
if [ "${1}" = "windows" ]; then
|
||||||
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +dynamic-resolution +auto-reconnect +home-drive /wm-class:"Microsoft Windows" /v:${RDP_IP} 1>/dev/null 2>&1 &
|
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +dynamic-resolution +auto-reconnect +home-drive /wm-class:"Microsoft Windows" /v:${RDP_IP} 1>/dev/null 2>&1 &
|
||||||
elif [ "${1}" = "check" ]; then
|
elif [ "${1}" = "check" ]; then
|
||||||
dprint "CHECK"
|
dprint "CHECK"
|
||||||
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /app:program:"explorer.exe" /v:${RDP_IP}
|
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /app:program:"explorer.exe" /v:${RDP_IP}
|
||||||
elif [ "${1}" = "manual" ]; then
|
elif [ "${1}" = "manual" ]; then
|
||||||
dprint "MANUAL:${2}"
|
dprint "MANUAL:${2}"
|
||||||
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +home-drive +dynamic-resolution ${MULTI_FLAG} /app:program:"${2}" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +home-drive +dynamic-resolution ${MULTI_FLAG} /app:program:"${2}" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
||||||
elif [ "${1}" != "install" ]; then
|
elif [ "${1}" != "install" ]; then
|
||||||
dprint "DIR:${DIR}"
|
dprint "DIR:${DIR}"
|
||||||
if [ -e "${DIR}/../apps/${1}/info" ]; then
|
if [ -e "${DIR}/../apps/${1}/info" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${DIR}/../apps/${1}/info"
|
. "${DIR}/../apps/${1}/info"
|
||||||
ICON="${DIR}/../apps/${1}/icon.svg"
|
ICON="${DIR}/../apps/${1}/icon.svg"
|
||||||
elif [ -e "${HOME}/.local/share/winapps/apps/${1}/info" ]; then
|
elif [ -e "${HOME}/.local/share/winapps/apps/${1}/info" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${HOME}/.local/share/winapps/apps/${1}/info"
|
. "${HOME}/.local/share/winapps/apps/${1}/info"
|
||||||
ICON="${HOME}/.local/share/winapps/apps/${1}/icon.svg"
|
ICON="${HOME}/.local/share/winapps/apps/${1}/icon.svg"
|
||||||
elif [ -e "/usr/local/share/winapps/apps/${1}/info" ]; then
|
elif [ -e "/usr/local/share/winapps/apps/${1}/info" ]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "/usr/local/share/winapps/apps/${1}/info"
|
. "/usr/local/share/winapps/apps/${1}/info"
|
||||||
ICON="/usr/local/share/winapps/apps/${1}/icon.svg"
|
ICON="/usr/local/share/winapps/apps/${1}/icon.svg"
|
||||||
else
|
else
|
||||||
echo "You need to run 'installer.sh' first."
|
echo "You need to run 'installer.sh' first."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -n "${2}" ]; then
|
if [ -n "${2}" ]; then
|
||||||
dprint "HOME:${HOME}"
|
dprint "HOME:${HOME}"
|
||||||
FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g')
|
FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g')
|
||||||
dprint "FILE:${FILE}"
|
dprint "FILE:${FILE}"
|
||||||
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +clipboard +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:program:"${WIN_EXECUTABLE}",icon:"${ICON}",name:"${FULL_NAME}",cmd:"\"$FILE\"" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +clipboard +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:program:"${WIN_EXECUTABLE}",icon:"${ICON}",name:"${FULL_NAME}",cmd:"\"$FILE\"" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
||||||
else
|
else
|
||||||
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +clipboard +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:program:"${WIN_EXECUTABLE}",icon:"${ICON}",name:"${FULL_NAME}" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
$FREERDP_COMMAND ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /scale:${RDP_SCALE} +auto-reconnect +clipboard +home-drive -wallpaper +dynamic-resolution ${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:program:"${WIN_EXECUTABLE}",icon:"${ICON}",name:"${FULL_NAME}" /v:"${RDP_IP}" 1>/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dprint "END"
|
dprint "END"
|
||||||
|
@ -198,6 +198,3 @@ sudo systemctl restart libvirtd
|
|||||||
sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
|
sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
|
||||||
```
|
```
|
||||||
You will likely need to reboot to ensure your current shell is added to the group.
|
You will likely need to reboot to ensure your current shell is added to the group.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2048 2048">
|
||||||
<path d="M0 268l768-107v735H0V268zM1920 0v896H896V143L1920 0zM896 1024h1024v896L896 1777v-753zm-896 0h768v735L0 1652v-628z" fill="#73A1FB" />
|
<path d="M0 268l768-107v735H0V268zM1920 0v896H896V143L1920 0zM896 1024h1024v896L896 1777v-753zm-896 0h768v735L0 1652v-628z" fill="#73A1FB" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 216 B |
@ -219,4 +219,3 @@ Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\*" |
|
|||||||
"EXES+=(""$Exe"")"
|
"EXES+=(""$Exe"")"
|
||||||
"ICONS+=(""$Icon"")"
|
"ICONS+=(""$Icon"")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1186
install/inquirer.sh
554
installer.sh
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
if ! command -v bc &> /dev/null
|
if ! command -v bc &> /dev/null
|
||||||
then
|
then
|
||||||
echo "You need bc!"
|
echo "You need bc!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
||||||
@ -16,80 +16,80 @@ USEDEMO=0
|
|||||||
INSTALLED_EXES=()
|
INSTALLED_EXES=()
|
||||||
|
|
||||||
function waUsage() {
|
function waUsage() {
|
||||||
echo 'Usage:
|
echo 'Usage:
|
||||||
./installer.sh --user # Install everything in ${HOME}
|
./installer.sh --user # Install everything in ${HOME}
|
||||||
./installer.sh --system # Install everything in /usr'
|
./installer.sh --system # Install everything in /usr'
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
function waNoSudo() {
|
function waNoSudo() {
|
||||||
echo 'You are attempting to switch from a --system install to a --user install.
|
echo 'You are attempting to switch from a --system install to a --user install.
|
||||||
Please run "./installer.sh --system --uninstall" first.'
|
Please run "./installer.sh --system --uninstall" first.'
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
function waInstall() {
|
function waInstall() {
|
||||||
${SUDO} mkdir -p "${SYS_PATH}/apps"
|
${SUDO} mkdir -p "${SYS_PATH}/apps"
|
||||||
. "${DIR}/bin/winapps" install
|
. "${DIR}/bin/winapps" install
|
||||||
}
|
}
|
||||||
|
|
||||||
function waFindInstalled() {
|
function waFindInstalled() {
|
||||||
echo -n " Checking for installed apps in RDP machine (this may take a while)..."
|
echo -n " Checking for installed apps in RDP machine (this may take a while)..."
|
||||||
if [ $USEDEMO != 1 ]; then
|
if [ $USEDEMO != 1 ]; then
|
||||||
rm -f ${HOME}/.local/share/winapps/installed.bat
|
rm -f ${HOME}/.local/share/winapps/installed.bat
|
||||||
rm -f ${HOME}/.local/share/winapps/installed.tmp
|
rm -f ${HOME}/.local/share/winapps/installed.tmp
|
||||||
rm -f ${HOME}/.local/share/winapps/installed
|
rm -f ${HOME}/.local/share/winapps/installed
|
||||||
rm -f ${HOME}/.local/share/winapps/detected
|
rm -f ${HOME}/.local/share/winapps/detected
|
||||||
cp "${DIR}/install/ExtractPrograms.ps1" ${HOME}/.local/share/winapps/ExtractPrograms.ps1
|
cp "${DIR}/install/ExtractPrograms.ps1" ${HOME}/.local/share/winapps/ExtractPrograms.ps1
|
||||||
for F in $(ls "${DIR}/apps"); do
|
for F in $(ls "${DIR}/apps"); do
|
||||||
. "${DIR}/apps/${F}/info"
|
. "${DIR}/apps/${F}/info"
|
||||||
echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${F} >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp" >>${HOME}/.local/share/winapps/installed.bat
|
echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${F} >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp" >>${HOME}/.local/share/winapps/installed.bat
|
||||||
done
|
done
|
||||||
echo "powershell.exe -ExecutionPolicy Bypass -File \\\\tsclient\\home\\.local\\share\\winapps\\ExtractPrograms.ps1 > \\\\tsclient\home\\.local\\share\\winapps\\detected" >>${HOME}/.local/share/winapps/installed.bat
|
echo "powershell.exe -ExecutionPolicy Bypass -File \\\\tsclient\\home\\.local\\share\\winapps\\ExtractPrograms.ps1 > \\\\tsclient\home\\.local\\share\\winapps\\detected" >>${HOME}/.local/share/winapps/installed.bat
|
||||||
echo "RENAME \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp installed" >>${HOME}/.local/share/winapps/installed.bat
|
echo "RENAME \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp installed" >>${HOME}/.local/share/winapps/installed.bat
|
||||||
$FREERDP_COMMAND /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" +auto-reconnect +home-drive -wallpaper +span /app:program:"C:\Windows\System32\cmd.exe",cmd:"/C \\\\tsclient\\home\\.local\\share\\winapps\\installed.bat" /v:${RDP_IP} 1>/dev/null 2>&1 &
|
$FREERDP_COMMAND /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" +auto-reconnect +home-drive -wallpaper +span /app:program:"C:\Windows\System32\cmd.exe",cmd:"/C \\\\tsclient\\home\\.local\\share\\winapps\\installed.bat" /v:${RDP_IP} 1>/dev/null 2>&1 &
|
||||||
COUNT=0
|
COUNT=0
|
||||||
while [ ! -f "${HOME}/.local/share/winapps/installed" ]; do
|
while [ ! -f "${HOME}/.local/share/winapps/installed" ]; do
|
||||||
sleep 5
|
sleep 5
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
if ((COUNT == 15)); then
|
if ((COUNT == 15)); then
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
echo ""
|
echo ""
|
||||||
echo "The RDP connection failed to connect or run. Please confirm FreeRDP can connect with:"
|
echo "The RDP connection failed to connect or run. Please confirm FreeRDP can connect with:"
|
||||||
echo " bin/winapps check"
|
echo " bin/winapps check"
|
||||||
echo ""
|
echo ""
|
||||||
echo "If it cannot connect, this is most likely due to:"
|
echo "If it cannot connect, this is most likely due to:"
|
||||||
echo " - You need to accept the security cert the first time you connect (with 'check')"
|
echo " - You need to accept the security cert the first time you connect (with 'check')"
|
||||||
echo " - Not enabling RDP in the Windows VM"
|
echo " - Not enabling RDP in the Windows VM"
|
||||||
echo " - Not being able to connect to the IP of the VM"
|
echo " - Not being able to connect to the IP of the VM"
|
||||||
echo " - Incorrect user credentials in winapps.conf"
|
echo " - Incorrect user credentials in winapps.conf"
|
||||||
echo " - Not merging install/RDPApps.reg into the VM"
|
echo " - Not merging install/RDPApps.reg into the VM"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $MAKEDEMO = 1 ]; then
|
if [ $MAKEDEMO = 1 ]; then
|
||||||
rm -rf /tmp/winapps_demo
|
rm -rf /tmp/winapps_demo
|
||||||
cp -a ${HOME}/.local/share/winapps /tmp/winapps_demo
|
cp -a ${HOME}/.local/share/winapps /tmp/winapps_demo
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm -rf ${HOME}/.local/share/winapps
|
rm -rf ${HOME}/.local/share/winapps
|
||||||
cp -a /tmp/winapps_demo ${HOME}/.local/share/winapps
|
cp -a /tmp/winapps_demo ${HOME}/.local/share/winapps
|
||||||
#sleep 3
|
#sleep 3
|
||||||
fi
|
fi
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureApp() {
|
function waConfigureApp() {
|
||||||
if [ -z "${ICON}" ]; then
|
if [ -z "${ICON}" ]; then
|
||||||
ICON=${SYS_PATH}/apps/${1}/icon.${2}
|
ICON=${SYS_PATH}/apps/${1}/icon.${2}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. "${SYS_PATH}/apps/${1}/info"
|
. "${SYS_PATH}/apps/${1}/info"
|
||||||
echo -n " Configuring ${NAME}..."
|
echo -n " Configuring ${NAME}..."
|
||||||
if [ ${USEDEMO} != 1 ]; then
|
if [ ${USEDEMO} != 1 ]; then
|
||||||
${SUDO} rm -f "${APP_PATH}/${1}.desktop"
|
${SUDO} rm -f "${APP_PATH}/${1}.desktop"
|
||||||
echo "[Desktop Entry]
|
echo "[Desktop Entry]
|
||||||
Name=${NAME}
|
Name=${NAME}
|
||||||
Exec=${BIN_PATH}/winapps ${1} %F
|
Exec=${BIN_PATH}/winapps ${1} %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
@ -99,119 +99,119 @@ StartupWMClass=${FULL_NAME}
|
|||||||
Comment=${FULL_NAME}
|
Comment=${FULL_NAME}
|
||||||
Categories=${CATEGORIES}
|
Categories=${CATEGORIES}
|
||||||
MimeType=${MIME_TYPES}
|
MimeType=${MIME_TYPES}
|
||||||
" | ${SUDO} tee "${APP_PATH}/${1}.desktop" >/dev/null
|
" | ${SUDO} tee "${APP_PATH}/${1}.desktop" >/dev/null
|
||||||
${SUDO} rm -f "${BIN_PATH}/${1}"
|
${SUDO} rm -f "${BIN_PATH}/${1}"
|
||||||
echo "#!/usr/bin/env bash
|
echo "#!/usr/bin/env bash
|
||||||
${BIN_PATH}/winapps ${1} $@
|
${BIN_PATH}/winapps ${1} $@
|
||||||
" | ${SUDO} tee "${BIN_PATH}/${1}" >/dev/null
|
" | ${SUDO} tee "${BIN_PATH}/${1}" >/dev/null
|
||||||
${SUDO} chmod a+x "${BIN_PATH}/${1}"
|
${SUDO} chmod a+x "${BIN_PATH}/${1}"
|
||||||
fi
|
fi
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
|
|
||||||
ICON=""
|
ICON=""
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureApps() {
|
function waConfigureApps() {
|
||||||
APPS=()
|
APPS=()
|
||||||
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
||||||
. "${DIR}/apps/${F}/info"
|
. "${DIR}/apps/${F}/info"
|
||||||
APPS+=("${FULL_NAME} (${F})")
|
APPS+=("${FULL_NAME} (${F})")
|
||||||
INSTALLED_EXES+=("$(echo "${WIN_EXECUTABLE##*\\}" | tr '[:upper:]' '[:lower:]')")
|
INSTALLED_EXES+=("$(echo "${WIN_EXECUTABLE##*\\}" | tr '[:upper:]' '[:lower:]')")
|
||||||
done
|
done
|
||||||
IFS=$'\n' APPS=($(sort <<<"${APPS[*]}"))
|
IFS=$'\n' APPS=($(sort <<<"${APPS[*]}"))
|
||||||
unset IFS
|
unset IFS
|
||||||
OPTIONS=("Set up all detected pre-configured applications" "Select which pre-configured applications to set up" "Do not set up any pre-configured applications")
|
OPTIONS=("Set up all detected pre-configured applications" "Select which pre-configured applications to set up" "Do not set up any pre-configured applications")
|
||||||
|
|
||||||
if [ "${INSTALL_TYPE}" != 'User' ]; then
|
if [ "${INSTALL_TYPE}" != 'User' ]; then
|
||||||
menuFromArr APP_INSTALL "How would you like to handle WinApps pre-configured applications?" "${OPTIONS[@]}"
|
menuFromArr APP_INSTALL "How would you like to handle WinApps pre-configured applications?" "${OPTIONS[@]}"
|
||||||
else "grep -l -d skip"
|
else "grep -l -d skip"
|
||||||
menuFromArr APP_INSTALL "How would you like to handle WinApps pre-configured applications? If any web browser is set-up, may be configured as default browser." "${OPTIONS[@]}"
|
menuFromArr APP_INSTALL "How would you like to handle WinApps pre-configured applications? If any web browser is set-up, may be configured as default browser." "${OPTIONS[@]}"
|
||||||
fi
|
fi
|
||||||
if [ "${APP_INSTALL}" = "Select which pre-configured applications to set up" ]; then
|
if [ "${APP_INSTALL}" = "Select which pre-configured applications to set up" ]; then
|
||||||
checkbox_input "Which pre-configured apps would you like to set up?" APPS SELECTED_APPS
|
checkbox_input "Which pre-configured apps would you like to set up?" APPS SELECTED_APPS
|
||||||
echo "" >"${HOME}/.local/share/winapps/installed"
|
echo "" >"${HOME}/.local/share/winapps/installed"
|
||||||
for F in "${SELECTED_APPS[@]}"; do
|
for F in "${SELECTED_APPS[@]}"; do
|
||||||
APP="${F##*(}"
|
APP="${F##*(}"
|
||||||
APP="${APP%%)}"
|
APP="${APP%%)}"
|
||||||
echo "${APP}" >>"${HOME}/.local/share/winapps/installed"
|
echo "${APP}" >>"${HOME}/.local/share/winapps/installed"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
${SUDO} cp "${DIR}/bin/winapps" "${BIN_PATH}/winapps"
|
${SUDO} cp "${DIR}/bin/winapps" "${BIN_PATH}/winapps"
|
||||||
COUNT=0
|
COUNT=0
|
||||||
if [ "${APP_INSTALL}" != "Do not set up any pre-configured applications" ]; then
|
if [ "${APP_INSTALL}" != "Do not set up any pre-configured applications" ]; then
|
||||||
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
${SUDO} cp -r "apps/${F}" "${SYS_PATH}/apps"
|
${SUDO} cp -r "apps/${F}" "${SYS_PATH}/apps"
|
||||||
waConfigureApp "${F}" svg
|
waConfigureApp "${F}" svg
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
rm -f "${HOME}/.local/share/winapps/installed"
|
rm -f "${HOME}/.local/share/winapps/installed"
|
||||||
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
||||||
if (($COUNT == 0)); then
|
if (($COUNT == 0)); then
|
||||||
echo " No configured applications."
|
echo " No configured applications."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureAppsAllOfficiallySupported(){
|
function waConfigureAppsAllOfficiallySupported(){
|
||||||
${SUDO} cp "${DIR}/bin/winapps" "${BIN_PATH}/winapps"
|
${SUDO} cp "${DIR}/bin/winapps" "${BIN_PATH}/winapps"
|
||||||
COUNT=0
|
COUNT=0
|
||||||
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
for F in $(cat "${HOME}/.local/share/winapps/installed" | sed 's/\r/\n/g'); do
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
${SUDO} cp -r "apps/${F}" "${SYS_PATH}/apps"
|
${SUDO} cp -r "apps/${F}" "${SYS_PATH}/apps"
|
||||||
waConfigureApp "${F}" svg
|
waConfigureApp "${F}" svg
|
||||||
done
|
done
|
||||||
rm -f "${HOME}/.local/share/winapps/installed"
|
rm -f "${HOME}/.local/share/winapps/installed"
|
||||||
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
||||||
if (($COUNT == 0)); then
|
if (($COUNT == 0)); then
|
||||||
echo " No configured applications."
|
echo " No configured applications."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureDetectedApps() {
|
function waConfigureDetectedApps() {
|
||||||
if [ -f "${HOME}/.local/share/winapps/detected" ]; then
|
if [ -f "${HOME}/.local/share/winapps/detected" ]; then
|
||||||
sed -i 's/\r//g' "${HOME}/.local/share/winapps/detected"
|
sed -i 's/\r//g' "${HOME}/.local/share/winapps/detected"
|
||||||
. "${HOME}/.local/share/winapps/detected"
|
. "${HOME}/.local/share/winapps/detected"
|
||||||
APPS=()
|
APPS=()
|
||||||
for I in "${!NAMES[@]}"; do
|
for I in "${!NAMES[@]}"; do
|
||||||
EXE=${EXES[$I]##*\\}
|
EXE=${EXES[$I]##*\\}
|
||||||
EXE_LOWER=$(echo "${EXE}" | tr '[:upper:]' '[:lower:]')
|
EXE_LOWER=$(echo "${EXE}" | tr '[:upper:]' '[:lower:]')
|
||||||
if (
|
if (
|
||||||
dlm=$'\x1F'
|
dlm=$'\x1F'
|
||||||
IFS="$dlm"
|
IFS="$dlm"
|
||||||
[[ "$dlm${INSTALLED_EXES[*]}$dlm" != *"$dlm${EXE_LOWER}$dlm"* ]]
|
[[ "$dlm${INSTALLED_EXES[*]}$dlm" != *"$dlm${EXE_LOWER}$dlm"* ]]
|
||||||
); then
|
); then
|
||||||
APPS+=("${NAMES[$I]} (${EXE})")
|
APPS+=("${NAMES[$I]} (${EXE})")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
IFS=$'\n' APPS=($(sort <<<"${APPS[*]}"))
|
IFS=$'\n' APPS=($(sort <<<"${APPS[*]}"))
|
||||||
unset IFS
|
unset IFS
|
||||||
OPTIONS=("Set up all detected applications" "Select which applications to set up" "Do not set up any applications")
|
OPTIONS=("Set up all detected applications" "Select which applications to set up" "Do not set up any applications")
|
||||||
menuFromArr APP_INSTALL "How would you like to handle other detected applications?" "${OPTIONS[@]}"
|
menuFromArr APP_INSTALL "How would you like to handle other detected applications?" "${OPTIONS[@]}"
|
||||||
if [ "${APP_INSTALL}" = "Select which applications to set up" ]; then
|
if [ "${APP_INSTALL}" = "Select which applications to set up" ]; then
|
||||||
checkbox_input "Which other apps would you like to set up?" APPS SELECTED_APPS
|
checkbox_input "Which other apps would you like to set up?" APPS SELECTED_APPS
|
||||||
echo "" >"${HOME}/.local/share/winapps/installed"
|
echo "" >"${HOME}/.local/share/winapps/installed"
|
||||||
for F in "${SELECTED_APPS[@]}"; do
|
for F in "${SELECTED_APPS[@]}"; do
|
||||||
EXE="${F##*(}"
|
EXE="${F##*(}"
|
||||||
EXE="${EXE%%)}"
|
EXE="${EXE%%)}"
|
||||||
APP="${F% (*}"
|
APP="${F% (*}"
|
||||||
echo "${EXE}|${APP}" >>"${HOME}/.local/share/winapps/installed"
|
echo "${EXE}|${APP}" >>"${HOME}/.local/share/winapps/installed"
|
||||||
done
|
done
|
||||||
elif [ "${APP_INSTALL}" = "Set up all detected applications" ]; then
|
elif [ "${APP_INSTALL}" = "Set up all detected applications" ]; then
|
||||||
for I in "${!EXES[@]}"; do
|
for I in "${!EXES[@]}"; do
|
||||||
EXE=${EXES[$I]##*\\}
|
EXE=${EXES[$I]##*\\}
|
||||||
echo "${EXE}|${NAMES[$I]}" >>"${HOME}/.local/share/winapps/installed"
|
echo "${EXE}|${NAMES[$I]}" >>"${HOME}/.local/share/winapps/installed"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
COUNT=0
|
COUNT=0
|
||||||
if [ -f "${HOME}/.local/share/winapps/installed" ]; then
|
if [ -f "${HOME}/.local/share/winapps/installed" ]; then
|
||||||
while read LINE; do
|
while read LINE; do
|
||||||
EXE="${LINE%|*}"
|
EXE="${LINE%|*}"
|
||||||
NAME="${LINE#*|}"
|
NAME="${LINE#*|}"
|
||||||
for I in "${!NAMES[@]}"; do
|
for I in "${!NAMES[@]}"; do
|
||||||
if [ "${NAME}" = "${NAMES[$I]}" ] && [[ "${EXES[$I]}" == *"\\${EXE}" ]]; then
|
if [ "${NAME}" = "${NAMES[$I]}" ] && [[ "${EXES[$I]}" == *"\\${EXE}" ]]; then
|
||||||
EXE=$(echo "${EXE}" | tr '[:upper:]' '[:lower:]')
|
EXE=$(echo "${EXE}" | tr '[:upper:]' '[:lower:]')
|
||||||
${SUDO} mkdir -p "${SYS_PATH}/apps/${EXE}"
|
${SUDO} mkdir -p "${SYS_PATH}/apps/${EXE}"
|
||||||
echo "# GNOME shortcut name
|
echo "# GNOME shortcut name
|
||||||
NAME=\"${NAME}\"
|
NAME=\"${NAME}\"
|
||||||
|
|
||||||
# Used for descriptions and window class
|
# Used for descriptions and window class
|
||||||
@ -225,29 +225,29 @@ CATEGORIES=\"WinApps\"
|
|||||||
|
|
||||||
# GNOME mimetypes
|
# GNOME mimetypes
|
||||||
MIME_TYPES=\"\"
|
MIME_TYPES=\"\"
|
||||||
" | sudo tee "${SYS_PATH}/apps/${EXE}/info" >/dev/null
|
" | sudo tee "${SYS_PATH}/apps/${EXE}/info" >/dev/null
|
||||||
echo "${ICONS[$I]}" | base64 -d | sudo tee "${SYS_PATH}/apps/${EXE}/icon.ico" >/dev/null
|
echo "${ICONS[$I]}" | base64 -d | sudo tee "${SYS_PATH}/apps/${EXE}/icon.ico" >/dev/null
|
||||||
waConfigureApp "${EXE}" ico
|
waConfigureApp "${EXE}" ico
|
||||||
COUNT=$((COUNT + 1))
|
COUNT=$((COUNT + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done <"${HOME}/.local/share/winapps/installed"
|
done <"${HOME}/.local/share/winapps/installed"
|
||||||
rm -f "${HOME}/.local/share/winapps/installed"
|
rm -f "${HOME}/.local/share/winapps/installed"
|
||||||
fi
|
fi
|
||||||
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
rm -f "${HOME}/.local/share/winapps/installed.bat"
|
||||||
if (($COUNT == 0)); then
|
if (($COUNT == 0)); then
|
||||||
echo " No configured applications."
|
echo " No configured applications."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureWindows() {
|
function waConfigureWindows() {
|
||||||
echo -n " Configuring Windows..."
|
echo -n " Configuring Windows..."
|
||||||
if [ ${USEDEMO} != 1 ]; then
|
if [ ${USEDEMO} != 1 ]; then
|
||||||
${SUDO} rm -f "${APP_PATH}/windows.desktop"
|
${SUDO} rm -f "${APP_PATH}/windows.desktop"
|
||||||
${SUDO} mkdir -p "${SYS_PATH}/icons"
|
${SUDO} mkdir -p "${SYS_PATH}/icons"
|
||||||
${SUDO} cp "${DIR}/icons/windows.svg" "${SYS_PATH}/icons/windows.svg"
|
${SUDO} cp "${DIR}/icons/windows.svg" "${SYS_PATH}/icons/windows.svg"
|
||||||
echo "[Desktop Entry]
|
echo "[Desktop Entry]
|
||||||
Name=Windows
|
Name=Windows
|
||||||
Exec=${BIN_PATH}/winapps windows %F
|
Exec=${BIN_PATH}/winapps windows %F
|
||||||
Terminal=false
|
Terminal=false
|
||||||
@ -255,119 +255,119 @@ Type=Application
|
|||||||
Icon=${SYS_PATH}/icons/windows.svg
|
Icon=${SYS_PATH}/icons/windows.svg
|
||||||
StartupWMClass=Microsoft Windows
|
StartupWMClass=Microsoft Windows
|
||||||
Comment=Microsoft Windows
|
Comment=Microsoft Windows
|
||||||
" | ${SUDO} tee "${APP_PATH}/windows.desktop" >/dev/null
|
" | ${SUDO} tee "${APP_PATH}/windows.desktop" >/dev/null
|
||||||
${SUDO} rm -f "${BIN_PATH}/windows"
|
${SUDO} rm -f "${BIN_PATH}/windows"
|
||||||
echo "#!/usr/bin/env bash
|
echo "#!/usr/bin/env bash
|
||||||
${BIN_PATH}/winapps windows
|
${BIN_PATH}/winapps windows
|
||||||
" | ${SUDO} tee "/${BIN_PATH}/windows" >/dev/null
|
" | ${SUDO} tee "/${BIN_PATH}/windows" >/dev/null
|
||||||
${SUDO} chmod a+x "${BIN_PATH}/windows"
|
${SUDO} chmod a+x "${BIN_PATH}/windows"
|
||||||
fi
|
fi
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
function waUninstallUser() {
|
function waUninstallUser() {
|
||||||
rm -f "${HOME}/.local/bin/winapps"
|
rm -f "${HOME}/.local/bin/winapps"
|
||||||
rm -rf "${HOME}/.local/share/winapps"
|
rm -rf "${HOME}/.local/share/winapps"
|
||||||
for F in $(grep -l -d skip "bin/winapps" "${HOME}/.local/share/applications/"* -s); do
|
for F in $(grep -l -d skip "bin/winapps" "${HOME}/.local/share/applications/"* -s); do
|
||||||
echo -n " Removing ${F}..."
|
echo -n " Removing ${F}..."
|
||||||
${SUDO} rm ${F}
|
${SUDO} rm ${F}
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
done
|
done
|
||||||
for F in $(grep -l -d skip "bin/winapps" "${HOME}/.local/bin/"* -s); do
|
for F in $(grep -l -d skip "bin/winapps" "${HOME}/.local/bin/"* -s); do
|
||||||
echo -n " Removing ${F}..."
|
echo -n " Removing ${F}..."
|
||||||
${SUDO} rm ${F}
|
${SUDO} rm ${F}
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function waUninstallSystem() {
|
function waUninstallSystem() {
|
||||||
${SUDO} rm -f "/usr/local/bin/winapps"
|
${SUDO} rm -f "/usr/local/bin/winapps"
|
||||||
${SUDO} rm -rf "/usr/local/share/winapps"
|
${SUDO} rm -rf "/usr/local/share/winapps"
|
||||||
for F in $(grep -l -d skip "bin/winapps" "/usr/share/applications/"* -s); do
|
for F in $(grep -l -d skip "bin/winapps" "/usr/share/applications/"* -s); do
|
||||||
if [ -z "${SUDO}" ]; then
|
if [ -z "${SUDO}" ]; then
|
||||||
waNoSudo
|
waNoSudo
|
||||||
fi
|
fi
|
||||||
echo -n " Removing ${F}..."
|
echo -n " Removing ${F}..."
|
||||||
${SUDO} rm ${F}
|
${SUDO} rm ${F}
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
done
|
done
|
||||||
for F in $(grep -l -d skip "bin/winapps" "/usr/local/bin/"* -s); do
|
for F in $(grep -l -d skip "bin/winapps" "/usr/local/bin/"* -s); do
|
||||||
if [ -z "${SUDO}" ]; then
|
if [ -z "${SUDO}" ]; then
|
||||||
waNoSudo
|
waNoSudo
|
||||||
fi
|
fi
|
||||||
echo -n " Removing ${F}..."
|
echo -n " Removing ${F}..."
|
||||||
${SUDO} rm ${F}
|
${SUDO} rm ${F}
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
OPTIONS=(User System)
|
OPTIONS=(User System)
|
||||||
menuFromArr INSTALL_TYPE "Would you like to install for the current user or the whole system?" "${OPTIONS[@]}"
|
menuFromArr INSTALL_TYPE "Would you like to install for the current user or the whole system?" "${OPTIONS[@]}"
|
||||||
elif [ "${1}" = '--user' ]; then
|
elif [ "${1}" = '--user' ]; then
|
||||||
INSTALL_TYPE='User'
|
INSTALL_TYPE='User'
|
||||||
elif [ "${1}" = '--system' ]; then
|
elif [ "${1}" = '--system' ]; then
|
||||||
INSTALL_TYPE='System'
|
INSTALL_TYPE='System'
|
||||||
else
|
else
|
||||||
waUsage
|
waUsage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${INSTALL_TYPE}" = 'User' ]; then
|
if [ "${INSTALL_TYPE}" = 'User' ]; then
|
||||||
SUDO=""
|
SUDO=""
|
||||||
BIN_PATH="${HOME}/.local/bin"
|
BIN_PATH="${HOME}/.local/bin"
|
||||||
APP_PATH="${HOME}/.local/share/applications"
|
APP_PATH="${HOME}/.local/share/applications"
|
||||||
SYS_PATH="${HOME}/.local/share/winapps"
|
SYS_PATH="${HOME}/.local/share/winapps"
|
||||||
mkdir -p $BIN_PATH
|
mkdir -p $BIN_PATH
|
||||||
mkdir -p $APP_PATH
|
mkdir -p $APP_PATH
|
||||||
mkdir -p $SYS_PATH
|
mkdir -p $SYS_PATH
|
||||||
if [ -n "${2}" ]; then
|
if [ -n "${2}" ]; then
|
||||||
if [ "${2}" = '--uninstall' ]; then
|
if [ "${2}" = '--uninstall' ]; then
|
||||||
# Uninstall
|
# Uninstall
|
||||||
echo "Uninstalling..."
|
echo "Uninstalling..."
|
||||||
waUninstallUser
|
waUninstallUser
|
||||||
exit
|
exit
|
||||||
elif [ "${2}" = '--setupAllOfficiallySupportedApps' ]; then
|
elif [ "${2}" = '--setupAllOfficiallySupportedApps' ]; then
|
||||||
echo "Setting up All Officially Supported Apps "
|
echo "Setting up All Officially Supported Apps "
|
||||||
echo "Removing any old configurations..."
|
echo "Removing any old configurations..."
|
||||||
waUninstallUser
|
waUninstallUser
|
||||||
waUninstallSystem
|
waUninstallSystem
|
||||||
waInstall
|
waInstall
|
||||||
waFindInstalled
|
waFindInstalled
|
||||||
waConfigureWindows
|
waConfigureWindows
|
||||||
waConfigureAppsAllOfficiallySupported
|
waConfigureAppsAllOfficiallySupported
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ "${INSTALL_TYPE}" = 'System' ]; then
|
elif [ "${INSTALL_TYPE}" = 'System' ]; then
|
||||||
SUDO="sudo"
|
SUDO="sudo"
|
||||||
sudo ls >/dev/null
|
sudo ls >/dev/null
|
||||||
BIN_PATH="/usr/local/bin"
|
BIN_PATH="/usr/local/bin"
|
||||||
APP_PATH="/usr/share/applications"
|
APP_PATH="/usr/share/applications"
|
||||||
SYS_PATH="/usr/local/share/winapps"
|
SYS_PATH="/usr/local/share/winapps"
|
||||||
if [ -n "${2}" ]; then
|
if [ -n "${2}" ]; then
|
||||||
if [ "${2}" = '--uninstall' ]; then
|
if [ "${2}" = '--uninstall' ]; then
|
||||||
# Uninstall
|
# Uninstall
|
||||||
echo "Uninstalling..."
|
echo "Uninstalling..."
|
||||||
waUninstallSystem
|
waUninstallSystem
|
||||||
exit
|
exit
|
||||||
elif [ "${2}" = '--setupAllOfficiallySupportedApps' ]; then
|
elif [ "${2}" = '--setupAllOfficiallySupportedApps' ]; then
|
||||||
echo "Setting up All Officially Supported Apps "
|
echo "Setting up All Officially Supported Apps "
|
||||||
echo "Removing any old configurations..."
|
echo "Removing any old configurations..."
|
||||||
waUninstallUser
|
waUninstallUser
|
||||||
waUninstallSystem
|
waUninstallSystem
|
||||||
|
|
||||||
echo "Installing..."
|
echo "Installing..."
|
||||||
waInstall
|
waInstall
|
||||||
waFindInstalled
|
waFindInstalled
|
||||||
waConfigureWindows
|
waConfigureWindows
|
||||||
waConfigureAppsAllOfficiallySupported
|
waConfigureAppsAllOfficiallySupported
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Removing any old configurations..."
|
echo "Removing any old configurations..."
|
||||||
|
@ -208,4 +208,3 @@
|
|||||||
<imagelabel>+385601105:+385600513</imagelabel>
|
<imagelabel>+385601105:+385600513</imagelabel>
|
||||||
</seclabel>
|
</seclabel>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
||||||
|