Skip to content

Instantly share code, notes, and snippets.

@evan-goode
Forked from flibitijibibo/fnaUpdate.sh
Last active October 12, 2022 13:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evan-goode/a811f1437af7b3444e2d4155643a377c to your computer and use it in GitHub Desktop.
Save evan-goode/a811f1437af7b3444e2d4155643a377c to your computer and use it in GitHub Desktop.
Use this to update a game's FNA installation!
#!/usr/bin/env bash
# FNA Update Script
# Written by Ethan "flibitijibibo" Lee
#
# Released under public domain.
# No warranty implied; use at your own risk.
#
# Run this script in the game's executable folder.
#
# This script requires the following programs:
# - git
# - msbuild, which should include a C# compiler
#
# You may want to update MonoKickstart as well!
# https://github.com/flibitijibibo/MonoKickstart/tree/master/precompiled
# Be Smart. Be Safe.
set -e
# Move to script's directory
cd "`dirname "$0"`"
# Grab native libraries
curl -L -O fna.flibitijibibo.com/archive/fnalibs.tar.bz2
tar xvfj fnalibs.tar.bz2 lib64
rm fnalibs.tar.bz2 # Wouldn't want to waste disk space, would we...
# Download and build latest FNA
if [ -d "FNA" ]; then
cd FNA
git pull
git submodule update
else
git clone --recursive https://github.com/FNA-XNA/FNA.git
cd FNA
curl -L -o FNA.Settings.props flibitijibibo.com/Terraria.Settings.props
fi
# msbuild /p:Configuration=Release FNA.sln
make release
cd ..
cp FNA/bin/Release/* .
# We out.
echo Complete!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment