Commit 7a8db4eb authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play winbox: use native winbox4 instead windows winbox3 (eterbug #17844)

parent ca6225af
...@@ -3,21 +3,21 @@ ...@@ -3,21 +3,21 @@
TAR="$1" TAR="$1"
RETURNTARNAME="$2" RETURNTARNAME="$2"
VERSION="$3" VERSION="$3"
URL="$4"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
PKGNAME=$PRODUCT-$VERSION.tar mkdir -p opt/$PRODUCT
mkdir -p opt/eepm-wine/$PRODUCT/ erc $TAR || fatal
cat <<EOF >opt/eepm-wine/$PRODUCT/run.sh mv WinBox_Linux/* opt/$PRODUCT
#!/bin/sh
RUNFILE="/opt/eepm-wine/winbox/winbox64.exe" VERSION=$(echo "$URL" | awk -F'/' '{print $6}')
exec wine "\$RUNFILE" "\$@" [ -n "$VERSION" ] || fatal "Can't get package version"
EOF
chmod 755 opt/eepm-wine/$PRODUCT/run.sh PKGNAME=$PRODUCT-$VERSION
cp $TAR opt/eepm-wine/$PRODUCT/ erc pack $PKGNAME.tar opt || fatal
erc pack $PKGNAME opt/eepm-wine
return_tar $PKGNAME return_tar $PKGNAME.tar
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
PKGNAME=winbox PKGNAME=winbox
SUPPORTEDARCHES="x86_64" SUPPORTEDARCHES="x86_64"
VERSION="3.40" VERSION="$2"
DESCRIPTION='Winbox from the official site' DESCRIPTION='Winbox from the official site'
URL="https://mikrotik.com/download" URL="https://mikrotik.com/download"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
warn_version_is_not_supported if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- https://mikrotik.com/download | grep WinBox_Linux.zip | awk -F'/' '{print $6}' | head -n1)
fi
PKGURL="https://download.mikrotik.com/routeros/winbox/$VERSION/WinBox_Linux.zip"
PKGURL="https://mt.lv/winbox64" install_pack_pkgurl
install_pack_pkgurl $VERSION
...@@ -5,13 +5,10 @@ BUILDROOT="$1" ...@@ -5,13 +5,10 @@ BUILDROOT="$1"
SPEC="$2" SPEC="$2"
PRODUCT=winbox PRODUCT=winbox
PRODUCTDIR=/opt/eepm-wine/$PRODUCT
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
add_requires '/usr/bin/wine' add_bin_link_command $PRODUCT /opt/$PRODUCT/WinBox
add_bin_link_command $PRODUCT $PRODUCTDIR/run.sh
cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
[Desktop Entry] [Desktop Entry]
...@@ -20,10 +17,12 @@ Exec=$PRODUCT %F ...@@ -20,10 +17,12 @@ Exec=$PRODUCT %F
Type=Application Type=Application
StartupNotify=true StartupNotify=true
Icon=$PRODUCT Icon=$PRODUCT
StartupWMClass=winbox64.exe StartupWMClass=winbox
Categories=Wine;Network; Categories=Network
EOF EOF
# copied from unpacked exe file: winbox64.exe # copied from unpacked exe file: winbox64.exe
i=48 i=48
install_file ipfs://Qmdkgx2mstbxHtvFuooaUTrRL1tnz5XWh5seiyXQGkTmCW /usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png install_file ipfs://Qmdkgx2mstbxHtvFuooaUTrRL1tnz5XWh5seiyXQGkTmCW /usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png
add_libs_requires
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment