Skip to content

Commit

Permalink
Start building releases
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningDroid committed May 18, 2023
1 parent 86dc967 commit 5c91cfc
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BYTEPATH-win32.zip
BYTEPATH.AppImage
BYTEPATH.love
game_64.AppImage
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,42 @@ A replayable arcade shooter with a focus on build theorycrafting. Use a massive

### Running

Note: If I can stick to this long enough I'll start doing releases
**Warning**: running from source or `BYTEPATH.love` and running from a fused release save to different locations.

#### Windows
|OS|not fused|fused|
|---|---|---|
|Windows|`%appdata%\LOVE\BYTEPATH`|`%appdata%\BYTEPATH`|
|Linux|`$XDG_DATA_HOME/love/BYTEPATH`|`$XDG_DATA_HOME/BYTEPATH`|

???
#### Without Steam
##### Windows

#### Linux
1. download `BYTEPATH-win32.zip` from the latest [release](https://github.com/RunningDroid/BYTEPATH/releases)
2. extract & run!

1. install [LÖVE](https://repology.org/project/love/versions) from your distro's repositories or use the latest [appimage](https://github.com/love2d/love/releases)
2. clone this repo
3. cd to where you've cloned the repo and run `love .` (or just run `love /path/to/repo/`)
##### Linux

1. download `BYTEPATH.AppImage` from the latest [release](https://github.com/RunningDroid/BYTEPATH/releases)
2. `chmod +x BYTEPATH.AppImage` & run!

#### With Steam
##### Windows

1. Download `BYTEPATH-win32.zip` from the latest [release](https://github.com/RunningDroid/BYTEPATH/releases)
2. Extract `BYTEPATH-win32.zip` on top of the version installed by Steam
- It's most likely `C:\Program Files (x86)\Steam\steamapps\common\BYTEPATH`
3. Copy `steam_api.dll` from another game and put it in the folder you just extracted
- Or you can grab a `steam_api.dll` from the [Steamworks SDK](https://partner.steamgames.com/downloads/list) instead
4. Enjoy your achievements!

##### Linux

1. Download `game_64.AppImage` from the latest [release](https://github.com/RunningDroid/BYTEPATH/releases)
2. Replace the `game_64.AppImage` Steam has with the one you just downloaded
- It's most likely in `$XDG_DATA_HOME/Steam/steamapps/common/BYTEPATH`
3. Copy `libsteam_api.so` from another game and put it in the same folder as `game_64.AppImage`
- Or you can grab a `libsteam_api.so` from the [Steamworks SDK](https://partner.steamgames.com/downloads/list) instead
4. Enjoy your achievements!

---

Expand Down
75 changes: 75 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/sh -eu
#
# build release binaries for Windows and Linux

current_love_release='11.4'

# get the path to the repo
repo_dir="$(realpath "$(dirname "$0")")"
cd "$repo_dir"

(
# separated by '' (Unit Separator (0x1F) usually rendered as '^_') (Ctrl-v Ctrl-Shift--)
generated_files="BYTEPATH.loveBYTEPATH-win32.zipBYTEPATH.AppImagegame_64.AppImage"

# set IFS to Unit Separator (GitHub doesn't render control characters)
IFS=''
for file in ${generated_files}; do
if [ -e "$file" ]; then
rm "$file"
fi
done
)

# some stuff in the repo doesn't need to be included in the release
# zip's --exclude doesn't exclude directories, test case: `zip -sf --recurse-paths test.zip . --exclude tutorial/ release.sh | grep tutorial`
find . \! -path './tutorial*' \! -path './.git*' \! -path './release.sh' \! -path './BYTEPATH.love' \! -path './resources/BYTEPATH.desktop' | zip -9 --names-stdin BYTEPATH.love

tmp_dir="$(mktemp -d)"
cd "$tmp_dir"

# create a Windows executable
curl --disable --location --output 'love-win32.zip' \
"https://github.com/love2d/love/releases/download/${current_love_release}/love-${current_love_release}-win32.zip"

mkdir love-win32
unzip love-win32.zip -d love-win32
love_dir_name="$(basename love-win32/* )"

cd "love-win32/$love_dir_name"

rm 'readme.txt'
cat "love.exe" "${repo_dir}/BYTEPATH.love" > "BYTEPATH.exe"

cd ..

mv "$love_dir_name" 'BYTEPATH'
zip -9 --recurse-paths 'BYTEPATH-win32.zip' 'BYTEPATH'
mv 'BYTEPATH-win32.zip' "$repo_dir"

cd "$tmp_dir"

# create a Linux appimage
mkdir love-lin64
cd love-lin64

curl --disable --location --output 'love-x86_64.AppImage' \
"https://github.com/love2d/love/releases/download/${current_love_release}/love-${current_love_release}-x86_64.AppImage"
curl --disable --location --remote-name 'https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage'

chmod +x 'love-x86_64.AppImage' 'appimagetool-x86_64.AppImage'
./love-x86_64.AppImage --appimage-extract

cat 'squashfs-root/bin/love' "${repo_dir}/BYTEPATH.love" > 'squashfs-root/bin/BYTEPATH'
chmod +x 'squashfs-root/bin/BYTEPATH'

rm 'squashfs-root/love.desktop'
cp "${repo_dir}/resources/BYTEPATH.desktop" 'squashfs-root/'

./appimagetool-x86_64.AppImage 'squashfs-root' 'BYTEPATH.AppImage'

mv 'BYTEPATH.AppImage' "$repo_dir"

cd "$repo_dir"
rm -r "$tmp_dir"
cp 'BYTEPATH.AppImage' 'game_64.AppImage'
7 changes: 7 additions & 0 deletions resources/BYTEPATH.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=BYTEPATH
Exec=BYTEPATH
Type=Application
Categories=Game;
Terminal=false
Icon=love

0 comments on commit 5c91cfc

Please sign in to comment.