Skip to content

Instantly share code, notes, and snippets.

@Razikus
Created November 1, 2024 12:40
Show Gist options
  • Save Razikus/01bc4a187eaa5077d3456222c1a51857 to your computer and use it in GitHub Desktop.
Save Razikus/01bc4a187eaa5077d3456222c1a51857 to your computer and use it in GitHub Desktop.
Update haven jogl libraries
#!/bin/sh
# check if ~/cache exists
if [ ! -d ~/.cache/haven-launcher/cache/https/game.havenandhearth.com/java/jogl/current/jar/ ]; then
echo "Cache doesn't exist, first try to run haven"
osascript -e 'display dialog "Please run Haven first before continuing." buttons {"OK"} with title "Haven Required" with icon caution'
exit 1
fi
curl -o jogl.7z https://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z
tar -xvf jogl.7z
rm jogl.7z
cp jogamp-all-platforms/jar/jogl-all-natives-macosx-universal.jar ~/.cache/haven-launcher/cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/jogl-all.jar ~/.cache/haven-launcher/cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/gluegen-rt.jar ~/.cache/haven-launcher/cache/https/game.havenandhearth.com/java/jogl/current/jar/
cp jogamp-all-platforms/jar/gluegen-rt-natives-macosx-universal.jar ~/.cache/haven-launcher/cache/https/game.havenandhearth.com/java/jogl/current/jar/
rm -r jogamp-all-platforms
osascript -e 'display dialog "Jogamp libraries have been updated. Run Haven now" buttons {"OK"} with title "Jogamp Updated" with icon note'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment