Last active
May 26, 2025 00:00
-
-
Save flibitijibibo/f06e3f60eb66e5462da824e490229591 to your computer and use it in GitHub Desktop.
Use this to update a game's FNA installation!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
# | |
# 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 -O https://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 | |
cd FNA | |
curl -o FNA.Settings.props https://flibitijibibo.com/Terraria.Settings.props | |
fi | |
msbuild /p:Configuration=Release /p:Platform=x86 FNA.sln | |
cd .. | |
cp FNA/bin/Release/* . | |
# We out. | |
echo Complete! |
fnalibs.tar.bz2 do not seem to be part of that flibitijibibo archive link anymore, but rather this link:
https://github.com/FNA-XNA/fnalibs-dailies/actions
this should probably be updated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works fine for Terraria but not as well for tModLoader.
I tried using this for tModLoader, but it seems they use a modified version of FNA. As a result, using the FNA.dll built by this script crashes the game.
You can replace the libraries without any issues though. Run the script in an empty folder. Once the libraries are built (specifically,
libFNA3D.so.0
,libFAudio.so.0
,libSDL2-2.0.so.0
, andlibtheorafile.so
, saved in/lib64
), copy them to/tModLoader/Libraries/Native/Linux/
. It won't crash if you don't replace FNA.dll. However, I’m not sure if tModLoader's libraries are outdated, so replacing them might not have any effect.