Skip to content

Commit

Permalink
epm play: add faststone-image-viewer(eterbug #17695)
Browse files Browse the repository at this point in the history
  • Loading branch information
VanoMajukin authored and vitlav committed Sep 14, 2024
1 parent 77216ac commit bb3850f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pack.d/faststone-image-viewer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

TAR="$1"
RETURNTARNAME="$2"
VERSION="$3"

. $(dirname $0)/common.sh

PKGNAME=$PRODUCT-$VERSION.tar

erc unpack $TAR || fatal
mkdir -p opt/eepm-wine/$PRODUCT/

mv FSViewer*/* opt/eepm-wine/$PRODUCT/

cat <<EOF >opt/eepm-wine/$PRODUCT/run.sh
#!/bin/sh
RUNFILE="/opt/eepm-wine/faststone-image-viewer/FSViewer.exe"
exec wine "\$RUNFILE" "\$@"
EOF
chmod 755 opt/eepm-wine/$PRODUCT/run.sh

erc pack $PKGNAME opt/eepm-wine

return_tar $PKGNAME
19 changes: 19 additions & 0 deletions play.d/faststone-image-viewer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

PKGNAME=faststone-image-viewer
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION='An image browser, converter and editor that supports all major graphic formats.'
URL="https://www.faststone.org/FSViewerDetail.htm"

. $(dirname $0)/common.sh

warn_version_is_not_supported

VERSION=$(eget -q -O- "https://www.faststone.org/FSViewerDetail.htm" | grep -o -m 1 "Version [0-9.]\+" | awk '{print $2}')

PKGURL="https://www.faststonesoft.net/DN/FSViewer${VERSION//./}.zip"

install_pack_pkgurl $VERSION


29 changes: 29 additions & 0 deletions repack.d/faststone-image-viewer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"

SPEC="$2"

PRODUCT=faststone-image-viewer
PRODUCTDIR=/opt/eepm-wine/$PRODUCT

. $(dirname $0)/common.sh

add_requires '/usr/bin/wine'

add_bin_link_command $PRODUCT $PRODUCTDIR/run.sh

cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Name=Faststone image viewer
Exec=$PRODUCT %F
Type=Application
StartupNotify=true
Icon=$PRODUCT
StartupWMClass=FSViewer.exe
Categories=Wine;Graphics;
EOF

# copied from unpacked exe file: FSViewer.exe
i=128
install_file ipfs://QmTQMybWanVQBrV5diGrKDnMbU3zWXtG26uTJ8bcjcKKMp /usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png

0 comments on commit bb3850f

Please sign in to comment.