Vassal package in Arch User Repository

Does anyone know when the current version of vassal will be added to the arch user repository? It’s showing version 3.7.8-1 as most recent and it is tagged as out of date. Or is the AUR packager completely independent of the program developers?

I also tried installing/updating with the local file but I got this message:

error: missing package metadata in VASSAL-3.7.12-linux.tar.bz2
error: 'VASSAL-3.7.12-linux.tar.bz2': invalid or corrupted package

I am on ArcoLinux (Arch) running Linux kernel 6.6.34-1-lts

Whoever is packaging for Arch isn’t working with us; I don’t know who that person is. Does the package for 3.7.8 list a maintainer?

Yeah, the person’s username is sunng.

I don’t know if it helps any, but here is the link to vassal’s entry in AUR:

https://aur.archlinux.org/packages/vassal

Is there any way of contacting the package maintainer? I’d have thought there’d be an email address. (Alternatively, you might find a way of contacting them by searching here in the event that they’ve ever posted here about the package.)

That looks like you tried treating the VASSAL archive as a package file. To use the VASSAL linux archive, you just need to extract the files to a local directory, and then run VASSAL.sh from that directory. If you want an icon in your desktop environment, you’ll need to create your own (instructions will vary depending on your DE; Gnome, KDE/Plasma, etc.) to run VASSAL.sh. VASSAL.svg is provided to use as the program icon.

1 Like

It’s possible but I don’t have an Arch account and I can’t figure out the captcha they require to make an account lol.

I was able to log in to the Arch site and got the maintainer’s email address, which I’ve sent you in a PM. Now you can continue running down getting the package updated.

Excellent, thank you. I didn’t have time to figure out their gatekeep question.

I sent him an email. I’ll let you all know if I hear anything back from him.

1 Like

I did hear back from him and he said that he has been a little busy lately and would get the updated package uploaded soon. I just checked and version 3.7.12-1 is available for download if you search with paru/yay.

He also mentioned that he is looking for a co-maintainer for this, due to his schedule, in order to keep timely with the Vassal releases. If there is anyone open to helping out with this you can PM me and I’ll put you in contact.

1 Like

For desktop icons, etc. take a look at the instructions for running VASSAL on SteamDeck or Android. In particular

Create the file ~/Desktop/VASSAL.desktop with the content

[Desktop Entry]
Type=Application
MimeType=application/x-vassal-module;application/x-vassal-log;application/x-vassal-save
Name=VASSAL
Exec=${HOME}/VASSAL-current/VASSAL.sh
Icon=${HOME}/VASSAL-current/VASSAL.svg
Actions=Run;Edit;
Categories=Games

[Desktop Action Run]
Name=Run
Exec=${HOME}/VASSAL-current/VASSAL.sh -l %f
                                   
[Desktop Action Edit]
Name=Edit
Exec=${HOME}/VASSAL-current/VASSAL.sh -e %f

and make it executable

chmod 755 ~/Desktop/VASSAL.desktop

Note, this assumes you have VASSAL installed in ~/VASSAL-current. If you put VASSAL elsewhere (say in /opt/vassal/current), then change ${HOME}/VASSAL-current in the above to the correct path (e.g., /opt/vassal/current).

Also copy the file to ~/.local/share/applications

cp ~/Desktop/VASSAL.desktop ~/.local/share/applications/

Create the file ~/.local/share/mime/packages/application-x-vassal.xml with the content

<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/x-vassal-module">
    <comment>VASSAL module file</comment>
    <glob pattern="*.vmod"/>
    <icon name="application-x-vassal"/>
  </mime-type>
  <mime-type type="application/x-vassal-log">
    <comment>VASSAL log file</comment>
    <glob pattern="*.vlog"/>
    <icon name="application-x-vassal"/>
  </mime-type>
  <mime-type type="application/x-vassal-save">
    <comment>VASSAL save file</comment>
    <glob pattern="*.vsav"/>
    <icon name="application-x-vassal"/>
  </mime-type>
</mime-info>

Copy the VASSAL icon (in say /opt/vassal/current) to /.local/share/icons/hicolor/scalable/mimetypes

cp ~/VASSAL-current/VASSAL.svg  ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-vassal.svg

Finally, update the Desktop registries with the new information

update-desktop-database ~/.local/share/applications
update-mime-database ~/.local/share/mime

This applies to all desktop environments that support the free-desktop standard, including GNOME, KDE, and Xfce.

Ideally, VASSAL would distribute a script or the like that did this set-up. Something like

#!/bin/bash

VASSAL_DIR=`realpath $(dirname $0)`

# --- For logging purposes -------------------------------------------
msg() {
    if test $verb -lt 1 ; then return ; fi

    echo $@
}

# --- Help message ---------------------------------------------------
usage()
{
    cat <<-EOF
	Usage: $0 [OPTIONS]
	
	Options:
	  -h,--help		     This help
	  -u,--user		     Install for current user only
	  -s,--system		     Install system wide
	  -v,--vassal-path DIR	     VASSAL installation (${VASSAL_DIR})
	  -d,--desktop		     Make desktop short-cut
	  -D,--no-desktop	     Do not make desktop short-cut
	  -V,--verbose		     Be verbose
	  -r,--remove                Remove VASSAL desktop integration
	  
	System-wide (-s,--system) requrires super-user privileges.  Run
	this script with f.ex. 'sudo'.

	Default is to install for current user only.

	By default, no desktop short-cut is not installed.
	EOF
}

