Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use this to update a game's FNA installation!
#!/bin/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.
# For macOS this will be Game.app/Contents/MacOS/.
#
# 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"`"
# Get the system architecture
UNAME=`uname`
# Grab native libraries
curl -O fna.flibitijibibo.com/archive/fnalibs.tar.bz2
if [ "$UNAME" == "Darwin" ]; then
tar xvfj fnalibs.tar.bz2 osx
else
tar xvfj fnalibs.tar.bz2 lib64
fi
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 git://github.com/FNA-XNA/FNA.git
cd FNA
curl -o FNA.Settings.props flibitijibibo.com/Terraria.Settings.props
fi
msbuild /p:Configuration=Release FNA.sln
cd ..
cp FNA/bin/Release/* .
# We out.
echo Complete!
@flibitijibibo

This comment has been minimized.

Copy link
Owner Author

@flibitijibibo flibitijibibo commented Aug 4, 2020

Script has been redone for FNA3D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment