Skip to content

Commit

Permalink
Celeste64: new game
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Feb 9, 2024
1 parent e92cb5a commit 6487301
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/updates/Celeste64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

version=$(get_release ExOK/Celeste64)

armhf_url="https://github.com/ExOK/Celeste64/releases/download/v$version/Celeste64-v$version-Linux-arm.zip"
arm64_url="https://github.com/ExOK/Celeste64/releases/download/v$version/Celeste64-v$version-Linux-arm64.zip"

source $GITHUB_WORKSPACE/.github/workflows/update_github_script.sh
1 change: 1 addition & 0 deletions apps/Celeste64/credits
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Extremely OK Games
7 changes: 7 additions & 0 deletions apps/Celeste64/description
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Relive the magic of Celeste Mountain alongside Madeline in this small, heartfelt 3D platformer.
Created in a week(ish) by the Celeste team to celebrate the game’s sixth anniversary!

Controllers are recommended.

To run: Menu -> Games -> Celeste64
To run in a terminal: Celeste64
Binary file added apps/Celeste64/icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/Celeste64/icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions apps/Celeste64/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash

#get version of glibc
glibc_ver="$(ldd --version | head -n1 | awk '{print $NF}')" # example value: 2.30
maj="$(awk -F. '{print $1}' <<<"$glibc_ver")"
min="$(awk -F. '{print $2}' <<<"$glibc_ver")"

#exit if glibc is lower than 2.35
if [ $maj -eq 2 ] && [ $min -ge 30 ] || [ $maj -gt 2 ];then
true
else
error "User error: Celeste64 can only run on Ubuntu Jammy 22.04 or Debian Bookworm 12 and newer."
fi

cd /tmp || error "Could not move to /tmp folder"

version="1.1.1"

#determine filename of download
if [ $arch == 32 ];then
filename="https://github.com/ExOK/Celeste64/releases/download/v$version/Celeste64-v$version-Linux-arm.zip"
elif [ $arch == 64 ];then
filename="https://github.com/ExOK/Celeste64/releases/download/v$version/Celeste64-v$version-Linux-arm64.zip"
fi

status "Downloading the game"
rm -f Celeste64.zip
wget -O Celeste64.zip "$filename"

# create program directory
sudo mkdir -p /usr/local/bin/ /usr/local/share/applications/ /usr/local/share/Celeste64 /usr/local/share/icons/hicolor/64x64/apps/ /usr/local/share/icons/hicolor/24x24/apps/ || error "Could not create required directories!"

status "Installing the game"
# extract game to
sudo unzip -o Celeste64.zip -d /usr/local/share/Celeste64 || error "Failed to unzip game to install folder"
rm -f Celeste64.zip

status "Creating launcher script..."

function version { echo "$@" | awk -F. '{ printf("%d%03d%03d\n", $1,$2,$3); }'; }
if ! command -v glxinfo >/dev/null ;then
install_packages mesa-utils || exit 1
fi

# detect if script is running on a system with OpenGL lower than 3.3
if [ $(version $(glxinfo -B | sed -n "s/^OpenGL version string://p" | awk '{ print $1 }')) -lt $(version "3.3.0") ]; then
warning "You are running a device that is not OpenGL 3.3 compliant or the OpenGL version could not be determined."
warning "Adding a MESA_GL_VERSION_OVERRIDE to 3.3"
echo '#!/bin/bash
DOTNET_EnableArm64AdvSimd=0 MESA_GL_VERSION_OVERRIDE=3.3 /usr/local/share/Celeste64/Celeste64' | sudo tee /usr/local/bin/Celeste64 >/dev/null || error "Failed to create Celeste64 launch script"
else
echo '#!/bin/bash
DOTNET_EnableArm64AdvSimd=0 /usr/local/share/Celeste64/Celeste64' | sudo tee /usr/local/bin/Celeste64 >/dev/null || error "Failed to create Celeste64 launch script"
fi
sudo chmod +x /usr/local/bin/Celeste64 || error "Failed to make launcher script executable!"

sudo cp "$(dirname "$0")/icon-64.png" /usr/local/share/icons/hicolor/64x64/apps/Celeste64.png || error "Failed to install Celeste64 icon!"
sudo cp "$(dirname "$0")/icon-24.png" /usr/local/share/icons/hicolor/24x24/apps/Celeste64.png || error "Failed to install Celeste64 icon!"
# update timestamp of top level icon directory to signal icon cache to be refreshed
sudo touch /usr/local/share/icons/hicolor

status "Adding to applications menu"

sudo tee /usr/local/share/applications/Celeste64.desktop <<'EOF'
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/Celeste64
Terminal=false
Name=Celeste64
Icon=Celeste64
Categories=Game
EOF

status_green "Game installed!"
4 changes: 4 additions & 0 deletions apps/Celeste64/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

purge_packages || exit 1
sudo rm -rf /usr/local/bin/Celeste64 /usr/local/share/Celeste64 /usr/local/share/applications/Celeste64.desktop /usr/local/share/icons/hicolor/64x64/apps/Celeste64.png /usr/local/share/icons/hicolor/24x24/apps/Celeste64.png || error "Could not uninstall Celeste64"
1 change: 1 addition & 0 deletions etc/categories
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ btop++|System Management
Caprine|Internet/Communication
Caskaydia Cove NF|Appearance
Celeste Classic|Games
Celeste64|Games
Chiaki|Games
Chromium|Internet/Browsers
ckb-next|Tools
Expand Down
1 change: 1 addition & 0 deletions etc/category-overrides-jetson-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Autostar|hidden
Better Chromium|hidden
Box86|hidden
Boxy SVG|hidden
Celeste64|hidden
Chiaki|hidden
Codex|hidden
CommanderPi|hidden
Expand Down

0 comments on commit 6487301

Please sign in to comment.