mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-30 03:44:08 -04:00
* CPack: Refactor AppImage and Apple DMG Generation * Switch from linuxdeployqt to linuxdelpoy * Add ARM64 AppImage support * Add support for `.run` installers using `makeself`, an alternative to AppImage * Refactor BashCompletion.cmake * Enable CPack debugging via `WANT_DEBUG_CPACK` * Add `download_binary`, `create_symlink` macros * Qt6: Fix @rpath bug on macOS * Detect and bundle LV2 UI Suil modules (Related #7201) * Allow remote plugins to honor `LMMS_PLUGIN_DIR` * Add .github/workflows/deps-ubuntu-24.04-gcc.txt * Fix waveforms FileDialog Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# Halt on first error
|
|
set -e
|
|
|
|
DESTDIR="/opt/@CPACK_PROJECT_NAME@"
|
|
BASHCOMPLETIONS="/usr/share/bash-completion/completions"
|
|
if [ "$(id -u)" != "0" ]; then
|
|
# Prepend "$HOME" so we can install to a writable location
|
|
DESTDIR="${HOME}${DESTDIR}"
|
|
BASHCOMPLETIONS="${HOME}/.local/share/bash-completion/completions"
|
|
echo "Installing as a regular user to ${DESTDIR}/..."
|
|
else
|
|
echo "Installing as elevated user to ${DESTDIR}/..."
|
|
fi
|
|
|
|
# Deploy @CPACK_PROJECT_NAME_UCASE@
|
|
mkdir -p "${DESTDIR}"
|
|
unalias cp &> /dev/null || true
|
|
cp -rf ./* "${DESTDIR}"
|
|
rm -f "${DESTDIR}/setup.sh"
|
|
mv "${DESTDIR}/AppRun" "${DESTDIR}/@CPACK_PROJECT_NAME@"
|
|
|
|
# Install bash completions
|
|
mkdir -p "${BASHCOMPLETIONS}"
|
|
ln -sf "${DESTDIR}/usr/share/@CPACK_PROJECT_NAME@/bash-completion/completions/@CPACK_PROJECT_NAME@" "${BASHCOMPLETIONS}/@CPACK_PROJECT_NAME@"
|
|
|
|
# Test @CPACK_PROJECT_NAME_UCASE@
|
|
echo "Installation complete... Testing \"@CPACK_PROJECT_NAME@\"..."
|
|
"${DESTDIR}/@CPACK_PROJECT_NAME@" --allowroot --version &> /dev/null
|
|
|
|
# TODO: Register file associations, desktop icon, etc
|
|
|
|
echo "@CPACK_PROJECT_NAME_UCASE@ was installed successfully to ${DESTDIR}. To run:"
|
|
echo " ${DESTDIR}/@CPACK_PROJECT_NAME@" |