Skip to content

Commit

Permalink
Archimage 4.1 (#19)
Browse files Browse the repository at this point in the history
* Update obs-full-junest.sh

* Update obs-junest.sh
  • Loading branch information
ivan-hc authored Jan 2, 2025
1 parent c34e588 commit 307aa77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 38 deletions.
31 changes: 12 additions & 19 deletions obs-full-junest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,27 +211,20 @@ function _create_AppRun() {
CONTY_DIR="${DATADIR}/Conty/overlayfs_shared"
[ -f /sys/module/nvidia/version ] && nvidia_driver_version="$(cat /sys/module/nvidia/version)"
if [ -n "$nvidia_driver_version" ]; then
[ ! -d "${CONTY_DIR}"/up/usr/share/glvnd ] && ln -s /usr/share/glvnd "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
[ ! -d "${CONTY_DIR}"/up/usr/share/nvidia ] && ln -s /usr/share/nvidia "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
ln -s /usr/share/nvidia "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
mkdir -p "${CONTY_DIR}"/up/usr/lib
if [ ! -f "${CONTY_DIR}"/nvidia/current-nvidia-version ]; then
mkdir -p "${CONTY_DIR}"/nvidia
echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
fi
mkdir -p "${CONTY_DIR}"/nvidia "${CONTY_DIR}"/up/usr/lib "${CONTY_DIR}"/up/usr/share
nvidia_data_dirs="egl glvnd nvidia vulkan"
for d in $nvidia_data_dirs; do [ ! -d "${CONTY_DIR}"/up/usr/share/"$d" ] && ln -s /usr/share/"$d" "${CONTY_DIR}"/up/usr/share/ 2>/dev/null; done
[ ! -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
[ -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && nvidia_driver_conty=$(cat "${CONTY_DIR}"/nvidia/current-nvidia-version)
if [ "${nvidia_driver_version}" != "${nvidia_driver_conty}" ]; then
rm -f "${CONTY_DIR}"/up/usr/lib/*
echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
rm -f "${CONTY_DIR}"/up/usr/lib/*; echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
fi
nvidialibs="libcuda libEGL_nvidia libGLX_nvidia libnvidia libOpenCL libvdpau_nvidia"
for n in $nvidialibs; do
nvidia_libs="$nvidia_libs $(find /usr/lib -name "$n*" -print0 | xargs -0)"
done
for n in $nvidia_libs; do
libname=$(echo "$n" | sed 's:.*/::')
[ ! -f "${CONTY_DIR}"/up/usr/lib/"$libname" ] && cp "$n" "${CONTY_DIR}"/up/usr/lib/
done
/sbin/ldconfig -p > "${CONTY_DIR}"/nvidia/host_libs
grep -i "nvidia\|libcuda" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2 > "${CONTY_DIR}"/nvidia/host_nvidia_libs
libnv_paths=$(grep "libnv" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2)
for f in $libnv_paths; do strings "${f}" | grep -qi -m 1 "nvidia" && echo "${f}" >> "${CONTY_DIR}"/nvidia/host_nvidia_libs; done
nvidia_libs=$(cat "${CONTY_DIR}"/nvidia/host_nvidia_libs)
for n in $nvidia_libs; do libname=$(echo "$n" | sed 's:.*/::') && [ ! -f "${CONTY_DIR}"/up/usr/lib/"$libname" ] && cp "$n" "${CONTY_DIR}"/up/usr/lib/; done
[ -d "${CONTY_DIR}"/up/usr/lib ] && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}":"${CONTY_DIR}"/up/usr/lib:"${LD_LIBRARY_PATH}"
[ -d "${CONTY_DIR}"/up/usr/share ] && export XDG_DATA_DIRS="${XDG_DATA_DIRS}":"${CONTY_DIR}"/up/usr/share:"${XDG_DATA_DIRS}"
fi
Expand Down Expand Up @@ -580,4 +573,4 @@ fi
export ARCH=x86_64
./appimagetool -n --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|OBS-Studio-appimage|continuous-full|*-$ARCH.AppImage.zsync" \
./"$APP".AppDir ./"$(awk -F"=" '/Name=/ {print $2; exit}' ./"$APP".AppDir/*.desktop | sed 's/ /-/g')"-FULL_"$VERSION"-archimage4.1alpha-"$ARCH".AppImage
./"$APP".AppDir ./"$(awk -F"=" '/Name=/ {print $2; exit}' ./"$APP".AppDir/*.desktop | sed 's/ /-/g')"-FULL_"$VERSION"-archimage4.1-"$ARCH".AppImage
32 changes: 13 additions & 19 deletions obs-junest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,33 +203,27 @@ function _create_AppRun() {
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin
[ -z "$NVIDIA_ON" ] && NVIDIA_ON=1
if [ "$NVIDIA_ON" = 1 ]; then
DATADIR="${XDG_DATA_HOME:-$HOME/.local/share}"
CONTY_DIR="${DATADIR}/Conty/overlayfs_shared"
[ -f /sys/module/nvidia/version ] && nvidia_driver_version="$(cat /sys/module/nvidia/version)"
if [ -n "$nvidia_driver_version" ]; then
[ ! -d "${CONTY_DIR}"/up/usr/share/glvnd ] && ln -s /usr/share/glvnd "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
[ ! -d "${CONTY_DIR}"/up/usr/share/nvidia ] && ln -s /usr/share/nvidia "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
ln -s /usr/share/nvidia "${CONTY_DIR}"/up/usr/share/ 2>/dev/null
mkdir -p "${CONTY_DIR}"/up/usr/lib
if [ ! -f "${CONTY_DIR}"/nvidia/current-nvidia-version ]; then
mkdir -p "${CONTY_DIR}"/nvidia
echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
fi
mkdir -p "${CONTY_DIR}"/nvidia "${CONTY_DIR}"/up/usr/lib "${CONTY_DIR}"/up/usr/share
nvidia_data_dirs="egl glvnd nvidia vulkan"
for d in $nvidia_data_dirs; do [ ! -d "${CONTY_DIR}"/up/usr/share/"$d" ] && ln -s /usr/share/"$d" "${CONTY_DIR}"/up/usr/share/ 2>/dev/null; done
[ ! -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
[ -f "${CONTY_DIR}"/nvidia/current-nvidia-version ] && nvidia_driver_conty=$(cat "${CONTY_DIR}"/nvidia/current-nvidia-version)
if [ "${nvidia_driver_version}" != "${nvidia_driver_conty}" ]; then
rm -f "${CONTY_DIR}"/up/usr/lib/*
echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
rm -f "${CONTY_DIR}"/up/usr/lib/*; echo "${nvidia_driver_version}" > "${CONTY_DIR}"/nvidia/current-nvidia-version
fi
nvidialibs="libcuda libEGL_nvidia libGLX_nvidia libnvidia libOpenCL libvdpau_nvidia"
for n in $nvidialibs; do
nvidia_libs="$nvidia_libs $(find /usr/lib -name "$n*" -print0 | xargs -0)"
done
for n in $nvidia_libs; do
libname=$(echo "$n" | sed 's:.*/::')
[ ! -f "${CONTY_DIR}"/up/usr/lib/"$libname" ] && cp "$n" "${CONTY_DIR}"/up/usr/lib/
done
/sbin/ldconfig -p > "${CONTY_DIR}"/nvidia/host_libs
grep -i "nvidia\|libcuda" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2 > "${CONTY_DIR}"/nvidia/host_nvidia_libs
libnv_paths=$(grep "libnv" "${CONTY_DIR}"/nvidia/host_libs | cut -d ">" -f 2)
for f in $libnv_paths; do strings "${f}" | grep -qi -m 1 "nvidia" && echo "${f}" >> "${CONTY_DIR}"/nvidia/host_nvidia_libs; done
nvidia_libs=$(cat "${CONTY_DIR}"/nvidia/host_nvidia_libs)
for n in $nvidia_libs; do libname=$(echo "$n" | sed 's:.*/::') && [ ! -f "${CONTY_DIR}"/up/usr/lib/"$libname" ] && cp "$n" "${CONTY_DIR}"/up/usr/lib/; done
[ -d "${CONTY_DIR}"/up/usr/lib ] && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}":"${CONTY_DIR}"/up/usr/lib:"${LD_LIBRARY_PATH}"
[ -d "${CONTY_DIR}"/up/usr/share ] && export XDG_DATA_DIRS="${XDG_DATA_DIRS}":"${CONTY_DIR}"/up/usr/share:"${XDG_DATA_DIRS}"
fi
Expand Down Expand Up @@ -578,4 +572,4 @@ fi
export ARCH=x86_64
./appimagetool -n --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|OBS-Studio-appimage|latest|*-$ARCH.AppImage.zsync" \
./"$APP".AppDir ./"$(awk -F"=" '/Name=/ {print $2; exit}' ./"$APP".AppDir/*.desktop | sed 's/ /-/g')"_"$VERSION"-archimage4.1alpha-"$ARCH".AppImage
./"$APP".AppDir ./"$(awk -F"=" '/Name=/ {print $2; exit}' ./"$APP".AppDir/*.desktop | sed 's/ /-/g')"_"$VERSION"-archimage4.1-"$ARCH".AppImage

0 comments on commit 307aa77

Please sign in to comment.