Skip to content

Instantly share code, notes, and snippets.

@TheDaftRick
Forked from flibitijibibo/fnaUpdate.sh
Last active October 24, 2020 20:00
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TheDaftRick/c7948d00203ad618861dfd11e04fb311 to your computer and use it in GitHub Desktop.
Save TheDaftRick/c7948d00203ad618861dfd11e04fb311 to your computer and use it in GitHub Desktop.
FNA update script for Terraria -requires running the game in 64bit
#!/bin/bash
# This script it outdated - please see the original for updates
#
# FNA Update Script
# Written by Ethan "flibitijibibo" Lee
# Edited by TheDaftRick
#
# Released under public domain.
# No warranty implied; use at your own risk.
#
# Linux guide:
# Place this file fnaUpdate.sh in your Terraria folder
# Open your Terraria folder in terminal and run these two commands
# chmod +x fnaUpdate.sh
# ./fnaUpdate.sh -autoarch
# Add a Non-Steam game and select Terraria.bin.x86_64 in your Terraria folder
# Use this to run Terraria (Steam will still see you running the regular version of Terraria with all Steam features working)
#
# If you want to run the 32bit version of Terraria then use this script to update FNA to 1707
# https://gist.github.com/TheDaftRick/d5e49ebbfd8f09ddfb66dc29e775ece1
#
# Run this script in the game's executable folder.
# For OSX this will be Game.app/Contents/MacOS/.
#
# This script requires the following programs:
# - git
# - make
# - dmcs, the Mono C# compiler
# Be Smart. Be Safe.
set -e
# Move to script's directory
cd "`dirname "$0"`"
# Get the system architecture
UNAME=`uname`
ARCH=`uname -m`
# Grab native libraries
curl -O fna.flibitijibibo.com/archive/fnalibs.tar.bz2
if [ "$UNAME" == "Darwin" ]; then
tar xvfj fnalibs.tar.bz2 osx
else
if [ "$ARCH" == "x86_64" ]; then
tar xvfj fnalibs.tar.bz2 lib64
else
tar xvfj fnalibs.tar.bz2 lib
fi
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
fi
sed -i 's/IntPtr mem,/byte[] mem,/g' lib/SDL2-CS/src/SDL2.cs
make release
cd ..
cp FNA/bin/Release/* .
# We out.
echo Complete!
@Tomsod
Copy link

Tomsod commented Oct 24, 2020

Problem 5, Terraria now no longer crashes, but looks like this:


Solution: ??? Is this the end of the line?

It's a bit off-topic, but I must thank you for providing an insight for my own problem. I've just updated from 1.4.0.5, and your screenshots are what Terraria 1.4.1.1 looks for me. Everything is flickering rectangles -- sprites, letters, cursor, everything. But now that I know it's an FNA issue, I was able to rid of this graphics glitch by downgrading FNA.dll to the one provided with 1.4.0.5, and the game seems to work fine. Not the most elegant solution, but I'll take whatever works.

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