diff options
author | TheKoopaKingdom | 2017-12-15 19:13:32 -0500 |
---|---|---|
committer | TheKoopaKingdom | 2017-12-15 19:13:32 -0500 |
commit | e3617207ddb7cde239ca0dd4af6ff98aea87c057 (patch) | |
tree | 9c8e5833c7b4f58505b1ad55775b2476875d35db | |
download | aur-e3617207ddb7cde239ca0dd4af6ff98aea87c057.tar.gz |
Initial commit 🎉.
-rw-r--r-- | .SRCINFO | 33 | ||||
-rwxr-xr-x | PKGBUILD | 114 | ||||
-rwxr-xr-x | check-for-duplicate-lmlms.sh | 25 | ||||
-rwxr-xr-x | com.donutteam.lucas-simpsons-hit-and-run-mod-launcher.desktop | 13 | ||||
-rw-r--r-- | lucas-simpsons-hit-and-run-mod-launcher.png | bin | 0 -> 48645 bytes | |||
-rwxr-xr-x | lucas-simpsons-hit-and-run-mod-launcher.sh | 248 | ||||
-rw-r--r-- | lucas-simpsons-hit-and-run-mod-launcher.xml | 17 | ||||
-rwxr-xr-x | the-simpsons-hit-and-run.desktop | 12 | ||||
-rw-r--r-- | the-simpsons-hit-and-run.png | bin | 0 -> 51670 bytes | |||
-rwxr-xr-x | the-simpsons-hit-and-run.sh | 21 |
10 files changed, 483 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..eec052560791 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = lucas-simpsons-hit-and-run-mod-launcher + pkgdesc = Mod launcher for The Simpsons: Hit & Run. + pkgver = 1.16.2 + pkgrel = 1 + url = https://donutteam.com/ + arch = any + license = unknown + depends = zenity + depends = wine + depends = wine-mono + depends = wine_gecko + depends = winetricks + source = lucas-simpsons-hit-and-run-mod-launcher.zip::https://donutteam.com/apps/Lucas'%20Simpsons%20Hit%20&%20Run%20Mod%20Launcher%201.16.2.zip + source = lucas-simpsons-hit-and-run-mod-launcher.sh + source = the-simpsons-hit-and-run.sh + source = lucas-simpsons-hit-and-run-mod-launcher.xml + source = lucas-simpsons-hit-and-run-mod-launcher.png + source = the-simpsons-hit-and-run.png + source = com.donutteam.lucas-simpsons-hit-and-run-mod-launcher.desktop + source = the-simpsons-hit-and-run.desktop + source = check-for-duplicate-lmlms.sh + md5sums = e5007494840121bdd0bc2431146858e6 + md5sums = eadcf24b2aa741cbd6e8ba4b2a2a0671 + md5sums = 118c8447bee61faba9126b33067799b7 + md5sums = 5cb3ea57491d4252d1e5473c365eb187 + md5sums = 28fcaf84f934fe0d7ce0320bc670d1e0 + md5sums = 4d1053736cc3616ae09c3b3829f3306c + md5sums = 179ffc615c04ddf4c8bcc8ca567264f7 + md5sums = 6b67d38033e5f6f962485e5e9ae9a74c + md5sums = a7952fc64976886f82e00b684bb888e8 + +pkgname = lucas-simpsons-hit-and-run-mod-launcher + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..dbdf874c0a23 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,114 @@ +# Maintainer: Koopa <thekoopakingdom@gmail.com> + +# Verification: +# - All scripts are ran through ShellCheck (Ignoring PKGBUILD related false positives.). +# - This PKGBUILD in particular is ran through namcap. +# - Desktop entries are ran through desktop-file-validate. + +pkgname='lucas-simpsons-hit-and-run-mod-launcher' +pkgver='1.16.2' +pkgrel='1' +pkgdesc="Mod launcher for The Simpsons: Hit & Run." +arch=('any') +url="https://donutteam.com/" +# The mod launcher uses the ZLIB and Lua licenses, but it doesn't make sense to redownload them for +# this because said licenses should be managed by Linux packages, and Windows licenses left up to +# the Windows app to display. The mod launcher itself has no particular license. +license=('unknown') +depends=( + # Zenity is needed for the mod launcher script's dialogs shown while installing the runtime. + 'zenity' + # Wine is needed to run the mod launcher. Currently limited to staging due to a bug in Wine + # stable that prevents .NET 2.0 SP2 from being installed. + 'wine' + # Wine's Mono implementation is needed for booting up an instance of Wine. + 'wine-mono' + # Wine's Gecko implementation is needed for booting up an instance of Wine. + 'wine_gecko' + # Winetricks is needed to install the .NET 3.5 SP1 runtime required by the mod launcher. + 'winetricks' +) +source=( + "$pkgname.zip::https://donutteam.com/apps/\ +Lucas'%20Simpsons%20Hit%20&%20Run%20Mod%20Launcher%20${pkgver}.zip" + "$pkgname.sh" + "the-simpsons-hit-and-run.sh" + "$pkgname.xml" + "$pkgname.png" + "the-simpsons-hit-and-run.png" + "com.donutteam.$pkgname.desktop" + "the-simpsons-hit-and-run.desktop" + "check-for-duplicate-lmlms.sh" +) +md5sums=( + "e5007494840121bdd0bc2431146858e6" # Mod launcher ZIP archive. + "eadcf24b2aa741cbd6e8ba4b2a2a0671" # Mod launcher launcher Bash script. + "118c8447bee61faba9126b33067799b7" # SHAR launcher Bash script. + "5cb3ea57491d4252d1e5473c365eb187" # LMLM/LMLH XML MIME type. + "28fcaf84f934fe0d7ce0320bc670d1e0" # Mod launcher PNG icon. + "4d1053736cc3616ae09c3b3829f3306c" # SHAR launcher PNG icon. + "179ffc615c04ddf4c8bcc8ca567264f7" # Mod launcher desktop entry. + "6b67d38033e5f6f962485e5e9ae9a74c" # SHAR launcher desktop entry. + "a7952fc64976886f82e00b684bb888e8" # LMLM duplicate checking Bash script. +) + +package() { + # Fullscreen: never use the game's fullscreen. Use the resizeable window hack, and your DE's + # native fullscreen function. + + # Install the mod launcher files. + + # Install the Windows executable to /usr/lib/lucas-simpsons-hit-and-run-mod-launcher/ because it's + # an executable, but not meant to be ran as-is. + install -Dm644 "Lucas Simpsons Hit & Run Mod Launcher.exe" "$pkgdir/usr/lib/$pkgname/$pkgname.exe" + # Install the default hacks to /usr/lib/lucas-simpsons-hit-and-run-mod-launcher/hacks/ because + # they are, in a sense, shared objects injected into the game, just in a format for the launcher + # Despite this, the permissions for group and other are still set to non-executable because + # are techincally not ordinary shared objects. + install -Dm644 -t "$pkgdir/usr/lib/$pkgname/hacks/" Hacks/*.lmlh + # Install the default mods to /usr/share/lucas-simpsons-hit-and-run-mod-launcher/mods/ because + # they aren't really shared objects, but just data like textures and models. + install -Dm644 -t "$pkgdir/usr/share/$pkgname/mods/" Mods/*.lmlm + + # Install the launchers. + + install -Dm655 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname" + install -m655 "the-simpsons-hit-and-run.sh" "$pkgdir/usr/bin/the-simpsons-hit-and-run" + + # Install the MIME types. + + install -Dm644 "$pkgname.xml" "$pkgdir/usr/share/mime/packages/$pkgname.xml" + + # Install the icons. + + # At one point, I conisdered installing multiple icon sizes, but went against it because the + # downscaled icons didn't look great, so only the original high quality icons are installed. This + # is the original code for installing a few different sizes: + # for SIZE in 16 32 48 64 128 256; do + # install -Dm644 "$pkgname-$SIZE.png" \ + # "$pkgdir/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/$pkgname.png" + # install -Dm644 "the-simpsons-hit-and-run-$SIZE.png" \ + # "$pkgdir/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/the-simpsons-hit-and-run.png" + # done + + # And here's some code to run in your shell to generate some downscaled images with ImageMagick. + # for SIZE in 16 32 48 64 128 256; do + # convert -resize $SIZEx$SIZE + # the-simpsons-hit-and-run-256.png the-simpsons-hit-and-run-$SIZE.png + # done + install -Dm644 "$pkgname.png" \ + "$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png" + install -m644 "the-simpsons-hit-and-run.png" \ + "$pkgdir/usr/share/icons/hicolor/256x256/apps/the-simpsons-hit-and-run.png" + + # Install the desktop entries. + + install -Dm644 "com.donutteam.$pkgname.desktop" \ + "$pkgdir/usr/share/applications/com.donutteam.$pkgname.desktop" + install -m644 "the-simpsons-hit-and-run.desktop" \ + "$pkgdir/usr/share/applications/the-simpsons-hit-and-run.desktop" + + # Install the helper script. + + install -m655 "check-for-duplicate-lmlms.sh" "$pkgdir/usr/bin/check-for-duplicate-lmlms" +} diff --git a/check-for-duplicate-lmlms.sh b/check-for-duplicate-lmlms.sh new file mode 100755 index 000000000000..704c2ab032c4 --- /dev/null +++ b/check-for-duplicate-lmlms.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +USER_MOD_DIRECOTRY="$HOME/.local/share/lucas-simpsons-hit-and-run-mod-launcher/mods/" +SYSTEM_MOD_DIRECTORY="/usr/share/lucas-simpsons-hit-and-run-mod-launcher/mods/" + +# Modified version of: https://unix.stackexchange.com/a/41615. + +# Find every LMLM file in the user and system mods directory, and print the last element. +DUPLICATE_MOD_PATHS=$(find "$USER_MOD_DIRECOTRY" "$SYSTEM_MOD_DIRECTORY" -maxdepth 1 \ + -name "*.lmlm" -type f -printf '%f\n' | \ + # Sort the list. + sort | \ + # Find the duplicate lines. + uniq -d | \ + # Prepend the user mod directory to the path. + sed -e "s|^|$USER_MOD_DIRECOTRY|g") + +if [[ -n "$DUPLICATE_MOD_PATHS" ]]; then + read -rp "$(echo "$DUPLICATE_MOD_PATHS" | wc -l) duplicate mods found: +$DUPLICATE_MOD_PATHS +Remove duplicate mods? (y/n): " CHOICE + if [[ ${CHOICE,,} = "y" ]]; then + rm "$DUPLICATE_MOD_PATHS" + fi +fi
\ No newline at end of file diff --git a/com.donutteam.lucas-simpsons-hit-and-run-mod-launcher.desktop b/com.donutteam.lucas-simpsons-hit-and-run-mod-launcher.desktop new file mode 100755 index 000000000000..d71dadeb3052 --- /dev/null +++ b/com.donutteam.lucas-simpsons-hit-and-run-mod-launcher.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Name=Lucas' Simpsons Hit & Run Mod Launcher +Name[en_US]=Lucas' Simpsons Hit & Run Mod Launcher +GenericName=Mod Launcher +Comment=Run mods for The Simpsons: Hit & Run. +Icon=lucas-simpsons-hit-and-run-mod-launcher +TryExec=/usr/bin/lucas-simpsons-hit-and-run-mod-launcher +Exec=lucas-simpsons-hit-and-run-mod-launcher %F +MimeType=application/x-lmlm;application/x-lmlh +Categories=Utility +Keywords=SHAR +StartupWMClass=lucas-simpsons-hit-and-run-mod-launcher.exe diff --git a/lucas-simpsons-hit-and-run-mod-launcher.png b/lucas-simpsons-hit-and-run-mod-launcher.png Binary files differnew file mode 100644 index 000000000000..a7c357419805 --- /dev/null +++ b/lucas-simpsons-hit-and-run-mod-launcher.png diff --git a/lucas-simpsons-hit-and-run-mod-launcher.sh b/lucas-simpsons-hit-and-run-mod-launcher.sh new file mode 100755 index 000000000000..b0ce9212c413 --- /dev/null +++ b/lucas-simpsons-hit-and-run-mod-launcher.sh @@ -0,0 +1,248 @@ +#!/bin/bash + +PROGRAM_NAME=${0##*/} + +print_help() +{ + # Keep the help string in its own variable because a single quote in a heredoc messes up syntax + # highlighting. + HELP_STRING="\ +Usage: $PROGRAM_NAME [-hios] [MOD...] +Sets up a Wine prefix and directory structure for and launches Lucas' Simpsons Hit & Run Mod +Launcher. + + -h Show this help message and exit. + -i Reinitialize the data directory for the mod launcher, even if it already exists. + -o If initializing, overwrite the Wine prefix with a new one. + -s If initializing, overwrite existing symlinks in the original data directory without +prompting. + +If no arguments are specified, this script will check to see if the data directory, +~/.local/share/lucas-simpsons-hit-and-run-mod-launcher/, exists, and if not then it will install the +.NET 3.5 runtime and its Service Pack 1 that the mod launcher requiress is installed there. If the +directory does exist, it will be assumed that the runtime is already installed and skip the +installation. -i can be used to override this and force the runtime to be reinstalled. + +Optionally, one or more mods can be specified at the end to be added to the mod listing." + echo "$HELP_STRING" + exit 0 +} + +launch_mod_launcher() +{ + # Technically, wineboot is executed both on a normal run and during the first time initialization, + # but this one doesn't really warrant its own Zenity progress bar because Wine booting after the + # prefix has been created is unsignifigant enough to not really matter, it's pretty quick. + wineboot &> "$WINE_WINEBOOT_LOG_FILE" + + # Enable font smoothing. Running this every launch is suboptimal, but necessary because winecfg + # may reset the setting. + winetricks fontsmooth=rgb &> "$LOG_DIRECTORY/winetricks-fontsmooth.log" + + # Launch the mod launcher in the background, using taskset to avoid a multicore issue. + # We don't have to pass a hacks directory because, the way the structure works out, the launcher + # can already see them anyways. + taskset -c 0 wine "$MOD_LAUNCHER_EXECUTABLE" -mods "Z:/usr/share/$PACKAGE_NAME/mods/" \ + "${MOD_LAUNCHER_ARGUMENTS[@]}" &> "$MOD_LAUNCHER_LOG_FILE" & +} + +#################################################################################################### +### Argument parsing. +#################################################################################################### + +FORCE_INIT=false +OVEWRWRITE_WINE_PREFIX=false +ALWAYS_OVERWRITE_SYMLINKS=false + +while getopts "hios" opt; do + case $opt in + h) + print_help + ;; + i) + FORCE_INIT=true + ;; + o) + OVEWRWRITE_WINE_PREFIX=true + ;; + s) + ALWAYS_OVERWRITE_SYMLINKS=true + ;; + *) + print_help + ;; + esac +done +# Shift the options over to the mod list. +shift "$((OPTIND-1))" + +# Generate "-mod" arguments for the mod launcher from the arguments passed to the end of this +# script. +declare -a MOD_LAUNCHER_ARGUMENTS +for MOD in "$@"; do + MOD_LAUNCHER_ARGUMENTS+=("-mod") + # By defualt, Wine maps the Z drive to "/" on the host filesystem. + MOD_LAUNCHER_ARGUMENTS+=("Z:$MOD") +done + +#################################################################################################### +### Common variables. +#################################################################################################### + +# Suggested package name, reused for most of this launcher's support files. +PACKAGE_NAME="lucas-simpsons-hit-and-run-mod-launcher" + +# Path to mod launcher executable in the system library folder. +MOD_LAUNCHER_EXECUTABLE="/usr/lib/$PACKAGE_NAME/$PACKAGE_NAME.exe" +# Path to the directory where the mod launcher expects its user files to be. We will be symlinking +# the subdirectories here to NEW_USER_DATA_DIRECTORY. +ORIGINAL_USER_DATA_DIRECTORY="$HOME/Documents/My Games/Lucas' Simpsons Hit & Run Mod Launcher" + +# Path to directory in the user's home folder for storing user specific data. +NEW_USER_DATA_DIRECTORY="$HOME/.local/share/$PACKAGE_NAME" +# Path to directory within the user data directory for storing logs. This is something specific to +# this Linux launcher, and is not a part of the original mod launcher. +LOG_DIRECTORY="$NEW_USER_DATA_DIRECTORY/logs" +# Path to the log file for when Wine is booting up. +WINE_WINEBOOT_LOG_FILE="$LOG_DIRECTORY/wine-wineboot.log" +# Path to the log fike for the mod launcher. +MOD_LAUNCHER_LOG_FILE="$LOG_DIRECTORY/$PACKAGE_NAME.log" + +# Architecture for Wine to use. The .NET 3.5 SP1 runtime only works on 32-bit. +export WINEARCH='win32' +# Path to the Wine prefix, in the user data directory.0 +export WINEPREFIX="$NEW_USER_DATA_DIRECTORY/wine/" + +#################################################################################################### +### Initialization and Execution +#################################################################################################### + +# If the user forced initialization via the "-i" argument, or there's no existing user data +# directory. +if [[ "$FORCE_INIT" = true || ! -d "$NEW_USER_DATA_DIRECTORY" ]]; then + # Arguments passed to Zenity that are always the same. + ZENITY_COMMON_ARGUMENTS=( + --title "Lucas' Simpsons Hit & Run Mod Launcher First Time Initialization" + --width 500 + ) + # First time initialization subshell, with progress tracked by Zenity's progress bar. + ( + echo "# Making data directory structure." + + # If the mod launcher has never before been ran, its original directory won't exist. + mkdir -p "$ORIGINAL_USER_DATA_DIRECTORY" + # Use -p to not throw an error if the directory already exists, in the case of forced + # initialization. + mkdir -p "$NEW_USER_DATA_DIRECTORY" + + # Paths to the normal mod launcher directories that will be linked to the user's data directory. + declare -A LINKED_DATA_PATHS=( + ["$NEW_USER_DATA_DIRECTORY/crashes/"]="$ORIGINAL_USER_DATA_DIRECTORY/Crashes" + ["$NEW_USER_DATA_DIRECTORY/mods/"]="$ORIGINAL_USER_DATA_DIRECTORY/Mods" + ["$NEW_USER_DATA_DIRECTORY/saves/"]="$ORIGINAL_USER_DATA_DIRECTORY/Saved Games" + ["$NEW_USER_DATA_DIRECTORY/screenshots/"]="$ORIGINAL_USER_DATA_DIRECTORY/Screenshots" + ) + + for NEW_USER_DATA_SUBDIRECTORY in "${!LINKED_DATA_PATHS[@]}"; do + ORIGINAL_USER_DATA_SUBDIRECTORY=${LINKED_DATA_PATHS[$NEW_USER_DATA_SUBDIRECTORY]} + + echo "# Linking original mod launcher data directory \"$ORIGINAL_USER_DATA_SUBDIRECTORY\" to \ +new data directory $NEW_USER_DATA_SUBDIRECTORY." + + # Define the arguments to be passed to "ln" becuase we'll be appending to them later. + LN_ARGS="-sT" + # Options to change linking behavior. + SKIP_LINK=false + OVERWRITE_LINK=false + + # If there's already a preexisting mod launcher subdirectory that's not a symlink. + if [[ -d "$ORIGINAL_USER_DATA_SUBDIRECTORY" && ! -L "$ORIGINAL_USER_DATA_SUBDIRECTORY" ]]; \ + then + # If there's already a new user mod launcher file/directory/whatever. + if [[ -e "$NEW_USER_DATA_SUBDIRECTORY" ]]; then + if zenity "${ZENITY_COMMON_ARGUMENTS[@]}" --question --text "Both original mod launcher \ +user data subdirectory \"${ORIGINAL_USER_DATA_SUBDIRECTORY/&/&}\" and new user data \ +subdirectory \"$NEW_USER_DATA_SUBDIRECTORY\" already exist. Do you want to use the existing new \ +user data subdirectory (\"$NEW_USER_DATA_SUBDIRECTORY\")?"; then + rm -rf "$ORIGINAL_USER_DATA_SUBDIRECTORY" + else + rm -rf "$NEW_USER_DATA_SUBDIRECTORY" + mv "$ORIGINAL_USER_DATA_SUBDIRECTORY" "$NEW_USER_DATA_SUBDIRECTORY" + fi + fi + + # If there's a symlink/file where preexisting mod launcher data would be. -e isn't used + # because it doesn't include broken symlinks. + elif [[ -f "$ORIGINAL_USER_DATA_SUBDIRECTORY" || -L "$ORIGINAL_USER_DATA_SUBDIRECTORY" ]]; then + if [[ "$ALWAYS_OVERWRITE_SYMLINKS" = true ]] || zenity "${ZENITY_COMMON_ARGUMENTS[@]}" \ + --question --text "Symlink or file at \"${ORIGINAL_USER_DATA_SUBDIRECTORY/&/&}\" \ +already exists. Do you want to replace it? If you're rerunning this after intializing the new \ +directory before, you can click \"Yes\"."; then + OVERWRITE_LINK=true + mkdir -p "$NEW_USER_DATA_SUBDIRECTORY" + else + SKIP_LINK=true + fi + + # If there's no preexisting original mod launcher data. + else + mkdir -p "$NEW_USER_DATA_SUBDIRECTORY" + fi + + if [[ $OVERWRITE_LINK = true ]]; then + LN_ARGS+="f" + fi + + if [[ $SKIP_LINK = false ]]; then + # Link the directory where the mod launcher expects its data to be to our new data + # directory. + ln "$LN_ARGS" "$NEW_USER_DATA_SUBDIRECTORY" "$ORIGINAL_USER_DATA_SUBDIRECTORY" + fi + done + + # Our logging directory is independent of the mod launcher's original data directories. + mkdir -p "$LOG_DIRECTORY" + + # Remove the Wine prefix, if specfied. + if [[ "$OVEWRWRITE_WINE_PREFIX" = true ]]; then + rm -rf "$WINEPREFIX" + fi + + echo "# Booting up Wine." + wineboot &> "$WINE_WINEBOOT_LOG_FILE" + + # Path to the log file for when Winetricks is installing the .NET 3.5 SP1 runtime. + WINETRICKS_DOTNET35SP1_LOG_FILE="$LOG_DIRECTORY/winetricks-dotnet35sp1.log" + + SKIP_WINETRICKS_DOTNET35SP1=false + if [[ $(winetricks list-installed) == *"dotnet35sp1"* ]]; then + echo "# Skipping .NET 3.5 SP1 runtime installation." + SKIP_WINETRICKS_DOTNET35SP1=true + else + echo "# Installing the .NET 3.5 SP1 runtime. This may take a while, use \"tail -f \ +$WINETRICKS_DOTNET35SP1_LOG_FILE\" to track internal status. If the installation hangs on \ +\"Running /usr/bin/wineserver -w.\", run \"WINE_PREFIX=$WINEPREFIX wine taskmgr\", and manually \ +close each process. If an unidentified program encounters a fatal error, it's fine to continue the \ +installation." + fi + + if [[ "$SKIP_WINETRICKS_DOTNET35SP1" = true ]] || winetricks dotnet35sp1 &> \ + "$WINETRICKS_DOTNET35SP1_LOG_FILE" ; then + echo "# Launching the mod launcher." + launch_mod_launcher + else + zenity "${ZENITY_COMMON_ARGUMENTS[@]}" --error --text "Failed to install the .NET 3.5 SP1 \ +runtime. See \"$WINETRICKS_DOTNET35SP1_LOG_FILE\" for more info." + echo "# An error occured while initializing Lucas' Simpsons Hit & Run Mod Launcher. To \ +reinitialize with a new Wine prefix, run \"$PROGRAM_NAME -io\"." + fi + + echo EOF + ) | + zenity "${ZENITY_COMMON_ARGUMENTS[@]}" --progress --pulsate +else + # It's possible the logs have been cleared. + mkdir -p "$LOG_DIRECTORY" + + launch_mod_launcher +fi diff --git a/lucas-simpsons-hit-and-run-mod-launcher.xml b/lucas-simpsons-hit-and-run-mod-launcher.xml new file mode 100644 index 000000000000..f160f6a962fd --- /dev/null +++ b/lucas-simpsons-hit-and-run-mod-launcher.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-lmlm"> + <glob pattern="*.lmlm"/> + <comment>Lucas' Simpsons Hit & Run Mod Launcher Mod</comment> + <acronym>LMLM</acronym> + <expanded-acronym>Lucas' Mod Launcher Mod</expanded-acronym> + <icon name="application-x-lmlm"/> + </mime-type> + <mime-type type="application/x-lmlh"> + <glob pattern="*.lmlh"/> + <comment>Lucas' Simpsons Hit & Run Mod Launcher Hack</comment> + <acronym>LMLH</acronym> + <expanded-acronym>Lucas' Mod Launcher Hack</expanded-acronym> + <icon name="application-x-lmlh"/> + </mime-type> +</mime-info>
\ No newline at end of file diff --git a/the-simpsons-hit-and-run.desktop b/the-simpsons-hit-and-run.desktop new file mode 100755 index 000000000000..32fb5a1ca7ac --- /dev/null +++ b/the-simpsons-hit-and-run.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=The Simpsons Hit & Run +Name[en_US]=The Simpsons Hit & Run +GenericName=Game +Comment=Drive through Springfield in 7 levels of sandbox-style missions and races. +Icon=the-simpsons-hit-and-run +TryExec=/usr/bin/the-simpsons-hit-and-run +Exec=the-simpsons-hit-and-run +Categories=Game;ActionGame;AdventureGame +Keywords=SHAR +StartupWMClass=simpsons.exe diff --git a/the-simpsons-hit-and-run.png b/the-simpsons-hit-and-run.png Binary files differnew file mode 100644 index 000000000000..a7073ba8dd5c --- /dev/null +++ b/the-simpsons-hit-and-run.png diff --git a/the-simpsons-hit-and-run.sh b/the-simpsons-hit-and-run.sh new file mode 100755 index 000000000000..c3aead3ff9f2 --- /dev/null +++ b/the-simpsons-hit-and-run.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +declare SHAR_PATH +USER_SHAR_PATH="$HOME/.local/share/the-simpsons-hit-and-run" +SYSTEM_SHAR_PATH="/usr/share/the-simpsons-hit-and-run" + +if [[ -d "$USER_SHAR_PATH" ]]; then + SHAR_PATH=$USER_SHAR_PATH +elif [[ -d "$SYSTEM_SHAR_PATH" ]]; then + SHAR_PATH=$SYSTEM_SHAR_PATH +else + zenity --title "The Simpsons: Hit & Run" --width 500 --error --text "The Simpsons: Hit & Run \ +game files not found. Please move the contents of your installation to either $USER_SHAR_PATH or \ +$SYSTEM_SHAR_PATH." +fi + +if [[ -n $SHAR_PATH ]]; then + # Set the working directory to the game's directory because it's not able to access its files + # otherwise. + (cd "$SHAR_PATH" && taskset -c 0 wine "$SHAR_PATH/Simpsons.exe") +fi
\ No newline at end of file |