add-transhell

This commit is contained in:
2023-07-31 10:14:24 +08:00
parent 1a12416ad6
commit c144bc5bba
4 changed files with 32 additions and 18 deletions

View File

@@ -121,7 +121,7 @@ echo "Section: utils" >> ./deb-contents/DEBIAN/control
echo "Priority: optional" >> ./deb-contents/DEBIAN/control
echo "Architecture: $DEBIAN_DEB_ARCH" >> ./deb-contents/DEBIAN/control
echo "Maintainer: CongTianKong (gitee.com/CongTianKong)" >> ./deb-contents/DEBIAN/control
echo "Depends: bubblewrap, bash, coreutils, shared-mime-info, xdg-utils" >> ./deb-contents/DEBIAN/control
echo "Depends: bubblewrap, bash, coreutils, shared-mime-info, xdg-utils, transhell" >> ./deb-contents/DEBIAN/control
echo "Description: A script to run programs with newer libc." >> ./deb-contents/DEBIAN/control
echo " package built with make-deb.sh from additional-base-lib project." >> ./deb-contents/DEBIAN/control
echo " libc6 download URL: $LIBC6_DOWNLOAD_URL" >> ./deb-contents/DEBIAN/control
@@ -141,6 +141,10 @@ echo "copy ablrun-appimage script..."
cp ./scripts/ablrun-appimage ./deb-contents/usr/bin/ablrun-appimage
check $?
echo "copy transhell i18n scripts..."
mkdir -p ./deb-contents/usr/share/ablrun/transhell
cp ./scripts/transhell/ablrun_* ./deb-contents/usr/share/ablrun/transhell/
echo "generate ablrun-normal script..."
echo "#!/bin/bash" > ./deb-contents/usr/bin/ablrun-normal
echo "ABL_TARGET_LD_SO_PATH=$LD_SO_LOCATION" >> ./deb-contents/usr/bin/ablrun-normal
@@ -186,10 +190,12 @@ echo "copy libstdc++..."
cp `rooted_readlink ./downloads/libstdc++6/usr/lib/${DEBIAN_MULTIARCH}/libstdc++.so.6 ./downloads/libstdc++6/` "./deb-contents/usr/lib/${DEBIAN_MULTIARCH}/additional-base-lib/libstdc++.so.6"
check $?
echo
echo "build deb package:"
dpkg -b ./deb-contents "./additional-base-lib_${GLIBC_VERSION}-${ABL_VERSION}_${DEBIAN_DEB_ARCH}.deb"
check $?
echo
echo "complete with no error!"
echo "complete with no error!"

View File

@@ -1,23 +1,16 @@
#!/bin/bash
source /opt/durapps/transhell/transhell.sh
load_transhell
if [ "$*" = "" ]
then
echo "usage: $0 [command [arguments ...]]"
echo " The script is part of additional-base-lib. The package provides a"
echo " simple way to solve the compatible problem between application and"
echo " glibc, powered by bubblewrap."
echo -e "${TRANSHELL_CONTENT_USAGE}"
echo -e "${TRANSHELL_CONTENT_ADDITIONAL_BASE_LIB_INFO}"
echo
echo " All the library files, which packed with additional-base-lib,"
echo " are taken from one GNU/Linux distribution. You may found information"
echo " in package control files. The scripts theirselves were created by"
echo " CongTianKong <https://gitee.com/CongTianKong>. There's no lisence"
echo " nor copyright restriction with The script. Feel free to deal with."
echo
echo " This script auto-detects normal executable and appimage, and then"
echo " uses specified script to run either. If you experienced issues,"
echo " you may want to use them directly."
echo " for appimage, you need ablrun-appimage."
echo " for normal executable, you need ablrun-normal."
echo -e "${TRANSHELL_CONTENT_SCRIPT_AUTO_DETECT}"
echo -e "${TRANSHELL_CONTENT_APPIMAGE_INFO}"
echo -e "${TRANSHELL_CONTENT_NORMAL_EXECUTABLE_INFO}"
exit
fi
@@ -33,7 +26,7 @@ else
ABL_FILENAME=`which $1`
if [ "$?" != "0" ]
then
echo "File not exists."
echo -e "${TRANSHELL_CONTENT_FILE_NOT_EXISTS}"
exit 1
fi
fi
@@ -48,3 +41,4 @@ then
fi
exec ablrun-appimage "$@"

View File

@@ -0,0 +1,7 @@
#!/bin/bash
TRANSHELL_CONTENT_USAGE="usage: \$0 [command [arguments ...]]"
TRANSHELL_CONTENT_ADDITIONAL_BASE_LIB_INFO="The script is part of additional-base-lib. The package provides a simple way to solve the compatible problem between application and glibc, powered by bubblewrap."
TRANSHELL_CONTENT_SCRIPT_AUTO_DETECT="This script auto-detects normal executable and appimage, and then uses specified script to run either. If you experienced issues, you may want to use them directly."
TRANSHELL_CONTENT_APPIMAGE_INFO="for appimage, you need ablrun-appimage."
TRANSHELL_CONTENT_NORMAL_EXECUTABLE_INFO="for normal executable, you need ablrun-normal."
TRANSHELL_CONTENT_FILE_NOT_EXISTS="File not exists."

View File

@@ -0,0 +1,7 @@
#!/bin/bash
TRANSHELL_CONTENT_USAGE="使用方法:\$0 [命令 [参数...]]"
TRANSHELL_CONTENT_ADDITIONAL_BASE_LIB_INFO="此脚本是 additional-base-lib 的一部分。该软件包提供了一个简单的方法来解决应用程序和 glibc 之间的兼容性问题,由 bubblewrap 提供支持。"
TRANSHELL_CONTENT_SCRIPT_AUTO_DETECT="此脚本会自动检测普通可执行文件和 AppImage 文件,然后使用指定的脚本运行它们。如果遇到问题,您可以直接使用它们。"
TRANSHELL_CONTENT_APPIMAGE_INFO="对于 AppImage 文件,您需要 ablrun-appimage。"
TRANSHELL_CONTENT_NORMAL_EXECUTABLE_INFO="对于普通可执行文件,您需要 ablrun-normal。"
TRANSHELL_CONTENT_FILE_NOT_EXISTS="文件不存在。"