Aninhumer
Guy with scary face.
Despite the development of the PND system, I've seen quite a few people being confused by file placement already.
This could be solved by a quick script that checks if the files exist, and prompts for their location otherwise.
I'm sure many devs are working on much more important bugs, so I thought I'd post this script for packagers to adapt:
(Example for prboom. Untested. Variables possibly incorrect, but you get the idea.)
I'm assuming that anything written to the . local directory by this script will go to the correct appdata/ directory automatically?
This script can also be adapted in various ways, you could run checksums to make sure the file is correct, for example.
Note:
FILE_FILTER takes the form: (Filetype description | ) filter1 (filter2 filter3 ...)
So for example: "Archives (zip/rar/7z) | *.zip *.rar *.7z"
This could be solved by a quick script that checks if the files exist, and prompts for their location otherwise.
I'm sure many devs are working on much more important bugs, so I thought I'd post this script for packagers to adapt:
(Example for prboom. Untested. Variables possibly incorrect, but you get the idea.)
Code:
#!/bin/bash
TARGET="./doom.wad" #The location for the necessary file
TITLE="Locate Doom .wad file" #Window title of file selector
FILE_FILTER="*.wad" #Filter on displayed files
LAUNCH="./prboom" #Command to run after script is finished
if ! ls $TARGET
then
FILE=`zenity --title "$TITLE" --file-selection --file-filter "$FILE_FILTER"`
if [ $? != 0 ]; then exit; fi
cp $FILE $TARGET
fi
exec $LAUNCH
This script can also be adapted in various ways, you could run checksums to make sure the file is correct, for example.
Note:
FILE_FILTER takes the form: (Filetype description | ) filter1 (filter2 filter3 ...)
So for example: "Archives (zip/rar/7z) | *.zip *.rar *.7z"