Skip to content

Commit

Permalink
feat(params): option to add steam lib
Browse files Browse the repository at this point in the history
  • Loading branch information
eyzi authored and sr229 committed Dec 25, 2024
1 parent 0dca370 commit 6c61a17
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:20.04

RUN apt-get update
RUN apt-get install --yes bzip2 wget libxext6 libllvm6.0 mesa-utils
RUN apt-get install --yes bzip2 wget libxext6 libllvm6.0 mesa-utils unzip rsync

COPY build.sh /build.sh

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ This GitHub action allows you to make distributable builds of a Ren'Py visual no

- `package`: Specific package to build for. Must be one of the following: `pc`, `mac`, `linux`, `market`, `web`, `android`. Will build for all packages if value is not supported.

- `add-steam-lib`: Whether to include Steam lib. This is necessary if you want your build to work with Steam achievements. Defaults to `false`.

### Outputs

- `dir`: The directory where the files were built to.
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ inputs:
- market
- web
- android
add-steam-lib:
description: "Whether to include Steam lib"
required: false
default: false
type: boolean
outputs:
dir:
description: "The directory where the distributed files exist"
Expand All @@ -33,6 +38,7 @@ runs:
- ${{ inputs.sdk-version }}
- ${{ inputs.project-dir }}
- ${{ inputs.package }}
- ${{ inputs.add-steam-lib }}
branding:
color: 'gray-dark'
icon: 'archive'
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ tar -xf ./${sdk_name}.tar.bz2
rm ./${sdk_name}.tar.bz2
mv ./${sdk_name} ../renpy

if [ $4 = "true" ]; then
steam_lib_name=renpy-$1-steam
echo "Downloading Steam lib (${steam_lib_name})..."
wget -q https://www.renpy.org/dl/$1/${steam_lib_name}.zip
clear

echo "Downloaded Steam lib (${steam_lib_name})..."
echo "Adding Steam lib to Renpy"
unzip -qq ./${steam_lib_name} -d ${steam_lib_name}
rsync -a ${steam_lib_name}/ ../renpy
rm -rf ${steam_lib_name} ${steam_lib_name}.zip
fi

# Note: This will be checked regardless of the version of Ren'Py. Caution is
# advised.
if [ -d "$2/old-game" ]; then
Expand Down

0 comments on commit 6c61a17

Please sign in to comment.