Very experimental changes to support running AGM functions, such as get_installer or get_steam, from other scripts. Please report if anything breaks. First script using this functionality, conjury-update, added.

This commit is contained in:
Michael Taboada 2023-12-02 21:57:17 -08:00
parent 479a5651b6
commit f85a11b54d
2 changed files with 57 additions and 4 deletions

View File

@ -54,6 +54,8 @@ alert() {
# Check for latest news # Check for latest news
check_news() { check_news() {
# For use by update scripts that want to source functions in this file.
[ "$AGM_NO_LAUNCH" == "yes" ] && return
trap return INT trap return INT
# url for news file # url for news file
local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" local newsFile="https://stormgames.wolfe.casa/media/agm.ogg"
@ -808,6 +810,8 @@ kill_game() {
# launch games that are installed # launch games that are installed
game_launcher() { game_launcher() {
# For use by update scripts that want to source functions in this file.
[ "$AGM_NO_LAUNCH" == "yes" ] && return
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null) mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
if [[ ${#lines} -eq 0 ]]; then if [[ ${#lines} -eq 0 ]]; then
echo "Install some games first." echo "Install some games first."
@ -3311,10 +3315,10 @@ export norh=false # Must install a voice, and rhvoice works easily with 64 bit.
open_url "https://2mb.games/product/2mb-patron/" open_url "https://2mb.games/product/2mb-patron/"
;; ;;
*) *)
[[ -n "${game}" ]] && echo "Game \"${game}\" not found." [ "$AGM_NO_LAUNCH" != "yes" ] && [[ -n "${game}" ]] && echo "Game \"${game}\" not found."
exit 1 [ "$AGM_NO_LAUNCH" != "yes" ] && exit 1
;; ;;
esac esac
winetricks sandbox [ "$AGM_NO_LAUNCH" != "yes" ] && winetricks sandbox
exit 0 [ "$AGM_NO_LAUNCH" != "yes" ] && exit 0

49
game-scripts/conjury-update.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
#
# âe contents of this file are subject to the Common Public Attribution
# License Version 1.0 (the âcenseâ you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# https://opensource.org/licenses/CPAL-1.0. The License is based on the Mozilla Public License Version
# 1.1 but Sections 14 and 15 have been added to cover use of software over a
# computer network and provide for limited attribution for the Original
# Developer. In addition, Exhibit A has been modified to be consistent with
# Exhibit B.
#
# Software distributed under the License is distributed on an â ISâasis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for THE SPecific language governing rights and limitations under the
# License.
#
# The Original Code is audiogame manager.
#
# The Original Developer is not the Initial Developer and is . If
# left blank, the Original Developer is the Initial Developer.
#
# The Initial Developer of the Original Code is Billy "Storm Dragon" Wolfe. All portions of
# the code written by Billy Wolfe are Copyright (c) 2020. All Rights
# Reserved.
#
# Contributor Michael Taboada.
#
# Attribution Copyright Notice: Audiogame manager copyright 2020 Storm Dragon. All rights reserved.
#
# Attribution Phrase (not exceeding 10 words): A Stormux project
#
# Attribution URL: https://stormgames.wolfe.casa
#
# Graphic Image as provided in the Covered Code, if any.
#
# Display of Attribution Information is required in Larger
# Works which are defined in the CPAL as a work which combines Covered Code
# or portions thereof with code not governed by the terms of the CPAL.
# Provisional new functionality to be able to source functions from agm:
export AGM_NO_LAUNCH=yes
source audiogame-manager.sh
# All functions should be available at this point.
export game="Conjury"
export WINEPREFIX="$HOME/.local/wine/conjury"
# Now it should be as simple as running get_steam to redownload the game.
get_steam 2684520 "https://store.steampowered.com/app/2684520/Conjury/"
exit 0