mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-03 21:57:18 +02:00
Update installer multi-select
This commit is contained in:
parent
a7b2dce33d
commit
01e0bb3b09
@ -377,16 +377,17 @@ on_checkbox_input_enter() {
|
||||
fi
|
||||
done
|
||||
|
||||
if (( ${#_checkbox_list[@]} <= 5 )); then
|
||||
tput cud $((${#_checkbox_list[@]}-${_current_index}))
|
||||
tput cub "$(tput cols)"
|
||||
|
||||
if (( ${#_checkbox_list[@]} <= 5 )); then
|
||||
for i in $(seq $((${#_checkbox_list[@]}+1))); do
|
||||
tput el1
|
||||
tput el
|
||||
tput cuu1
|
||||
done
|
||||
else
|
||||
tput cud $((6-${_current_row}))
|
||||
tput cub "$(tput cols)"
|
||||
for i in $(seq 8); do
|
||||
tput el1
|
||||
tput el
|
||||
|
19
installer.sh
19
installer.sh
@ -2,6 +2,9 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
MAKEDEMO=0
|
||||
USEDEMO=1
|
||||
|
||||
. "${DIR}/install/inquirer.sh"
|
||||
|
||||
INSTALLED_EXES=()
|
||||
@ -26,9 +29,11 @@ function waInstall() {
|
||||
|
||||
function waFindInstalled() {
|
||||
echo -n " Checking for installed apps in RDP machine (this may take a while)..."
|
||||
if [ $USEDEMO != 1 ]; then
|
||||
rm -f ${HOME}/.local/share/winapps/installed.bat
|
||||
rm -f ${HOME}/.local/share/winapps/installed.tmp
|
||||
rm -f ${HOME}/.local/share/winapps/installed
|
||||
rm -f ${HOME}/.local/share/winapps/detected
|
||||
cp "${DIR}/install/ExtractPrograms.ps1" ${HOME}/.local/share/winapps/ExtractPrograms.ps1
|
||||
for F in $(ls "${DIR}/apps"); do
|
||||
. "${DIR}/apps/${F}/info"
|
||||
@ -56,12 +61,23 @@ function waFindInstalled() {
|
||||
exit
|
||||
fi
|
||||
done
|
||||
if [ $MAKEDEMO = 1 ]; then
|
||||
rm -rf /tmp/winapps_demo
|
||||
cp -a ${HOME}/.local/share/winapps /tmp/winapps_demo
|
||||
exit
|
||||
fi
|
||||
else
|
||||
rm -rf ${HOME}/.local/share/winapps
|
||||
cp -a /tmp/winapps_demo ${HOME}/.local/share/winapps
|
||||
#sleep 3
|
||||
fi
|
||||
echo " Finished."
|
||||
}
|
||||
|
||||
function waConfigureApp() {
|
||||
. "${SYS_PATH}/apps/${1}/info"
|
||||
echo -n " Configuring ${NAME}..."
|
||||
if [ ${USEDEMO} != 1 ]; then
|
||||
${SUDO} rm -f "${APP_PATH}/${1}.desktop"
|
||||
echo "[Desktop Entry]
|
||||
Name=${NAME}
|
||||
@ -79,6 +95,7 @@ MimeType=${MIME_TYPES}
|
||||
${BIN_PATH}/winapps ${1} $@
|
||||
" |${SUDO} tee "${BIN_PATH}/${1}" > /dev/null
|
||||
${SUDO} chmod a+x "${BIN_PATH}/${1}"
|
||||
fi
|
||||
echo " Finished."
|
||||
}
|
||||
|
||||
@ -191,6 +208,7 @@ MIME_TYPES=\"\"
|
||||
|
||||
function waConfigureWindows() {
|
||||
echo -n " Configuring Windows..."
|
||||
if [ ${USEDEMO} != 1 ]; then
|
||||
${SUDO} rm -f "${APP_PATH}/windows.desktop"
|
||||
${SUDO} mkdir -p "${SYS_PATH}/icons"
|
||||
${SUDO} cp "${DIR}/icons/windows.svg" "${SYS_PATH}/icons/windows.svg"
|
||||
@ -209,6 +227,7 @@ Categories=Windows
|
||||
${BIN_PATH}/winapps windows
|
||||
" |${SUDO} tee "/${BIN_PATH}/windows" > /dev/null
|
||||
${SUDO} chmod a+x "${BIN_PATH}/windows"
|
||||
fi
|
||||
echo " Finished."
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user