1
0
Fork 0
forked from lthn/blockchain

fixes to crete manual script in appimage

This commit is contained in:
cryptozoidberg 2023-01-16 22:29:09 +01:00
parent 1b898d2afa
commit f7b44e552b
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 59 additions and 7 deletions

View file

@ -0,0 +1,41 @@
#!/bin/bash -x
script_dir=$( dirname "$(readlink -f "$0")" )
out_dir=~/.local/share/applications
out_file_name="${out_dir}/Zano.desktop"
call_app()
{
pushd $script_dir
usr/bin/Zano "$@"
popd
exit
}
create_desktop_icon()
{
target_file_name=$1
echo "Generating icon file: $target_file_name..."
rm -f "${out_dir}/Zano.png"
rm -f $target_file_name
cp -Rv "${APPDIR}/usr/share/icons/hicolor/256x256/apps/Zano.png" "${out_dir}/Zano.png"
echo [Desktop Entry] | tee -a $target_file_name > /dev/null
echo Version=1.0 | tee -a $target_file_name > /dev/null
echo Name=Zano | tee -a $target_file_name > /dev/null
echo GenericName=Zano | tee -a $target_file_name > /dev/null
echo Comment=Privacy blockchain | tee -a $target_file_name > /dev/null
echo Icon=${out_dir}/Zano.png | tee -a $target_file_name > /dev/null
echo Exec=$0 --deeplink-params=%u | tee -a $target_file_name > /dev/null
echo Terminal=true | tee -a $target_file_name > /dev/null
echo Type=Application | tee -a $target_file_name > /dev/null
echo "Categories=Qt;Utility;" | tee -a $target_file_name > /dev/null
echo "MimeType=x-scheme-handler/zano;" | tee -a $target_file_name > /dev/null
}
create_desktop_icon $out_file_name
xdg-mime default Zano.desktop x-scheme-handler/zano
call_app "$@"

View file

@ -11,6 +11,7 @@
# export QT_PREFIX_PATH=/home/user/Qt5.10.1/5.10.1/gcc_64
# export OPENSSL_ROOT_DIR=/home/user/openssl
# export LINUX_DEPLOY_QT=/home/user/QtDeployment.appimage
# export LINUX_APPIMAGE_TOOL=/home/user/AppImageTool.appimage
ARCHIVE_NAME_PREFIX=zano-linux-x64-
@ -98,28 +99,38 @@ cp -Rv ../../resources/app_icon.svg ./Zano/usr/share/icons/hicolor/scalable/apps
cp -Rv ../../resources/app_icon_256.png ./Zano/usr/share/icons/hicolor/256x256/apps/Zano.png
echo "Exec=$prj_root/build/release/Zano/usr/bin/Zano --no-sandbox --deeplink-params=%u" >> ./Zano/usr/share/applications/Zano.desktop
echo "Exec=$prj_root/build/release/Zano/usr/bin/Zano" >> ./Zano/usr/share/applications/Zano.desktop
if [ $? -ne 0 ]; then
echo "Failed to append deskyop file"
exit 1
fi
$LINUX_DEPLOY_QT ./Zano/usr/share/applications/Zano.desktop -appimage -qmake=$QT_PREFIX_PATH/bin/qmake
$LINUX_DEPLOY_QT ./Zano/usr/share/applications/Zano.desktop -qmake=$QT_PREFIX_PATH/bin/qmake
if [ $? -ne 0 ]; then
echo "Failed to run linuxqtdeployment"
exit 1
fi
rm -f ./Zano-x86_64.AppImage
rm -f $prj_root/build/release/Zano/AppRun
cp -Rv ../../utils/Zano_appimage_wrapper.sh $prj_root/build/release/Zano/AppRun
package_filename=${ARCHIVE_NAME_PREFIX}${version_str}.AppImage
pattern="*.AppImage"
files=( $pattern )
app_image_file=${files[0]}
$LINUX_APPIMAGE_TOOL ./Zano ./$package_filename
if [ $? -ne 0 ]; then
echo "Failed to run appimagetool"
exit 1
fi
mv ./$app_image_file ./$package_filename
#pattern="*.AppImage"
#files=( $pattern )
#app_image_file=${files[0]}
#mv ./$app_image_file ./$package_filename
echo "Build success"