mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-05 22:57:19 +02:00
Update installer multi-select
This commit is contained in:
parent
a7b2dce33d
commit
01e0bb3b09
@ -377,16 +377,17 @@ on_checkbox_input_enter() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if (( ${#_checkbox_list[@]} <= 5 )); then
|
||||||
tput cud $((${#_checkbox_list[@]}-${_current_index}))
|
tput cud $((${#_checkbox_list[@]}-${_current_index}))
|
||||||
tput cub "$(tput cols)"
|
tput cub "$(tput cols)"
|
||||||
|
|
||||||
if (( ${#_checkbox_list[@]} <= 5 )); then
|
|
||||||
for i in $(seq $((${#_checkbox_list[@]}+1))); do
|
for i in $(seq $((${#_checkbox_list[@]}+1))); do
|
||||||
tput el1
|
tput el1
|
||||||
tput el
|
tput el
|
||||||
tput cuu1
|
tput cuu1
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
tput cud $((6-${_current_row}))
|
||||||
|
tput cub "$(tput cols)"
|
||||||
for i in $(seq 8); do
|
for i in $(seq 8); do
|
||||||
tput el1
|
tput el1
|
||||||
tput el
|
tput el
|
||||||
|
19
installer.sh
19
installer.sh
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
|
MAKEDEMO=0
|
||||||
|
USEDEMO=1
|
||||||
|
|
||||||
. "${DIR}/install/inquirer.sh"
|
. "${DIR}/install/inquirer.sh"
|
||||||
|
|
||||||
INSTALLED_EXES=()
|
INSTALLED_EXES=()
|
||||||
@ -26,9 +29,11 @@ function waInstall() {
|
|||||||
|
|
||||||
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
|
||||||
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
|
||||||
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"
|
||||||
@ -56,12 +61,23 @@ function waFindInstalled() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
done
|
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."
|
echo " Finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
function waConfigureApp() {
|
function waConfigureApp() {
|
||||||
. "${SYS_PATH}/apps/${1}/info"
|
. "${SYS_PATH}/apps/${1}/info"
|
||||||
echo -n " Configuring ${NAME}..."
|
echo -n " Configuring ${NAME}..."
|
||||||
|
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}
|
||||||
@ -79,6 +95,7 @@ MimeType=${MIME_TYPES}
|
|||||||
${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
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,6 +208,7 @@ MIME_TYPES=\"\"
|
|||||||
|
|
||||||
function waConfigureWindows() {
|
function waConfigureWindows() {
|
||||||
echo -n " Configuring Windows..."
|
echo -n " Configuring Windows..."
|
||||||
|
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"
|
||||||
@ -209,6 +227,7 @@ Categories=Windows
|
|||||||
${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
|
||||||
echo " Finished."
|
echo " Finished."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user