# --- Delete a file --------------------------------------------------
del_file() {
    file=$1
    msg "Removing $file"
    if test ! -f $file ; then
        echo "$file does not exist" > /dev/stderr
        return 0
    fi
    rm -f $file 
}

# --- Settings -------------------------------------------------------
user=1
verb=0
app=application-x-vassal
rem=0

# --- Handle command line --------------------------------------------
while test $# -gt 0 ; do
    case x$1 in
        x-h|x--help) usage ; exit 0 ;;
        x-u|x--user) user=1 ;;
        x-s|x--system) user=0 ;;
        x-V|x--verbose) verb=1 ;;
        x-v|x--vassal-path) VASSAL_DIR=$2 ; shift ;;
        x-d|x--desktop) desktop_dir=$HOME/Desktop ;;
        x-D|x--no-desktop) desktop_dir= ;;
        x-r|x--remove|x--uninstall) rem=1 ;; 
        *) echo "$0: Unknown option $1" > /dev/stderr ; exit 1 ;;
    esac
    shift
done

# --- Check VASSAL directory -----------------------------------------
if test ! -f $VASSAL_DIR/VASSAL.sh ; then
    echo "$0: '$VASSAL_DIR' is not a valid VASSAL installation" > /dev/stderr
    exit 1
fi

# --- Set prefix and check privileges --------------------------------
if test $user -gt 0 ; then
    prefix=$HOME/.local
else
    prefix=/usr
    if test $UID -ne 0 ; then
        echo "You need super-user permissions to install in ${prefix}" \
             > /dev/stderr
        exit 0
    fi
fi

# --- Set target directories -----------------------------------------
mimetype_dir=$prefix/share/mime/packages
app_dir=$prefix/share/applications
icon_dir=$prefix/share/icons/hicolor/scalable/mimetypes

# --- Show current settings ------------------------------------------
msg "VASSAL installation: $VASSAL_DIR"
msg "Mime-types:          $mimetype_dir"
msg "Applications:        $app_dir"
msg "Icons:               $icon_dir"

# --- Create desktop launcher(s) -------------------------------------
mk_app() {
    if test $rem -gt 0 ; then
        del_file ${app_dir}/${app}.desktop

        if test x$desktop_dir != x ; then
            del_file ${desktop_dir}/${app}.desktop
        fi
        return 0
    fi
    
    msg "Making desktop launcher in ${app_dir}/${app}.desktop"
    
    name=`mktemp`

    cat <<-EOF > ${name}
	[Desktop Entry]
	Type=Application
	MimeType=application/x-vassal-module;application/x-vassal-log;application/x-vassal-save
	Name=VASSAL
	Exec=${VASSAL_DIR}/VASSAL.sh
	Icon=${app}
	Actions=Run;Edit;
	Categories=Games
	
	[Desktop Action Run]
	Name=Run
	Exec=${VASSAL_DIR}/VASSAL.sh -l %f
	                                   
	[Desktop Action Edit]
	Name=Edit
	Exec=${VASSAL_DIR}/VASSAL.sh -e %f
	EOF
    
    chmod a+rx ${name}
    mkdir -p ${app_dir}
    mv ${name} ${app_dir}/${app}.desktop

    if test "x${desktop_dir}" != "x" ; then
        msg "Making user Desktop short-cut"
        cp ${app_dir}/${app}.desktop
    fi
}

# --- Create mime-type database entry --------------------------------
mk_mime() {
    if test $rem -gt 0 ; then
        del_file ${mimetype_dir}/${app}.xml
        return 0
    fi
    
    msg "Making mime-type entry in ${mimetype_dir}/${app}.xml"
    
    name=`mktemp`

    cat <<-EOF > ${name}
	<?xml version="1.0"?>
	<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
	  <mime-type type="application/x-vassal-module">
	    <comment>VASSAL module file</comment>
	    <glob pattern="*.vmod"/>
	    <icon name="${app}"/>
	  </mime-type>
	  <mime-type type="application/x-vassal-log">
	    <comment>VASSAL log file</comment>
	    <glob pattern="*.vlog"/>
	    <icon name="${app}"/>
	  </mime-type>
	  <mime-type type="application/x-vassal-save">
	    <comment>VASSAL save file</comment>
	    <glob pattern="*.vsav"/>
	    <icon name="${app}"/>
	  </mime-type>
	</mime-info>
	EOF

    chmod a+r ${name}
    mkdir -p ${mimetype_dir}
    mv ${name} ${mimetype_dir}/${app}.xml
}

# --- Make icon ------------------------------------------------------
mk_icon() {
    if test $rem -gt 0 ; then
        del_file ${icon_dir}/${app}.svg
        return 0
    fi
    
    msg "Installing icon ${icon_dir}/${app}.svg"

    mkdir -p ${icon_dir}
    cp $VASSAL_DIR/VASSAL.svg ${icon_dir}/${app}.svg
}


# --- Update databases -----------------------------------------------
update_entries() {
    msg "Updating desktop database"
    
    update-desktop-database ${app_dir}
    update-mime-database `dirname ${mimetype_dir}` 
}


# --- Run everything -------------------------------------------------
mk_app
mk_mime
mk_icon
update_entries

#
# EOF
#

Yours,
Christian

1 Like

You just have to change this in the PKGBUILD:

pkgver=3.7.12

And update the first of the md5sums, you can change that to SKIP if you want to